Hacker News new | ask | show | jobs
by ntrz 1789 days ago
I guess I do a lot of cargo cult programming by the metrics in the article: if someone approaches me and demands a detailed explanation of the design principles involved in some minor function I wrote months ago, plus a list of the programming books I consulted (printed books -- no online resources, please!), I will probably score poorly in "eloquence" since I'll just be standing there slack-jawed and bewildered.
1 comments

Who remembers their sources anyway? Once you learn a concept or a principle, the source of that knowledge fades away pretty fast while the concept remains.
Though if you do copy some code blindly from Stackoverflow, it might be a good idea to include a comment linking to the answer you got it from.
I tend to use my commit messages for things like this.
The advantage of having it in a comment vs in a commit message is that the source is immediately available to another developer browsing the code. Otherwise they will have to use git blame (or equivalent) to see why you did it that way.
The advantage of having it in a commit message vs a comment is that there's no chance of the comment just hanging around once it inevitably becomes irrelevant. Once it's irrelevant it's anti-productive to leave it in. Since there is no direct link between a comment and the code it applies to (it could be at the top of the function or class, for example), it's also really easy to forget removing it once it is no longer relevant.
Commits are forever, comments could be deleted by someone 'cleaning up'.
I started keeping a list. Each time I discover a game changing concept I add it to my resource list on my personal website. After doing this I found having such a list invaluable to both myself and others.
Getting a bit off topic but I definitely have some strong associations between concepts and the time & place or people I learned them from.
For some concepts, yes. Radical new approaches to things that give you an "Aha!" moment will be memorable.

But often you synthesize ideas too. You take your body of knowledge and produce a good idea from it. Some concepts are "obvious" when you've learned other, related concepts.

In those cases you wouldn't have an external source. After years on the job, you should have a lot of things like that. They may not be original ideas, people have come up with the same ideas before, but nobody told them to you.

I have this only for concepts on radically different topics.

If it's something about history, I probably learned it from Revolutions, because I don't read a lot of history otherwise.

If it's about cryptography, I probably learned it from The Code Book, because I don't read a lot about cryptography otherwise.

If it's about language features in Python, heck if I know where I got it from, I watch, read, hear about, and find new stuff about python all the time, it's my job.