What “4 Rules of Simple Design” Means to Me

About two years ago, my interest mostly focus on how to write a well performed code. I was enjoying it, I had a lot of research about it, and I love talking about it with people. Every time I wrote a code, I just jumped in to the code and type everything. “Yeaaah! I’ll write some freaking fast codes.”, that was what I thought. However, at one stage, I felt there was something missing in what I did. Something was wrong with the way I did my job (read: hobby).

The problem was I didn’t feel that I was confident with my code.

I was progressively better in writing well performed code, but it was linear with the bug amounts. How foolish I was, pushing some buggy codes to the production. What the hell!?

My habit also brought another problem. By jumping directly to the code and typed everything, made the codebase getting dirty, difficult to read, and hard to maintain. It took me a longer time to ship small feature, mostly because there are a lot of code duplications, it is unreadable, and super complicated. So what should I do?

I needed something that really could help me getting through with my confidence with my own code. Something that could help me writing a better and readable code. I just couldn’t do it myself, I needed someone to teach and guide me about it.

Continue reading “What “4 Rules of Simple Design” Means to Me”

Advertisements

Questions That I Asked to Myself When Writing Codes

Lately, I’ve been involved intensively in Test Driven Development environment. Which is great! I’ve been waiting to have this experience of writing codes with clear standard. However, there’s no such thing of perfection (maybe I can talk about this later), but I give my highest respect to this new experience.

This cause some changes in how I write codes, to be precise, my attitude towards software development. So, there are more questions in my questions list, which I need to answer one by one, from the beginning of writing codes until the end. These are the complete questions:

  1. What’s the story?
  2. What am I suppose to do to solve it?
  3. Have I pulled new revisions?
  4. Do I need to create new branch?
  5. Do I need to write behaviour test?
  6. Do I need to write view test?
  7. Do I need to write controller test?
  8. Do I need to write model test?
  9. Do I need to write lib / other test?
  10. Do I need to write javascript test?
  11. Have I completed the story?
  12. Do I need to refactor?
  13. Do I need to extract the codes?
  14. Have I tested all related codes?

Those 14 questions are mandatory, in order to make sure that I always deliver quality codes.

Anyway, there’s other big question which should be asked in the very beginning.

Do I need CI?