Writing easy to change code

Although I couldn’t attend WWDC this summer, I have been spending quite some time watching some of the sessions over iTunes nowadays.

So far my favorite has been Ken Kocienda’s talk about “Writing easy to change code”. It gives some great tips even if you are not an iOS developer. Here are my notes:

  • Clear code is easier to change. Write clear code.
  • 98% of time, you debug using print statements. Do not feel sorry for that.
  • Use bug trackers and write stories about your bug fixes.
  • Do not rewrite code, refactor!
  • Get rid of code and comments that do not apply and clean as you go.
  • You need good people skills to code well. Talk to your teammates before making a change. Plan before building something big.
  • Never convince yourself that your program can be slower because you are adding a new feature. Never make your code run slower. 
  • Write tests, test your code.

If you want to watch the whole session, here is the link.

Tags: coding