Posts Tagged ‘programming’

Learn your damn vocabulary!

Posted in agile, management, software development on January 29th, 2011 by Joerg – 2 Comments

Yesterday in a conversation with a team-mate we had the idea of a metaphor that turned out to be very useful. Learning programming has a lot in common with learning a foreign language.

We were talking about different experiences while programming. Sometimes you are in a real flow. You can just fluently express all your ideas and create hundreds of lines without stopping. Other times you need to stop every second line to google some details or ask other people.

When using foreign languages you can find situations that feel exactly the same. The tourist with a dictionary needs to lookup every second word. There is no way to start a real conversation. It’s only enough to get to the next train station. But after some years of learning he might join the natives and enjoy a conversation. He can talk fluently and does not look up words or think about the grammar.

If the situations feel so similar, what can we learn from the metaphor. We should look what it takes to become a fluent speaker in a foreign language:

  • Learning vocabulary
  • Learning grammar
  • Using the language

Vocabulary in the world of programming is similar to basic language constructs, keywords and knowing what functionality your libraries are offering. I would also include knowledge about the editor or IDE, keyboard shortcuts and version control.
So what do you need to do to get fluent in your language. Learn your damn vocabulary! You really need to memorize it. It is not enough to be able to look it up. This would be like looking up every second word in a dictionary. A fluent conversation is impossible. Now the good news is, that in a natural language about 1000 words are enough to conduct a fluent conversation. Something similar is probably true for programming. You don’t need to know every detail to be fluent.
But the guy with a vocabulary of 1000 words will probably never win a Pulitzer prize. A lot of people think if they know the basics of their programming environment it is sufficient. No! You have to constantly extend your vocabulary. I am often surprised by discovering new features of the JDK, my IDE or the libraries we are using. Often I realize that I could have saved a lot of time, if only I did know this before. So go and discover new vocabulary and don’t forget to memorize it.

Grammar is more equivalent to higher level constructs like design patterns, data structures or algorithms. When you learn a foreign language, grammar is very helpful in understanding the right way to combine the words. If you don’t know the grammar, the way you use the language usually sounds funny to native speakers. The same goes for the grammar of programming. So learn it if you don’t want to sound funny.
There is another interesting effect. A fluent user of a language usually does not think about grammar. He can often not even explain why he used the words in a certain way. It just felt right. There is a lesson in it. Learn your grammar well but after a while don’t try to think about it to much in order to talk fluently.

Last but not least in order to get fluent in a language you have to use it. You usually start in a class together with a teacher. You have a save environment where you can try your vocabulary and grammar without fear. A good way to do this for programming are code katas. You are in a save environment with peers that support you and give you feedback. You have to repeat a kata often to memorize every important vocabulary.
There are many other well known ways to use programming in order to get fluent:

  • Read other peoples code
  • Do private projects (and open source them to get feedback)
  • And of course your do your daily business

Like learning a foreign language, learning programming takes many years. In the beginning you will be like the tourist and his dictionary. Just make sure that you don’t stay the tourist.

Next time you are stuck every second line while programming try to identify what vocabulary you just did not memorize or what grammar you probably not understood. Then memorize it and repeat …

Why all programmers should blog

Posted in agile, blogging, management, software development on January 30th, 2010 by Joerg – 38 Comments

There are some obvious reasons why you should start blogging when you are a programmer. Most of them also apply to everybody else:

  • You share your knowledge. This is a benefit for all of us. If everybody would be blogging about all the little issues they had then a Google-Search would help us even more. I am sure nearly every problem in the world is already solved. It is just not written down.
  • It’s a kind of self marketing. A potential employer can get a much better picture of your abilities than he could from CVs or references. When I hire somebody it is already a huge plus for him when he has a blog at all.
  • Explaining things to other people is the best way to learn. You can only teach what you fully understand. This is at least as efficient as hands on experience.
  • You might even make some money with blogging. There are several sites about this. If you are interested look here or here.

But the main reason is something else. Some years ago I read an article about software documentation. There was a lot of wisdom in it, but one phrase sticked to my brain:

Programming is doing something weird to your brain. When you write a piece of documentation right after a programming session the result is likely to be barely readable for human beings.

If that’s true then the opposite should work too.  Blogging teaches you to write for people, which is exactly what you should do in your code. Good code needs to be easy to understand to be easy to maintain. There are whole books about this like the famous Clean Code by Uncle Bob.

I think blogging does something weird to your brain, that makes your code better readable for human beings. So:

If you want to become a better programmer, start blogging!