<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-957776718998962870</id><updated>2011-11-27T15:33:51.847-08:00</updated><category term='recruiter'/><category term='ruby'/><category term='xml'/><category term='flash'/><category term='engineer'/><category term='p2p'/><category term='s3'/><category term='programming'/><category term='perl'/><category term='experience'/><category term='ssh'/><category term='reponse'/><category term='cdn'/><category term='gae'/><category term='hiring'/><category term='C++'/><category term='resume'/><category term='job'/><category term='social networking'/><category term='euler'/><category term='python'/><category term='amazon'/><category term='chumby'/><category term='rails'/><category term='lightbox'/><category term='puddy'/><category term='internet'/><category term='sinatra'/><category term='swf'/><category term='developer'/><category term='caching'/><category term='capistrano'/><category term='error'/><category term='web design'/><title type='text'>Web Respects</title><subtitle type='html'>The Internet has been my playground and this is what I have found.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>24</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-3161861018555875241</id><published>2009-07-23T08:33:00.000-07:00</published><updated>2009-07-23T08:36:52.371-07:00</updated><title type='text'>lighttpd unixsocket is too long in error</title><content type='html'>&lt;p&gt;I recently found this error occurring in my lighttpd error log.&lt;/p&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;2009-07-23 08:23:54: (mod_fastcgi.c.1290) unixsocket is too long in: fastcgi.server = ( .fcgi  =&gt; ( 127.0.0.1  ( ...&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Google did not prove useful, but its was pretty easy to figure out. The string being assigned to socket in the FCGI config is too large. The string needs to be shortened.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-3161861018555875241?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/3161861018555875241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=3161861018555875241' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/3161861018555875241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/3161861018555875241'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2009/07/lighttpd-unixsocket-is-too-long-in.html' title='lighttpd unixsocket is too long in error'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-5478332535226855636</id><published>2009-06-04T12:37:00.000-07:00</published><updated>2009-06-04T12:39:46.111-07:00</updated><title type='text'>switching from programming to responding to emails</title><content type='html'>I have the hardest time swithcing from programming to responding to 'quick' emails. My mind moves faster than my hands. I wish there was a syntax check for English, where are they on that? I saw Spelly on Google Wave, that's what I need.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-5478332535226855636?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/5478332535226855636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=5478332535226855636' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/5478332535226855636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/5478332535226855636'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2009/06/switching-from-programming-to.html' title='switching from programming to responding to emails'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-5247053926749942775</id><published>2009-02-09T11:19:00.001-08:00</published><updated>2009-04-08T16:28:57.110-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='gae'/><title type='text'>experience with learning Google App Engine and Python</title><content type='html'>In my endless aim to learn about the web technologies of the web, I finally came across to using &lt;a href="http://code.google.com/appengine/docs/"&gt;Google App Engine&lt;/a&gt;. My motivation to start using it was its promise of development environment where I didn't have to worry about the details of deploying my application.&lt;br /&gt;&lt;br /&gt;App Engine provides a integrated environment that allows you to build an application on your local dev box as it would work exactly on the live site. Some would find this constricting, but I just looked at as new platform where I didn't have to worry about the database setup, massive configurations files, and finding hosting for final project.&lt;br /&gt;&lt;br /&gt;I've been working on a side project for awhile, which has gone through many iterations of development (in short I was over thinking it). One of the iterations started with me developing on Google App Engine where I got to chance to build using Python. Google uses Python internally for many things (apparently), but they also choose it because it allowed to easily create a sandbox environment.&lt;br /&gt;&lt;br /&gt;Learning &lt;a href="http://python.org/"&gt;Python&lt;/a&gt; from a &lt;a href="http://perl.org/"&gt;Perl&lt;/a&gt; and &lt;a href="http://www.ruby-lang.org/en/"&gt;Ruby&lt;/a&gt; background has shown me the true meaning of there is more than one way to do it. In dynamic languages, you usually have control of how the program flows, Python follows this same convention, but doesn't provide so many avenues to do so. For example, in Ruby there are about 5 different types of eval, as far as I can find Python has one. These conventions (not restrictions) of Python make you think of your program in a different order of logical steps.  Its been kind of PITA because somethings that come intuitive in Ruby just didn't come to me while working in Python.&lt;br /&gt;&lt;br /&gt;The sandbox environment of Google App Engine is built the same on the desktop and the deployment environments. It follows the brand of WYSIWYG from a programming stance. The limitations to the sandbox is pretty much that the Python cannot run C-based libraries and access the OS for more advance I/O features.&lt;br /&gt;&lt;br /&gt;Because only pure Python applications can run in the sandbox I had to choose a web framework that would work within it. Google App Engine comes with its own lite web framework, but it was just bits and pieces of &lt;a href="http://www.djangoproject.com/"&gt;Django&lt;/a&gt; patched together. Web frameworks are plentiful in the Python realm, and &lt;a href="http://webpy.org/"&gt;webpy&lt;/a&gt; seems to be the simplest and easiest to pick up, which instantly attracted me to it.&lt;br /&gt;&lt;br /&gt;After working 2-3 weeks learning Python and building my application, I came to the conclusion that ran into too many limitations of my knowledge of Python. I would always wanted to do something that would always bring back to "I can do that in Rails easily".&lt;br /&gt;&lt;br /&gt;Mid-entry &lt;span style="font-weight: bold;"&gt;UPDATE&lt;/span&gt;: It appears that Google is planning on supporting &lt;a href="http://code.google.com/appengine/docs/java/overview.html"&gt;Java&lt;/a&gt; on Google App Engine. There are even early reports coming in of early Rails development using JRuby on Rails. This is some exciting stuff, which means I will certainly be revisiting App Engine in the near future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-5247053926749942775?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/5247053926749942775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=5247053926749942775' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/5247053926749942775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/5247053926749942775'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2009/02/experience-with-learning-google-app.html' title='experience with learning Google App Engine and Python'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-1933111199933767046</id><published>2008-11-16T10:54:00.000-08:00</published><updated>2008-11-16T10:55:09.006-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sinatra'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Sinatra speaks a different language, Perl</title><content type='html'>So, if it has become obvious to some, I have a thing for web frameworks. I like to understand how and why they work, and for me that usually involves more than just reading the source code. My first attempt was different variations of &lt;a href="http://code.google.com/p/puddy/"&gt;Puddy&lt;/a&gt; -- &lt;a href="http://www.rubyonrails.org/"&gt;Rails&lt;/a&gt;/&lt;a href="http://www.merbivore.com/"&gt;Merb&lt;/a&gt; like framework in Perl. The second iteration has led me down the path of the Ruby &lt;a href="http://sinatra.rubyforge.org/"&gt;Sinatra&lt;/a&gt; framework.&lt;br /&gt;&lt;br /&gt;Sinatra is a minimalist framework for creating web applications. Its scope really only extends into realm of controllers. It does support views, but it is still far from the enormous support that Rails would provide in options. The controller aspect allows you to define the route in method call of the action -- often causing your entire application to be just one file. I have used it to experiment with building APIs for some of my projects.&lt;br /&gt;&lt;br /&gt;In short, its a light, quick, and not at all a memory hog, so of course I wanted to dissect it. This lead me to just reading the source code, but I wanted to do more to understand how it worked. I should inform you that I do indeed know Ruby. I've used it on a daily basis for the past 2 years for my job(s) and have used well beyond just the Rails environment. Now, I have also been a big supporter of Perl, mainly because it was my first language beyond good old Q-BASIC.&lt;br /&gt;&lt;br /&gt;With that in mind, I would like introduce a project that I have been working on &lt;a href="http://code.google.com/p/sinatra/"&gt;Sinatra for Perl&lt;/a&gt;. Yes, it is a work in progress, but I have put a lot of effort into making sure that this code base was some what solid before I released it to the world. In the repository, a working example can be found and run on your local machine of the feature set.&lt;br /&gt;&lt;br /&gt;I like the ease of of extending Sinatra in either Ruby and now Perl. I have added simple extensions to support page caching, running tasks from command line,  and a simple background job server. Many of these are lacking optimizations, but I just wanted to show the ease of extending the framework.&lt;br /&gt;&lt;br /&gt;The simplest example of a Sinatra app:&lt;br /&gt;&lt;pre name="code" class="perl"&gt;&lt;br /&gt;#!/usr/bin/env perl&lt;br /&gt;require 'lib/sinatra.pl';&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;&lt;br /&gt;get('', {}, sub{&lt;br /&gt; return 'Hello World';&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;get(':name', {}, sub{&lt;br /&gt; my $r = shift;&lt;br /&gt; return 'Hello, ' . $r-&gt;params-&gt;{name};&lt;br /&gt;});&lt;br /&gt;&lt;/pre&gt;A simple DSL that defines what action to perform on a route. LOVE IT!&lt;br /&gt;&lt;br /&gt;This has been an educational experience (albeit a nerdy one) and I hope to continue on this project. I think I will probably have to go through a name change in the near feature as not to confuse people on the Ruby version.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-1933111199933767046?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/1933111199933767046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=1933111199933767046' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/1933111199933767046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/1933111199933767046'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2008/11/sinatra-speaks-different-language-perl.html' title='Sinatra speaks a different language, Perl'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-224341637288170215</id><published>2008-11-10T13:44:00.000-08:00</published><updated>2008-11-12T19:41:14.304-08:00</updated><title type='text'>rails plugin to white label CDNs</title><content type='html'>This is a continuation of my previous &lt;a href="http://jtarchie.com/2008/03/keeping-it-real-with-s3.html"&gt;post&lt;/a&gt; talking about using S3 as a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;CDN&lt;/span&gt;. This post covers some of the issues that were faced with making Rails work nice with a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;CDN&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Rails is made to do great things, but as many before have me said, handling concurrent connections is not one of them. Once a request comes into Rails, that process (Mongrel, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;FastCGI&lt;/span&gt;, etc.) is blocked till the request is done. Actions like sending emails, transferring files, large calculations need to be pushed away from the user request into another process. There are many solutions such as &lt;a href="http://backgroundrb.rubyforge.org/"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;BackgrounDRb&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://rubyforge.org/projects/starling/"&gt;Starling&lt;/a&gt;, etc, which allow you to load long running tasks from blocking Rails.&lt;br /&gt;&lt;br /&gt;The task of handling files on a remote server is always a tricky one. Each &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;CDN&lt;/span&gt; has there own interface on how to interact with the files -- delete, update, move, etc. This proved to be a problem when trying to test which one would work cleanly with our setup -- widgets stored in the database, which are updated &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_5"&gt;immediately&lt;/span&gt; to all users on the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;Chumby&lt;/span&gt; network.&lt;br /&gt;&lt;br /&gt;I took a top down approach to the problem. Designing how I wanted the widgets to move from our servers to a another server by building the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;API&lt;/span&gt; of methods. These methods were just a skeleton and did nothing. It just allowed to me to write the code I expected instead of working around another &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;CDN&lt;/span&gt; or modules &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;API&lt;/span&gt;. The methods could then be filled with the appropriate code to make it work with the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;CDN&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Originally, the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;CDN&lt;/span&gt; of choice was S3 -- not a true &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;CDN&lt;/span&gt;, but suited our purposed of unloading our servers of loading dynamic content from our servers. The necessary &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;API&lt;/span&gt; calls were filled to support the functionality of S3. Its then I realized that with the top down approach that the work I had could be easily modified to work with any &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;CDN&lt;/span&gt; method. I've written extensions for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;rsync&lt;/span&gt;, ssh, and just S3, but it has supported our &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_16"&gt;needs&lt;/span&gt; to be able to test multiple &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_17"&gt;environments&lt;/span&gt; and services quickly.&lt;br /&gt;&lt;br /&gt;This &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;plugin&lt;/span&gt; data_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;fu&lt;/span&gt; is currently a work in progress, but I hope to modify for wide spread use and finalize it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;NOTE&lt;/span&gt;: At the time of writing this software that there are many solutions of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;CDNs&lt;/span&gt; that handle transparent proxy and caching of content. The reason these solutions were not used because the content of widgets need to be updated instantly. Since the solution was to use vanilla &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;CDN&lt;/span&gt; mechanism so we could change &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;CDN&lt;/span&gt; solutions if one went down and switch over was needed immediately.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-224341637288170215?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/224341637288170215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=224341637288170215' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/224341637288170215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/224341637288170215'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2008/11/rails-plugin-to-white-label-cdns.html' title='rails plugin to white label CDNs'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-6787413021643366647</id><published>2008-09-15T20:02:00.000-07:00</published><updated>2008-09-18T14:30:46.888-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='euler'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>project euler repo</title><content type='html'>I have recently gotten back into the &lt;a href="http://projecteuler.net/"&gt;Project Euler&lt;/a&gt; problems. The website provides a bunch of math and logic problems that can be solved any way -- paper and pen or programming. I like the challenge every once and awhile, so I thought I might share some of my results of the &lt;a href="http://content.jtarchie.com/projects/projecteuler/files.html"&gt;code&lt;/a&gt; I have written to help solve the problems. There are comments in most of these. They are just quick dirty hacks to help me get the answer. Sometimes the output will not be the answer and you might need to go look for it, but the logic is there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-6787413021643366647?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/6787413021643366647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=6787413021643366647' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/6787413021643366647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/6787413021643366647'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2008/09/project-euler-repo.html' title='project euler repo'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-5546461146606763330</id><published>2008-09-13T18:44:00.000-07:00</published><updated>2008-11-23T12:09:49.173-08:00</updated><title type='text'>new job and location</title><content type='html'>I have neglected my duties as the maintainer of this blog for a few months. Its has been for the better though. About a month ago, I left my position at &lt;a href="http://www.chumby.com/"&gt;Chumby&lt;/a&gt; and moved to San Francisco to start working at [&lt;a href="http://contextoptional.com/"&gt;context&lt;/a&gt;]. I had a great time and experience working at Chumby, but I felt that San Francisco is where I needed to be for both work, but also experience. I grew up in one of the largest (and best) cities in the world, and I missed the lifestyle that came with it. San Diego has great weather, but I hated driving everywhere.&lt;br /&gt;&lt;br /&gt;Now I am in San Francisco. Trying to sell my car. And enjoying my new job, people, and experience.&lt;br /&gt;&lt;br /&gt;If you are in the area, please contact me, nice to meet some readers. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-5546461146606763330?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/5546461146606763330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=5546461146606763330' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/5546461146606763330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/5546461146606763330'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2008/09/new-job-and-location.html' title='new job and location'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-8193200019234674217</id><published>2008-09-13T18:35:00.000-07:00</published><updated>2008-09-13T18:35:45.870-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='swf'/><category scheme='http://www.blogger.com/atom/ns#' term='s3'/><category scheme='http://www.blogger.com/atom/ns#' term='cdn'/><title type='text'>Flash on S3</title><content type='html'>This is a continuation of my previous &lt;a href="http://jtarchie.com/2008/03/keeping-it-real-with-s3.html"&gt;post&lt;/a&gt; talking about using S3 as a CDN. This post discusses some of the issues that occurred with hosting Flash content on S3, and the solutions for them.&lt;br /&gt;&lt;br /&gt;Problems started to occur once Flash SWFs were loaded from the Chumby device and the Chumby website. SWFs have a built in security policy known as cross domain policies that allow the owner of a domain to specify what domains have access to the domain. Think of it as a &lt;a href="http://www.robotstxt.org/"&gt;robots.txt&lt;/a&gt; for Flash SWFs.&lt;br /&gt;&lt;br /&gt;&lt;span&gt;With S3 there are two ways to access content from a bucket -- AWS based URL or a CNAME from your domain that points to AWS (Amazon Web Services). When the Flash content is on S3, the Flash player looks for the crossdomain going through the AWS URL path. We setup a CNAME 'swf.chumby.com' and placed a crossdomain.xml that could be accessed via &lt;a href="http://swf.chumby.com/crossdomain.xml"&gt;http://swf.chumby.com/crossdomain.xml&lt;/a&gt; and also one on the top level &lt;a href="http://chumby.com/crossdomain.xml"&gt;http://chumby.com/crossdomain.xml.&lt;/a&gt; This allowed to control what SWF movies could load the widgets.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Playing the SWF as a stand alone Flash movie never showed any problems. When it was loaded via &lt;a href="http://swf.chumby.com/"&gt;http://swf.chumby.com&lt;/a&gt; the SWF would claim its domain to be &lt;a href="http://swf.chumby.com/"&gt;swf.chumby.com&lt;/a&gt; instead of an AWS domain. From the chumby website there is a way to preview the content that will appear on your Chumby -- the &lt;/span&gt;&lt;a href="http://www.chumby.com/mychumby/virtualchumby"&gt;Virtual Chumby&lt;/a&gt;&lt;span&gt;. The SWF for the Virtual Chumby exists on the main &lt;a href="http://chumby.com/"&gt;chumby.com&lt;/a&gt; website. With the crossdomain, it was able to load the widgets from &lt;a href="http://swf.chumby.com/"&gt;swf.chumby.com&lt;/a&gt; no problem, but when it wanted to send parameters to the widget a problem occurred.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Flash apparently has various sandbox models for the SWF files. This is good because allows SWF to maintain a state security and &lt;span style="font-style: italic;"&gt;ensures &lt;/span&gt;your data is protected. This bit us in the ass though. Since a SWF can grant only certain (sub)domains to ability to send it parameters we had 1000s of widget that we could play, but they didn't have access to any information that made it work well within the Virtual Chumby. There were two possible solutions. Change every widget to have the code &lt;a href="http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&amp;amp;file=00002647.html"&gt;allowDomain&lt;/a&gt;&lt;span&gt;, which would take weeks to contact 3rd party developers, countless resources, etc. The second solution is even tougher it would require moving the Virtual Chumby SWF over to the &lt;a href="http://swf.chumby.com/"&gt;swf.chumby.com&lt;/a&gt; domain and updating the links to it on our website. :)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-8193200019234674217?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/8193200019234674217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=8193200019234674217' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/8193200019234674217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/8193200019234674217'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2008/09/flash-on-s3.html' title='Flash on S3'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-2713376225135196728</id><published>2008-09-13T18:33:00.000-07:00</published><updated>2008-09-13T18:39:29.675-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='s3'/><category scheme='http://www.blogger.com/atom/ns#' term='cdn'/><category scheme='http://www.blogger.com/atom/ns#' term='chumby'/><title type='text'>s3 as a CDN</title><content type='html'>I worked for a company that provides widgets as a primary resource for our product the &lt;a href="http://www.chumby.com/"&gt;chumby&lt;/a&gt;. These widgets are purely static content in the form of Flash SWF files and an associated jpeg thumbnail. This content is provided from our servers from both dynamic (database) and static (file servers) resources. These resources are ready to scale to certain calculated amount before we have to worry about more servers, bandwidth, etc... We try to stay ahead of the curve with growth.&lt;br /&gt;&lt;br /&gt;The scaling numbers show that we can do one of two things -- expand our servers and utilize more bandwidth or use a CDN to provide our content utilizing caching. In short, the most cost effective solution is &lt;a href="http://aws.amazon.com/s3"&gt;S3&lt;/a&gt;. Our content, widgets that can change instantaneously when someone uploads a new one, needs to be provided to all users with in a reasonable time. A normal CDN could take minutes-hours to propagate and take time for integration. Expanding our servers would mean more time and maintenance on our end.&lt;br /&gt;&lt;br /&gt;The architecture we have decided is to have a two tier distribution, which will provide with redundancy for widgets. The widgets will exists on our servers in the database and on S3. Our database server is used to hold the widgets because its easy to backup, restore and replicate. With our current system, when a user uploads/updates a widget, it is saved in the database directly, so the newest version can be pushed to users as soon as it gets approved.&lt;br /&gt;&lt;br /&gt;Transferring files to S3 has proven to be quite simple to implement. The main problem has been adjusting our architecture to adapt to external URLs. Frontend (website) facing, obviously changing  URLs is pretty trivial and all browsers support cross domain loading of content.&lt;br /&gt;&lt;br /&gt;Pushing widgets to the database is easy. A simple create/update with ActiveRecord and you're done. When a user uploads a widget, in the same POST request the file is saved to the database, so there is no delay and problems and errors with the file are reported in real time. A blocking operation for Rails, but with size limits imposed on the database, model, and web server it shouldn't be too slow.&lt;br /&gt;&lt;br /&gt;To transfer the widgets to S3 from our database in 'real time' is a tricky part. This is a blocking that depends on factors beyond our control. The S3 servers could be done, our bandwidth pipe could be saturated with web hits so upload to outside server is slow, etc. This is a blocking operation no matter what, but one we don't want the the user to have to wait for when they upload a new widget. The solution was to push the transfer of a widget to S3 to a job server, whose main purpose is to queue long running tasks. The job server was built using &lt;a href="http://backgroundrb.rubyforge.org/"&gt;BackgroundRB&lt;/a&gt; that integrates well with Ruby On Rails.&lt;br /&gt;&lt;br /&gt;This post is to be continued in follow up posts. There is still so much more to cover with the &lt;a href="http://jtarchie.com/2008/09/flash-on-s3.html"&gt;problems we had with Flash&lt;/a&gt; and the framework built to white label CDNs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-2713376225135196728?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/2713376225135196728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=2713376225135196728' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/2713376225135196728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/2713376225135196728'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2008/03/keeping-it-real-with-s3.html' title='s3 as a CDN'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-8556292079996607549</id><published>2008-08-28T00:38:00.001-07:00</published><updated>2008-08-28T00:45:06.824-07:00</updated><title type='text'>very accurate description</title><content type='html'>Its not to often that I &lt;a href="http://lispy.wordpress.com/2008/08/27/how-to-get-the-most-out-of-your-eccentric-programmergenius/"&gt;read&lt;/a&gt; something that describes a certain type of people. This blog posting describes a particular type of programmer personality. Programmers come in many shapes, sizes, and mentalities. I am not saying this is a perfectly accurate description of who I am, but there is one paragraph that I read and was like woah! I am not going to quote the paragraph because I really think this is a blog posting all should read about me. :)&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-8556292079996607549?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/8556292079996607549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=8556292079996607549' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/8556292079996607549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/8556292079996607549'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2008/08/very-accurate-description.html' title='very accurate description'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-5165258267164490416</id><published>2008-05-26T12:08:00.001-07:00</published><updated>2008-05-26T12:20:52.941-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='amazon'/><category scheme='http://www.blogger.com/atom/ns#' term='s3'/><title type='text'>s3 logs with webalizer</title><content type='html'>I recently saw the site &lt;a href="http://s3stat.com/"&gt;s3stat.com&lt;/a&gt;, which is a simple service that takes your s3 logs and pushes them through &lt;a href="http://www.mrunix.net/webalizer/"&gt;webalizer&lt;/a&gt; to get the nice graphics and stats. The service is $2/month. I thought to myself that this can surely be done for free.&lt;br /&gt;&lt;br /&gt;An hour or so later, I think I have something that's pretty comparable in features to s3stat. I am in no way trying to put them out of business. They maintain their website and are improving the s3stat with more features. I purely wanted and needed a way to view s3 stats, and didn't want to pay for it.&lt;br /&gt;&lt;br /&gt;This script requires that a bucket on s3 has logging enabled. Please do so before using this script, or you will just get an error that logging is not turned on. The rubygem &lt;a href="http://amazon.rubyforge.org/"&gt;AWS::S3&lt;/a&gt; is required to run this script. Please look at the options hash for required parameters.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="ruby"&gt;&lt;br /&gt;#!/usr/bin/env ruby&lt;br /&gt;require 'rubygems'&lt;br /&gt;require 'aws/s3'&lt;br /&gt;require 'getoptlong'&lt;br /&gt;require 'tempfile'&lt;br /&gt;require 'date'&lt;br /&gt;&lt;br /&gt;#something wrong in the s3 gem&lt;br /&gt;Date::ABBR_MONTHS = Date::Format::ABBR_MONTHS&lt;br /&gt;&lt;br /&gt;#default arguments&lt;br /&gt;options = {&lt;br /&gt;  :access_key=&gt;'', #the Amazon access key&lt;br /&gt;  :secret_key=&gt;'', #the Amazon secret key&lt;br /&gt;  :bucket_name=&gt;'', #bucket name to pull logs from&lt;br /&gt;  :folder_name=&gt;'webalizer' #foldername for webalizer output&lt;br /&gt;  #:clear_webalizer_folder =&gt; true #delete local webalizer data&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#establish connection the s3&lt;br /&gt;AWS::S3::Base.establish_connection!(&lt;br /&gt;  :access_key_id     =&gt; options[:access_key],&lt;br /&gt;  :secret_access_key =&gt; options[:secret_key]&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;#find the bucket specifying the log files&lt;br /&gt;puts "Checking for logging for bucket #{options[:bucket_name]}"&lt;br /&gt;if AWS::S3::Bucket.logging_enabled_for?(options[:bucket_name])&lt;br /&gt;  new_log = File.new('bucket_log.log', 'w+')&lt;br /&gt;  log_status = AWS::S3::Bucket.logging_status_for(options[:bucket_name])&lt;br /&gt;  puts "Processing log files"&lt;br /&gt;  AWS::S3::Bucket.logs(options[:bucket_name]).each do |log|&lt;br /&gt;    #convert the lines of amazon s3 log to CLF (Common Log Format)&lt;br /&gt;    log.lines.each do |line|&lt;br /&gt;      new_log &lt;&lt; "#{line.remote_ip} - - [#{line.time.strftime("%d/%B/%Y:%H:%M:%S %z")}] \"#{line.request_uri}\" #{line.http_status || '-'} #{line.bytes_sent || '-'} \"#{line.referrer}\" \"#{line.user_agent}\"\n"&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;  new_log.close()&lt;br /&gt;  #make sure webalizer folder_name exists&lt;br /&gt;  if options[:clear_webazlier_folder] &amp;&amp; File.exists?(options[:folder_name])&lt;br /&gt;    Dir["#{options[:folder_name]}/*"].each{|f| puts f; File.delete(f)}&lt;br /&gt;    Dir.delete(options[:folder_name])&lt;br /&gt;  end&lt;br /&gt;  Dir.mkdir(options[:folder_name])&lt;br /&gt;  #run webalizer on current log file&lt;br /&gt;  webalizer_output = `webalizer -o webalizer/ -D dns.db -N 5 -F clf bucket_log.log`&lt;br /&gt;  puts "output from webalizer:"&lt;br /&gt;  puts webalizer_output&lt;br /&gt;  #update webalizer bucket with newest info&lt;br /&gt;  puts "updating webalizer to s3 bucket #{log_status.target_bucket}"&lt;br /&gt;  Dir["#{options[:folder_name]}/*"].each do |filename|&lt;br /&gt;    puts "uploading file #{filename}"&lt;br /&gt;    AWS::S3::S3Object.store("#{filename}",open(filename),log_status.target_bucket,{:access=&gt;:public_read})&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you have any improvements please let me know in the comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-5165258267164490416?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/5165258267164490416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=5165258267164490416' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/5165258267164490416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/5165258267164490416'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2008/05/s3-logs-with-webalizer.html' title='s3 logs with webalizer'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-2805323564366463511</id><published>2008-05-20T11:25:00.000-07:00</published><updated>2008-05-20T11:31:03.094-07:00</updated><title type='text'>Rails top 100</title><content type='html'>This wiki maintains a list of the &lt;a href="http://rails100.pbwiki.com/"&gt;top 100&lt;/a&gt; websites (by &lt;a href="http://www.alexa.com/"&gt;Alexa&lt;/a&gt; ranking) that use Rails. &lt;a href="http://www.chumby.com"&gt;Chumby&lt;/a&gt; is ranked number 67 on the list.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;NOTE:&lt;/span&gt; This is a shameless plug because I work for Chumby doing the RoR development. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-2805323564366463511?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/2805323564366463511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=2805323564366463511' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/2805323564366463511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/2805323564366463511'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2008/05/rails-top-100.html' title='Rails top 100'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-6348893574301461924</id><published>2008-04-29T01:17:00.000-07:00</published><updated>2008-04-29T01:18:25.630-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='resume'/><category scheme='http://www.blogger.com/atom/ns#' term='job'/><category scheme='http://www.blogger.com/atom/ns#' term='recruiter'/><category scheme='http://www.blogger.com/atom/ns#' term='engineer'/><title type='text'>criteria for a recruiter</title><content type='html'>The most dangerous part of finding a job online is having to put your contact information out there. When I first graduated college, I posted my resume on every job website that existed. This is what the (useless) career center told me to do. The next day my inbox was flooded with so many job descriptions from companies and recruiters. To a college graduate this is the most misleading part of a job search. I thought I would have my choice of the perfect job. &lt;br /&gt;&lt;br /&gt;Each email was an automated message sent base on the criteria that I had an email address and on certain keywords in my resume. They described competitive salaries, with great benefits, awesome work environment, and a great company. Obviously no human has ever read my resume because they would have made the immediate observation that I had just graduated. So my amazement from the emails turned to disappointment, which now has turned to annoyance.&lt;br /&gt;&lt;br /&gt;There have been a few exceptional recruiters that have emailed me. Most recruiters follow the same tactics of trying to lure you in, which are the spamming recruiters. I would like to point out some guidelines for recruiters that would make both our lives easier.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Read my resume&lt;/b&gt; &lt;p&gt;It obvious to me when you haven't. When the job description has nothing to do with my previous work, experience, skills, or interests.&lt;/p&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Be Personal&lt;/b&gt; &lt;p&gt;If you want to use me as a possible commission be a little more personal and address me -- not the masses. I tend to ignore the recruiters that send me and email with my name obviously copied and pasted in the Dear field. The biggest give away towards those emails is when at the end of the message ask for updated resume, desired salary, newest contact information, current employer, etc. Asking for updated information just seems really tacky to me -- especially when you have no idea what I am looking for.&lt;/p&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Describe the Job&lt;/b&gt; &lt;p&gt;Tell me more than the requirements of the job. I can see they want PHP/Perl/Java/C++ experience, but what does the job entail. Will projects becoming my way willy nilly and I have to be able to organize my time? Will I be working with someone else on the same project? What is their development style (extreme|agile|pair)? A job description should describe what a typical day might be for the employee.&lt;/p&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Describe the company&lt;/b&gt; &lt;p&gt;Tell me something positive about the company. Please don't copy and paste their description from the corporate profile. If I was a potential investor that might mean something, but I am potential employee. Tell me they have pick up games of basketball, allow flexible time, provide lunch, allow employees to be open about their ideas, have a turnover rate of 10 years, etc. I want to know what the employee culture is like for the company.&lt;/p&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Understand the different titles&lt;/b&gt; &lt;p&gt;I have learned that an engineer, developer, programmer, and architect are totally different things. Then there are different levels from junior-senior and I-V. Understand that I might be an engineer, with experience of building a software system abstractly based off an idea someone had. More often than not I have a job description that read it was for someone who picked up PHP in 24 hours -- with no previous computer experience ever. I am a software engineer. I enjoy the challenge of creating something new and putting the puzzle together.&lt;/p&gt;&lt;/li&gt; &lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Two years later, after removing my resume and contact information from said job sites, I still get the same emails. My email and resume are being passed around (like wine coolers at a middle school party) to recruiter contact database everywhere. I have learned to ask to be unsubscribe from these lists.&lt;br /&gt;&lt;br /&gt;Don't get to discouraged. There are good recruiters out there. I had one excellent recruiter ask me to fill out a questionnaire asking geeky questions of what I have done, when I started, and what I mess around with on computers plus a few logic problems. Usually that is something that you get in an interview, but thats what the recruiter should be doing interviewing you to help you find the best possible job and candidate for that job. They will either find you or you will find them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-6348893574301461924?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/6348893574301461924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=6348893574301461924' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/6348893574301461924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/6348893574301461924'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2008/04/criteria-for-recruiter.html' title='criteria for a recruiter'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-7428451466607115455</id><published>2008-03-17T15:10:00.000-07:00</published><updated>2008-06-05T15:02:39.072-07:00</updated><title type='text'>dirty fields in ActiveRecord</title><content type='html'>Managing databases from a programming environment is always an ordeal. Rails has an ORM (ActiveRecord) that transparently provides a programming environment that maps directly to the database and generates all SQL. ActiveRecord sacrifices efficiency over ease of use in some cases. I believe one of the most neglected ones is how ActiveRecord handles updating records in a table.&lt;br /&gt;&lt;br /&gt;When ActiveRecord updates a record in a table, it updates all fields whether or not those fields have actually been changed. In most cases this is fine, which a record is so small that setting the fields again takes a trivial amount of time. I happen to have one those rare cases where this is not a valid solution. I happen to use my database for file storage with files from 10KB to 1MB, so changing the name of the file causes the large chunk of data to be set again.&lt;br /&gt;&lt;br /&gt;Only the field that has changed (a dirty field) should be updated. ActiveRecord has no flags for what fields have changed or not. I took the time to extend ActiveRecord to support dirty flags for fields by modifying write_attribute method to mark a hash that an attribute of a record has changed.&lt;br /&gt;&lt;br /&gt;With the knowledge of dirty fields, generating the appropriate UPDATE statement needed to be done. The UPDATE statement is currently generated by converting all fields and their values in the an SQL assignment by the function attribute_with_quotes. I just extended this function to check that an attribute had been dirtied before it was added to the assignment statement. Since an UPDATE is syncing the database with the current model all the dirty fields are flagged as no longer being dirty.&lt;br /&gt;&lt;br /&gt;Show code:&lt;br /&gt;&lt;pre name="code" class="ruby"&gt;&lt;br /&gt;module DirtyAttributes&lt;br /&gt; def self.included(base)&lt;br /&gt;   base.class_eval do&lt;br /&gt;     alias_method_chain :write_attribute, :dirty&lt;br /&gt;     alias_method_chain :attributes_with_quotes, :dirty&lt;br /&gt;     after_update :reset_dirty&lt;br /&gt;   end&lt;br /&gt; end&lt;br /&gt; def reset_dirty&lt;br /&gt;   @dirtied_attrs = nil&lt;br /&gt; end&lt;br /&gt; def write_attribute_with_dirty(attr_name, value)&lt;br /&gt;   dirtied(attr_name)&lt;br /&gt;   write_attribute_without_dirty(attr_name,value)&lt;br /&gt; end&lt;br /&gt; def dirtied(attr_name = nil)&lt;br /&gt;   @dirtied_attrs ||= {}&lt;br /&gt;   #logger.info "dirtied #{attr_name}"&lt;br /&gt;   @dirtied_attrs[attr_name.to_s] = true if attr_name&lt;br /&gt; end&lt;br /&gt; def dirty?(attr_name = nil)&lt;br /&gt;   @dirtied_attrs ||= {}&lt;br /&gt;   #logger.info "dirty? #{attr_name}"&lt;br /&gt;   return (attr_name.nil? &amp;amp;&amp;amp; !@dirtied_attrs.empty?) || @dirtied_attrs.has_key?(attr_name.to_s)&lt;br /&gt; end&lt;br /&gt; def attributes_with_quotes_with_dirty(*args)&lt;br /&gt;   quoted = attributes_with_quotes_without_dirty(*args)&lt;br /&gt;   quoted.delete_if {|key,value| !dirty?(key) } unless (self.new_record?)&lt;br /&gt;   return quoted&lt;br /&gt; end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;ActiveRecord::Base.send(:include, DirtyAttributes)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I would just like to emphasize how easy this was to do. No more than 30 minutes. This is why I love Rails and Ruby. Yet, what gets me is why this wasn't done before. Sorry to say, but this is really one of those DUH! things that should have been implemented from start. If there is a reason that there wasn't please let me know because I am really curious.&lt;br /&gt;&lt;br /&gt;NOTE: I have not made this a plugin yet. This code has not been tested on a production environment either.&lt;br /&gt;&lt;br /&gt;UPDATE #1: Because of the way ActiveRecord handles method chaining with alias_method_chain there are some edge cases that need to be solved. Mainly I need to find a way to override the original define update function ActiveRecord::Base. You think it would be easy, but alias_method_chain renames functions, and since it is used to add support for 'update_at/updated_on' timestamps, it has proven to be difficult. I have found ways to make it work, but the potential for other plugins doing alias_method_chain to update could potentially cause problems. I think I will just submit a patch for ActiveRecord.&lt;br /&gt;&lt;br /&gt;UPDATE #2: I have been able to edit the code to work correctly in all 1.2.3/2.0 version of ActiveRecord successfully. I had to learn a little more about the internals, but the final code shows that it is possible and pretty easy to do.&lt;br /&gt;&lt;br /&gt;June 5, 2008 - It looks like Rails 2.1 is supporting dirty fields. Hurray, but its weird, I had it first. ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-7428451466607115455?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/7428451466607115455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=7428451466607115455' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/7428451466607115455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/7428451466607115455'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2008/03/dirtied-fields-in-activerecord.html' title='dirty fields in ActiveRecord'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-4602249795999377680</id><published>2008-01-10T22:08:00.001-08:00</published><updated>2008-01-11T23:56:39.240-08:00</updated><title type='text'>Puddy framework ideology</title><content type='html'>In case you have no idea what I am talking about, familiarize yourselves &lt;a href="http://jtarchie.com/2007/10/puddy-yawfp.html"&gt;here&lt;/a&gt;. I have been working on my own little mini framework for awhile. By observing some of the things that I have seen in mainly on Ruby on Rails and other frameworks and incorporating them.&lt;br /&gt;&lt;span style="display: block;" id="formatbar_Buttons"&gt;&lt;span class="" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;The thing that I have realized about many frameworks is the integration they with so much of the web application. I am not complaining at all. Having so many different options available for you is great, but have always gotten me is the overhead of such framework. Having the kitchen sink scenario is nice, but a minimalist framework would work just as well, which allow you to pick and choose just the features that you need. Rails 2.0 have gone in this direction, and I have seen smaller Ruby frameworks like &lt;a href="http://code.whytheluckystiff.net/camping/"&gt;Camping&lt;/a&gt; and &lt;a href="http://sinatra.rubyforge.org/"&gt;Sinatra&lt;/a&gt;, which are great examples of minimal work.&lt;br /&gt;&lt;br /&gt;Yet, what I have always wanted was access to each individual module of a framework and be able to pick and choose which get used. I believe that each module should not wholly depend one another. This can always be the case, but the dependency should be minimal.&lt;br /&gt;&lt;br /&gt;I have tried to keep this mentality with &lt;a href="http://code.google.com/p/puddy/"&gt;Puddy&lt;/a&gt;. If anyone has actually kept up with it, the modules are each individually coded, so one doesn't require functionality from another. I guess I am doing an MVC for a MVC framework.&lt;br /&gt;&lt;br /&gt;Anyways, a quick updated on the framework. I am making progress on it. It has been a learning experience. There are some parts that I have completely written myself and there are some that I have copied from Rails verbatim, but only because they did such a good job with it. I hope to be able to create an example app real soon to actually demonstrate the framework. I really just want to show something convenient, lite, and fast.&lt;br /&gt;&lt;br /&gt;Update: I forget to mention &lt;a href="http://merbivore.com/"&gt;Merb&lt;/a&gt;, which seems to be a ncie framework and follows this ideology too. Just when I think I am being innovative -- someone else has already done it. ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-4602249795999377680?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/4602249795999377680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=4602249795999377680' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/4602249795999377680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/4602249795999377680'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2008/01/puddy-framework-ideology.html' title='Puddy framework ideology'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-1750867146042330672</id><published>2007-12-14T15:29:00.000-08:00</published><updated>2007-12-15T10:09:24.022-08:00</updated><title type='text'>deep eager loading with ActiveRecord</title><content type='html'>I was going through Rails today cleaning up some code and found and interesting thing with ActiveRecord. I have always known it was capable of eager loading of associations. For example, a blog post can have many comments.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;pre name="code" class="ruby"&gt;&lt;br /&gt;@posts = Post.find(:all,:include=&gt;[:comments])&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Well a comment is associated is written by a user and say you want to eager load the user information too. Well it appears that ActiveRecord supports eager loading of associations with associations. Meaning, I can load the user information for each comment associated with a post.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;pre name="code" class="ruby"&gt;&lt;br /&gt;@posts = Post.find(:all,:include=&gt;[:comments=&gt;[:user])&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This is amazing. I had not known about this feature, but decided to give it a try. This saves in time with alot optimizations that I tried with eager loading and caching of associations' associations.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update:&lt;/span&gt; It has been brought to my attention that this actually documented. This either proves I need to read the entire document or it needs to be better organized. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-1750867146042330672?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/1750867146042330672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=1750867146042330672' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/1750867146042330672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/1750867146042330672'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2007/12/deep-eager-loading-with-activerecord.html' title='deep eager loading with ActiveRecord'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-7936829056213454265</id><published>2007-12-09T21:50:00.000-08:00</published><updated>2007-12-12T15:37:08.964-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='social networking'/><category scheme='http://www.blogger.com/atom/ns#' term='p2p'/><title type='text'>bringing back reality into social networking</title><content type='html'>I found recently that social networking is no longer limited to the virtual world any more. In an amazing turn of events, people are meeting new people and making professional relationships by meeting face to face. This is all in respect to technology based fields. The days of Facebook, Myspace, and LinkedIn are numbered.&lt;br /&gt;&lt;br /&gt;A (real life) social group I found called &lt;a href="http://www.workatjelly.com/"&gt;Jelly&lt;/a&gt; is nothing innovated, but something I think I have been missing in my work life. Its a simple concept. Biweekly someone opens up their place to strangers, offers free wifi, and works from home. Its great because people stop by to show what they are working on, from the trivial to the mediocre, but the most important thing is that you meet like minded people. How many people you know wants to leave their place open to complete strangers?&lt;br /&gt;&lt;br /&gt;I have slowly learned since graduating college that the working world lacks the inspiration of personal creativity. I have heard the stories of Google that allow you to work on your own projects. I currently work at a start up that allows me work on my own schedule, so I can make time at those points in the day to work on my 'side projects'. Unlike my time in college though, I don't find the environment of people constantly coming up with new ideas and talk to people to throw ideas around. Am I missing something?&lt;br /&gt;&lt;br /&gt;The idea behind Jelly is simple and I know its nothing new. It seems to be the simplest thing I've seen in real social networking. There is no one inviting heavy weight VCs, or the rockstar programmer, or the requirement of some sort of meal. One person opens up there place and invited (future) friends over, but with the intention of working on your own stuff. I'm going to have to give this a try. If anyone is interested in the &lt;a href="http://wiki.workatjelly.com/San-Diego"&gt;San Diego&lt;/a&gt; area.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-7936829056213454265?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/7936829056213454265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=7936829056213454265' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/7936829056213454265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/7936829056213454265'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2007/12/bringing-back-reality-into-social.html' title='bringing back reality into social networking'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-8062442488433995570</id><published>2007-11-30T09:08:00.000-08:00</published><updated>2007-11-30T09:30:12.237-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hiring'/><category scheme='http://www.blogger.com/atom/ns#' term='developer'/><category scheme='http://www.blogger.com/atom/ns#' term='reponse'/><title type='text'>response to 'Hiring a *buzzword* Developer ... '</title><content type='html'>There are a lot of blog postings out there with the subject of to hire the perfect developer. The most recent article the sparked my interest was '&lt;a href="http://www.rubyinside.com/11-tips-on-hiring-a-rails-developer-662.html"&gt;11 Tips on Hiring a Rails Developer&lt;/a&gt;'. That describes a great or *shudder* rockstar Rails developer as a hard to come by. There are many articles like this in the Rails world. Describing how to get the Rails developer that goes to the RubyConf, goes to the local Ruby meetup, and dreams in Ruby.&lt;br /&gt;&lt;br /&gt;In short, these articles often leave out the most vital argument of most programmers, engineers, scientists, etc. that have the willingness to learn and expand their expertise. At my current job, before I became the Rails developer/Software Engineer, my experience in Rails was next to nil. Mainly it was me tinkering around with the famous &lt;a href="http://media.rubyonrails.org/video/rails_take2_with_sound.mov"&gt;screencast&lt;/a&gt; showing how to make a blog. I was hired on as QA to test the currently developing website, but sometimes I would go in and tinker with the code, to make fixes that the other developer didn't have time for. Eventually I became the goto guy for the Rails development and I switched roles within the company.&lt;br /&gt;&lt;br /&gt;My point is that there are people out there who are passionate about Python, but can pick up Ruby. There is a Java developer out there learning the potential of languages with Groovy. If you look to hard for the person whose main experience has been everything in one concentrated field, what happens when the next buzzworthy thing comes out? Will they be able to learn it, or will they stick to what they know because it can do everything they need it to do?&lt;br /&gt;&lt;br /&gt;My belief if the true rockstar is able to adapt to anything.&lt;br /&gt;&lt;br /&gt;*PS - In response to the article that sparked this annoyance, You can hire people with a degree too. I have a Masters in Computer Engineering with concentration on data mining.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-8062442488433995570?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/8062442488433995570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=8062442488433995570' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/8062442488433995570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/8062442488433995570'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2007/11/response-to-hiring-buzzword-developer.html' title='response to &apos;Hiring a *buzzword* Developer ... &apos;'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-6058544551097664545</id><published>2007-10-26T22:15:00.000-07:00</published><updated>2007-10-26T22:21:13.560-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><category scheme='http://www.blogger.com/atom/ns#' term='error'/><category scheme='http://www.blogger.com/atom/ns#' term='capistrano'/><title type='text'>capistrano deployment error 'Errno::EACCES: Permission denied - /.ssh'</title><content type='html'>If you are using a Mac with Tiger and are having an error with capistrano deployment such as:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: localhost (Errno::EACCES: Permission denied - /.ssh)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Set your HOME environment variable. i.e. &lt;span style="font-family:courier new;"&gt;export HOME=/Users/monkeyboy&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;An hour later, I realized this. Hopefully someone else can find it here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-6058544551097664545?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/6058544551097664545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=6058544551097664545' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/6058544551097664545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/6058544551097664545'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2007/10/capistrano-deployment-error-errnoeacces.html' title='capistrano deployment error &apos;Errno::EACCES: Permission denied - /.ssh&apos;'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-7552754417585732950</id><published>2007-10-22T10:32:00.000-07:00</published><updated>2007-10-25T23:44:03.648-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='lightbox'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>issues with Flash content within lightbox</title><content type='html'>The lightbox concept in webpages started around 2 years ago (as far as I can remember). It allows certain content to be focused in on a webpage, so that nothing else can be distraction. Its been used for photo galleries, ajax content, [new form] popup advertisement, etc. In my case, it needed to show Flash content for configurations of content providers (widgets).&lt;br /&gt;&lt;br /&gt;Example screenshot (will be provided once I can get the image to upload)&lt;br /&gt;&lt;br /&gt;The problem that was occurring was that the &lt;a href="http://blog.craigambrose.com/articles/2006/09/22/redbox-release-2"&gt;Redbox&lt;/a&gt; plugin (for Rails) could not provide the correct support for the Flash content. Redbox is still a nice plugin.&lt;br /&gt;&lt;br /&gt;The following is a list of issues that were occuring, so that others may learn from my testing with Flash content in lightboxes:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Redbox uses CSS transparency to creat the grayed out portion of the lightbox -- known as the background overlay. There were problems that occurred with it across the browsers with flash content. Mainly if the user tried to scroll the browser the Flash movie would disappear. The transparency problems were resolved by creating a alpha-PNG to be used for all browsers except IE6 that uses the CSS filter property.&lt;/li&gt;&lt;li&gt;Some control was not provided by Redbox to handle the width and height of the lightbox. This was needed because the Redbox plugin sets the div that displays the lightbox to auto height and width, which is great for content such as images and text. Unfortunately, the width and height of the Flash movie do not get considered into this calculation (a DOM problem I assume) of the width and height of the div containing the lightbox. This would cause the lightbox display to be much smaller than it was supposed to be. The width and height need to be set manually.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;On the page where the lightbox was being displayed there are scroll bars that are part of a large select box. In some browsers, *cough* IE, like to overlay the scroll bars over all content, completely ignoring z-index. They need to be hidden while the lightbox is being displayed. It also needs to be taken into consideration that the scroll boxes within the lightbox are not removed.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;In Safari (and maybe some other browsers), content loaded from an Ajax request into lightbox needs to be removed from the lightbox even when the lightbox 'innerHTML' is set to empty string. This problem would occur if the same lightbox with Ajax request was performed again the content from the previous request would be there again. This is solved by removing the child HTML elements from the lightbox when the lightbox is no longer needed.&lt;/li&gt;&lt;li&gt;Proper positioning of the lightbox to be centered with respect to the current browser windows scrolled at position, not with respect to just the top of the content. This one was pretty trivial to solve as it was a professional design choice for our content. I label it as an issue because it seems that lightbox should work with respect to the user's view and not force the user to scroll to where the lightbox appears in the browser window.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;In Mozilla browsers (FF2) on Mac, the Flash movie likes to disappear every once and awhile depending on the condition that there were two flash movies playing in the same window -- one in a lightbox and one in the background. The other condition is that the flash movie in the background had a flashvar 'wmode' set to 'opaque'. Set this 'wmode' to a different value and the problem no longer occurs.&lt;/li&gt;&lt;/ol&gt;I make no claims to knowing why some of these issues occurred either browser issues, users issues, etc. I just came up with the best solutions I could to solve the problem from not occurring again in the browsers.&lt;br /&gt;&lt;br /&gt;With these issues, I took some time and built a &lt;a href="http://code.google.com/p/rb-lightbox-plugin/"&gt;Lightbox&lt;/a&gt; script that handles these conditions and supports Flash content plus any other content pretty well. I slapped it into a &lt;a href="http://code.google.com/p/rb-lightbox-plugin/"&gt;plugin&lt;/a&gt; a while back. I tried my best to make it backwards compatible with Redbox as much as possible, so we did not drastically need to change our code, so mostly its updated Javascript to handle the above conditions plus some extensions to the Helpers for width and height.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note:&lt;/span&gt; I would just like to point out that this code is kind of old. Its still in use at my current employer's &lt;a href="http://www.chumby.com/"&gt;website&lt;/a&gt;. It works well and has proven to be quite stable. At the time of its creation there were no nice Rails plugins with lightbox support except &lt;a href="http://blog.craigambrose.com/articles/2006/09/22/redbox-release-2"&gt;Redbox&lt;/a&gt;, which did not work well with the Flash content.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-7552754417585732950?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/7552754417585732950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=7552754417585732950' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/7552754417585732950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/7552754417585732950'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2007/10/another-alternative-lightbox-script.html' title='issues with Flash content within lightbox'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-8988084490684063990</id><published>2007-10-10T22:28:00.000-07:00</published><updated>2007-10-22T10:00:10.737-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='caching'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>timed out fragment caching in Rails</title><content type='html'>As you can probably tell I am a little into optimizations. In Rails, caching is one of those things that is made pretty easy, but can also be difficult when you want to do complex tasks with the caching -- such as expiring it. There are two ways with &lt;a href="http://api.rubyonrails.org/classes/ActionController/Caching/Fragments.html#M000119"&gt;expire_fragment&lt;/a&gt; within the logic of your controllers or using an &lt;a href="http://api.rubyonrails.org/classes/ActiveRecord/Observer.html"&gt;Observers&lt;/a&gt;. The Observers are useful, but require that much little effort to set things up, which personally I don't want to maintain. The expire fragment was my next target, but yet again a struggle because I had to write logic for it in certain places.&lt;br /&gt;&lt;br /&gt;Hence the creation of my next caching mechanism. Rails supports many types of caching like file, memory, memcache, etc. The problem I have found is that memcache is the only that supports auto timeouts of the cache data. Tell me why I cannot have the same functionality built into Rails for the other caching mechanisms? I want to cache fragments in local memory of the server, which require quick access, and are small enough where they don't need to be shared like memcache.&lt;br /&gt;&lt;br /&gt;For example I want to cache a fragment for 5 minutes on a page:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;This is last 5 minutes of posts from our forums:&lt;br /&gt;&amp;lt;%cache_timeout('forum_listing',5.minutes.from_now) do %&amp;gt;&lt;br /&gt;&amp;lt;ul&amp;gt;&lt;br /&gt;   &amp;lt;% for post in @posts %&amp;gt;&lt;br /&gt;   &amp;lt;li&amp;gt;&amp;lt;b&amp;gt;&amp;lt;%=post.title%&amp;gt;&amp;lt;/b&amp;gt; - by &amp;lt;%=post.author.username%&amp;gt; at &amp;lt;%=post.created_at&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;   &amp;lt;%end%&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;&amp;lt;%end%&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This fragment will timeout after the page that contains it is loaded after the 5 minute mark and then will be reloaded. As you will noticed @posts are loaded, so is_cache_expired? method is provided in the controller and view to make sure if the fragment hasn't expired. This allows data to loaded only when needed.&lt;br /&gt;&lt;br /&gt;The following is the code written for the timeout caching. Check back soon for plugin location.&lt;br /&gt;&lt;pre name="code" class="ruby"&gt;&lt;br /&gt;module ActionController&lt;br /&gt;  module Cache&lt;br /&gt;    module TimedCache&lt;br /&gt;      #used to store the associated timeout time of cache key&lt;br /&gt;      @@cache_timeout_values = {}&lt;br /&gt;      #handles standard ERB fragments used in RHTML&lt;br /&gt;      def cache_timeout(name={}, expire = 10.minutes.from_now, &amp;block)&lt;br /&gt;        unless perform_caching then block.call; return end&lt;br /&gt;        key = fragment_cache_key(name)&lt;br /&gt;        if is_cache_expired?(key,true)&lt;br /&gt;          expire_timeout_fragment(key)&lt;br /&gt;          @@cache_timeout_values[key] = expire&lt;br /&gt;        end&lt;br /&gt;        cache_erb_fragment(block,name)&lt;br /&gt;      end&lt;br /&gt;      #handles the expiration of timeout fragment&lt;br /&gt;      def expire_timeout_fragment(key)&lt;br /&gt;        @@cache_timeout_value[key] = nil&lt;br /&gt;        expire_fragment(key)&lt;br /&gt;      end&lt;br /&gt;      #checks to see if a cache has fully expired&lt;br /&gt;      def is_cache_expired?(name, is_key = false)&lt;br /&gt;        key = is_key ? fragment_cache_key(name) : name&lt;br /&gt;        return (!@@cache_timeout_values.has_key?(key)) || (@@cache_timeout_values[key] &amp;lt; Time.now)&lt;br /&gt;      end&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;module ActionView&lt;br /&gt;  module Helpers&lt;br /&gt;    module TimedCacheHelper&lt;br /&gt;      def is_cache_expired?(name = nil)&lt;br /&gt;        return false if name.nil?&lt;br /&gt;        key = fragment_cache_key(name)&lt;br /&gt;        return @controller.send('is_cache_expired?', key)&lt;br /&gt;      end&lt;br /&gt;      def cache_timeout(name,expire=10.minutes.from_now, &amp;block)&lt;br /&gt;        @controller.cache_timeout(name,expire,&amp;block)&lt;br /&gt;      end&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;#add to the respective controllers&lt;br /&gt;ActionView::Base.send(:include, ActionView::Helpers::TimedCacheHelper)&lt;br /&gt;ActionController::Base.send(:include, ActionController::Cache::TimedCache)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If anyone has any suggestions or comments please feel free to leave them in the comments.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update:&lt;/b&gt; This is the link to the &lt;a href="http://code.google.com/p/timedcachedfragment/"&gt;plugin&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-8988084490684063990?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/8988084490684063990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=8988084490684063990' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/8988084490684063990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/8988084490684063990'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2007/10/timeout-fragment-caching-in-rails.html' title='timed out fragment caching in Rails'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-1479009124521406162</id><published>2007-10-07T13:33:00.000-07:00</published><updated>2007-10-07T14:23:21.030-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='puddy'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Puddy -- YAWFP</title><content type='html'>Yet another web framework for Perl, but I like to call it &lt;a href="http://code.google.com/p/puddy/"&gt;Puddy&lt;/a&gt;. A work in progress.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Short Description:&lt;/span&gt;&lt;br /&gt;&lt;div id="wikicontent" style="padding: 0pt 3em 1.2em 0pt;"&gt;&lt;p style="font-style: italic;"&gt;A project based on wanting a web framework built for speed and integration with standards. Currently modeling Rails in the area of application design, but improving areas with modules that are known to be faster and optimized (because I say so). &lt;/p&gt;&lt;p style="font-style: italic;"&gt;Model uses Rose::DB::Object for ORM support. It will handle to the association with the database that is well designed -- meaning the database handles the relationships not the ORM. &lt;/p&gt;&lt;p style="font-style: italic;"&gt;View uses a custom built XML::Builder and EPB that will handle templating that make incorporating Perl code into document easily. There is no language better than the langauge the application is built to use for the View. I am basing off the fact that out of my personal experience I have never met a 'designer' that just use a simple templating language. &lt;/p&gt;&lt;p style="font-style: italic;"&gt;Controller... well a work in progrees.&lt;/p&gt;If anyone is interested in helping please message away at /[jtarchie][at][gmail][dot][com]/.&lt;br /&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-1479009124521406162?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/1479009124521406162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=1479009124521406162' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/1479009124521406162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/1479009124521406162'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2007/10/puddy-yawfp.html' title='Puddy -- YAWFP'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-8689631233241566350</id><published>2007-10-04T07:18:00.000-07:00</published><updated>2007-10-07T22:22:33.737-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='caching'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><title type='text'>XML fragment caching in Rails</title><content type='html'>Rails has been nice to use. The most powerful part of it is the templating engine for RHTML and RXML. A problem that exists is that they do not share some of the same functionality. Both can execute Ruby code, and output specific content, access helpers, etc. Yet, RXML lacks the ability for fragment caching.&lt;br /&gt;&lt;br /&gt;The problem exists for fragment caching because it was especially designed for ERB fragments. &lt;a href="http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/"&gt;ERB&lt;/a&gt; allows Ruby code to be use as a templating language -- the same way PHP does for HTML. The nice thing out ERB is that everything evaluated and rendered is plain text, but the caching relies on simple tricks with Ruby's &lt;a href="http://www.ruby-doc.org/core/classes/Kernel.html#M005926"&gt;eval&lt;/a&gt; to get the output of a block of ERB. The caching method &lt;a href="http://api.rubyonrails.org/classes/ActionView/Helpers/CacheHelper.html#M000564"&gt;cache&lt;/a&gt; (for views) even uses a function called &lt;a href="http://api.rubyonrails.org/classes/ActionController/Caching/Fragments.html#M000116"&gt;cache_erb_fragment&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I use RXML alot, so the benefits of fragment caching should be available as they are for RHTML. Especially with the slow rendering time of the RXML documents (a future post). RXML relies on overloading of a method using &lt;a href="http://corelib.rubyonrails.org/classes/Kernel.html#M002044"&gt;method_missing&lt;/a&gt; to help create a &lt;abbr title="Domain Specific Language"&gt;DSL&lt;/abbr&gt; for an XML document, in short, Ruby code gets outputted to XML.&lt;br /&gt;&lt;br /&gt;An Example RXML document:&lt;br /&gt;&lt;pre name="code" class="ruby"&gt;&lt;br /&gt;directors = ['George Lukas','Steven Speilberg','Michael Bay']&lt;br /&gt;xml.instruct!&lt;br /&gt;  xml.directors do&lt;br /&gt;     directors.each do |name|&lt;br /&gt;     xml.director :name=&gt;name&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;With the output as:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;directors&amp;gt;&lt;br /&gt;  &amp;lt;director name="George Lukas"/&amp;gt;&lt;br /&gt;  &amp;lt;director name="Steven Speilberg"/&amp;gt;&lt;br /&gt;  &amp;lt;director name="Michael Bay"/&amp;gt;&lt;br /&gt;&amp;lt;/directors&amp;gt;&lt;br /&gt;&lt;/pre&gt;A very simple example, but lets pretend the each director is dynamically loaded and that there is more information like age, location, and the last film they made. Information that will not change much till a movie is made, they get older, or they move. Never know when a director's already render XML might be needed again.&lt;br /&gt;&lt;br /&gt;It has actually proven to be quite a task to do XML caching. It appears to be a subject neglected in the Rails community -- any idea why? I have posted on forums &lt;a href="http://railsforum.com/viewtopic.php?id=7710"&gt;here&lt;/a&gt; and &lt;a href="http://forum.slicehost.com/comments.php?DiscussionID=635&amp;amp;page=1#Item_1"&gt;here&lt;/a&gt; about the topic. I had some preliminary code with those posts too, but I was having problems.&lt;br /&gt;&lt;br /&gt;I would like to give back my final results of XML caching. Something that I hope is useful to some.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The following is the code use for the xml caching:&lt;br /&gt;&lt;pre name="code" class="ruby"&gt;&lt;br /&gt;module ActionView&lt;br /&gt;  module Helpers&lt;br /&gt;    module CacheHelper&lt;br /&gt;      def cache_xml(name ={}, &amp;amp;block)&lt;br /&gt;        @controller.cache_xml_fragment(block, name)&lt;br /&gt;      end&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;module ActionController&lt;br /&gt;  module Caching&lt;br /&gt;    module Fragments&lt;br /&gt;      def cache_xml_fragment(block, name = {}, options = nil)&lt;br /&gt;        unless perform_caching then block.call; return end&lt;br /&gt;        buffer = eval("xml.target!",block.binding)&lt;br /&gt;        if cache = read_fragment(name, options)&lt;br /&gt;          buffer.concat(cache)&lt;br /&gt;        else&lt;br /&gt;          pos = buffer.length&lt;br /&gt;          block.call&lt;br /&gt;          write_fragment(name,buffer[pos..-1], options)&lt;br /&gt;        end&lt;br /&gt;      end&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;It works just like normal caching in RHTML documents. This is an example that can be used with the directors XML provided above.&lt;br /&gt;&lt;br /&gt;Example Usage:&lt;br /&gt;&lt;pre name="code" class="ruby"&gt;&lt;br /&gt;directors = ['George Lukas','Steven Speilberg','Michael Bay']&lt;br /&gt;xml.instruct!&lt;br /&gt;xml.directors do&lt;br /&gt;directors.each do |name|&lt;br /&gt;  cache_xml("director/#{name}") do&lt;br /&gt;    xml.director :name=&amp;gt;name&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;I hope to make this into a plugin very soon. Its easy to copy and paste for right now.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;UPDATE: &lt;/span&gt;The plugin can be found &lt;a href="http://code.google.com/p/xmlcache"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-8689631233241566350?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/8689631233241566350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=8689631233241566350' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/8689631233241566350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/8689631233241566350'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2007/10/xml-fragment-caching-in-rails.html' title='XML fragment caching in Rails'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-957776718998962870.post-1969321382356332060</id><published>2007-09-29T21:55:00.000-07:00</published><updated>2007-10-11T00:41:58.662-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web design'/><category scheme='http://www.blogger.com/atom/ns#' term='internet'/><category scheme='http://www.blogger.com/atom/ns#' term='experience'/><title type='text'>Experience with the web (Part 1?)</title><content type='html'>I have been using the web since '94 in the 1900s. I wasn't apart of its original inception because I was too little and naive to know it even existed. Except for BBSs, those rocked, it still amazes me what an ANSI artist can do with &lt;a href="http://en.wikipedia.org/wiki/TheDraw"&gt;TheDraw&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Currently, I am working for a company using Ruby on Rails as my primary development environment. Everything for the company is being written RoR. Its been interesting to use a framework to this extensive magnitude because you truly realize where its faults and advantages. With the changes, limitations, and additions I have worked into our implementation of RoR I thought that it would be nice to share in the case others might find it useful.&lt;br /&gt;&lt;br /&gt;I claim to be no expert to programming. Anyone who make a claim to be an expert at anything better be ready to back it up. I will admit that I have experience though whether it be professional, amateur, or just plain tinkering. A lot of my interest in computers has always been the web. I like the power it has to be accessed by so many people from so many different places.&lt;br /&gt;&lt;br /&gt;My first real website was way back in middle school. It was my play ground. Where everything from rants, drawings, hosting of others webpages, etc... were presented. It was my play ground for many year up till high school. Where I unsuccessfully tried starting my own cult. Unfortunately, a one person cult, well, is just lame.&lt;br /&gt;&lt;br /&gt;From this website though, I picked up my first CGI scripts from &lt;a href="http://www.scriptarchive.com/"&gt;Script Archive&lt;/a&gt;. This guy in my opinion really created the interest of CGI programs to provide web pages with interactivity and also was kind enough to lend his source code for everyone to use. This is what sparked my interest in &lt;a href="http://www.perl.org/"&gt;Perl&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;My most successful website to date incorporated alot what I had learned, but albeit still very crude. It was a fan site of South Park called killkenny. It had some of the copied content from many other fan sites, but also some original. I setup a weekly quiz, created with a friend of mine, about strange things we found in the episodes. This proved to be very popular because to date we had 100,000 unique hits / month. Keep in mind this is before Google Ads, so we made no money. It was for fun. Eventually it became, like other things, to difficult to maintain and was retired. From this I did the web design, content, hosting management, and interactivity B.A. (before ajax), during the year 1997 or 9th grade.&lt;br /&gt;&lt;br /&gt;Well I am going to take a breather because this is much more than I intended to write. I might continue writing about this at a later time, but I would really like to write about issues I have faced with respects to web programming and show my solutions or questions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/957776718998962870-1969321382356332060?l=webrepsects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://webrepsects.blogspot.com/feeds/1969321382356332060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=957776718998962870&amp;postID=1969321382356332060' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/1969321382356332060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/957776718998962870/posts/default/1969321382356332060'/><link rel='alternate' type='text/html' href='http://webrepsects.blogspot.com/2007/09/experience-with-web-part-1.html' title='Experience with the web (Part 1?)'/><author><name>jt archie</name><uri>http://www.blogger.com/profile/06350612684840721907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://bp3.blogger.com/_e6nVVlq-afg/R1y7ISiE8yI/AAAAAAAAABg/8Ys3Ct0CtA8/S220/n10603565_33695653_9527.jpg'/></author><thr:total>0</thr:total></entry></feed>
