How I write code

Todays article is about the way I create my programs.
First of all I have to say, I’m not a pro in writing code but on the other hand I’m learning a lot about Java, C++, C and programming-concepts in the university and as a result my skills improve. My aim is to write good, readable, tested and simple structured code, since this sort of code is the one you can depend on and improve later. This because you simply understand what it does by rereading the code and the tests^^.
So how do I start when I get a new programing task? I made a list to show you all the steps I need to make a program.

  • Think about the task.
  • What’s important (Deadlines, personal features etc.)
  • UML-Diagram
  • Write Tests
  • First class!
  • Expand class(es) iteratively (with the help of IDE and tests)
  • repeat 4-5 with new classes till your program works and does what it should
  • Write more test and get a coverage of over 60%
  • Reread the whole code, think about improvements in understanding and simplicity
  • If it’s possible refactor Interfaces and/or abstract-classes => Dependency Injection
  • Optional: Improve the speed of your program

So, that’s it for today, in the next weeks and months I’m going to write about each of this steps separately and if I’m done I’ll post a PDF with all the informations collected. I hope this will help you improving your code writing and I’m glad for comments or mails!
Cheers d3orn

  1. No comments yet.

  1. No trackbacks yet.