Ask HN: Do you ever go back and admire a piece of code you wrote?
101–110 of 267 posts
Re: Ask HN: Do you ever go back and admire a piece of code you wrote?
#102I've always loved seeing recursive functions I wrote in the past. The amount of power and elegance that can come from a good recursive function is my favorite.
Re: Ask HN: Do you ever go back and admire a piece of code you wrote?
#103Programming isn't unique in allowing you swing between moods of "this feels great :D" and "I'm so dumb". (I think most people feel like either at times, even hours apart). But Fred Brooks makes a good point with: """The programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination. Few media of creation are so flexib…
When I started my first programming job the CEO told me that programming is 59 minutes of feeling like an idiot and 1 minute of feeling like a genius. It's really stuck with me, and has so far proven true.
Re: Ask HN: Do you ever go back and admire a piece of code you wrote?
#104Re: Ask HN: Do you ever go back and admire a piece of code you wrote?
#105All 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…
I wish I could see over time that the latter takes precedence, but I'm just happy these days that the majority most falls somewhere in in the midpoint between both extremes.
Re: Ask HN: Do you ever go back and admire a piece of code you wrote?
#106Re: Ask HN: Do you ever go back and admire a piece of code you wrote?
#107All 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?
#108Earlier quoted context omitted.
It's unfortunate that the younger generation of coders took "comments are code smell" idealogy to heart and are actively against writing comments.
Too many comments explain what is going on. That should be obvious from well-written code. But comments why it's done that way can be extremely valuable. And sometimes there is indeed something wrong with the code. In those cases, a comment saying so can save a lot of time analyzing what's wrong with the code.
Re: Ask HN: Do you ever go back and admire a piece of code you wrote?
#109Not exactly a “creative pursuit” but often with legal work it takes years for any sort of feedback on a document’s effectiveness. Sometimes you’re alerted to a potential issue and your first thought is “yikes, there’s no way I drafted for that”. Much like coding it’s always a good feeling when you go back and see that you had contemplated the weird scenario and drafted accordingly.
I’ll admit it feels a bit more “magical” when it happens in my code though. I think perhaps because the stakes are lower so I can appreciate the work instead of feeling like I’ve dodged a bullet.
Re: Ask HN: Do you ever go back and admire a piece of code you wrote?
#110Programming isn't unique in allowing you swing between moods of "this feels great :D" and "I'm so dumb". (I think most people feel like either at times, even hours apart). But Fred Brooks makes a good point with: """The programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination. Few media of creation are so flexib…
When I started my first programming job the CEO told me that programming is 59 minutes of feeling like an idiot and 1 minute of feeling like a genius. It's really stuck with me, and has so far proven true.
Luckily as I have gotten older I have gotten fewer and fewer of those days.