Saturday, May 05, 2007

Touch typing rules

Touch typing is a great skill for an IT worker like myself, or anybody who uses a computer, come to think of it. I'm really glad I learnt how to do it when I first became an in-front-of-the-computer-sitting, doing-all-kinds-of-nerdy-things guy. Sure, it was hard for a couple of months, and I remember being really frustrated when my fingers wouldn't do what my brain told them to do. But after a while it got easier, and now, several years later, typing comes from the spine. I don't need to think about it.

The main advantages of touch typing (and using all ten fingers to type), compared to locating keys by sight and typing with 1-10 fingers, your nose, or whatever appendages the unenlightened like to use, are, in my opinion:
1) you don't have to look at the keyboard, instead you can keep your sight focused on the screen
2) typing is much faster
3) you look cool, in a nerdy way.

For some reason, I still remember part a conversation I overheard when I studied to become a software engineer. A student was presenting his project, a touch typing tutorial program, to a teacher. The part I remember was the teacher saying something like "it's not important for a programmer to know touch typing". I strongly disagree. I think it's a great, sharp tool for any programmer and should be taught (and obligatory) wherever programmers are taught.

I can understand the teacher's point of view. He probably thought of programming as intellectual exercises, of perfecting algorithms. Well, it is that, but it usually involves lots of other related work, like writing documentation, testing, doing maintenance work and so on. The teacher probably liked solving programming problems at evening, sitting in an armchair in his mansion while sipping cognac. If that's what programming is to you, then you might as well punch the keys with your cigar, if you like. But when you're churning out code and documentation for a living, 24/7, as I'm doing right now, speed becomes important. That's right, I work so hard that I'm actually coding right now with my back hands, or feet if that's what you like to call them. Whew. It ain't easy, you know.

I would claim that typing by touch makes you a better programmer. Nowadays, most programs have graphical user interfaces. If you find typing hard, you will use graphical tools to do things instead of command line tools. That is okay in some cases, but not always. An example: I've noticed that many of my coworkers like to use the graphical schema browser of Toad to look at data in database tables. Toad is allright (despite being a buggy piece of s**t) for some things, but I maintain that only amateurs inspect database tables through a graphical user interface. You should write the queries yourself. It's faster. And if you do that, you get to practice SQL all the time, and that makes you a better programmer. I guess that it's the same in most programming environments today: you can do a lot of things by clicking in an IDE. That's okay, but you should know what happens under the hood, and whether the GUI is slowing you down or making your work easier.

In my experience, it seems that a surprisingly large portion of programmers are trying to get away with less typing. I think that it partially explains the sparse comments, bad naming conventions and wrong indentation, which are all very common properties of bad code. If typing is drudgery for you, you will be reluctant to do these things properly. Also, you will be more reluctant to change things, when they're once done, and rewriting code is important to make it better. Usually, you don't get it completely right the first time.

I pictured this an epic subject before beginning to write, but now, what I've managed to get written seems sparse. Well, the book will be more elaborate, I promise. Now, to get some well deserved sleep...

No comments: