Live data from Hacker News

A Million Lines of Bad Code

varianceexplained.org

111–120 of 123 posts

Re: A Million Lines of Bad Code

#111

More important than good code is shipped code. I'd say about half my bad code is due to inexperience, what the post is referring to. As time goes on it DOES get better, especially since -- like most of you -- I'm constantly reading and trying to improve my skills. The other half of my bad code is due to time constraint. This is either because a quick hack is needed, or the proper planning time is not allocated to do…

https://i.imgflip.com/kc24o.jpg

(Sorry for commenting in a form of a meme, but it really was asking for it)

Re: A Million Lines of Bad Code

#113
post #6

I recently read the book "How to Win Friends & Influence People", bad title great book. My main take away from this is I've been talking to people really badly for the last 27 years. I wish I had read this book in middle school. But this blog reminded me of some of the concepts from the book, its far more productive to give positive encouragement than to give negative feedback, and just adding a complement isn't enou…

Michael Meeks has a good example of how this is supposed to work in LibreOffice:

https://people.gnome.org/~michael/data/2011-10-13-new-develo... (5 page presentation)

Compare pages 3 and 4.

Re: A Million Lines of Bad Code

#114
post #55

Earlier quoted context omitted.

I think it just comes down to different personalities. I'm just like you. I tend to get agitated when people try to sandwich their criticisms or compliment me for irrelevant things when I just want them to get to the point. I'd very much prefer someone just telling me "your code is shitty and here is how you'd fix it and why." Unfortunately, people that take criticisms like us seem to be in the minority.

That's why I personally declare Crocker's rules[0] - if you want to tell me something, I allow you to skip pleasantries and "social hacks", and just get straight to the point. [0] - http://wiki.lesswrong.com/wiki/Crocker%27s_rules

The trouble is: that's not how humans work. Including ones who push Crocker's rule. Personalising negative comments is how human brains work.

Remember: knowing a bias exists doesn't make it go away, at all.

In my experience, the sort of person who professes a love of unvarnished communication is someone heavily into sending it - the same people reliably hit the roof whenever they receive it.

Public relations is 50% of the job, even if you're bad at public relations. There are no quick hacks to make that go away, 'cos if there were then everyone would already be using them.

Re: A Million Lines of Bad Code

#117
post #6

I recently read the book "How to Win Friends & Influence People", bad title great book. My main take away from this is I've been talking to people really badly for the last 27 years. I wish I had read this book in middle school. But this blog reminded me of some of the concepts from the book, its far more productive to give positive encouragement than to give negative feedback, and just adding a complement isn't enou…

Don't you feel patronized when people do that though? Be as rude as you want to me, as long as you're correct. As for myself, I tend to not call out the positive parts of something, because that's sort of implicit. I would not bother to point out that the file reading code is wrong if the whole thing was broken. I admit I'm probably incorrect here, but I notice people try this "say something positive" and it really c…

I agree... to a point. It reminds me a bit about this quote by Ricky Grevais:

"The other thing about it is: Comedy comes from a good or a bad place. And I think that the funniest people always comes from a good place. Two people can say the same thing, and one person can be so nasty and vitriolic -- and therefore not funny. And the other can be, you know, a celebration. You know, you can be in on the joke."

--Ricky Gervais

http://www.howardschatz.com/film.php?ID=3814

Corny as it might sound -- I think brutal honesty is more constructive when it comes from a place of love. I'm not sure what the practical take-away from that is. Maybe build trust first, and then be direct? Or be honest, but avoid being mean?

OTOH I think everyone deserves/needs a good bit of BOFH bootcamp to slap them into reality before they are let lose writing code that talks to the Internet... ;-)

Re: A Million Lines of Bad Code

#118

Earlier quoted context omitted.

Programmers tend to incline towards efficiency. I think that's why we often skip the bread and deliver only the filling. IMO there's a big difference between a criticism sandwich and tactful criticism.

"Inclining towards efficiency" might be their justification, but I think the truth is closer to many programmers simply lacking tact.

S/he said, bluntly.

Re: A Million Lines of Bad Code

#119

Earlier quoted context omitted.

I like teaching. I don't think I'm amazing at it, but I like sharing knowledge and experience with my friends and co-workers and see them improve, or just sometimes for the abstract sense of helping. Of course, sometimes I fall flat and come across as arrogant or condescending, but I hope that's rare. I read "How to make friends" a long time ago, and I apply those rules diligently to my interactions with people. Rece…

I had the same problem with a past coworker, a "how is this person being paid to work with technology in any capacity" person doing development and having never learned how to read graphs ("the CPU is at the top of the graph, so that is the cause of the performance problem" was common). Or knowing that Excel could do visualizations of data. And I found myself doing the "Blatantly type their question into google right…

I had an IT job where I was the only person taking care of all office technology for 22 locations. This got bigger over time and I pushed management to get me some help. I got some halftime assistants, one of which was great, but he was a young guy and decided to move on after about 2 years (I was rather pleased this was the longest he had ever held a job!)

Then the powers that be decided I needed a manager, and hired some old wreck retired from IBM. I have no idea why. Old? Male? Wore a suit and would be more presentable to the board than me (not hard)? It was certainly not for his knowledge. He couldn't fix a PC, diagnose Windows problems, or use a Unix command line, and actually added to my workload because he would break his computer and need me to fix it. A co-worker quietly told me he spent his day playing Solitaire and taking messages because he was unable to solve problems.

He didn't seem to want to learn, either. That was the kicker. I would usually spend an hour a day teaching my previous assistant about networks or software, but this guy, his ignorance was just too big and he just didn't express any curiosity. I'm pretty sure his job was to collect a paycheck.

I quit. There wasn't really much choice. I was overworked and insulted. And within 2 weeks he resigned as well.

Re: A Million Lines of Bad Code

#120
post #111

More important than good code is shipped code. I'd say about half my bad code is due to inexperience, what the post is referring to. As time goes on it DOES get better, especially since -- like most of you -- I'm constantly reading and trying to improve my skills. The other half of my bad code is due to time constraint. This is either because a quick hack is needed, or the proper planning time is not allocated to do…

https://i.imgflip.com/kc24o.jpg (Sorry for commenting in a form of a meme, but it really was asking for it)

Very valid point. But not every product, as much as the stakeholder would like to believe, is a space shuttle.
Post reply on HN