Erik A. Hanson's Weblog

Archive for the 'Web development' Category

A Rake Task to Concatenate and Compress Javascript Files

Posted: Sunday, March 2nd, 2008    Tags: Javascript, Ruby on Rails, Web development, wshlst.com

A while ago, I wrote about a Ruby script to concatenate and compress Javascript files for my wshlst application. I’ve changed things around a bit since that article, so I thought it was time for an update.
Background
wshlst uses a lot of Javascript. When developing, I want to have all of my JS files listed in [...]

Firing mouse events in tests

Posted: Tuesday, January 1st, 2008    Tags: Javascript, JsUnit, Unit Testing, Web development

The Bad News
Sending mouse events such as click and mouseover in JsUnit tests can be really hard.
More Bad News
Prototype doesn’t make it any easier. Sam Stephenson says:

We would very much like to support it in the future. It’s fairly complicated to implement native event firing across all supported browsers, so in 1.6.0, fire works [...]

My time zone solution: RelativeDate.js and ServerTime.js

Posted: Wednesday, October 31st, 2007    Tags: Javascript, My Software, Ruby on Rails, Web development, wshlst.com

For my wshlst.com project, I needed to show when each item or comment was created or edited. My initial implementation was to just show the time and date of the change, but people who aren’t in the same time zone as my server didn’t like the fact that it showed a different time zone.
I contemplated [...]

wshlst.com: A Webapp With A Pure-Javascript UI

Posted: Thursday, October 25th, 2007    Tags: Javascript, My Software, Web development, wshlst.com

I created a little wish list website called wshlst.com for my family to use. (Read more about it here.) I worked on it a little bit before Christmas last year, and a little bit again this year.
It’s been a lot of fun to write, and one reason is that the entire UI is written in [...]

A Ruby Script to Concatenate and Compress Javascript Files

Posted: Tuesday, October 16th, 2007    Tags: Javascript, Web development

I’ve got an HTML page that includes a bunch of Javascript files, which makes development easy but which hurts performance in production.
The standard solution is to concatenate all the Javascript files into one big file and then compress it. I wanted it to be automated of course, and I wanted to do it at deploy-time, [...]

Element.stylize via Prototype.js

Posted: Friday, May 25th, 2007    Tags: Javascript, Web development

I often want to add a bunch of styles to an element, so I wrote a simple stylize method.

Installing termios gem on Mac OS X

Posted: Saturday, February 3rd, 2007    Tags: Mac OS X, Ruby on Rails, Web development

When installing Capistrano, you should install the termios gem so that your password isn’t echoed when you type it. Easier said than done.

Free Website Monitoring

Posted: Sunday, January 14th, 2007    Tags: Services, Web development

I was looking around for a good website monitoring service or script, and I found Montastic which is a free website monitoring service.

About Me

I'm a software developer and consultant in San Francisco. I mostly develop web apps in Javascript, Java and Rails. There's a little more about me on my LinkedIn profile.

Recent Projects

wshlst.com: a group-oriented wish list website.

BoardsConsult​/​RotationTracker: a site to help medical residents prepare for the U.S. Medical Licensing Exam, and a related site to help medical schools evaluate and track the progress of the residents in their programs.

Jobs

I moderate a few completely free jobs mailing lists with RSS feeds and zero spam: XP jobs, Rails jobs and Mac development jobs. Also, my pals at Pivotal Labs have agile Rails and Java job openings.

Plug: Web Hosting

Looking for cheap shared web hosting and/or domain registration? I've been using DreamHost for years and I've been very happy with them. They offer tons of disk space and bandwidth, one-click installation for apps like WordPress and Gallery, unlimited domains, thousands of email accounts, private domain registration, and more. They are also a nice bunch of folks, not some big dumb company.