Search

 


Time travelling into the future at a rate of 1s/s

New Photo Album

Posted by Paul McConnon Tue, 09 Jun 2009 23:19:00 GMT

I've completely redesigned the photo album on this site.

Its a much cleaner design with less visual distractions, muted colours to highlight the content and larger thumbnails. The previous album was displayed inline, within the blog layout, and the thumbnails were tiny.

The new layout is liquid; thumbnails flow to fill up the space, as would be expected in a desktop app. The layout looks particularly good on a widescreen monitor.

As with the previous album, it includes Lightbox functionality for displaying images when a thumbnail is clicked. This new album however, resizes display images on the fly to suit the size of the viewers browser window. When viewing on a large screen, images can be rendered up to 1200x1024, when viewing on a smaller screen, much smaller images are shown.

Image sizes are chosen from a list of preset sizes such that they are as large as possible, while still fitting within the browser window.

I have added an unobtrusive slideshow effect by simply 'remote controlling' the Lightbox plugin with javascript.

The album is zero administration and is always up to date. I just synchronise a folder on my computer with a folder on my server and the folders photos show up in the album automagically. The site takes care of thumbnailing and resizing itself.

Technical Info

I coded the whole thing up as a Rails plugin, the source of which I'll be putting on Github in the next few days. I have a few more tests to finish first ;)

The plugin was designed to provide the following benefits:

  • Instant-on
    • Install the plugin
    • Add a call to the route helper and point to the required folder in environment.rb
    • Navigate to the url /concept_album and you have a full working photo album
  • No database required
    • Lightweight info on the albums and images are cached using Rails caching mechanism
  • Minimal configuration
    • Set the folder to create the album for, and the location to store cached images and you're done.
    • Even these are not, strictly-speaking, necessary as sensible defaults are provided.
  • No maintenance tasks required.
    • New images are found automatically and show up immediately. Just copy (FTP, SSH, Upload within your web app) files to the album folder and they'll appear in the album on the site.

       

 

 

Posted in , ,  | Tags , , ,

Speed up slow Rails development in vista

Posted by Paul McConnon Tue, 01 Jul 2008 23:22:00 GMT

I’ve been doing rails development on a Vista box recently and was annoyed by how slow script/server (running mongrel) was to respond.

I am aware that Windows is slower in general for running ruby / rails but this was slooooooow.

I normally start rails development server with the standard ‘ruby script/server’ command…

C:\blah> ruby script\server
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
...

Notice that mongrel binds to 0.0.0.0 (as far as I remember, it used to bind to 127.0.0.1). This does work. But it is very slow, so I tried changing it to bind to 127.0.0.1

C:\blah> ruby script\server -b 127.0.0.1
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://127.0.0.1:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 127.0.0.1:3000
** Starting Rails with development environment...
...

And guess what, a subjective 300-400% increase in responsiveness. This makes the whole development process much more pleasant.

Hope this helps someone.

Tags , ,  | 4081 comments

I got my eeePC!

Posted by Paul McConnon Thu, 08 Nov 2007 21:10:00 GMT

I eeeventually (har har) got my eeePC delivered and I love it.

I already have it pimped out with full-blown Kde and Ruby on Rails, although the included range of software was amazing. You get Amarok music player (I prefer it to ITunes) Photo editor and manager, Open Office, Firefox and Thunderbird and tonnes of other applications all of which look very polished.

Here’s the welcome to rails page!

It’s a fast little fecker for the size, plays DivX without issues. I get about 2 hours of battery when I’m running with WiFi and working it hard. The thing gets surprisingly hot while running, but I suppose that’s to be expected when you cram so much into such a small space.

The keyboard is just big enough for two handed typing and the build quality is very sturdy. As it’s all solid state you don’t have to worry about bangs ruining your hard drive.

All in all I’m very pleased with it and happy to have a computer I can take with me wherever I go.

ps. This article was posted on it, including image editing and secure copying to my website…

Tags ,  | 46 comments | no trackbacks