Live data from Hacker News

Who wrote this shit?

heltweg.org

91–100 of 300 posts

Re: Who wrote this shit?

#91
post #72
post #37

It was me ... several times I have found a bug or code smell and then been surprised that the I was the original author. For the last fifteen to twenty years, I've generally found looking at code I wrote six months ago equally distasteful. So now my default behavior is to assume the code met the business function at the time, acknowledge that I'm continuously improving in my craft and finally, gained a joy in spendin…

I'm a strong believer in continuous refactoring. Improve existing code when you touch it. Defer architectural choices untill the moment you have enough info. And leave cleaning up to the moment that it starts becoming messy, not before. That implies, code never is perfect. Not even good. But clunky, cobbled together, expermental or just plain stupid. But always just about 'good enough' to solve the issue at hand.

>But always just about 'good enough' to solve the issue at hand.

I think this is context dependent. I generally agree with this statement on relatively low-risk projects. The problem with "good enough" is that it often becomes a rationale for our cognitive biases to take the easier route. I don't want someone doing that on, say, safety-critical code. Maintaining high standards is a way of buffering against those cognitive biases.

Re: Who wrote this shit?

#93
This ofcourse mirrors my first years in the industry, as it does for most of us.

However my moment of realization was when, two years into my career, I asked the question and found out it had been me.

Here are my own personal views on the subject matter:

I am not my code, and my code is not me.

As time progresses, so will I.

To become better.

Never perfect.

Re: Who wrote this shit?

#94
post #70

Asking who wrote this shit is useless. However asking " what is this shit" is a perfectly valid thing to do. There are good developers producing crap due to constraints. There are also other developers producing crap because they can't produce anything else or just don't give a damn. Being able to differentiate between the two is often helpful, hence the "what" question.

Often times the what is not known by anybody but the who and if you're lucky the who is still around to tell you. If they're not, quite often you screwed because that shit is the only place where the business rules are captured.

Re: Who wrote this shit?

#95
post #37

It was me ... several times I have found a bug or code smell and then been surprised that the I was the original author. For the last fifteen to twenty years, I've generally found looking at code I wrote six months ago equally distasteful. So now my default behavior is to assume the code met the business function at the time, acknowledge that I'm continuously improving in my craft and finally, gained a joy in spendin…

There's a bunch of little scripts I've had to write for my workflow. Time is short so I've taken parts and pieces from experiments, treated them as black boxes, and wrote interfaces to make them handle way more than I ever anticipated. It usually looks bad and has little useful documentation for the heavy math inside but it works and will work for years. I try to spend time on making the interface clear and friendly for anyone else that uses it after me but the internals are a nest of wires and obtuse mechanisms that I can barely remember how they work.

We had an excel spreadsheet that was used for at least a decade to process some measurements. There were a lot of magic numbers shoved in the equations to handle some issues with the equipment along with math that I'm surprised Excel can handle. The results would be correct but it was a total black box but the steps to get to them were nearly incomprehensible. A coworker decided to spend some time upgrading it to Matlab to allow for some better interfacing with new test equipment we were buying. She thought it would take a week, it took months. Talking to the original author was useless as he couldn't remember how he built any of it. Finally she got it working with both the old and new test equipment and now has properly documented everything so it explains the use of any magic numbers. I did not envy that job at all.

Re: Who wrote this shit?

#96
I get this. It's true, a lot of code is written and we don't know the circumstances that led to it. Those circumstances could have led to monstrosities -- I have created a good many myself. I try to empathize with those people and commits of the past.

HOWEVER, sometimes we see things that no mess of external pressure and crazy circumstance could have produced. No, these gems are born out of individual madness (maybe I've even been lucky enough to produce some myself, one can hope).

Example, no. But here's a clue: they are usually accompanied by an equally insane commit message. "Magic." "Kill me." "Why not?" or the ultimate "".

One technique that helps me keep myself sane: every commit message should describe "why", everything else is in code. I like to think it prevents a lot of future problems.

Re: Who wrote this shit?

#97
post #19
post #4

My favourite is when you're a solopreneur working in your own repos and still asking yourself "who wrote this shit?!"

I heard a saying once: "all developers should be embarrassed about code they wrote more than a year ago" as a (cheeky) measure of ongoing growth and development. :-)

I honestly find that kindof frustrating. I look at code I wrote a year ago and think - why didn't I do it this (better) way. And I also think - haven't I learned to write decent code by now? Why do I keep writing code like that when I should know how to write it better.

Re: Who wrote this shit?

#98

In my first corporate job out of college (a NOC at an ISP) I was asked to update the documentation for troubleshooting quality of service issues. I checked our wiki for what was already there and it horrendous. I started to mentally thrash the person and was going to go confront them about it. When I checked the edit history I was greeted by a single edit and my username a week after I started the job. I learned a gr…

I’m currently rewriting the first application I wrote on my own.

So much code to do pretty simple stuff… but it worked…

Re: Who wrote this shit?

#100
post #4

My favourite is when you're a solopreneur working in your own repos and still asking yourself "who wrote this shit?!"

On the other end, it's fun when you encounter a bug and go search for an answer and end up reading an answer on Stack Overflow that _you wrote_ 5 years ago and totally forgot about it.
Post reply on HN