Syntax Hell
I don’t like being a specialist. I enjoy working with lots of different technologies and different programming languages. That’s the good news. The bad news is that, when you work with all of these languages, you have to keep all of the syntax straight between them. All languages support certain base constructs like loops, but they all implement them with slight syntactic difference. Because of this, I get stuck on the stupidest things sometimes. This afternoon I was writing a quick Ruby script to remove bad, frozen messages from my exim queue. I could not for the life of me remember how to get out of a Ruby loop early. Is it next? loop? continue?
continue is the right answer. I had left my pickaxe book at the office, so I was looking it up online. Lots of resources for how to get into Ruby loops, but the ones that told you how to get out were being elusive. I had even tried continue earlier, but I must have fat-fingered the keyword because I got an error, so I kept looking for something different. It’s those kinds of loops, where you keep searching for the answer even though you actually already found it, that drive me up the wall.
So much for giving anything back today, eh?