July 15th, 2013 0 comments

I had a project that was almost entirely JavaScript come up with a decent timeline on it. Not to be one to have a completely uninformed opinion I decided that this would be an appropriate time to actually use CoffeScript and find out whether it was worth it.

By way of background I have been a Ruby and JavaScript developer for several years. I'm openly biased against indentation delimited languages, simply because I find them annoying to work in and this has so far caused me to avoid using CoffeeScript for much of anything beyond hello world.

The following are the highlights of just over two weeks of intense development, all of the JavaScript was written in CoffeeScript. ... (continued)

August 4th, 2012 0 comments

I have been asked recently to clearly define my views on government and the use of force. Stated succinctly I believe that every human being has a fundamental core of rights that is theirs because they are human usually termed natural or God-given rights. I also believe that the government is fundamentally based on the use of force and that it is necessary but should exist only as necessary to protect the rights of its citizens as free individuals.

“If men were angels, no government would be necessary.” -- James Madison

I find the core of a human’s rights to be most clearly defined as the right to be unmolested. Specifically, the way I view human or natural or God-given rights is that any person has the right to act as they wish, so long as they are not initiating force against another person. This satisfies and provides a logical control on the intuitive understanding of right and wrong: It is wrong to murder and steal. It is right to stop a murder or a theft.
... (continued)

June 6th, 2012 0 comments

An interesting problem came up today.

One of our models is serializing an arbitrary hash.

This was all well and good until we started looking at runtimes in our controller actions. 34% of runtime was spent parsing YAML.

Experimenting a little, I ran the following test which revealed that JSON.load is two orders of magnitude faster than YAML.load at simple hashes.

This was a shocking result to me, but as I thought about it I realized that YAML exists to store more than just simple hashes, whereas that is all that JSON can do.

It would seem that switching data over from the default YAML to JSON is quite simple.

The problem comes when you have existing data YAML encoded.

I fixed this with a rake task which creates a fake model to avoid other model configurations, validations and automagics and simple parses the YAML and encodes it to JSON. It may not be necessary to create the fake model in the general case, however in my situation where my model is very complicated and doing many different things it was easier to simply eliminate everything.

May 21st, 2012 0 comments

The Annular Solar Eclipse passed straight through St. George today. Interestingly, i got some pictures using my Galaxy Nexus by putting a black paper filter in front of it.

... (continued)
April 12th, 2012 0 comments

I'm going to be presenting this year at the Utah Open Source Conference.

I'll be presenting on two subjects. An introduction to Ruby and an introduction to Capybara.