2015-06-19 Coding tips

Some tips for coding, – first I wanted to remind myself not to build a platform until I need it (even when it has some very interesting research-like aspects), and then I started to remember several other best practices that I try follow:

  • Solve problems, do not build platforms or libraries to begin with. When you solve the same kind of problem again, and again, the common structure will emerge, – so wait until then, with refactoring the solutions to extract the library.
  • Learn the standard way of sharing the code in the environment you work within. How do you use and publish open source on the central code repository. (clojars, github, etc.)
  • Get to know your tools, – your editor, and build tools, and environment.
  • Decouple, and extract as modules.
  • Use automated testing, and integration server.
  • Have a structured way to handle issues and tasks in your code, – and be able to visualise the proress.
  • Automate test, staging and deploy workflow as much as possible.
  • Document, including overall workflow and architecture.
  • Release often.
  • Avoid reinventing the wheel. NiH.
  • Make it as simple as possible.
  • Deleting a line of code is often more productive than writing one. Do not be afraid to throw away code.