Think about problems before you code


My notes regarding thinking about the problem before you start coding

Things to consider:

  • Thinking about the problem / problems you have before you start to program a feature
  • Pseudo coding to uncover potential roadblocks with out getting too entangled with production code and it’s limitations etc
  • Iterating on the pseudo-code, even starting over, with the intimate knowledge of your first attempt
  • Programming in an isolated module with fake data
  • Slowly adding the module into the mothership code
  • Problems are often easier to reason about in a new and pristine project, vs a big cluster-code base were you have to constantly watch out for pitfalls / rabbit-holes
  • This way even if it doesn’t work well in the mothership code, you can try again with another module with the same API and attach it to the mothership.
  • This way you avoid growing the mothership out of control

Holistically:

  • When deciding to go for a solution, try to be the 10th man, the devils advocate, scrutinise the harmony of the decision. Going for a solution could eat up a lot of scare time/resources
  • Could there be better approaches, simpler solutions, that are less costly on resource / time