XMLRPC and Builder, a marriage made in heaven- July 26, 2008 This one is an example of why if you do XML you better do it right. I've written this blog with an aim for spotless MetaWeblog API support (I hate Web UI's and I own both MarsEdit and Ecto licenses). I also don't have an aversion to Dave Winer, and Atompub is not there yet IMO. So I've implemented a small MetaWeblog responder based on Ruby's XML-RPC module. The module is somewhat antiquated and the docs are not always telling all that you might need, but there is a little problem which is...http://live.julik.nl/2008/07/rpc-and-builder A prophecy cast in stone- July 25, 2008 This was so fantastically spot-on. Sure, theyre all curious and nice at first, but once they get their tentacles in, its nothing but this isnt good programming practice and that should be declaratively configured elsewhere. Youll see.http://live.julik.nl/2008/07/a-prophecy-cast-in-stone In defense of Amsterdam-Oost- July 23, 2008 If my neighbours wake up to the sounds of Cesaria Evora at 6AM and allow their guests to rumble across the stairwell at 4 screaming "Come out, Menno!", it ultimately means that once a month I'm allowed to go to sleep at 5 to the sounds of Donald Byrd. Fair trade, and it removes that bourgeois Northern-European tint from the neighbourly life where you need to go around begging for consent if you want to have a party on Friday evening where you'll serve mineral water and nachos and read...http://live.julik.nl/2008/07/in-defense-of-amsterdam-oost Brutal fragment cache- July 17, 2008 Recently I've hit that painful mark, y'know... A page on a Rails site I've been developing crossed the dreaded "1 second" request time. This can't be happening, thought I - it's just a list of objects! One SQL request, bonafide, no associations fetched, all indexes are in place... and the most aggravating was - the SQL request itself was a measly 0,1 seconds long. Something is wrong. After a short investigation the problem turned out to be of the following nature: <%...http://live.julik.nl/2008/07/cache-with-automatic-transmission Organized thread collisions- July 15, 2008 We don't like when things collide. Photo by szlea But what if we need them to What if we want to ensure that should a collision between threads happen, things will not go out of hand This is remarkably easy to do. Let's pretend we want $somevar to be thread-safe: require 'testunit' class Collision < Test::Unit::TestCase def test_that_fails a = Thread.new do 5.times do t $somevar = true sleep(rand(10)200.0) assert_equal true, $somevar, ...http://live.julik.nl/2008/07/ensuring-thread-collision |