4 ms·
Ask HN: Have you ever had strong emotional reactions to pieces of code?
I just noticed that there was a bit of UI that I actually feared debugging. Having pulled it out and replaced it, it's remarkable how differently I'm feeling about debugging the UI portion of my app.
I've read a lot about code smells. I'm wondering what other emotional reactions have folks had to code they were maintaining/upgrading?
- patio11 16y agoThe printing code for BCC desktop editition reads Abandon All Hope Ye Who Enter Here. It is a steaming pile, I don't understand why it works, I can't modify it without breaking it, and I can't reproduce the hardest feature in it. It makes me feel like sixth grade gym class: anxiety, shame, and certainty of physical pain. I've avoided it for something like three years now, and deprecated the desktop edition partly so I would never have to touch it again.
- joe_the_user 16y agoI wonder if the scariest part of code isn't so much obvious badness but badness that somehow still works. I've seen much worse code than what I was dealing with. But this particular stuff had all these calls Xlib to "aid" in the rendering of Qt windows. How could I reproduce that? (fortunately Qt by itself now does everything this code did)
- carbocation 16y agoThe code that I wrote about 5 years ago? Terrified to touch it. I've stepped away from the keyboard for a week before due to my fear of this old code. This is despite using versioning.
- togasystems 16y agoSounds like the code I wrote in University.
- deleted 16y ago[deleted]
- verysimple 16y agoI'm currently working on a project that needs one specific library that I didn't have time to code myself and there's only one other guy on the entire interweb that built something similar, but the code is... Oh, the code is so craptacular. Just spent the last 5 days hacking through it. Emotional reactions? At first, joy to find the library. Then came disappointment, when I looked at the source. Soon followed by frustration, when I realized I had to go in. Anger as it proved harder to figure out the nonsense, quickly followed by fear and doubt when I wondered if I was going to make it. Hope, when I had a breakthrough yesterday evening and finally, joy again since I completed my changes about an hour ago.
- bayareaguy 16y agoI recall being stunned when I first read the source to the http://en.wikipedia.org/wiki/Bourne_shell http://en.wikipedia.org/wiki/Bourne_shell available here http://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/sh http://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/...
- krevis 16y agoOh my. It uses all these inane macros (in mac.h): #define BEGIN { #define END } #define IF if( #define THEN ){ ... Style was a little different in 1979!
- harisenbon 16y agoAs much as I hate to say it, anything written by my old boss scares the pants off me to touch. He was a genius perl programmer, but unfortunately carried many of his perl programming practices into PHP. That and the fact that he used spaces and line breaks like they were made of gold. Great guy, amazing programmer, but I would rather rewrite code from scratch than dig through the mines of his programs.
- weel 16y agoThe OCaml compiler is a work of art. Reading it fills me with awe.