Monday, July 4, 2011

Code Patterns and the People who can't see them

What makes a good or decent coder?
In my opinion, anyone who can see patterns in code and constructs their code so that it is efficient and does the least amount of work in the fastest manor.

What makes a bad coder?

Duct tape programmers - someone who is paid to throw code together any way he can whether it is good or not and gets paid for it, then that code is someone else's problem later.

People who ignore the compiler - when someone deliberately ignores the compiler when the compiler is telling you - you are doing something wrong as a warning. There are cases where things can't be helped, but then there are cases where someone writes shitty code like this:
//Do work
return;
//Do more work that will never be executed
That is called unreachable code and if you do this it makes you look like a novice.

People who write code for humans and not for computers/efficiency - okay I understand it is hard to read code sometimes, but guess what, too bad learn how to read code no matter how it is written and write comments above the complex code to get by. Do not write if/else statements where the if or the else block is empty, that is STUPID. Don't use string builders and still concatenate strings in the string builder it DEFEATS the PURPOSE of the string builder. Use your head.

Lazy Coders - These are the people who just shouldn't code at all. They don't want to understand what they are working on and would rather duplicate code than take the time to understand what they are changing before just making a full copy of a method. They don't want to expense the time or the effort to do things right and will use try/catch blocks to convert values and set defaults versus type.TryParse() or equivalent. They are people who program by exception and do not bother to anticipate what could happen. They are people who use throw ex; vs. throw; Worst of all, Lazy Coders are people who won't listen when you tell them they are doing something wrong. They just get upset and say what they are doing is right when it is indeed wrong!

I have been cleaning up some code in the application I am working on all of the time and the crap I keep seeing upsets me greatly. To the point where I hate the individuals who did it. They took no care in their work and left the mess for others to find. It is one thing if you don't know what you are doing, it is another if you intentionally write bad code. Fuck bad coders.

No comments:

Post a Comment