What's the impact of a bad designed code, or an un-designed code? A well designed code will lengthen the code's lifetime coz it can be easily changed, maintained, and added. I think that this is what make a programmer doesn't hate his job. In my opinion, code design is crucial to a software company. A company which has a bad smelled code won't be productive enough to grow rapidly along the technology improvement. And what will the programmer do when the code started to smell very bad? They resigned and move to another company because they feel that:
- They have a lot of work to do
- The customer always love to ask for features which need changes in the code which they think is impossible to implement
Imagine a small cup sized 100 cc. You can't load the cup with 200 cc of waters if its size is only 100 cc. In this case, you have to change the cup with a bigger cup. The cup is the code's design, and the water is the features of the software application.
Below are some of the major bad smelled codes:
- Doesn't implement any programming style (ex: OOP)
- Duplicated code
- Big class
- Big method
- Too many temporary variable
- Nested if
- Nested loop
- Nested try catch finally block
- Long parameter list
- Unused codes
Maybe you felt that it happened to you, or you see it happened in your company, but this is just my opinion and I don't meant to hurt anyone.
No comments:
Post a Comment