What is discipline?

There's no such thing as disciplined people and less disciplined people

Last time I wrote that the reason programmers write suboptimal code is usually lack of discipline. “Discipline”, however, is not a clear-cut term. We sometimes think there are disciplined people and less disciplined people. I think this is wrong. Here’s why:

  • If you are a scientist, you probably have the discipline to sit down and spend several days or weeks to read a difficult paper, even if you aren’t certain it will help you discover what you want to discover.

  • But you likely don’t have the discipline to spend a few days to learn git, although it should be clear that in the long term it would be beneficial.

  • If you have a model that produces wrong results, you probably have the discipline to work for days or weeks in order to locate the bug.

  • But maybe you find it very hard to spend one or two days to create an automated test.

The things that are hard for you may be easy for me and vice versa. It’s not that one of us is disciplined while the other one isn’t. It’s that different people are good at different things.