Accidentally I've stumbled upon the following quote by Linus Torvalds:


  "Bad programmers worry about the code. Good programmers worry about
  data structures and their relationships."


I've thought about it for the last few days and I'm still confused (which is probably not a good sign), hence I wanted to discuss the following:


What interpretation of this possible/makes sense?
What can be applied/learned from it?


It might help to consider what Torvalds said right before that:


  git actually has a simple design, with stable and reasonably well-documented data structures. In fact, I'm a huge proponent of designing your code around the data, rather than the other way around, and I think it's one of the reasons git has been fairly successful […] I will, in fact, claim that the difference between a bad programmer and a good one is whether he considers his code or his data structures more important.


What he is saying is that good data structures make the code very easy to design and maintain, whereas the best code can't make up for poor data structures.

If you're wondering about the git example, a lot of version control systems change their data format relatively regularly in order to support new features.  When you upgrade to get the new feature, you often have to run some sort of tool to convert the database as well.

For example, when DVCS first became popular, a lot of people couldn't figure out what about the distributed model made merges so much cleaner than centralized version control.  The answer is absolutely nothing, except distributed data structures had to be much better in order to have a hope of working at all.  I believe centralized merge algorithms have since caught up, but it took quite a long time because their old data structures limited the kinds of algorithms they could use, and the new data structures broke a lot of existing code.

In contrast, despite an explosion of features in git, its underlying data structures have barely changed at all.  Worry about the data structures first, and your code will naturally be cleaner.
