<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
 
 <title>blog.webandy.com | Andy Atkinson</title>
 
 <link href="http://blog.webandy.com/" />
 <updated>2009-03-28T11:19:07-07:00</updated>
 <id>http://blog.webandy.com/</id>
 <author>
   <name>Andy Atkinson</name>
   <email>andy@webandy.com</email>
 </author>

 
 <link rel="self" href="http://feeds.feedburner.com/webandy" type="application/atom+xml" /><entry>
   <title>Stats-driven lens shopping with Ruby</title>
   <link href="http://feedproxy.google.com/~r/webandy/~3/3CdgGMETDsY/stats-driven-lens-shopping-with-ruby.html" />
   <updated>2009-03-05T00:00:00-08:00</updated>
   <id>http://blog.webandy.com/2009/03/05/stats-driven-lens-shopping-with-ruby</id>
   <content type="html">&lt;h1 id='statsdriven_lens_shopping_with_ruby'&gt;Stats-driven lens shopping with Ruby&lt;/h1&gt;

&lt;p&gt;I purchased a zoom lens for my SLR before a recent vacation, after weighing the pros and cons of two models. One is sharper and faster, but has a smaller focal range (17-50), the other is an &amp;#8220;ultrazoom&amp;#8221; (18-200) with a big range, but slower focusing times and produces &amp;#8220;softer&amp;#8221; results. The lenses were comparably priced.&lt;/p&gt;

&lt;p&gt;I decided that the additional range would be the better purchase, especially for vacation photos (outside, distant subjects, etc.). Well was it? Thanks to some Ruby hacking, I have a few answers. I started with 400 photos from the vacation, but reduced that to 240 in post processing. The stats below reflect what I thought of as the best photos, which to me means the focal length numbers are even more interesting.&lt;/p&gt;

&lt;p&gt;I developed the script &lt;code&gt;photo_stats.rb&lt;/code&gt; below to recurse through photo files in subdirectories and grab EXIF data (thanks to the &lt;a href='http://exifr.rubyforge.org/'&gt;exifr gem&lt;/a&gt;). The script calculates the mean focal distance of all the photos, sums photos at the widest focal distance, maximum distance, and those in the bottom and top quarter of the focal range.&lt;/p&gt;

&lt;p&gt;If you have a similar directory structure (or don&amp;#8217;t mind tweaking the regular expression), this script should work for your photos too! Remember to &lt;code&gt;gem install exifr&lt;/code&gt; first. Have fun!&lt;/p&gt;
&lt;!-- putting a &amp;nbsp; in otherwise converted to self-closing tag --&gt;&lt;script src='http://gist.github.com/74742.js'&gt;&amp;nbsp;&lt;/script&gt;
&lt;h2 id='results'&gt;RESULTS&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;Focal length results for 240 photos
-----------------------------------
72 photos at minimum focal length of 18.0mm
3 photos at maximum focal length of 200.0mm
152 photos in bottom quarter focal distance 18.0-46.0mm
8 photos in top quarter focal distance 154.0-200.0mm
27 photos +/-5mm of overall mean focal length of 45mm&lt;/code&gt;&lt;/pre&gt;</content>
 <feedburner:origLink>http://blog.webandy.com/2009/03/05/stats-driven-lens-shopping-with-ruby.html</feedburner:origLink></entry>
 
 <entry>
   <title>Some hubbub around Githubbub</title>
   <link href="http://feedproxy.google.com/~r/webandy/~3/B292AN6TzbU/githubbub.html" />
   <updated>2009-03-04T00:00:00-08:00</updated>
   <id>http://blog.webandy.com/2009/03/04/githubbub</id>
   <content type="html">&lt;h1 id='some_hubbub_around_githubbub'&gt;Some hubbub around Githubbub&lt;/h1&gt;

&lt;p&gt;&lt;a href='http://github.com/stephencelis/githubbub/tree/master'&gt;Githubbub&lt;/a&gt; is a userscript that can be used with a &lt;a href='http://fluidapp.com/'&gt;Fluid&lt;/a&gt; site-specific browser to add auto-refreshing to the News Feed dashboard page, add &lt;a href='http://growl.info/'&gt;Growl&lt;/a&gt; notifications for new News Feed items, and add a dock badge (red circle with number) showing github private messages count.&lt;/p&gt;

&lt;p&gt;Yesterday I forked the repository because it was not working, and started hacking it up. In the process of trying to fix it, I learned that Fluid userscripts can use &lt;a href='http://jquery.com/'&gt;jquery&lt;/a&gt;, how &lt;a href='https://developer.mozilla.org/en/DOMParser'&gt;DOMParser&lt;/a&gt; can be used to parse XML strings, and that fluid makes growl and dock badges pretty easy: &lt;code&gt;window.fluid.showGrowlNotification&lt;/code&gt; and &lt;code&gt;window.fluid.dockBadge&lt;/code&gt; to add/update those respectively.&lt;/p&gt;

&lt;p&gt;I sent a pull request to &lt;a href='http://github.com/stephencelis'&gt;stephencelis&lt;/a&gt; with some tweaks and some questions (but still broken code). He answered the questions and was even inspired to debug his original code. When doing that he found an unclosed element in the github markup causing XML parsing to fail, and &lt;a href='http://support.github.com/discussions/repos/305-unclosed-input-tag-on-line-46'&gt;filed a ticket with github&lt;/a&gt;. I was confused because DOMParser was returning a &lt;code&gt;document&lt;/code&gt;&amp;#8211;but an invalid one, I see now how the valid document was needed to compare timestamps, thanks stephen! Even though he didn&amp;#8217;t end up merging my fork, I&amp;#8217;m happy to have helped a bit in getting this project back to a working state. Yeah for open source software!&lt;/p&gt;</content>
 <feedburner:origLink>http://blog.webandy.com/2009/03/04/githubbub.html</feedburner:origLink></entry>
 
 <entry>
   <title>Github Pages and Jekyll</title>
   <link href="http://feedproxy.google.com/~r/webandy/~3/QTUQvgOr_e8/github-pages-jeykll.html" />
   <updated>2009-03-04T00:00:00-08:00</updated>
   <id>http://blog.webandy.com/2009/03/04/github-pages-jeykll</id>
   <content type="html">&lt;h1 id='github_pages_and_jekyll'&gt;Github Pages and Jekyll&lt;/h1&gt;

&lt;p&gt;Hello World! This is a new blog powered by &lt;a href='http://pages.github.com/'&gt;Github Pages&lt;/a&gt; and &lt;a href='http://github.com/mojombo/jekyll/tree/master'&gt;Jekyll&lt;/a&gt;. Since Jekyll is built-in to Github Pages, making blog updates is as simple as doing a &lt;code&gt;git push&lt;/code&gt;. I like how the page management aspect moves to the version control system instead of within blog software.&lt;/p&gt;

&lt;p&gt;This system fits my workflow. I can edit in Textmate, preview Markdown (my preference over Textile) formatting with control-option-command-p, add code samples (syntax highlighting CSS is included), commit and push when I&amp;#8217;m done.&lt;/p&gt;

&lt;p&gt;When I want to make this layout fancier, Jekyll uses &lt;a href='http://www.liquidmarkup.org/'&gt;Liquid Templating&lt;/a&gt; and has some view helpers. Jeykll can be installed as a gem and generate a site locally as well, however I didn&amp;#8217;t need to do that to get started. &lt;a href='http://github.com/mojombo/jekyll/tree/master'&gt;mojombo&lt;/a&gt; even encourages using his layouts and CSS to get rolling. Paid github account holders can even map domain names to their user page, nice!&lt;/p&gt;</content>
 <feedburner:origLink>http://blog.webandy.com/2009/03/04/github-pages-jeykll.html</feedburner:origLink></entry>
 
 <entry>
   <title>F1 Webchallenge Team Ruby.mn recap</title>
   <link href="http://feedproxy.google.com/~r/webandy/~3/QkCZBNJ9eNg/f1-webchallenge-team-rubymn.html" />
   <updated>2009-03-01T00:00:00-08:00</updated>
   <id>http://blog.webandy.com/2009/03/01/f1-webchallenge-team-rubymn</id>
   <content type="html">&lt;h1 id='f1_webchallenge_team_rubymn_recap'&gt;F1 Webchallenge Team Ruby.mn recap&lt;/h1&gt;

&lt;p&gt;This year I participated in the &lt;a href='http://f1webchallenge.com/'&gt;F1 Web Challenge&lt;/a&gt;, an event that unites teams of programmers and designers, with non-profits, where the goal is to (re-)build a website in 24 hours. The event is also a competition, one winner is chosen. For the curious, &lt;a href='http://www.sierra-bravo.com/'&gt;Sierra Bravo&lt;/a&gt; (event sponsor) covered the event in depth on their &lt;a href='http://blog.nerdery.com/tag/webchallenge/'&gt;Nerdery blog&lt;/a&gt;. Dig around there for more recap posts from participants.&lt;/p&gt;

&lt;p&gt;Here is a picture of me and &lt;a href='http://twitter.com/samschroeder'&gt;@samschroeder&lt;/a&gt; coding during the event. Photo is by &lt;a href='http://jrmehle.com/'&gt;Jared Mehle&lt;/a&gt; and also posted on &lt;a href='http://jrmehle.com/2009/03/02/sleep-is-for-the-weak/'&gt;his recap blog post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src='/images/f1webchallenge.jpg' alt='F1 Webchallenge Andy and Sam' /&gt;&lt;/p&gt;

&lt;p&gt;The non-profit we were assigned was &amp;#8220;Resource Center of the Americas.&amp;#8221; We have not officially launched the redesigned site yet, I will update this post when the site is live.&lt;/p&gt;

&lt;h2 id='technical_details'&gt;Technical details&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Built new site with &lt;a href='http://radiantcms.org/'&gt;Radiant CMS&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;Built a basic Paypal integration for e-commerce using Website Payments Standard&lt;/li&gt;

&lt;li&gt;Managed Radiant plugins as git submodules&lt;/li&gt;

&lt;li&gt;Github sponsored our team and &lt;a href='http://github.com/blog/364-f1-web-challenge'&gt;wrote a blog post about it&lt;/a&gt;! We used github throughout the competition&lt;/li&gt;

&lt;li&gt;Deployment was managed with capistrano (thanks &lt;a href='http://twitter.com/tomtoday'&gt;@tomtoday&lt;/a&gt;)&lt;/li&gt;

&lt;li&gt;1 year of &lt;a href='http://www.slicehost.com/'&gt;Slicehost VPS hosting&lt;/a&gt; (and t-shirts!) was paid for by a &lt;a href='http://www.trms.com/'&gt;Tightrope Media Systems&lt;/a&gt; sponsorship&lt;/li&gt;

&lt;li&gt;Built a team twitter and flickr aggregator &lt;a href='http://f1.ruby.mn/'&gt;site with Sinatra&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content>
 <feedburner:origLink>http://blog.webandy.com/2009/03/01/f1-webchallenge-team-rubymn.html</feedburner:origLink></entry>
 
 <entry>
   <title>Introducing gadgets and demo generator</title>
   <link href="http://feedproxy.google.com/~r/webandy/~3/UKATqf_SbMc/introducing-gadgets-demo-generator.html" />
   <updated>2008-11-15T00:00:00-08:00</updated>
   <id>http://blog.webandy.com/2008/11/15/introducing-gadgets-demo-generator</id>
   <content type="html">&lt;h1 id='introducing_gadgets_and_demo_generator'&gt;Introducing gadgets and demo generator&lt;/h1&gt;

&lt;p&gt;I started learning DOM scripting and how to work with &lt;a href='http://www.json.org/'&gt;JSON&lt;/a&gt; about a year ago. More recently I&amp;#8217;ve been learning object-oriented JavaScript, and have enjoyed learning the &lt;a href='http://www.prototypejs.org/'&gt;Prototype framework&lt;/a&gt; for its similarities to Ruby. For these reasons, I started creating runnable mini apps that demonstrate what I&amp;#8217;m learning, and serve as code samples for others to read.&lt;/p&gt;

&lt;p&gt;I started managing directories of static files in the public directory of my main Rails app to host these small projects, but I really wanted a separate app. I started making a list of requirements for how to host them.&lt;/p&gt;

&lt;p&gt;With dynamic script tags, calling remote web services does not require a local web server (current projects), but I wanted to have the option of fetching data from a local server since future projects may require that capability. The app needed to be deployable (&lt;a href='http://www.capify.org/'&gt;Capistrano&lt;/a&gt;) and easily hosted (apache virtual host plus &lt;a href='http://www.modrails.com/'&gt;Phusion Passenger&lt;/a&gt;), be written in Ruby, and have an MVC design. Last week I started playing around with &lt;a href='http://merbivore.com/'&gt;Merb&lt;/a&gt; very-flat apps and &lt;a href='http://sinatra.rubyforge.org/'&gt;Sinatra&lt;/a&gt; to evaluate how whether either of those would work, and I decided Sinatra was a good fit.&lt;/p&gt;

&lt;p&gt;When I was getting things set up, I realized I wanted a way to show which mini projects are new, or the updates I&amp;#8217;ve made to existing ones, so I decided to parse a repository commit log to show what is new. As I started thinking about what should go on the landing page, I realized that most of the data I wanted was already available as metadata from the project repository. I wanted to host this on github, so I used &lt;a href='https://code.whytheluckystiff.net/hpricot/'&gt;hpricot&lt;/a&gt; to parse both XML from the official &lt;a href='http://github.com/guides/the-github-api'&gt;GitHub API&lt;/a&gt; and scrape HTML from the project repository metadata, for display on the landing page.&lt;/p&gt;

&lt;p&gt;I settled on the name &amp;#8220;gadgets&amp;#8221; for these small projects, and &amp;#8220;demo generator&amp;#8221; for the Sinatra app. Demo generator basically parses the commit feed, scrapes repository metadata, and builds a list of directories where the gadgets live. I realized I could make this configurable for others to use as well.&lt;/p&gt;

&lt;p&gt;By supplying a user, project, and branch value, demo generator can generate a landing page for your github project too! It currently lives within my gadgets repository, but could be added to other similar projects as a sort of embedded Sinatra app. I&amp;#8217;m not sure if anyone else will actually use this, but I made it generic in case anyone wants to try, please let me know if you do. I thought this was kind of an interesting use of Sinatra, a dynamic page for some simple client-side apps, which could optionally return data from a database or filesystem, is written in Ruby, and has an MVC design.&lt;/p&gt;

&lt;h2 id='links'&gt;Links&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Check out the &lt;a href='http://gadgets.webandy.com/'&gt;gadgets&lt;/a&gt;! (I periodically update them, and add new ones)&lt;/li&gt;

&lt;li&gt;Check out &lt;a href='http://github.com/webandy/gadgets/tree/master'&gt;gadgets and demo generator on github&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content>
 <feedburner:origLink>http://blog.webandy.com/2008/11/15/introducing-gadgets-demo-generator.html</feedburner:origLink></entry>
 
 <entry>
   <title>JavaScript Zoom Effect for Small Photos</title>
   <link href="http://feedproxy.google.com/~r/webandy/~3/HiMT2hnuXi4/javascript-zoom-effect.html" />
   <updated>2008-10-28T00:00:00-07:00</updated>
   <id>http://blog.webandy.com/2008/10/28/javascript-zoom-effect</id>
   <content type="html">&lt;h1 id='javascript_zoom_effect_for_small_photos'&gt;JavaScript Zoom Effect for Small Photos&lt;/h1&gt;

&lt;p&gt;Many personal websites will display photos on the front page of the website, usually in a thumbnail size. Small photos provide context because they show several photos from a given photostream, however they can&amp;#8217;t provide much detail due to their small size.&lt;/p&gt;

&lt;p&gt;To get more detail, a thumbnail may link to an information page where the photo lives, or link to a larger version of the same photo. However these options encourage visitors to leave the site. To retain site visitors, while giving them more detail, a popular effect is to provide a larger version of the photo inline when the photo is clicked. Showing photo metadata in the pop-up gives the visitor even more information. I have integrated a couple of these libraries into the front page of some sites and wanted to give an overview of their features.&lt;/p&gt;

&lt;h2 id='lightbox'&gt;Lightbox&lt;/h2&gt;

&lt;p&gt;One popular approach is the &lt;a href='http://www.huddletogether.com/projects/lightbox/'&gt;Lightbox JS&lt;/a&gt;. Lightboxes are modal windows, which means users cannot click outside the pop-up. Lightboxes force the user to focus on the pop-up content by darkening the area that surrounds it. Lightboxes generally let users navigate multiple items by keyboard, which makes them great for galleries or portfolio websites. However Lightboxes have been criticized for slow load times. When a Lightbox is used for a photo gallery, it is resized for each photo that is a different size than the previous one. Depending on how many items the visitor is viewing through a Lightbox, this approach may be too slow.&lt;/p&gt;

&lt;h2 id='fancyzoom'&gt;FancyZoom&lt;/h2&gt;

&lt;p&gt;Alternatives to Lightboxes take different approaches and have different tradeoffs. The next few libraries here animate the transition as the pop-up opens as well. This technique was pioneered by Cabel Sasser in his &lt;a href='http://www.cabel.name/2008/02/fancyzoom-10.html'&gt;FancyZoom&lt;/a&gt; library. FancyZoom is a great alternative to Lightbox for some applications, though it has downsides addressed by the next library. Additionally, $39 is requested for FancyZoom when it is used on commercial websites.&lt;/p&gt;

&lt;p&gt;John Nunemaker made a &lt;a href='http://orderedlist.com/articles/fancyzoom-meet-prototype'&gt;rewrite of FancyZoom using Prototype&lt;/a&gt;. A convincing reason for me was that it builds on top of Prototype which I include in my site anyway. Additionally I find that the animation is snappier and more pleasing. His version also has rounded corners and supports text and Flash movies embedded in pop-ups as well. I have an example of a &lt;a href='http://webandy.com/2008/6/23/chicago-weekend-2008'&gt;Flash movie of photos from a recent trip&lt;/a&gt; here. Google hosts the Prototype and scriptaculous libraries which provides an additional speed improvement. The &lt;a href='http://github.com/jnunemaker/fancy-zoom/tree/master'&gt;John Nunemaker FancyZoom rewrite&lt;/a&gt; is open source and has a &lt;a href='http://orderedlist.com/demos/fancy-zoom/'&gt;demo site here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A potential disadvantage of FancyZoom is that it requires all content to be loaded on the page. Since there is no round trip to the server when photos are clicked, the pop-up animation is faster, but for sites with large images, it probably makes more sense to load images via ajax.&lt;/p&gt;

&lt;h2 id='highslide_js'&gt;Highslide JS&lt;/h2&gt;

&lt;p&gt;The library I used before FancyZoom was &lt;a href='http://highslide.com/'&gt;Highslide JS&lt;/a&gt;. Highslide is loaded with features and supports basically everything I&amp;#8217;ve mentioned so far and more, including the ability to move pop-ups around on the page, auto-play slideshows, and pause playback with the spacebar. The library is broken apart so users can remove pieces that are not needed, which helps reduce client download time. Highslide makes the best gallery in my opinion, since it supports loading large images via ajax, is keyboard navigable, easy to style, and returns the user to the original view after the last item is displayed. Check out the &lt;a href='http://highslide.com/#examples'&gt;Highslide examples&lt;/a&gt; and &lt;a href='http://highslide.com/index.htm'&gt;Barebones samples&lt;/a&gt;. Highslide is free for non-commercial use. Prices start at $29 for commercial websites.&lt;/p&gt;</content>
 <feedburner:origLink>http://blog.webandy.com/2008/10/28/javascript-zoom-effect.html</feedburner:origLink></entry>
 
 <entry>
   <title>Rails Deployments</title>
   <link href="http://feedproxy.google.com/~r/webandy/~3/n4soGbj4zPk/rails-deployments.html" />
   <updated>2008-10-01T00:00:00-07:00</updated>
   <id>http://blog.webandy.com/2008/10/01/rails-deployments</id>
   <content type="html">&lt;h1 id='rails_deployments'&gt;Rails Deployments&lt;/h1&gt;

&lt;p&gt;This September I deployed two Rails applications, each using different stacks, and wanted to share the details. I was learning most of this as I went, with hardly any server management experience.&lt;/p&gt;

&lt;h2 id='personal_project'&gt;Personal project&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Ubuntu Gutsy (7.10) &lt;a href='http://www.slicehost.com/'&gt;slicehost&lt;/a&gt; image&lt;/li&gt;

&lt;li&gt;Apache 2.2 with &lt;a href='http://www.modrails.com/'&gt;Passenger&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;MySQL 5&lt;/li&gt;

&lt;li&gt;&lt;a href='http://www.hoptoadapp.com'&gt;Hoptoad&lt;/a&gt; exception reporting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A 256MB slice runs this low traffic application OK. For two or more applications, more memory is preferred. I developed this application with &lt;a href='http://git.or.cz/'&gt;Git&lt;/a&gt; version control, the repository was hosted on &lt;a href='http://github.com/'&gt;github&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id='work_project'&gt;Work project&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Ubuntu Hardy (8.04) &lt;a href='http://aws.amazon.com/ec2/'&gt;Amazon EC2 image&lt;/a&gt; (customized an existing AMI)&lt;/li&gt;

&lt;li&gt;Asset storage on &lt;a href='http://aws.amazon.com/s3/'&gt;Amazon S3&lt;/a&gt; via the &lt;a href='http://github.com/technoweenie/attachment_fu/tree/master'&gt;attachment_fu&lt;/a&gt; plugin&lt;/li&gt;

&lt;li&gt;&lt;a href='http://nginx.net/'&gt;nginx&lt;/a&gt; web server (static assets and load balancing)&lt;/li&gt;

&lt;li&gt;&lt;a href='http://www.postgresql.org/'&gt;PostgreSQL 8.3&lt;/a&gt; on separate instance&lt;/li&gt;

&lt;li&gt;cluster of &lt;a href='http://mongrel.rubyforge.org/'&gt;mongrel&lt;/a&gt; application servers&lt;/li&gt;

&lt;li&gt;&lt;a href='http://www.sphinxsearch.com'&gt;Sphinx&lt;/a&gt; 0.9.8 search engine&lt;/li&gt;

&lt;li&gt;server monitoring with &lt;a href='http://tildeslash.com/monit/'&gt;monit&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;server backups via &lt;a href='http://s3sync.net/wiki'&gt;s3sync&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The staging server for the development initially ran a &lt;a href='http://www.centos.org/'&gt;CentOS&lt;/a&gt; Linux image, before I realized how painful it was to have separate production and staging environments.&lt;/p&gt;

&lt;p&gt;The Amazon EC2 &amp;#8220;Small Instance&amp;#8221; has 1.8GB RAM as of this writing. Our application puts a very small load on the server, even with many mongrels running. This application was developed with &lt;a href='http://subversion.tigris.org/'&gt;Subversion&lt;/a&gt; version control, the repository was hosted internally.&lt;/p&gt;

&lt;p&gt;Both applications send email. For my personal project I configured &lt;a href='http://www.postfix.org/'&gt;postfix&lt;/a&gt;. &lt;a href='http://www.capify.org/'&gt;capistrano&lt;/a&gt; was used for deployment in both applications.&lt;/p&gt;</content>
 <feedburner:origLink>http://blog.webandy.com/2008/10/01/rails-deployments.html</feedburner:origLink></entry>
 
 <entry>
   <title>WindyCityRails 2008 conference</title>
   <link href="http://feedproxy.google.com/~r/webandy/~3/jj6gziR8VTM/windycityrails-2008.html" />
   <updated>2008-09-23T00:00:00-07:00</updated>
   <id>http://blog.webandy.com/2008/09/23/windycityrails-2008</id>
   <content type="html">&lt;h1 id='windycityrails_2008_conference'&gt;WindyCityRails 2008 conference&lt;/h1&gt;

&lt;p&gt;My notes from the &lt;a href='http://windycityrails.org'&gt;WindyCityRails 2008 1-day conference&lt;/a&gt; held Saturday September September 20th, 2008 in Chicago.&lt;/p&gt;

&lt;h2 id='dhh_qa'&gt;DHH Q&amp;amp;A&lt;/h2&gt;

&lt;p&gt;David (DHH) had a 30-minute morning Q&amp;amp;A session. Recently 37Signals publicly discussed performance-improvement work to Basecamp, so it did not surprise me that performance was a theme of David&amp;#8217;s discussion. David said &amp;#8220;optimize for HTTP&amp;#8221; to improve the user experience most. Do this by setting long expiration headers, gzipping static content, and using etags. Follow guidelines from tools like the Y!Slow plugin. David discussed an upcoming addition in Rails, a &lt;a href='http://ryandaigle.com/articles/2008/8/14/what-s-new-in-edge-rails-simpler-conditional-get-support-etags'&gt;fresh?&lt;/a&gt; method available on &lt;code&gt;request&lt;/code&gt; which prevents generation of a page if the etag has not changed.&lt;/p&gt;

&lt;p&gt;When asked about guarding intellectual property (Ruby code) in Rails apps, David suggested trying to host it (like Basecamp). Regarding upcoming thread safety in Rails 2.2, David said this is like free ice cream, everyone loves it. However for most applications, using the Matz Ruby interpreter (MRI), there wouldn&amp;#8217;t be much performance improvement (&amp;#8220;but hey, it&amp;#8217;s still free ice cream&amp;#8221;). JRuby (or other alternative Ruby interpreters) will benefit more because they &lt;a href='http://blog.headius.com/2008/08/qa-what-thread-safe-rails-means.html'&gt;have true system native threads&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;David discussed some &lt;code&gt;ActiveModel&lt;/code&gt; work forthcoming in Rails that would replace cache sweepers. He also discussed internationalization support. A &lt;code&gt;translate&lt;/code&gt; function is how a developer will look up a language string. He discussed language peculiarities the Rails core team has discovered as a result of adding internationalization support, describing how in Russian, the month is said differently depending on the format of the date string.&lt;/p&gt;

&lt;p&gt;One person asked David what he was excited about in web development in general, he replied CouchDB (and document databases) are interesting.&lt;/p&gt;

&lt;h2 id='metrics_and_testing'&gt;Metrics and testing&lt;/h2&gt;

&lt;p&gt;A testing tool &amp;#8220;flog&amp;#8221; was demonstrated. It assigns numbers to Ruby methods, where higher numbers indicate more complex methods. More complex methods could be good candidates for refactoring. &lt;a href='http://saikuro.rubyforge.org/'&gt;Saikuro&lt;/a&gt; is a testing tool that analyzes cyclomatic complexity. Semi-related, one presenter mentioned a &amp;#8220;developer card&amp;#8221; which could be part of a user story approach to project planning. A developer card builds explicit time into the project for developer activities like refactoring. &amp;#8220;Source control churn&amp;#8221; was mentioned, with the idea being that files that are checked in very often are a &amp;#8220;smell&amp;#8221; and potential candidates for refactoring. &lt;a href='http://metric-fu.rubyforge.org'&gt;metric_fu&lt;/a&gt; is a Rails plugin for metrics and reports.&lt;/p&gt;

&lt;h2 id='web_development_on_iphone'&gt;Web development on iPhone&lt;/h2&gt;

&lt;p&gt;iPhone Mobile Safari supports CSS3 properties like -webkit-box-shadow. Using Safari on the desktop? Use XRAY for CSS and DOM help. &lt;a href='http://github.com/noelrappin/tank-engine/tree/master'&gt;Tank Engine&lt;/a&gt; was announced by the creator Noel Rappin, a successor to plugin &lt;code&gt;rails_iui&lt;/code&gt;, addressing issues he has faced with prior tools. Many developers will be excited to hear it is built on jQuery.&lt;/p&gt;

&lt;h2 id='sleight_of_hand_for_the_ruby_man'&gt;Sleight of Hand for the Ruby man&lt;/h2&gt;

&lt;p&gt;Aaron Bedra demonstrated writing a configuration file parser using metaprogramming techniques. He mentioned the &lt;a href='http://github.com/spicycode/the-inspector/tree/master'&gt;Inspector tool&lt;/a&gt; that lets developers run &lt;code&gt;Inspector.where_is_this_defined&lt;/code&gt; in script/console to find where a method has been redefined. He recommended the Pragmatic Programmer screencast series on metaprogramming.&lt;/p&gt;

&lt;h2 id='merb'&gt;Merb&lt;/h2&gt;

&lt;p&gt;Yehuda Katz overviewed &lt;a href='http://merbivore.com/'&gt;Merb&lt;/a&gt;, a Ruby web development framework (an alternative to Rails) approaching its &amp;#8220;1.0&amp;#8221; release. Small points I noted: &amp;#8220;plugins stay stable&amp;#8221; and code like &lt;code&gt;logged_in?&lt;/code&gt; could be moved to the router (equivalent to &lt;code&gt;routes.rb&lt;/code&gt; in Rails) instead of the application controller. Merb can detect whether a page is page cacheable or action cacheable, and do that automatically.&lt;/p&gt;

&lt;p&gt;Yehuda demonstrated managing Merb as a single process with Ruby Enterprise Edition while still having multiple Mongrel instances to which requests were routed (he had nginx doing load balancing), providing easier management (similar to Apache with Passenger Rails deployment), however this is built-in to Merb. Some of the above features may not be available until the 1.0 release.&lt;/p&gt;

&lt;h2 id='rspec'&gt;RSpec&lt;/h2&gt;

&lt;p&gt;&lt;a href='http://cukes.info/'&gt;Cucumber&lt;/a&gt;, a replacement for StoryRunner from RSpec, was briefly discussed and demonstrated.&lt;/p&gt;</content>
 <feedburner:origLink>http://blog.webandy.com/2008/09/23/windycityrails-2008.html</feedburner:origLink></entry>
 
 <entry>
   <title>Chart your console history with Google Charts</title>
   <link href="http://feedproxy.google.com/~r/webandy/~3/Q_H87_izYmI/console-history-google-charts.html" />
   <updated>2008-04-17T00:00:00-07:00</updated>
   <id>http://blog.webandy.com/2008/04/17/console-history-google-charts</id>
   <content type="html">&lt;h1 id='chart_your_console_history_with_google_charts'&gt;Chart your console history with Google Charts&lt;/h1&gt;

&lt;p&gt;This script was for fun to play around with &lt;a href='http://code.google.com/apis/chart/'&gt;Google Charts&lt;/a&gt;. There was an internet meme going around where programmers were posting their console history on their blogs. The history gives some insight into the work the programmer does, but I wanted to jazz it up a bit.&lt;/p&gt;

&lt;p&gt;I took the output from that script and made a Ruby hash of commands and their frequencies, then sent that data to a Google Charts url to display them as a 3d pie chart. Try it out! (tested with Ruby 1.8.6 on OS X)&lt;/p&gt;
&lt;script src='http://gist.github.com/75927.js'&gt;&amp;nbsp;&lt;/script&gt;
&lt;h2 id='results'&gt;RESULTS&lt;/h2&gt;

&lt;p&gt;&lt;img src='/images/charts.png' alt='Console history as a google chart' /&gt;&lt;/p&gt;</content>
 <feedburner:origLink>http://blog.webandy.com/2008/04/17/console-history-google-charts.html</feedburner:origLink></entry>
 
 <entry>
   <title>No Fluff Just Stuff April 2007 conference</title>
   <link href="http://feedproxy.google.com/~r/webandy/~3/lVIET11cMss/nfjs-conference.html" />
   <updated>2007-04-16T00:00:00-07:00</updated>
   <id>http://blog.webandy.com/2007/04/16/nfjs-conference</id>
   <content type="html">&lt;h1 id='no_fluff_just_stuff_april_2007_conference'&gt;No Fluff Just Stuff April 2007 conference&lt;/h1&gt;

&lt;p&gt;I attended the April 2007 Minneapolis stop of the &lt;a href='http://www.nofluffjuststuff.com'&gt;No Fluff Just Stuff&lt;/a&gt; Java symposium with a few coworkers. The keynote was how to choose a web framework (several were presented throughout the weekend). &lt;a href='http://code.google.com/webtoolkit/'&gt;Google Web Toolkit&lt;/a&gt; (enjoyed a few presentations from David Geary including one on GWT) was a big topic as was the &lt;a href='http://groovy.codehaus.org/'&gt;Groovy&lt;/a&gt; programming language and &lt;a href='http://www.grails.org/'&gt;Grails framework&lt;/a&gt;. I also enjoyed a presentation from &lt;a href='http://tedneward.com/'&gt;Ted Neward&lt;/a&gt; on the internals of JVM garbage collection.&lt;/p&gt;</content>
 <feedburner:origLink>http://blog.webandy.com/2007/04/16/nfjs-conference.html</feedburner:origLink></entry>
 
 <entry>
   <title>Twin Cities Code Camp 2006</title>
   <link href="http://feedproxy.google.com/~r/webandy/~3/rKzo_UAFalU/code-camp-2006.html" />
   <updated>2006-11-11T00:00:00-08:00</updated>
   <id>http://blog.webandy.com/2006/11/11/code-camp-2006</id>
   <content type="html">&lt;h1 id='twin_cities_code_camp_2006'&gt;Twin Cities Code Camp 2006&lt;/h1&gt;

&lt;p&gt;Today I&amp;#8217;m attending the inaugural &lt;a href='http://www.twincitiescodecamp.com/TCCC/Default.aspx'&gt;Twin Cities Code Camp&lt;/a&gt;, a free conference with varied sessions on .NET, test tooling, Ajax, web services, and more. The venue is new, meeting rooms are labeled well, and the event staff is professional and courteous. Sponsors are providing great food and great prizes will be given away at the end of the day. Here are summaries of the morning sessions I attended.&lt;/p&gt;

&lt;h2 id='objectrelational_mapping_with_hibernate'&gt;Object/Relational Mapping with Hibernate&lt;/h2&gt;

&lt;p&gt;Bob McCune gave an excellent introduction to &lt;a href='http://www.hibernate.org/'&gt;Hibernate&lt;/a&gt;. He showed live code of easy-to-understand Hibernate API calls and the SQL that was produced. Hibernate provides relational database independence, and helps map plain Java objects to the relational database structure.&lt;/p&gt;

&lt;h2 id='quick_and_dirty_functional_testing_with_selenium'&gt;Quick and Dirty Functional Testing with Selenium&lt;/h2&gt;

&lt;p&gt;Steve Peterson gave an excellent introduction to an open source tool called &lt;a href='http://www.openqa.org/selenium-ide/'&gt;Selenium&lt;/a&gt;. He created and ran test scripts created with the Selenium IDE (a Firefox addon). The tool allowed him to capture input and view the results in a graphical way or in a source code view. The source code view can be toggled to output capture results in many languages like Java, Ruby, or .NET languages. Output viewed as Java can be copied and pasted into a JUnit test method.&lt;/p&gt;

&lt;h2 id='building_innovative_applications_using_amazon_web_services'&gt;Building Innovative Applications using Amazon Web Services&lt;/h2&gt;

&lt;p&gt;Jinesh Varia gave us an overview of all the &lt;a href='http://aws.amazon.com/'&gt;Amazon web services&lt;/a&gt;, then focused on specific code examples utilizing Simple Storage Service (S3) and the Elastic Compute Cloud (EC2).&lt;/p&gt;</content>
 <feedburner:origLink>http://blog.webandy.com/2006/11/11/code-camp-2006.html</feedburner:origLink></entry>
 
 
</feed>
