How to be a better programmer (P1)

You care about code. You’re passionate about programming. You’re the kind of developer who likes to craft truly great software. But the career path to become a developer is not a straight path. With me it took me 10 years to become a Junior to an kind of Software Architecture. And I still have a lot of think to learn. So that if you want to become a better developer, let come from the principle first. In this article, we’ll look at what makes great programmers.

Care about the code presentation
– Write a good name variables, methods, classes.
– Make a good code layout and code structure.
– Keep every thing clear and clean.
– Clean code better than comments

Write less code
– Remove dead code
– Remove duplication
– Refactor bad design
– Reusable code
– Less code, less bugs

Read before write
– Read old code before write new code
– More read code , less write code
– Read Best Practice
– Read new syntax update for languages
– If you plan to write new thing, it may don’t need it

Do the code
– Follow the Boy Scout Rule : Whenever you touch some code leave it better than you found it.
– Make code changes slowly, and carefully. Make one change at a time.
– Code, Debug, Test and Improve.
– Note what you think is important, you may need it somewhen
– Refactor code step by step, not big refactor.
– There is no need to apportion blame for “bad” code.
– Smell the shit code, but smell carefully. Keep silent. Don’t break old logic.

Face with error
– Care about exception. You may need how to deal with exception.
– Try to test unexpected scenarios.
– Threading can bring magic error.
– Object may be disposed.

%d bloggers like this: