Thursday, August 17, 2023

Orem City Candidates

Crystal Muhlestein

  • All for shared values, families, neighborhoods, and community. 
  • Lower fees and fiscal responsibility.
  • Supports family housing - position on high density housing is unclear, might be opposed due to emphasis on family housing.
  • Bachelor's degree from BYU.
  • Works in health care, and substitute teacher at elementary school.
  • Married with kids.
  • Not responding to Facebook posts or email.
Matt McKell
  • CPA and tennis coach.
  • Married with kids.
  • Fiscal responsibility.
  • Supports family housing, protecting neighborhoods.
  • Not responding to email.
Greg Duerden
  • Veteran.
  • Married with kids, grand kids, and great grandkids.
  • Supported separation of Orem schools from Alpine.
  • Supports transition to Constitutional Charter City.
  • Was against Woodbury apartment development Promenade near UVU and Lakeridge Jr. High.
  • Strongly opposed to high density housing.
  • Responds to email. I agree with his response to my inquiry.
Chris Killpack
  • Married with kids.
  • Served mission with the Church of Jesus Christ of Latter-day Saints. Also served as mission president of the Utah Orem mission.
  • Stronger Orem endorses Chris.
  • Manages a business on State Street.
  • Responds to email.
Jeffrey Lambson
  • Opposed splitting Orem from Alpine school district.
  • Supported pause of high density housing construction.
  • Married with kids.
  • Coach of various sports.
  • Supports smart, reasonable development where it makes sense and keeping it away from areas where it doesn't make sense. Sounds like he supports high density housing if it's in the right location.
  • Stronger Orem endorses Jeff.
  • Responds to email.
  • I agree with his response to my email.
Archie Williams III
  • No profile on state website.
  • Facebook page notes that he's a commander at National Royal Rangers Ministry, heavy equipment operator at Geneva Rock Products, and a few other miscellaneous jobs.
  • Single with kids.
  • College includes Salt Lake Baptist College and Orange Coast College.
  • Pro-life, anti-marijuana, anti-illegal drugs, against gay marriage.
  • Supports unions.
  • Supports raising the minimum wage.
  • Didn't post a profile on the state voting website nor a video interview.
Spencer Rands
  • Married with kids.
  • Opposes high density housing that are poorly planned. Supports responsible growth and development.
  • Supports ample funding of public safety departments.
  • Doesn't respond to email.
Heather Fry
  • Married with kids.
  • Supports Family City USA.
  • Seems like she's against high density housing.
  • Responds to email, although her response to my email was severely lacking.
Jenn Gale
  • Swim coach at Orem High.
  • Married with kids.
  • Studying public administration at BYU.
  • Supported upgraded Orem rec center and library hall.
  • Stronger Orem endorses Jenn.
  • Believes Orem residents should be inclusive and compassionate toward all people.
  • Responds to email.
David Garber
  • Wants to abolish zoning, licenses, and regulation. Supports privatizing city-run businesses.
  • Married.
  • Member of and served a couple of missions for the Church of Jesus Christ of Latter-day Saints.
  • Responds to email.
  • I approve of his response to my inquiry.
Mike Carpenter
  • Married with kids.
  • "appropriately manage the remaining growth and potential redevelopment within the city while maintaining the characteristics that have made this such a desirable place to live"
  • Responds to email.
  • I agree with his response to my email.
Wade Sewell
  • BYU alumni.
  • Wants an apparently vastly more limited government.
  • Not happy about city's response to people that are late on their utility bills.
  • Doesn't respond to email.
  • Didn't submit a video to Orem city as a candidate.

Saturday, July 17, 2010

Programmatic Encryption in Java

I'm working on a program in my spare time that requires, among other things, storing a user's password. To avoid storing the password in plain text, I dug around the internet and cobbled together code that will encrypt and decrypt the password. Here's the code:


import javax.crypto.Cipher;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.PBEParameterSpec;

private static final char[] password = new char[] {/*array of any number of
random characters*/};
private static final byte[] salt = new byte[] {/*array of 8 random bytes*/};
private static final String ENCRYPTION_ALGORITHM = "PBEWithMD5AndDES";
private static final PBEKeySpec key = new PBEKeySpec(password, salt, /*random
number, doesn't really matter what the number is*/);

private String decrypt(String value) {
return crypto(value, Cipher.DECRYPT_MODE);
}

private String encrypt(String value) {
return crypto(value, Cipher.ENCRYPT_MODE);
}

private String crypto(String value, int mode) {
String result = "ERROR";
try {
Cipher cipher = Cipher.getInstance(ENCRYPTION_ALGORITHM);
cipher.init(mode, SecretKeyFactory.getInstance(
ENCRYPTION_ALGORITHM).generateSecret(key),
new PBEParameterSpec(key.getSalt(),
key.getIterationCount()));
result = new String(cipher.doFinal(value.getBytes()));
} catch (Exception e) {
log.info("cryption failed: " + e.getMessage());
e.printStackTrace();
}
return result;
}

Monday, November 16, 2009

RESTful Web Services using Eclipse and Jersey

Axis2 wraps everything in XML, and some people prefer Eclipse over Netbeans, but developing a RESTful web services project in Eclipse without Axis is possible even though it is not straight forward. Here are instructions to create a RESTful web services project in Eclipse without Axis:

Setup

  1. Download Eclipse IDE for Java EE Developers (as opposed to Java Developers) from http://www.eclipse.org/downloads/
  2. Download Glassfish from https://glassfish.dev.java.net/downloads/v2.1-b60e.html and follow the instructions on the web page.
  3. Download Jersey 1.1 from https://jersey.dev.java.net/servlets/ProjectDocumentList
  4. Install the Firefox "Poster" add-on

Create the RESTful web service project
  1. Create a new Dynamic Web Project that uses GlassFish v2.x for the Target Runtime
  2. Right-click in the Servers view and create a new GlassFish v2.x server
  3. Create a new package in the Java Resources folder
  4. Create a new Java class in the new package in the Java Resources folder (hereafter referred to as class A)
  5. In the Properties for the project, on the Java Build Path page, in the Libraries tab, click on "Add External JARs"
  6. Find the jsr311-api*.jar in the folder you installed Jersey to, and add it as an external JAR
  7. Add the @Path("insert_a_path_here") annotation right before the declaration of class A
  8. Add a method to class A that has the @GET annotation and the @Produces("application/xml") annotation right before the method declaration
  9. Create another class in the same package as class A (hereafter referred to as class B)
  10. Add the @XmlRootElement(name="insert_a_name_here") right before the declaration of class B
  11. Add some random fields to class B and generate getters and setters for them
  12. Add the @XmlElement annotation from the javax.xml.bind.annotation package right before the getters
  13. Modify class A to return a new instance of class B
  14. Replace the contents of the web.xml file in the WebContent/WEB-INF directory with
  15. <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xsi="http://www.w3.org/2001/XMLSchema-instance" schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <servlet>
    <servlet-name>ServletAdaptor</servlet-name>
    <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>ServletAdaptor</servlet-name>
    <url-pattern>/resources/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    </web-app>

  16. Right-click on the project and choose Run As->Run on server.
  17. Open the Poster plug-in in Firefox and run a GET request on http://localhost:8080/insert_name_of_dynamic_web_project_here/resources/insert_the_path_specified_in_the_annotation_for_class_A_here (modify port numbers as necessary depending on output of GlassFish application deployment in the "Console" tab)
  18. You should get a XML response with the data from class B
  19. El fin!


Note: if you want to return a list of objects, use the following annotations before the getter that returns the list:

@XmlElementWrapper
@XmlElements({@XmlElement(name="element_name")})

where element_name is "suggestion" in the example XML below:

<suggestions>
<suggestion>a suggestion</suggestion>
<suggestion>another suggestion</suggestion>
</suggestions>

Also note that the web.xml and sun-web.xml contain the two parts of the URL before the part specified by the @Path annotation.

Thursday, October 22, 2009

Scalable Online Discussions

Large discussions such as the debate over national health care in the United States could be aided if people could discuss issues with each other more effectively. Generally, the pros and cons are not all gathered together into one central location - news outlets and blogs post their opinions on options they believe are best, and some even discuss both sides of the issue, but both have difficulty doing a complete treatment of the discussion. Invariably, points are left out either through ignorance or bias. But if a central discussion page were to be created that would allow all people to publish the points in the debate as they see fit, if the points were consolidated to eliminate duplication, if points were ranked by importance, and if methods were made available to allow people to collaborate about conflicts regarding the combination of points and their relative importance, the discussion could be rationally made and more people could be educated and convinced as to the rightness of the right side of the discussion.

Discussions of all kinds could take place, from the best way to fix local community problems to choosing the appropriate response to actions by multinational companies and states. Some problems need to be resolved, such as preventing a few people from stifling the opinions of others by removing points simply because they have a majority of users of the site, and to provide proper communication methods to allow people to quickly and effectively discuss resolutions to conflicts. Perhaps the site hosting the discussion pages could provide voice communication so that people can talk to each other. Methods would be put in place so that groups can choose a moderator that would take charge of giving people the floor, and methods to replace moderators with a vote in case the moderator is stifling the opinions of the opposing side of the discussion and to take the floor away from someone that is either intentionally not contributing to the discussion or is attempting to filibuster and the moderator is not already taking the floor away from said person. Such a communication system would also have to support perhaps millions of listeners and participants. The system could also allow the division into groups so that more people can voice their opinions rather than having to wait in a line of 10,000 people.

Sunday, January 18, 2009

Why I Have Not Bought an iPhone

I haven't posted in a while, so here's a post.

I haven't been keeping up with technology recently. Although I wrote some posts about the "fighting" between the hackers and Apple, I have no intention of owning an iPhone. Despite the dramatic price reduction of the 3G over the original, the cost is still to high for me to get one, and the benefit is low.

At the moment, I have a cell phone that cost about $100 that I bought specifically for its camera. With a convenient camera that is small and I should always have with me, if I'm ever in a minor accident, I can just swap information with the other driver, take some pictures proving it was not my fault, then move on. The cops don't seem to care about minor accidents, or at least the minor accident I was in a couple of years ago in a private parking lot that resulted in a dent in the van I was driving. They told me that all they could do is say that the other driver and I were present.

The phone I bought also has some nice features like a calendar, but I still use my paper planner for organizing my time and keeping track of that which I need to do. I find writing in a paper planner to be more convenient than trying to type on a tiny keyboard that is not sufficiently large to allow me to assume the hand positions necessary to type quickly.

As for being able to browse the internet, I have not suffered from not being able to check my email during the times that I am away from a computer. I figure that if someone urgently needs to contact me, they can call me. If they need to contact me, but it does not matter how soon I respond, they can send an email. I try to make sure that I check my email at least once a day (which is easy given my need to use a computer for work and school) which is a sufficient response time for most email communication.

Although the internet can help if I become lost between destinations, or if I want to find a store nearby my current location for something I need, another device does a better job in both cases: a GPS navigation system. A GPS system knows exactly where I am and what I need to do to get there. The GPS system my wife gave me for Christmas can also find places of interest near my current location, wherever that may be, in those rare circumstances that I need to find a store I was not planning on finding before I left a location with a computer.

All in all, I do not see a benefit of owning an iPhone that makes it worth the additional cost over my current cell phone ($100 to buy a phone with a decent camera, $0.18/minute which averages to about $20/month for me since I hardly use phones).

As a side note, I was thinking today how nice it would be if there was a service somewhere in the world that provided free encrypted file storage. To make the system feasible, each client would have to have special software that handled the encryption and decryption of the file system, including managing the keys, so that the user does not have to deal with them. To the user, it would be as if they were using a network file server. To the company running the servers, they would be seeing a bunch of encrypted data passing back and forth between its servers and its clients. The client software would handle the keys and not share them with the servers so that no one that has access to the servers can view the data the clients store there except the clients that own the data. The software used by the clients would have to be open source so that people could be confident that the company hosting the servers has not programmed the clients to send the keys to the company so they can view the data.

As for which encryption would be best, I'm not sure. RSA would do the job, but it isn't necessary since the same person that encrypts the data will decrypt the data. The person would have to be able to copy down the encryption key so that if the client's computer dies, they can still get setup on another computer and access their data. The benefit of such a service lies in the backing up of the data on the remote servers. People would not have to backup their data on their own, and they would have the added benefit of being able to access all of their data from any location that has access to the internet without the problems of USB drives (the limited number of writes before they die, viruses, compatability).

Sunday, September 28, 2008

Patience

Before I begin talking about patience, I would like to reassure you all that my blog is not turning into a religious pulpit. I will occasionally blog about technology and any other topic that suits my fancy. I include posts that consider religious topics because the doctrines of Christ will lead us to live better lives and improve our productivity at our jobs and in anything else we do.

Patience can be misapplied. The case of Eli (1 Samuel 2) could be interpreted in a few different ways. One interpretation of why he didn't restrain his sons is that he was trying to be patient with them. Perhaps he was trying to prevent hurting their feelings or making them look bad by removing them from their office. Perhaps he thought they would repent and do better so he left them in the office so he wouldn't have to remove them and then put them back in soon. Or maybe he was trying to preserve his own reputation: what would people think if he removed his own sons from their office? Would they think that he wasn't a good father and therefore unfit to be the high priest? We can be sure that Eli should have honored God more than his sons, for that was God's accusation (1 Samuel 2:29).

We should be patient in some, if not all, cases. How do we know when to be patient and when not to be patient? Should we always be patient with those that afflict us that are not within our responsibility, and determine on a case-by-case basis for those that are under our responsibility? The Lord suffered all manner of false accusations and physical harm, and he was patient in all His suffering. Whatever we come up with, we can be sure of one thing: we must honor God above all else in our actions and thoughts.

Friday, March 14, 2008

Immigration and the United States

The reasons that immigration shouldn't be opened to anyone that wishes to come include: the need to filter out terrorists, the possible disruption of the economy, and the need to document all those that come so they cannot easily change their identity and hide amongst the people.

As for the need to filter out terrorists, how effective is that? The government of the country of origin could give us a criminal history of the person, but could terrorists somehow sneak into the country? Immigration has become stricter since the terrorist attacks of September 11th, 2001, but how far should the Government go in filtering immigrants?

As for the possible disruption of the economy, the economy has proven to fix itself in many instances. If work becomes scarce, people will move to places with higher demand for labor. The problem of welfare freeloaders could be exacerbated. Many already complain that immigrants are taking their jobs. Such complaining comes from those that are too lazy to find other employment or to rise to the competition that the immigrants supply. Utah County is experiencing a labor shortage that could be alleviated by immigrants that are willing to work. If one believes they aren't getting paid fairly, he should find another job that pays better and switch rather than fight his current employers for higher pay. If everyone acts like this, those that don't pay enough will either have to pay more or go out of business due to a shortage of employees. The trucking industry seems to be in such a position. It has been difficult for them to attract drivers: potential drivers don't seem to believe that the pay compensates for the cost to them to be drivers (time away from family, boredom, long hours). The market will correct itself if everyone plays the market right. In some cases, it is necessary to involve the Federal Government to correct some things. For example, food safety, workplace safety, and the enforcement of contracts. But it would be better for the Government to not meddle with prices or wages: the market will take care of those things.

The need to document people as they enter is necessary since they don't have a birth certificate in the United States, another way must be found to uniquely identify them. Perhaps an immigration record would suffice.

One of the possible reasons Rome finally collapsed in the 500's or 600's was the desire of the Romans to not let the Germanic peoples become part of the empire of Rome. Are we making the same mistake? Shouldn't we be friendly to all? We can be friendly to all and still maintain our interests.