not sure? write a test

I learned this lesson from a colleague some years ago, but it’s worth reiterating. If you have a question about how a certain aspect of a programming language or library behaves, then it’s usually quicker to write and run a small test which demonstrates, than it is to read the documentation to try and figure […]


Inspired by Martin Fowler articles on domain specific languages, I’ve come up with this kind of thing to use a USB gamepad device to control things on my desktop. device "/dev/input/by-id/usb-050d_0805-event-joystick"   key_map 304, :ctrl, :alt, :left key_map 306, :ctrl, :alt, :right   rule ‘ABS’, ‘THROTTLE’ do |value| `/home/edward/bin/set-volume #{adjust_range(value, 255, 0, 0, 100, true)}` […]

soft coding

I enjoy Worse Than Failure for the quick laughs some days. But you can’t have a site that shows bad practices in IT, without thinking about what the good alternatives are. Yesterday they had a thought provoking discursive article on Soft Coding, which looks at the tension between hard coding values in a program versus […]