Live data from Hacker News

Who wrote this shit?

heltweg.org

191–200 of 300 posts

Re: Who wrote this shit?

#191
This is also true outside of this in functions like finance. We inherited an important spreadsheet from the contingent finance team brought in to hold things together while the company went through a structural transition. The spreadsheets were horrible - bad logic, lots of “Easter eggs”(points where people hard coded a number in a sea of formulas number where you would have excepted a calculation which is very hard to catch), and just overall poor incremental design that didn’t take much into account except to fix an immediate problem.

It was a pain but all the collective griping and work to improve it made us stronger as a group and also made us way better excel designers.

Re: Who wrote this shit?

#192
post #19

Earlier quoted context omitted.

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.

I don't mean this sarcastically, you're probably an better coder than this comment implies, but what you described is the mind's mental content that should motivate you to write "decent" code.

Do you only feel this motivation when you look back at old projects? Perhaps the improvement could be in organization (code-level or otherwise) such that you do not feel lost or confused looking at your old stuff.

Re: Who wrote this shit?

#193
I was working on some markdown related code years ago, and didn't test against utf-8 characters. I put a comment in there saying as much, and "I hope this doesn't come back to bite me."

Sure enough, a few years later, I was diagnosing a bug in this software, and realized it only happened in documents with some utf-8 in them. After digging a while, I found that comment.

Re: Who wrote this shit?

#195
post #142

Many people in this thread are saying they are surprised by their own shitty code, 6 month ago. I read this everywhere on the Web. It's like I should myself be finding my code from 6 months ago horrible. I don't know. I tend to remember what code I wrote, and recognize my own code when seeing it, even years later. My code from 6 months ago looks good to me. My code from 10 years ago looks "reasonable, if a bit messy"…

If I felt my code from a year ago was still good, I'd be worried I've stopped learning and growing.

Re: Who wrote this shit?

#196

Earlier quoted context omitted.

I find that half the time I'll wonder who wrote it, realize I wrote it, start to rework it, and then realize why I wrote it that way in the first time, add a comment and move on.

Same here. Sometimes I add comments like "don't change this shit!" to remind myself that there is a reason why it is like that.

I prefer to add comments which contain some rational, like "Changing this causes race condition headaches in the frobulater." Or "Ugly... but it handles the edge case of XYZ in the foobar config"

If I don't then the comments either have the effect of a) scaring future me, or b) getting ignored because I think that I can do better now.

Re: Who wrote this shit?

#197
post #122

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 also had that moment; ask “Who wrote that shit?”, run ‘git blame’ and find yourself. This happened 1 year into my second job.

More than once I've googled how to do something new and found the answer on Stackoverflow, written by me. I haven't even written that many answers on Stackoverflow.

Re: Who wrote this shit?

#198
On the topic of "who wrote this shit", I'd really like to plug the idea that some of the most high-impact documentation you can write is a good commit message.

Say you track down a bug, find a line of code that makes no sense, and `git blame` it, to discover that you wrote it yourself, 2 years ago. If the commit message is "bugfix flaky builds", good luck figuring it out.

If the commit subject rather, is "bugfix flaky builds", followed by a message that explains what the flakiness was, why you think the change will fix it, what other bugs or limitations you were working around, and what upstream changes you might be waiting on that prevented further work, you're in a much better position. Suddenly you have a lot more context on what you were doing, why you were doing it, why you didn't do it better at the time, and in some cases it can even catch you from making an obvious but subtly-wrong mis-step.

Similarly, if someone's confused by your code during code review, that's a great opportunity for either in-line comments, or commit messages, as appropriate.

Unlike PR discussions, tickets, emails, slack threads, wiki pages, or photos of whiteboards, commit messages + git blame has an uncanny ability to be exactly the documentation you need exactly when you need it. Good git history practice can be one of the highest returning investments.

Re: Who wrote this shit?

#200
> legacy software is written by people like me

legacy software or shit software? The two are not the same. So be clear with your statement, to circle it back to your intro, you're the creator of the _shit software_ -- right? That's what this is about? See how difficult it is to admit it. You couldn't even do it and you're writing the blog post about it. The ego is strong. But, I guess you're on the path towards this acceptance, you kinda semi-admitted to it. You have much more work to do but one day you'll finally understand this distinction and it'll be good for you and all the folks that have to maintain your shit. Keep improving your critical thinking and software engineering skills. The buck ends up with you. It's your choice what you produce and your standard of excellence. And you know what, it may be the case that the sooner you become a manager the better for everyone. That may also be a tough pill to swallow but fear not, you'll be happier... and also some content for a future blog post!

Post reply on HN