Friday, February 12, 2010

What have we programmers learned?

Remember when everyone wrote spaghetti code littered with gotos? Ok, I don't, and I doubt there was such a time. The really great people never wrote spaghetti code littered with gotos. They used gotos because they were all that was available, but they wrote structured code before structured code was cool. It took time, and language advances, but eventually the average joe programmer like me caught on to the practice. This led to much rejoicing and greatly improved software. Of course, by that time, the great programmers were already moving on to things like object-oriented programming and generic programming. There is always a downdraft from the great programmers exploring and pioneering to the average joe learning and improving the mean.

The questions were are here to ask (and answer) are
1) What has the average joe programmer learned over the last 10 years?
and
2) What are the great programmers exploring and pioneering today?

It is interesting to note that most of the things I'm going to discuss were practiced since the beginning of the computer era. They are not new ideas or inventions, it is just that it has taken this long for the rest of us to catch up and realize their significance and importance.

In this post, I'll list out what I believe we have learned and are learning and in future posts, we'll go into each in more depth.

What have we learned over the last 10 years?


1) Automated unit testing - Note, this doesn't necessarily mean TDD, BDD or any other methodology, just that we should have unit tests and they should be run automatically.
2) Refactoring
3) Small methods
4) Value Semantics - How can I say this when most VMs use references? Think immutable reference types!
5) Functional extensions to procedural languages
6) VMs are good
7) OO is not a silver bullet
8) ORM is hard
9) IDEs are vital
10) XML was a cruel joke

What are we learning?



In most of these cases, we know the concept is important, but we're still quite unsure of how to quite integrate it into our everyday lives. There are still many fledgling attempts, but nothing has quite been standardized. In some cases, it could be that web search has clouded my view of what is importat.

1) Non-nullable types
2) DSLs
3) Metaprogramming is important
4) MapReduce [or parallelism is all about the programming model]
5) Statistics
6) Column-Store DBs have a place, but so do RDBMS's
7) Convention vs Specification
8) Patterns are not a silver bullet, nor are functional languages
9) Type inferencing is a benefit
10) XML was a cruel joke (yes, it goes in both)

Please feel free to comment if you disagree or want to add.