Things That Annoy Programmers
kevinwilliampang.com
kevinwilliampang.com
"That must be what I was getting at, right? Some sort of pleasant, middle-of-the-road compromise between the two polar extremes of no comments whatsoever and carefully formatted epic poems every second line of code?
Not exactly. Rather than add a comment, I'd refactor to this:
private double SquareRootApproximation(n) {
r = n / 2;
while ( abs( r - (n/r) ) > t ) {
r = 0.5 * ( r + (n/r) );
}
return r;
}
System.out.println( "r = " + SquareRootApproximation(r) ); "Ideally I'd even like to see a brief comment on why Newton-Raphson was chosen as well. Is there a good reason why I shouldn't replace that code with some other square root approximation technique or was it chosen because it was the only algorithm the author knew?
I would probably refactor the code as Jeff says, but add a comment that describes the function, probably with details about why it's implemented the way it is.
and I totally agree with #1, it's very true for me. And especially when I've used some framework and the framework has been updated to a newer version with lots of goodies, i feel lazy to maintain code that been written in older version of the framework. (and even more lazier to update it to the new framework if it requires lots of changes). I just leave it working fine in it's current state. Seems like thats what results in legacy software. So I now follow my new rule-- working on beta versions of frameworks so that i can leave it unmaintained for longer time and spend the time on new ideas.
Being told "how" instead of "what". Use this API to access that database to do this process. Don't tell me how to do something. Tell me what you want. Let me figure out how. That's my job.
Being told "what" instead of "why". So you need a 4 GB csv download of the entire database every day at noon? Why? Oh, in that case, why don't you just use <somethingElse> which has been right at your fingertips all along. If you don't understand the system, ask and I'll be glad to help. But don't make up unnecessary work for me.
Being asked for data to put into your Excel spreadsheet which you will screw up 8 minutes later. Then you want me to fix it. Forget it. If you have a business problem, tell me about it. We will find a solution together. Lone rangers don't get help. I'm not Tonto.
Calling me every 42 minutes for 3 days asking, "Is it done yet?" No, it's not. I'll let you know when it is and if there's a problem, I'll let you know about that, too.
Not calling me for 3 weeks after a release. Either it's working perfectly or no one's using it. It would be nice to know which.
Criticizing my work in a meeting in front of others without talking to me first. Big mistake. You don't want to piss off your waiter and you don't want to piss off your programmer.
Meetings when a phone call would have sufficed.
Phone calls when an email would have sufficed.
Status meetings. Pointless. I'll email status. Any questions, click "Reply".
Code walkthroughs that are more concerned with syntax than function.
SQL SELECTs inside of iterations. Please go work at McDonald's.
Sarbanes-Oxley (SOX).
Web filters that screen out Hacker News. Grounds for divorce.
"what instead of why" - they need something
1. Employee self-assessment forms - We don't need HR to make to my manager make me tell him what I think I do well/poorly. Business jargon is no substitute for 2-way honest conversation.
2. Managers that try to shoehorn every problem into one solution.
3. Being restricted to technology choices that your manager knows.
4. Being the single go-to guy for everything in your department because no one else is interested enough to learn things on their own - Want me to setup your enterprise Java portal while fixing IE CSS/Javascript bugs that our web developers couldn't figure out while debugging a WordPress plugin for another department? Sure, you want fries with that order, sir?
Calling my work shit without providing any constructive feedback, problem details, or patches will tend to make your future requests for help go straight to the bottom of my priority list.
Blaming me or my work for a problem you are experiencing without performing any investigation into what actually the problem is also will make any future requests for help go straight to the bottom of my priority list. Not quite as far down as the category above though.
I don't want to sound like a prima-donna but I don't like creating unnecessary work for others because most people have better things to do, I just wish this was reciprocated more often.
Just use "sizex" and "sizey" like a Microsoft programmer from the '90s.
One of my least favorite situations is dealing with other people's minor plugins or libraries...
If it's in Python, usually it's good as-is.
If it's in PHP, usually the structure is so disturbing that if we have to use it, I simply try not to look. The code ranges from naive to over-engineered, the latter of which is especially pointless in PHP.
For other people's JavaScript, usually I'm horrified by all of the 'for' and 'if' blocks that are lacking braces. Argh! Half the time I end up rewriting and removing portions of various plug-ins, and I often feel the compulsion to go fix all of the lazy bracing at the same time.
You might be able to mak the case that falls under "other programmers" :)
The next time you find yourself in a fruitless meeting, consider the things you could do to ensure future meetings are more valuable in the future, and work with management to get your ideas in motion. Hopefully you'll improve your situation, and you'll show initiative that'll look great when your next review comes up.