<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Notes from the front-lines of startup engineering</description><title>Ruckus Notes</title><generator>Tumblr (3.0; @ruckus)</generator><link>http://ruckus.tumblr.com/</link><item><title>Saaspose: Cloud based document conversion &amp; recognition</title><description>&lt;a href="http://saaspose.com/"&gt;Saaspose: Cloud based document conversion &amp; recognition&lt;/a&gt;: &lt;p&gt;Appears to be a versatile service for barcode recognition and OCR. This could come in very handy.&lt;/p&gt;</description><link>http://ruckus.tumblr.com/post/23743442869</link><guid>http://ruckus.tumblr.com/post/23743442869</guid><pubDate>Fri, 25 May 2012 11:27:18 -0700</pubDate></item><item><title>Protip: Store file imports for better support / debugging</title><description>&lt;p&gt;If you run a service which allows one to import data, say maybe by uploading a CSV file, than do yourself a favor and store the original file in a place where you can access it later for support or debugging.&lt;/p&gt;
&lt;p&gt;Our service allows a person to upload a CSV file containing postal addresses and it has about 8 columns that need to be in a certain order.&lt;/p&gt;
&lt;p&gt;Before our code starts to actually process the file we shove it up to S3 in its original form. Later during processing if an error is encountered than a support person can look at the original file and see any obvious errors. Maybe you expect a CSV file but get an Excel (or a Apple Numbers file)? Maybe the customer wasnt paying attention and totally re-arranged the columns. Sure, most of these &amp;#8220;soft&amp;#8221; errors (such as CSV vs Excel) can be caught pretty easy by inspecting the file extension, but as a whole you are guaranteed to run into trickier situations.&lt;/p&gt;
&lt;p&gt;Either way, having the original file on hand for debugging is super helpful. Much better than emailing the customer and asking them to re-send you the file. In most cases we can be pro-active and email the customer back and say &amp;#8220;Hi, I saw that you just attempted a data import and it failed, it looks like it was due to &amp;#8230;.&amp;#8221;&lt;/p&gt;</description><link>http://ruckus.tumblr.com/post/23253644079</link><guid>http://ruckus.tumblr.com/post/23253644079</guid><pubDate>Thu, 17 May 2012 15:50:00 -0700</pubDate></item><item><title>Postgres search: normalizing accented characters</title><description>&lt;p&gt;As part of my move from Sphinx to Postgres Full-Text Search I needed a way to normalize accented characters. My data contains lots of diacritics, a common example is the varietal name &amp;#8220;Grüner Veltliner&amp;#8221;.&lt;/p&gt;
&lt;p&gt;My users do not want to enter that Umlaut each time they want to search for this varietal.&lt;/p&gt;
&lt;p&gt;Fortunately there is an awesome Postgres contribution package called &amp;#8220;unaccent&amp;#8221; which replaces diacritics with their plain text equivalent, effectively normalizing the data set.&lt;/p&gt;
&lt;p&gt;Using the package is pretty straight-forward. We first install the extension and then create a new text search configuration and ensure that we use it in all indexing and searching.&lt;/p&gt;
&lt;script src="https://gist.github.com/2561158.js?file=gistfile1.sql" type="text/javascript"&gt;&lt;/script&gt;&lt;p&gt;When searching make sure we reference the new configuration instead of the default &amp;#8216;english&amp;#8217;:&lt;/p&gt;
&lt;script src="https://gist.github.com/2561258.js?file=gistfile1.sql" type="text/javascript"&gt;&lt;/script&gt;</description><link>http://ruckus.tumblr.com/post/22134616630</link><guid>http://ruckus.tumblr.com/post/22134616630</guid><pubDate>Mon, 30 Apr 2012 11:56:31 -0700</pubDate></item><item><title>Sidekiq: alternative to Resque for background processing</title><description>&lt;p&gt;Mike Perham of &lt;a href="https://github.com/mperham/dalli"&gt;Dalli&lt;/a&gt; fame has written an awesome library called &lt;a href="https://github.com/mperham/sidekiq"&gt;Sidekiq&lt;/a&gt; which enables background processing via threads.&lt;/p&gt;
&lt;p&gt;Resque is a popular background processing solution and its what we use at Batch. It&amp;#8217;s battle tested and for the most part has stood up well.&lt;/p&gt;
&lt;p&gt;However, it feels heavy-weight because each Resque worker is a distinct process. Which is where Sidekiq comes in: it uses a pool of threads to process jobs so at most you have one master process.&lt;/p&gt;
&lt;p&gt;For smaller apps on constrained systems (read: VPS) I feel this can be a better solution. I&amp;#8217;ve been using Sidekiq for a couple of weeks now and I really like it. Sidekiq is Resque compatible so you can write jobs with existing Resque code and then process them using new Sidekiq workers. But in my case I just went straight Sidekiq.&lt;/p&gt;
&lt;p&gt;One major change is that in Resque your workers must implement a class method of &lt;code&gt;perform&lt;/code&gt;, but in Sidekiq the &lt;code&gt;perform&lt;/code&gt; method must be an instance method.&lt;/p&gt;
&lt;p&gt;So far I am a fan of Sidekiq. Give it a shot!&lt;/p&gt;</description><link>http://ruckus.tumblr.com/post/21866002669</link><guid>http://ruckus.tumblr.com/post/21866002669</guid><pubDate>Thu, 26 Apr 2012 13:45:00 -0700</pubDate></item><item><title>Switched from Sphinx to Postgres Full Text</title><description>&lt;p&gt;I&amp;#8217;ve recently migrated two Rails projects from Sphinx search to Postgres Full Text Search. Mainly because the applications were small and I didn&amp;#8217;t see the benefit of running another service, hence another point of failure.&lt;/p&gt;
&lt;p&gt;In both cases the number of documents and the level of search activity were not very high, so it was not a question of load on the Postgres server.&lt;/p&gt;
&lt;p&gt;In one of the applications searchable content has to be filtered for security and just treating Sphinx as a dumb search content repository was annoying. By moving it all into Postgres I can have the actual fuzzy text searching and the necessary security checks (by checking other tables) all in one place.&lt;/p&gt;
&lt;p&gt;My general architecture / flow is:&lt;/p&gt;
&lt;p&gt;* For each searchable table: add a &lt;code&gt;search_content&lt;/code&gt; column of type &lt;code&gt;tsvector&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;* Create a GIN index on the search_content column&lt;/p&gt;
&lt;p&gt;* If the columns can be indexed as-is and we dont need any other searchable columns then we can use the native &lt;code&gt;tsvector_update_trigger&lt;/code&gt; trigger to update the search index:&lt;/p&gt;
&lt;script src="https://gist.github.com/2483903.js?file=gistfile1.sql" type="text/javascript"&gt;&lt;/script&gt;&lt;p&gt;However, if the search content requires other tables then we need to write a manual function trigger. Don&amp;#8217;t forget to use &lt;code&gt;COALLESCE&lt;/code&gt; if any of your searchable columns can be NULL. If you forget this and allow NULLs to be creep in then it will make the whole tsvector  NULL and you&amp;#8217;ll wonder why you have no searchable content.&lt;/p&gt;
&lt;script src="https://gist.github.com/2483910.js?file=gistfile1.sql" type="text/javascript"&gt;&lt;/script&gt;&lt;p&gt;Now we need to seed the initial search index. In this case I just leveraged the touch method in ActiveRecord.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Contact.all.each { |c| c.touch }&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Finally, performing searches is pretty straight-forward. I wish there was a way that we can save from having Postgres parse and construct a query structure twice, but for these projects its a negligible cost.&lt;/p&gt;
&lt;script src="https://gist.github.com/2483945.js?file=gistfile1.sql" type="text/javascript"&gt;&lt;/script&gt;</description><link>http://ruckus.tumblr.com/post/21735656420</link><guid>http://ruckus.tumblr.com/post/21735656420</guid><pubDate>Tue, 24 Apr 2012 14:27:00 -0700</pubDate></item><item><title>Quickbooks + Ruby</title><description>&lt;p&gt;Recently I needed to integrate my Rails app with Quickbooks. Looking around on GitHub I didn&amp;#8217;t find any fresh libraries. &lt;/p&gt;
&lt;p&gt;Intuit has their Data Services API (currently at v2) which exposes a REST API to their customer data. Its a pretty clean API. Its annoying that it uses XML but Intuit is hard at work on v3 which will support JSON so thats nice.&lt;/p&gt;
&lt;p&gt;But anyways, I didn&amp;#8217;t find any good libraries so I decided to roll up my sleeves and write my own: &lt;a href="https://github.com/ruckus/quickeebooks"&gt;Quickeebooks&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It supports reading and writing of basic objects using the v2 API. &lt;/p&gt;
&lt;p&gt;I think it&amp;#8217;s pretty easy to use, you work with plain Ruby objects which get marshaled to XML and back. &lt;/p&gt;
&lt;p&gt;Give it a shot and let me know what you think.&lt;/p&gt;</description><link>http://ruckus.tumblr.com/post/19035241714</link><guid>http://ruckus.tumblr.com/post/19035241714</guid><pubDate>Fri, 09 Mar 2012 18:37:44 -0800</pubDate></item><item><title>Bundler install error: ArgumentError: invalid byte sequence in US-ASCII</title><description>&lt;p&gt;I upgraded my Rails app to 3.2.2 and was doing a deploy via Capistrano and during the bundler install process the deploy bombed out with the following error:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;** [out] ArgumentError: invalid byte sequence in US-ASCII &lt;/code&gt; &lt;br/&gt;&lt;code&gt;** [out] An error occured while installing will_paginate (3.0.3), and Bundler cannot continue.&lt;/code&gt; &lt;br/&gt;&lt;code&gt;** [out] Make sure that `gem install will_paginate -v '3.0.3'` succeeds before bundling.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I think the reference to will_paginate is really a red-herring. Anyways, the solution is to properly set the default environment in Capistrano which gets passed to the environment that Capistrano+Bundler use in the deploy.&lt;/p&gt;
&lt;p&gt;Specifically you need to set the &lt;code&gt;LANG&lt;/code&gt; attribute.&lt;/p&gt;
&lt;p&gt;Add this to your Capfile. Note that the PATH is not strictly necessary, but I had that block in there already.&lt;/p&gt;
&lt;script src="https://gist.github.com/1960251.js?file=gistfile1.rb"&gt;&lt;/script&gt;</description><link>http://ruckus.tumblr.com/post/18613786601</link><guid>http://ruckus.tumblr.com/post/18613786601</guid><pubDate>Fri, 02 Mar 2012 10:37:00 -0800</pubDate></item><item><title>Writing a basic image filter in Android using NDK</title><description>&lt;p&gt;I needed to implement some image filters on bitmaps for my Android project. I first attempted the filters in pure Java but it turns out to be too slow and consume too much memory.&lt;/p&gt;
&lt;p&gt;Bitmap handling in Android has always been a pain point and there is too much memory overhead.&lt;/p&gt;
&lt;p&gt;To get access to the underlying pixel data from a Bitmap in Java you use &lt;code&gt;Bitmap.getPixels()&lt;/code&gt; which returns an integer array of &lt;code&gt;Color&lt;/code&gt; objects. There is just too much object creation there meaning too much overhead.&lt;/p&gt;
&lt;p&gt;So the solution is to go native C.&lt;/p&gt;
&lt;p&gt;For a proof of concept I wanted to try implementing a filter in native C using the Android Native Development Kit (NDK). My test case adjusts a bitmaps level of brightness. &lt;/p&gt;
&lt;p&gt;The complete source is available on GitHub: &lt;a href="https://github.com/ruckus/android-image-filter-ndk"&gt;&lt;a href="https://github.com/ruckus/android-image-filter-ndk"&gt;https://github.com/ruckus/android-image-filter-ndk&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;First off you will need to download the Android NDK and place the directory somewhere handy, I put mine at &lt;code&gt;/AndroidSDK/android-ndk-r7b&lt;/code&gt; along side my standard Android SDK.&lt;/p&gt;
&lt;p&gt;In your Activity you will need to declare a method using the native keyword, this tells Android that the implementation for this method is in a C library, which we will generate shortly.&lt;/p&gt;
&lt;p&gt;In the &lt;code&gt;jni&lt;/code&gt; folder you will need any C files, I just have a single file, and a Makefile template.&lt;/p&gt;
&lt;p&gt;Compile the library using the &lt;code&gt;ndk-build&lt;/code&gt; command in the NDK:&lt;/p&gt;
&lt;script src="https://gist.github.com/1881398.js?file=gistfile1.txt"&gt;&lt;/script&gt;&lt;p&gt;If all goes well then it should compile cleanly and leave you with a &lt;code&gt;libimageprocessing.so&lt;/code&gt; shared object.&lt;/p&gt;
&lt;p&gt;Crack open &lt;code&gt;jni/imageprocessing.c&lt;/code&gt; and lets have a look. Notice that the method name we call is&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Java_com_example_ImageActivity_brightness&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Which is the complete Java package name plus the method that we annotated with the &lt;code&gt;native&lt;/code&gt; keyword in the Activity. The first argument to this method is the JNI environment which Android supplies for us. Any additional arguments are the user supplied ones part of the signature in Java. Looking at the signature in Java:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;public native void brightness(Bitmap bmp, float brightness);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;We pass in the Bitmap and the brightness value.&lt;/p&gt;
&lt;p&gt;Looking back at the Java Activity notice that C receives the Bitmap and writes back the modified pixels to the same object.&lt;/p&gt;
&lt;p&gt;The Android NDK gives us some basic bitmap functions that we need to use to get at the actual pixel data:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;AndroidBitmap_lockPixels&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Its important than any calls to &lt;code&gt;AndroidBitmap_lockPixels&lt;/code&gt; are complemented with a &lt;code&gt;AndroidBitmap_unlockPixels&lt;/code&gt; when you are done.&lt;/p&gt;
&lt;p&gt;In the core filter method &lt;code&gt;brightness&lt;/code&gt; the logic is the following:&lt;/p&gt;
&lt;p&gt;1) Iterate over each row of pixel data.&lt;/p&gt;
&lt;p&gt;2) After we grab the whole row we iterate over each column.&lt;/p&gt;
&lt;p&gt;3) The pixel data is a packed integer which contains the actual RGB values&lt;/p&gt;
&lt;p&gt;4) Since we need to manipulate each RGB value we extract the components out&lt;/p&gt;
&lt;p&gt;5) We multiplty by the brightness factor and then constrain it to a value between 0 and 255&lt;/p&gt;
&lt;p&gt;6) Then finally we write the modified pixels back into the structure.&lt;/p&gt;
&lt;p&gt;Some before and after screenshots:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Before" height="683" src="http://codycaughlan.s3.amazonaws.com/images/before.png" width="540"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="After" height="663" src="http://codycaughlan.s3.amazonaws.com/images/after.png" width="523"/&gt;&lt;/p&gt;</description><link>http://ruckus.tumblr.com/post/18055652108</link><guid>http://ruckus.tumblr.com/post/18055652108</guid><pubDate>Tue, 21 Feb 2012 20:44:00 -0800</pubDate></item><item><title>Recruiter Fail!
Some ProTips:
Don’t forget to substitute...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lz19ftGoS21qz4akvo1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;strong&gt;Recruiter Fail!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Some ProTips:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Don’t forget to substitute my real name into the email template placeholders&lt;/li&gt;
&lt;li&gt;Make sure all the other recipients are sent their own unique email and not just CC’ed onto mine.&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;No wonder recruiters garner so much scorn.&lt;/p&gt;</description><link>http://ruckus.tumblr.com/post/17214605198</link><guid>http://ruckus.tumblr.com/post/17214605198</guid><pubDate>Tue, 07 Feb 2012 09:19:00 -0800</pubDate></item><item><title>Java: Joda DateTime on the wire, long values in the database</title><description>&lt;p&gt;I&amp;#8217;ve begun development of the Android app for &lt;a href="http://batch.com/"&gt;Batch&lt;/a&gt; and we use REST/JSON as our API.&lt;/p&gt;
&lt;p&gt;Dates in JSON are represented as strings like:&lt;/p&gt;
&lt;pre&gt;2012-01-07T01:06:37Z&lt;/pre&gt;
&lt;p&gt;I am also using the wonderful &lt;a href="http://ormlite.com/"&gt;ORMLite&lt;/a&gt; framework to persist my objects in a local SQLite database. I would like to store my dates as UNIX timestamps using a type of &amp;#8220;long&amp;#8221;. By doing this I can do date filtering much faster by just having SQLite compare numbers instead of strings.&lt;/p&gt;
&lt;p&gt;Thus, I need an easy and transparent way to marshal my dates from DateTime strings to Longs and back and forth. &lt;/p&gt;
&lt;p&gt;Fortunately I am using the &lt;a href="http://wiki.fasterxml.com/JacksonHome"&gt;Jackson&lt;/a&gt; JSON library which has killer custom serialization/deserialization support. &lt;/p&gt;
&lt;script src="https://gist.github.com/1585575.js?file=gistfile1.java"&gt;&lt;/script&gt;</description><link>http://ruckus.tumblr.com/post/15588142449</link><guid>http://ruckus.tumblr.com/post/15588142449</guid><pubDate>Mon, 09 Jan 2012 15:27:00 -0800</pubDate><category>java</category><category>json</category><category>jackson</category><category>joda-time</category><category>rest</category><category>ormlite</category></item><item><title>WAL-E for Postgres WAL archiving / backup</title><description>&lt;a href="https://github.com/heroku/wal-e"&gt;WAL-E for Postgres WAL archiving / backup&lt;/a&gt;: &lt;p&gt;Been using WAL-E for Postgres continuous archiving / backup and I have to say I really like it. Super easy to setup and start rolling.&lt;/p&gt;
&lt;p&gt;Point-In-Time-Recovery has never been so easy…&lt;/p&gt;</description><link>http://ruckus.tumblr.com/post/14566705330</link><guid>http://ruckus.tumblr.com/post/14566705330</guid><pubDate>Wed, 21 Dec 2011 08:29:59 -0800</pubDate></item><item><title>Logging to Rails.logger from a Resque job</title><description>&lt;p&gt;I had various Rails.logger statements in my Resque background jobs but they were never hitting the the actual log.&lt;/p&gt;
&lt;p&gt;Turns out the problem was due to ActiveSupport::BufferedLogger flushing. What happens is that by default the flush period is 1000 statements, but since a given Resque job has such a short lifespan the flush period never gets reached.&lt;/p&gt;
&lt;p&gt;The solution is to turn on auto flushing for the duration of that job&lt;/p&gt;
&lt;script src="https://gist.github.com/1296366.js?file=gistfile1.txt"&gt;&lt;/script&gt;</description><link>http://ruckus.tumblr.com/post/11619655587</link><guid>http://ruckus.tumblr.com/post/11619655587</guid><pubDate>Tue, 18 Oct 2011 12:06:41 -0700</pubDate></item><item><title>Generate Excel friendly CSV from Ruby with UTF8/16 data</title><description>&lt;p&gt;I needed to generate an Excel friendly CSV file from a bunch of UTF-8 encoded data, coming from a database. I could generate the file just fine and it looked OK in vi or TextMate but when opened in Excel all of my diacritics (umlauts, etc) would be rendered as gibberish. Which made me think it was more of an Excel issue, because they appeared fine in TextMate, for example.&lt;/p&gt;
&lt;p&gt;The answer ended up being two-fold:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Use a tab delimiter instead of a comma&lt;/li&gt;
&lt;li&gt;Use Iconv to force your string to be UTF-16&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Both of these seemed to be required. Why the tab delimiter was crucial I have no idea, chalk it up to MS.&lt;/p&gt;

&lt;script src="https://gist.github.com/1293773.js?file=gistfile1.rb"&gt;&lt;/script&gt;</description><link>http://ruckus.tumblr.com/post/11582880026</link><guid>http://ruckus.tumblr.com/post/11582880026</guid><pubDate>Mon, 17 Oct 2011 13:59:42 -0700</pubDate></item><item><title>"I think in general engineers tend to not care as long as people stay out of their way and follow..."</title><description>“&lt;p&gt;I think in general engineers tend to not care as long as people stay out of their way and follow procedure and use sound logic and back things with data.&lt;/p&gt;

&lt;p&gt;Engineers hate working on things that data says won’t work, or just don’t make common sense. Engineers, while sometimes creative are very practical and programmatic by nature of their thought process.&lt;/p&gt;

&lt;p&gt;The easiest way to piss of an engineer is to have a bad idea, have no data to suggest why it’s not a bad idea and to disrupt the current flow of activity. Do that, and you’re on the shitlist.txt file for life.&lt;/p&gt;

&lt;p&gt;Come to the table and explain the logic behind the idea, the data behind it, what needs to be done to bring it to reality, and show you did your homework, and have a timetable that’s practical. More often than not, you’ll get a lot of engineering support. &lt;/p&gt;

&lt;p&gt;Engineers love to be productive and work on winning things. Most have an overachiever complex to some degree. They hate to get on board the fail train. Most companies have more work than engineering resources. Think about it.&lt;/p&gt;”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Robert Accettura - &lt;a href="http://www.quora.com/How-do-engineers-at-tech-companies-feel-about-their-non-engineer-colleagues"&gt;How do engineers at tech companies feel about their non-engineer colleagues?&lt;/a&gt;&lt;/em&gt;</description><link>http://ruckus.tumblr.com/post/8178635483</link><guid>http://ruckus.tumblr.com/post/8178635483</guid><pubDate>Thu, 28 Jul 2011 11:15:43 -0700</pubDate></item><item><title>PostgreSQL trigger to update a tsvector column</title><description>&lt;p&gt;One method of implementing full-text search in PostgreSQL is by storing your searchable content in a &lt;strong&gt;tsvector&lt;/strong&gt; column. You can add a GIN index on this column for super fast full-text search, but its not required.&lt;/p&gt;
&lt;p&gt;The idea is that you have, for example, a &lt;strong&gt;title&lt;/strong&gt; column that you want searchable. So you make a &lt;strong&gt;tsvector&lt;/strong&gt; column and then store the search index for the &lt;strong&gt;title&lt;/strong&gt; column in the &lt;strong&gt;tsvector&lt;/strong&gt; column.&lt;/p&gt;
&lt;p&gt;As content is added to the &lt;strong&gt;title&lt;/strong&gt; column you need to make sure the search index is kept up-to-date. This is where a pgsql trigger comes in to play:&lt;/p&gt;
&lt;script src="https://gist.github.com/1101717.js?file=gistfile1.sql"&gt;&lt;/script&gt;&lt;p&gt;In this trigger we always update the &lt;strong&gt;tsvector&lt;/strong&gt; on an INSERT and only update it on an UPDATE when the text actually changes.&lt;/p&gt;</description><link>http://ruckus.tumblr.com/post/7977605358</link><guid>http://ruckus.tumblr.com/post/7977605358</guid><pubDate>Sat, 23 Jul 2011 11:29:00 -0700</pubDate></item><item><title>Processing Resque jobs in Ruby that are queued by Java Workers</title><description>&lt;p&gt;I am using the awesome &lt;a href="https://github.com/gresrun/jesque"&gt;Jesque&lt;/a&gt; package to process jobs from &lt;a href="https://github.com/defunkt/resque"&gt;Resque&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We have a mixture of Ruby and Java workers. All our workers accept a Hash of arguments. In one case I needed to create a job from Java to be consumed by a Ruby worker. To generate the appropriate argument structure I ended up making a dummy worker class like:&lt;/p&gt;
&lt;script src="https://gist.github.com/1070875.js?file=gistfile1.java"&gt;&lt;/script&gt;&lt;p&gt;and I materialize the Job like so:&lt;/p&gt;
&lt;script src="https://gist.github.com/1070877.js?file=gistfile1.java"&gt;&lt;/script&gt;&lt;p&gt;Using this technique I can properly generate jobs from Java to be consumed by Ruby workers.&lt;/p&gt;</description><link>http://ruckus.tumblr.com/post/7363647803</link><guid>http://ruckus.tumblr.com/post/7363647803</guid><pubDate>Thu, 07 Jul 2011 17:52:03 -0700</pubDate></item><item><title>Connection Pooling in JDBC with Postgres and Commons DBCP</title><description>&lt;p&gt;I was trying to get connection pooling in JDBC with Postgres going and looked into using the Commons DBCP and Pool libraries. &lt;/p&gt;
&lt;p&gt;The problem is that the examples on how to get started dont refer to the released versions of the libraries but instead refer to trunk and the current refactoring. &lt;/p&gt;
&lt;p&gt;Thus: the basic &amp;#8220;&lt;a href="http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/doc/PoolingDataSourceExample.java?revision=1139667&amp;amp;view=markup"&gt;PoolingDataSourceExample.java&lt;/a&gt;&amp;#8221; doesnt work as advertised, based on the current release of &lt;strong&gt;commons-dpcp-1.4.jar&lt;/strong&gt; and &lt;strong&gt;commons-pool-1.5.6.jar.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I was able to create my connection pool by using code like so:&lt;/p&gt;
&lt;script src="http://gist.github.com/1055335.js?file=gistfile1.java"&gt;&lt;/script&gt;</description><link>http://ruckus.tumblr.com/post/7062932834</link><guid>http://ruckus.tumblr.com/post/7062932834</guid><pubDate>Wed, 29 Jun 2011 17:22:05 -0700</pubDate></item><item><title>CRON gotcha</title><description>&lt;p&gt;&lt;span&gt;Programs and scripts in &lt;strong&gt;/etc/cron.{d, hourly,daily,weekly,monthly}&lt;/strong&gt;/ are ignored if their names contain characters outside a very strict list. Most notably, dots. So if your program ends with .sh, .pl, .py or whatever, cron will silently ignore it.&lt;/span&gt;&lt;/p&gt;</description><link>http://ruckus.tumblr.com/post/6976713205</link><guid>http://ruckus.tumblr.com/post/6976713205</guid><pubDate>Mon, 27 Jun 2011 09:17:00 -0700</pubDate></item><item><title>Origin of Company Policy</title><description>&lt;p&gt;Start with a cage containing five monkeys.  Inside the cage, hang a banana on a string and place a set of stairs under it.  Before long, a monkey will go to the stairs and start to climb towards the banana.  As soon as he touches the stairs, spray all of the other monkeys with very cold, high-pressure water.  After a while, another monkey makes an attempt with the same result — all the other monkeys are sprayed with cold water.  Pretty soon, when another monkey tries to climb the stairs, the other monkeys will try to prevent it.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://codycaughlan.s3.amazonaws.com/images/monkey-banana-in-hand.jpg" align="left" alt="Monkey" height="244" width="225"/&gt;Now, put away the cold water.  Remove one monkey from the cage and replace it with a new one.  The new monkey sees the banana and wants to climb the stairs.  To his surprise and horror, all of the other monkeys attack him.  After another attempt and attack, he knows that if he tries to climb the stairs, he will be assaulted.  Next, remove another of the original five monkeys and replace it with a new one.  The newcomer goes to the stairs and is attacked.  The previous newcomer takes part in the punishment with enthusiasm!&lt;/p&gt;
&lt;p&gt;Likewise, replace a third original monkey with a new one, then a fourth, then the fifth.  Every time the newest monkey takes to the stairs, he is attacked.  None of the monkeys that are beating him have any idea why they were not permitted to climb the stairs or why they are participating in the beating of the newest monkey.  After replacing all the original monkeys, none of the remaining monkeys have ever been sprayed with cold water.  Nevertheless, no monkey ever again approaches the stairs to try for the banana.  Why not?  Because as far as they know that’s the way it’s always been done around here.&lt;/p&gt;
&lt;p&gt;And that, my friends, is how company policy begins.&lt;/p&gt;
&lt;p&gt;(Courtesy of &lt;a href="http://hackerboss.com/get-rid-of-templates/"&gt;&lt;a href="http://hackerboss.com/get-rid-of-templates/"&gt;http://hackerboss.com/get-rid-of-templates/&lt;/a&gt;&lt;/a&gt; )&lt;/p&gt;</description><link>http://ruckus.tumblr.com/post/496657142</link><guid>http://ruckus.tumblr.com/post/496657142</guid><pubDate>Sun, 04 Apr 2010 15:53:00 -0700</pubDate></item><item><title>"The issue was a company called Zynga, which makes online games, like FarmVille, that have become..."</title><description>“The issue was a company called Zynga, which makes online games, like FarmVille, that have become incredibly popular on Facebook among people who are missing parts of their brains.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://www.fakesteve.net/2009/11/why-mainstream-media-is-dying.html"&gt;http://www.fakesteve.net/2009/11/why-mainstream-media-is-dying.html&lt;/a&gt;&lt;/em&gt;</description><link>http://ruckus.tumblr.com/post/237373245</link><guid>http://ruckus.tumblr.com/post/237373245</guid><pubDate>Sun, 08 Nov 2009 14:06:31 -0800</pubDate></item></channel></rss>
