Making Good Software

A blog by Alberto G (Alberto Gutierrez)

Written by Alberto Gutierrez

November 9th, 2009 at 5:42 am

The four golden rules to be a better software developer.

with 15 comments

The research to become a better software developer is core to any good software developer. Being a better software developer reflects directly in the code you produce, the better software developer you are, the less bugs, easier to read and easier to maintain code you will produce.

What follow are the four rules I use on my day to day work to help me become a better software developer.

Rule number 1:  My code is crap.

All code is crap, and that includes yours, (and mine, of course). No matter how brilliant a piece of code you think it is, there will be always better ways to implement it, and several programmers who will hate it.

Even if you are sure your code happens to be good, force yourself into “my code is crap” mode, and ask around about improvements, be open minded and you will see soon how you will find issues in your code that you never have thought about.

Rule number 2: Even if it’s crap, I care about my code.

It is not about creating the best code upfront, is about making it better every time you visit it. When you finish some functionality, you are not done, I haven’t met any programmer that produces acceptable code on their first attempt, you need to polish it. Refactoring is then one of the main activities you should be performing.

Rule number 3: My opinion about my own code is wrong.

We are so egocentric that we end up believing that what we have produced, no matter how bad it is, is the best solution as possible. Never trust your own opinion, show your code to as much developers as possible and listen to them.

Rule number 4: My manager doesn’t care about my code, and he pays me.

This rule regulates the other three, it is easy to forget that you actually get paid to get things done, your manager should also care about the code, but he is more focused in completing things on time with an acceptable quality, so be careful not to expend too much time just making sure your code is not that crap. The key is being able to balance getting things done and their quality.

Bonus: A few tips to help you with these rules.

15 Responses to 'The four golden rules to be a better software developer.'

Subscribe to comments with RSS or TrackBack to 'The four golden rules to be a better software developer.'.

  1. [...] This post was mentioned on Twitter by RoadHouse and Ben Armstrong, Steve Levine. Steve Levine said: Four rules to be a better developer: http://bit.ly/16AH6v [...]

  2. Nice. My code isn’t always crap when I first write it, and in those cases I will hunch over it and mutter about “my precious.” But I can be sure that soon enough, I (or someone else) will need some functionality that I didn’t quite figure into the initial architecture, and the crapification will begin.

    Cujo

    10 Nov 09 at 8:23 am

  3. You seem to have missed the point of your own title. Good title, meaningless content. How does knowing my code is crap improve it?

    Jim Danby

    10 Nov 09 at 8:51 am

  4. [...] via The four golden rules to be a better software developer. | Making Good Software. [...]

  5. Rule No 4 can be such a pain in the a** sometimes. It collides with rules 1, 2 and 3 many times. If only managers could understand how tricky it can be to get things write considering the time they require.

    Time estimates always seem to go haywire especially when trying to solve something you did not expect would occur in the first place. How do you estimate that?

    Kevin

    26 Feb 10 at 8:43 pm

  6. [...] 在抱怨那些我碰到的程式碼10年之久後,我得到了一個精闢的結論:所有(包含我自己寫的)程式碼,都是鬼扯蛋。當然,就算鬼扯還是有等級之分,但即使是我看過寫得最好的程式碼,也是難以閱讀。 [...]

  7. Good remarks…
    I am lucky to have enough experience to know that even if I am proud of the code I just wrote, I might be horrified to see it some months (years) later! Blame my ego if I wrote “might”, but still my experience allows me to write… (sometime!) good code on the first try. Well, by first try, I don’t mean I type and it works, I mean I code, compile, test, debug, start again, go through the code review, the test team, etc. :-)

    PhiLho

    30 May 10 at 1:22 am

  8. [...] The four golden rules to be a better software developer. [...]

  9. In my opinion this is a wrong attitude. If I believed that all the code I create is crap, I wouldn’t bother improving it. Rule number 1 would mean that I’m never able to write a good code, even after series of refactorings. But if it’s not true, and refactorings can improve the existing code, then nothing stops me from creating a good code in the first place.

    Which I believe I do.

    If I wouldn’t believe it, I wouldn’t wasting my time learning design patterns, attending conferences, reading books like “Effective Java” and “Code Complete” or following Uncle Bob’s or Marting Fowler’s blogs. Or yours.

    And if your manager knows anything about software engineering, he does care about the quality of your code. We don’t create a good code just for sake of it, we create it so that it would be possible to understand it and to modify (extend or fix) the existing solution in a reasonable time.

    Maruda

    26 May 11 at 2:45 am

  10. [...] posts, you can find more information of what exactly I mean when I say that all the code is crap here and [...]

  11. [...] 我要告诉你一个坏消息,兄弟,所有的程序都写的很烂,包括你的。无论你在上面花多少功夫,其他大多数程序员总是会认为你写的代码很烂、他们能写出比你好10倍的程序。我在前几篇文章里已经讨论过了这个问题,你可以读读这篇文章和这篇文章,从中你可以理解我所说的所有的程序都写的很烂究竟是什么意思。 [...]

  12. [...] 我要告诉你一个坏消息,兄弟,所有的程序都写的很烂,包括你的。无论你在上面花多少功夫,其他大多数程序员总是会认为你写的代码很烂、他们能写出比你好10倍的程序。我在前几篇文章里已经讨论过了这个问题,你可以读读这篇文章和这篇文章,从中你可以理解我所说的所有的程序都写的很烂究竟是什么意思。 [...]

  13. [...] The four golden rules to be a better software developer Philosophy & World View [...]

  14. [...] 我要告诉你一个坏消息,兄弟,所有的程序都写的很烂,包括你的。无论你在上面花多少功夫,其他大多数程序员总是会认为你写的代码很烂、他们能写出比你好10倍的程序。我在前几篇文章里已经讨论过了这个问题,你可以读读这篇文章和这篇文章,从中你可以理解我所说的所有的程序都写的很烂究竟是什么意思。 [...]

  15. [...] order to become a great coder you need to practice great coding (yes, I’ve read All code is crap, but there are definitely varying degrees of crap and you want to be on the less crappy side). If [...]

Leave a Reply