Live data from Hacker News

Ask HN: Do you ever go back and admire a piece of code you wrote?

news.ycombinator.com

171–180 of 267 posts

Re: Ask HN: Do you ever go back and admire a piece of code you wrote?

#171
I had this feeling from time to time, usually right after finishing a project. While every relevant contextual details are still fresh in my mind.

Admiring an older piece of code that I've written more than last year? Rarely, unless it's just a small puzzle or self contained code.

Re: Ask HN: Do you ever go back and admire a piece of code you wrote?

#172

I don't code, but I do write. I regularly re-read my own writing to spot any problems, but sometimes just for pleasure. For example, about 18 months ago I wrote a 5 part series on how to build a direct conversion receiver for the ham radio bands from scratch. I learned tons along the way and it was really rewarding to write. Re-reading it recaptures some of that joy and reminds me that I'm a good writer, even when I…

I want to read that. Can you post it on here or on your profile or something please?

Re: Ask HN: Do you ever go back and admire a piece of code you wrote?

#174

I don't code, but I do write. I regularly re-read my own writing to spot any problems, but sometimes just for pleasure. For example, about 18 months ago I wrote a 5 part series on how to build a direct conversion receiver for the ham radio bands from scratch. I learned tons along the way and it was really rewarding to write. Re-reading it recaptures some of that joy and reminds me that I'm a good writer, even when I…

Never mind, I found it at miscdotgeek.

Re: Ask HN: Do you ever go back and admire a piece of code you wrote?

#175
All the time.

I have learned very useful tricks over time, like the ability to automate code creation to incredible levels with my own dialects of lisp that makes me hundreds of times more productive.

But when I was young I used scalable vector graphics to document everything I did, and some ideas I had are quite impressive to me today.

Re: Ask HN: Do you ever go back and admire a piece of code you wrote?

#177
I have on one or two occasions come up with a pretty neat algorithm for some task that seemed really clever. Later I'd learn that I wasn't the first to invent it and that so-and-so had discovered that algorithm years ago. It could make me sad, but usually it makes me think, "Hey! I'm as smart as that programmer!" or at least, "Hey! I have been as smart as that programmer was when they came up with that algorithm! I'm not a complete idiot!"

Re: Ask HN: Do you ever go back and admire a piece of code you wrote?

#178
It is the best way to stay motivated as a programmer. The power to model a real world scenario into code and seeing it work has been my motivation to keep coding. Make sure you also look at that stupid code once in a while and ponder "What was i thinking?"

Re: Ask HN: Do you ever go back and admire a piece of code you wrote?

#179
post #64
post #62

I've only been coding for a few years now. Often I'm sort of irked by my old code. But it is telling that from time to time I find some old simple code that was easier to read / change than I expected if only because I coded it so simply and in an iterative sort of way. There's something to be said for being simple...

Going back and being annoyed with your old code means you've improved.

Well then I've improved A GREAT DEAL ARGH!

Re: Ask HN: Do you ever go back and admire a piece of code you wrote?

#180
post #20

Earlier quoted context omitted.

Hehe, well if we're going here there are various go-to shell commands / filenames / hostnames I inevitably end up using at some point just for the wry smile: $ PONG=1.1.1.1; ping $PONG $ more cowbell $ cat dog | tee hee And my favourite choice of empty file: $ touch me Also I was fairly please years ago when I briefly re-aliased cd to something that could do "the right thing" (TM): $ cd ... $ cd ..../src/ etc..

I wrote a generic bash function to spin up a mongodb instance called `mongo`. I couldn't resist adding `echo "Mongo only pawn in game of life"`

You would get bonus points if you wrapped the mongodb process so that when it receives a SIGKILL it logs out "Mongo like candy!"
Post reply on HN