I can’t talk about my job too much because everything we do is TOP SECRET, but I thought I’d make a few confessions / thoughts about programming.
- I absolutely love writing code. Probably moreso than is healthy.
- I spend more time than I should formatting my code so it looks pretty. I really enjoy reading code with syntax highlighting, lots of comments, and good indenting.
- I dislike the ternary
"<expression> ? <true-value> : <false-value>"operator. I think it obfuscates code and makes debugging more difficult. That said, I’m guilty of using it myself because I think it looks cool. - I used to consider myself a ‘very good’ programmer, but I’ve learned a lot at my new job, and the more I learn, the more I realize there is to learn. Programming is like knowledge in general that way. I think this phenomenon (beginning programmers overrating their skills) is a great example of the Dunning-Kruger effect at work.
- I get a huge rush when I write a lot of code and it works on the first try, especially if the code involved pointer arithmetic or a nontrivial algorithm.
- I think programming is a great way to gain self confidence. There’s nothing like completing a project that sounded terrifying when it was first proposed to you.
- Python used to be, far and away, my favorite language, but I’m starting to think C# is really cool, largely because I like the .NET libraries and the Reflection capabilities. If I do go back to using Python on a regular basis, I’ll probably switch to IronPython so I can still use . NET. I still think Python is better for manipulating strings, largely because of the splicing syntax, but I rarely have to do that. I’ve never extensively used the
picklemodule in Python, but from what I remember, it was more difficult to use than .NET’s XML Serialization. Admittedly, the XML serialization syntax in .NET is kind of goofy for serializing recursively defined classes like Trees, and it can’t handle a class like a Graph without some carefull planning, but it really is cool to add a few attributes, feed your obejct to a BinaryWriter, and have the data easily persisted to the hard drive or sent across the wire. - I hate the const keyword in C++ but I think it’s necessary for writing good code. The reason I dislike it is that it spreads like a virus: you add the const keyword to one function, and soon you have to add const to all the inputs to that function and then add const to the output, and const soon your whole const class, all of its const clients, and some other random const code you wrote is peppered with const keywords. I like C#’s implementation of the out keyword much, much more.
- That is all for now. I have more code to write