ATTs 1993 Predictions Remarkably Accurate
09.18.09 - 04:12pm
h/t core77.com
It’s amazing how many of these 1993 predictions are just common place today.

09.18.09 - 04:12pm
h/t core77.com
It’s amazing how many of these 1993 predictions are just common place today.

09.18.09 - 12:25pm
Seth’s Blog: Things to ask before you redo your website
I think these are perhaps the tenth and eleventh questions you should ask, not the first two. Here’s my list of difficult and important questions you have to answer before you spend a nickel:

09.10.09 - 10:23am
We were seeing a json error in the couchdb logs. Apparently 0.9.1 (because of MochiWeb) doesn’t like certain UTF characters. Unfortunately, this causes replication to totally hang. That’s a bummer. It looks like it’s been patched:
http://issues.apache.org/jira/browse/COUCHDB-333
However, that’s not in the 0.9.1 release.

09.10.09 - 10:21am
If the couchdb book confused you regarding the changes api that supposedly exists:
http://books.couchdb.org/relax/reference/change-notifications
I think that’s a 0.10 release feature (and not yet in 0.9.1). I stumbled upon this API which seems to do something very similar: http://wiki.apache.org/couchdb/HTTP_Document_API?action=show&redirect=HttpDocumentApi (scroll down to “all_docs_by_seq”).

09.09.09 - 09:24am
How to avoid the dog-pile effect on your Rails app | Plataforma Blog
Imagine that in a certain hour, this page on your application receives 4 requests per second on average. In this case, between the first request and the query results being returned, 5 seconds will pass and something around 20 requests will hit your server. The problem is, all those 20 requests will miss the cache and your application will try to execute the query in all of them, consuming a lot of CPU and memory resources. This is the dog-pile effect.
Nice article on how to prevent multiple requests from triggering the same long-running query.

09.04.09 - 11:07am
UPDATE: This is rails-incompatible... which sucks.
Ruby 1.8.6 leaks memory in some surprising places. Even gsub and split on the String class cause some bad headaches. If you're using Haml and 1.8.6 - you are probably in a bit of trouble.
Read more: http://blog.edhickey.com/2008/12/03/memory-leak-in-ruby-186-string-class/
However, simply overwriting the offending methods fixes this memory leak at least. With a weird caveat that you may not use $ variables (eg $1) in any blocks passed to gsub.
Re-read that last sentence... "boom".gsub(/b(.)/) {|m| $1.upcase} will NO LONGER work. Unfortunately... rails uses that syntax, making this blog post probably moot
08.13.09 - 11:41am
At Motionbox, we use a RFC 3339 time format in some data we return. Javascript doesn't natively handle this format with Date.parse. The only other blog post I've seen on the subject is this:
http://dansnetwork.com/2008/11/01/javascript-iso8601rfc3339-date-parser/
However, since that's a regular expression that's parsing on the string, it can sometimes be slower (but not toooo bad... 1000 iterations on the code from the blog post above took < 100 miliseconds in IE7 (~40 miliseconds in Firefox on a macbook pro).
I knew we could do better with splits. With my code below I got it operating 60% faster (so operations take 40% of the time from the code above).
07.21.09 - 02:35pm
http://programmers-blog.com/2009/06/08/ruby-1-8-6-in-ubuntu-9-04-64-minimal

07.21.09 - 02:34pm
http://axonflux.com/curb-install-problems-on-ubunt

03.19.09 - 09:14pm
It was hard to find a lot of documentation on how to create a Message Driven Bean (MDB) EJB (for deployment into glassfish). Basically - I want to create a ruby app that receives messages and then does stuff with them. After tons of looking around I was able to finally put together one using NetBeans.
http://github.com/tobowers/jruby-mdb/tree/master
I don't have time now to go into the details... I, hopefully, will soon. However, edit the TesterMessageHandlerBean.java to change what message queue it listens to. Add or edit files in the src/conf/ruby directory to add ruby files.
Hope that helps... later I'll go into more detail about setting up glassfish and using OpenMQ.
I hate java, but this is a pretty damn nice way to deploy your ruby apps. Hopefully, this'll be a good start into letting us have ruby apps listening to OpenMQ in glassfish, but using jRuby.