Live data from Hacker News

Signs You're a Crappy Programmer (and don't know it)

damienkatz.net

51–60 of 66 posts

Re: Signs You're a Crappy Programmer (and don't know it)

#51
post #40
post #22

Earlier quoted context omitted.

"a language that supports it properly..." Meaning what exactly? A language that automatically optimized for tail recursion? Are there languages which don't support recursion "properly?"

A few years ago my friend wrote up a few recursive functions in C and they were slower than using a for loop. Since then I haven't used any sort of recursion in C or C++. Maybe my fears are unfounded but I try and avoid those two languages in any case. edit: I just realized what I actually mean. Some programming languages, or the culture/community around them, do not seem to encourage certain things that can be done…

> they were slower than using a for loop. Since then I haven't used any sort of recursion in C or C++.

That's premature optimization.

Re: Signs You're a Crappy Programmer (and don't know it)

#52
post #19

Earlier quoted context omitted.

You're still making two function calls when you could be making one. If one of them gets lost in the fray, you'll spend just as much time solving that problem.

One very useful idiom: while(readLine()) { process lines... } where readLine() encapsulates the repetition and returns eof as well.

where is the line (to be processed) stored?

Re: Signs You're a Crappy Programmer (and don't know it)

#53
post #50
post #4

"...and it often simplifies the code to have multiple returns." Today. And what happens after 10 other programmers modify your slick little multi-return function? Nobody will ever be able to modify it again because the entries and exits are lost among the garbage. This is the ongoing debate I've had for years with "clever programmers". They're missing one critical point: the guidelines of structured programming are n…

The number one sign you're a crappy programmer: 1. You foist idiocy upon others and refuse to listen when they point it out as such, because someone told you that the idiocy was "effective established principles". Your "effective established principles" seem to be neither effective, nor established, nor principled.

"neither effective, nor established, nor principled"

http://en.wikipedia.org/wiki/Structured_programming

Isaac Newton "stood upon the shoulders of giants." Interesting to see that you know better.

-----------------------

"...someone told you..."

Actually, I learned what I'm sharing in this thread (and much, much more) from MANY excellent mentors. I hope you find some, too.

----------------------

"The number one sign you're a crappy programmer"

I have hundreds of (well paying) clients that would disagree with you.

----------------------

I "foist" standards only upon those who work for me. You won't ever have to worry about that.

Re: Signs You're a Crappy Programmer (and don't know it)

#55
post #50
post #4

"...and it often simplifies the code to have multiple returns." Today. And what happens after 10 other programmers modify your slick little multi-return function? Nobody will ever be able to modify it again because the entries and exits are lost among the garbage. This is the ongoing debate I've had for years with "clever programmers". They're missing one critical point: the guidelines of structured programming are n…

The number one sign you're a crappy programmer: 1. You foist idiocy upon others and refuse to listen when they point it out as such, because someone told you that the idiocy was "effective established principles". Your "effective established principles" seem to be neither effective, nor established, nor principled.

I'll give you the vote because very often hard-set rules in programming are not good.

Re: Signs You're a Crappy Programmer (and don't know it)

#56
post #49

I expected this list to be written by a crappy programmer who didn't know it... but it turns out it isn't. I'll add two items to this list: 1. You believe anyone who doesn't write unit tests is a crappy programmer. (I'm done trying to explain this to carppy programmers- not only are they crappy they think that unit tests make them not crappy, and so they can't concieve of the reason unit tests are bad (and often they…

How many of your bosses did not go to college?

Re: Signs You're a Crappy Programmer (and don't know it)

#57
post #49

I expected this list to be written by a crappy programmer who didn't know it... but it turns out it isn't. I'll add two items to this list: 1. You believe anyone who doesn't write unit tests is a crappy programmer. (I'm done trying to explain this to carppy programmers- not only are they crappy they think that unit tests make them not crappy, and so they can't concieve of the reason unit tests are bad (and often they…

I think it's about time somebody stood up for the "curly braces stand alone" school.

I mean, we can debate silly stuff all day, like LISP versus C, Firefox vs. IE, Mac vs. PC, web 1.0 vs web 2.0, etc. But these "braces on the same line" guys are just completely out of their minds. :) <-- Smiley face means humor was used in this comment.

Re: Signs You're a Crappy Programmer (and don't know it)

#58
post #49

I expected this list to be written by a crappy programmer who didn't know it... but it turns out it isn't. I'll add two items to this list: 1. You believe anyone who doesn't write unit tests is a crappy programmer. (I'm done trying to explain this to carppy programmers- not only are they crappy they think that unit tests make them not crappy, and so they can't concieve of the reason unit tests are bad (and often they…

Hate to break it to you, but you are just like all the others: every programmer thinks he is the only good programmer and all the others are crap.

Re: Signs You're a Crappy Programmer (and don't know it)

#59
post #49

I expected this list to be written by a crappy programmer who didn't know it... but it turns out it isn't. I'll add two items to this list: 1. You believe anyone who doesn't write unit tests is a crappy programmer. (I'm done trying to explain this to carppy programmers- not only are they crappy they think that unit tests make them not crappy, and so they can't concieve of the reason unit tests are bad (and often they…

I think it's about time somebody stood up for the "curly braces stand alone" school. I mean, we can debate silly stuff all day, like LISP versus C, Firefox vs. IE, Mac vs. PC, web 1.0 vs web 2.0, etc. But these "braces on the same line" guys are just completely out of their minds. :) <-- Smiley face means humor was used in this comment.

I've seen whole projects fail over that discussion.

Maybe it really should be used as an interview question. There is no point in mixing same-liners and new-liners together.

Only remedy might be to use a programming language without curly braces.

Re: Signs You're a Crappy Programmer (and don't know it)

#60
post #59

Earlier quoted context omitted.

I think it's about time somebody stood up for the "curly braces stand alone" school. I mean, we can debate silly stuff all day, like LISP versus C, Firefox vs. IE, Mac vs. PC, web 1.0 vs web 2.0, etc. But these "braces on the same line" guys are just completely out of their minds. :) <-- Smiley face means humor was used in this comment.

I've seen whole projects fail over that discussion. Maybe it really should be used as an interview question. There is no point in mixing same-liners and new-liners together. Only remedy might be to use a programming language without curly braces.

I have to admit it's a pet peeve for me -- even more than choice of languages, oddly enough. When scanning code, I just like the ability to see my control blocks clearly. Simply because you can do something like this

 if (a==b) { doStuff(); } else doOtherStuff();

Doesn't mean you should.

I would consider this a little bit of a hangup on my part, though, as it seems other programmers go the other way. An interesting topic for a book is all the weird things programmers get hung up about. Variable naming comes to mind, as does error handling strategies. And when we get hung up, usually we're not too shy about explaining why everybody else is wrong!

Post reply on HN