Improve your code in 18 easy steps!

« back

February 20, 2015 | Originally published at https://blog.nyctef.com/post/111611401002/improve-your-code

  1. Take lots of coffee breaks

  2. Go to the toilet regularly (as a result of 1.)

  3. Have a nemesis. If there isn't already someone at your company who vehemently disagrees with almost everything you believe in, try to cultivate an antagonistic relationship with a colleague.

  4. Take regular showers

  5. During said showers (and coffee breaks) practice mental arguments with your nemesis about the latest decision you've made. What would their rebuttals be? Do they have any merit?

  6. Lie awake at night thinking about the code you wrote a few hours earlier

  7. Invest in a high-quality rubber duck

  8. Regularly ask yourself if you're fixing the problem or just treating the symptoms

  9. Ask the duck what she thinks

  10. Develop a deep and meaningful relationship with ELIZA

  11. Carry around a notepad at all times

  12. Sneer at your nemesis if you ever pass them in the corridor

  13. Buy a Surface Pro because a notepad just isn't high-tech enough

  14. use the notepad anyway

  15. Repeat for two to three weeks

  16. With luck, you'll have a sudden epiphany - there's another way of accomplishing your task which involves about three times less code and lets you write a couple more features in an afternoon!

  17. Rush to your desk, start a new branch and type out the code you should have been writing in the first place.

  18. Celebrate! Have another coffee.