An attempt at web development

Posted in rails, web at 6:32 am by wingerz

Recently I volunteered to put together a new website for my wife’s former company, New Sector Alliance (the old site). I figured it was a good way to learn the right way to put a website together. The only customer requirements: Make it look better than the old site, and add in some flashing quotes.

Some of the things I’ve picked up:

  • Creating layouts with div positioning rather than tables: No more fiddling with colspans and rowspans, put your layout boxes wherever you want them, even overlapping or obscuring one another.
  • Nice rounded tabs: I used A List Apart‘s sliding doors approach. Basically it involves creating a (narrow) left image and a (wide) right image of a box with rounded corners, then positioning them as backgrounds with the left image pushed to the upper left and the right image pushed to the upper right. Only the part of the image that covers the tab element shows through. The other neat trick is for changing the background image on a hover event. Rather than switching images or switching the class of an element, you put two images into a single image, stacked on top of each other, then switch the positioning of the image on a hover event.
  • Slick graphical effects: script.aculo.us is one of many Javascript libraries for cool “Web 2.0” effects. It’s pretty easy to use. I created a box that contains changing quotes and used this to fade quotes in and out.
  • More Javascript: Found a simple sortable table script, which I dumped in to display every past project that the company has done (134). Things like this make me happy to know perl.
  • Cross-browser functionality: I haven’t really looked at this yet, but I am not looking forward to it. Some of the stuff doesn’t even render in IE.
  • Development environment: I actually started coding the site up in Ruby on Rails to take advantage of the layout system. I’ve got a default layout that draws the header, main nav menu, and footer. It’s made working with the nav menus much easier (especially for highlighting the item in the menu that matches the page that’s currently being viewed).


Upgrade to Rails 1.1

Posted in rails at 9:08 pm by wingerz

Yeah, yeah, I’m several weeks behind. A quick note for people who are (still) upgrading to Rails 1.1 – if the old Rails gem is still around make sure to edit environment.rb so that the newest gem is loaded.




Posted in dogooder, dreamhost, rails at 8:42 am by wingerz

Yesterday dreamhost just upgraded to a new version of rails, taking doGooder down with it.

While fixing the problem (by following directions to temporarily revert to Rails 1.0), it was kind of lonely:

[admiralty]$ date
Wed Mar 29 06:58:38 PST 2006
[admiralty]$ who
wingerz  pts/0        Mar 29 05:40 ...
wingerz  pts/3        Mar 29 05:40 ...
wingerz  pts/4        Mar 29 06:58 ...
psq      pts/7        Mar 29 00:02 ...
wingerz  pts/13       Mar 28 21:02 ...

Not used to having nearly the entire server to myself.

Also, last week while setting up a cronjob to update the database, I invented a time machine.

[admiralty]$ date
Wed Mar 29 07:02:22 PST 2006
[admiralty]$ date
Wed Mar 29 07:02:21 PST 2006

It only goes 1 second backwards, but it’s a start.