I have a bunch of open source projects from more recent years up on Github that I look at once in a while when I'm looking for a solution for something, and they tend to be less piles of shit. BTW my biggest project open source project has been taken over by a whole team after I've left it, and I can't recognize most of the code now, that's a really weird bittersweet feeling.
Ask HN: Do you ever go back and admire a piece of code you wrote?
151–160 of 267 posts
Re: Ask HN: Do you ever go back and admire a piece of code you wrote?
#152Re: Ask HN: Do you ever go back and admire a piece of code you wrote?
#153The only thing I have ever gone back and admired is when I wrote the following snippet of code: long time; // no see
class Action(Lawsuit): ...Re: Ask HN: Do you ever go back and admire a piece of code you wrote?
#154Re: Ask HN: Do you ever go back and admire a piece of code you wrote?
#155Re: Ask HN: Do you ever go back and admire a piece of code you wrote?
#156Earlier quoted context omitted.
Me writing docstrings: God this is so much work for nothing... my code should speak for itself. Me 6 months later: Thank god I wrote docstrings, what is this garbled mess.
100%. It's amazing how many GitHub repos have little to no comments, not even file or function overview comments. The amount of time save by potential contributors reading and having to interpret the code is way longer than it would take for the author to write the comments in the first place. To each their own, but comments are generally a positive addition to code.
Re: Ask HN: Do you ever go back and admire a piece of code you wrote?
#157All the time. The old joke is about us looking at code we wrote six months ago, and being horrified at what we see. And I've had more than my share of that. But what's ALSO happened, many times, is I look at old code I wrote... and I'm IMPRESSED. Just blown away by the beautiful elegance and power of the abstractions I came up with, the sheer intelligence of the approach, the insight and lucidity oozing from the code…
Me writing docstrings: God this is so much work for nothing... my code should speak for itself. Me 6 months later: Thank god I wrote docstrings, what is this garbled mess.
Re: Ask HN: Do you ever go back and admire a piece of code you wrote?
#158Everyone's talking about code, but I do this with carpentry. Right now, I'm working as a trim carpenter in residential construction, and I pride myself on doing as good a job as I can. As a result, when I come back to a job to install door hardware after everything is painted, I sometimes just wander around the house and admire my work. Especially tricky details that took a bit of thinking to get right, even if no-on…
How does one find a trim carpenter (or any skilled tradesman) who has this level of attention to detail? There's definitely two tiers of work, someone who cares and work good enough for a rental unit, and you have no idea what you're going to get until it's done.
If someone's good at running and marketing a large business, it doesn't necessarily mean that they do good work, and may mean that they know how to maximise profits by cutting corners whenever they can. That's not always the case, but it seems to be pretty typical.
Instead, look for the small guy who may not have a website and drives a plain van. I work for my dad, and that describes him to a tee, as well as most of the other tradesmen on the jobs we do. My dad doesn't even have a company name, nor business cards. He gets all of his work either through a few regular builders, or by word of mouth from previous customers, and is definitely not a business-man. He started carpentry with his dad after he finished high school, and just slowly grew from there. For most of his life he worked alone, but as they grew older, all of my brothers at one point worked for him full-time (it's just me now, and I'm part-time).
If you do find a potential tradesman, just ask him (or her) how he does certain aspects of the job (ex. baseboard inside corners should always be coped, never mitred), and make it clear that you expect high quality work. If he asks for significant payment up-front for anything other than materials, walk away. Better yet, supply all the materials yourself, and pay a proportion of the job each day or week until it's done. One more factor to consider is price. We charge more than the typical carpenter, but not exorbitantly more. If the price seems too good to be true, it probably is.
I've also found this to be true for auto mechanics. The run-down looking shop is more trustworthy and does better work for a better price than the highly polished franchises.
Re: Ask HN: Do you ever go back and admire a piece of code you wrote?
#159Earlier quoted context omitted.
Me writing docstrings: God this is so much work for nothing... my code should speak for itself. Me 6 months later: Thank god I wrote docstrings, what is this garbled mess.
On a bit of a tangent here, but good commit messages are another thing I really appreciate 6 months later.