» Code formatting +
I try to be consistant about code formatting. I pick a convention and stick to it. But I like the convention to make sense, as well as being easy to read (easy for me, I could care less if you can read it, heh).
If you've seen any of my code in my posts, you probably noticed that I use parentheses for everything -- method invocation, conditionals / other control structures, built-in methods like require, &c. So I write like this:
if (combo_meal and a_drink)
puts('you cheapskate, pay the extra buck')
get_refund("I'm goin' to taco bell!")
But I've been thinking lately that it doesn't really make sense to parenthesize with control structures, unless it is for the explicit purpose of grouping. They aren't methods, so they shouldn't be written like methods. I think I'm going to start writing them without the parens and see how I like it. I'm still not sure about require, and puts and so forth. They are methods, but then they are not regular methods -- they are top-level methods. Mabye I'll try writing them with space rather than parentheses as well.