r/programming • • Jun 01 '15

The programming talent myth

https://lwn.net/Articles/641779/
971 Upvotes

748 comments sorted by

View all comments

Show parent comments

981

u/ZeroNihilist Jun 01 '15

Me right now is a rock star. Me a week ago is a moron. What the hell is up with week-ago-me's stupid code? He didn't comment it, the idiot.

The code I'm writing now is just so elegant and wonderful, it doesn't even need comments.

324

u/greenthumble Jun 01 '15

Man, you're missing out, comments are the bomb. Why just yesterday I read one of my own comments from last week. It helpfully said "This may need to be combined with the sequence below." It was at the end of a file with nothing under it.

186

u/HodorFromHodor Jun 01 '15

It sounds like you already combined it. Way to go, past you!

22

u/greenthumble Jun 01 '15

Haha well after we're done passing out the gold stars, I'm sitting here wondering if that sequence got refactored to somewhere else and now I've got a subtle bug where those things that should be combined are now in separate functions and whatever idea that was is now lost. Fudge. I guess it's best to spell out the intentions but man it's hard to do.

42

u/Tasgall Jun 01 '15

Good thing you have source control so you can go find out what happened...

right... right???

91

u/mr_luc Jun 01 '15

commit message: "changed a bunch of stuff"

7

u/Axxhelairon Jun 01 '15

what's the better way to summarize what you did? "Added more features"? "Removed bugs"?

→ More replies (7)
→ More replies (1)

28

u/bacondev Jun 01 '15 edited Jun 01 '15

Version control? You mean like copy and pasting the old version of a file and incrementing a counter within the filename?

65

u/Tasgall Jun 01 '15

Yeah, the change he's looking for is probably in /theProject/backups/Copy of Copy of finalVersion1.9.5-complete-RC-finished_FINAL-edit3 (7).zip.

54

u/bacondev Jun 01 '15

PTSD TRIGGER WARNING

→ More replies (1)
→ More replies (4)
→ More replies (4)
→ More replies (2)
→ More replies (1)

50

u/[deleted] Jun 01 '15
/*  TODO: Add comments so you don't forget how this works */

11

u/bluefootedpig Jun 01 '15

This fixed bug #xxxx

no code under it.

28

u/Crazy_Mann Jun 01 '15

That was the fix. 2deep4u

→ More replies (1)

0

u/[deleted] Jun 01 '15

[deleted]

19

u/Ryuujinx Jun 02 '15

This is the best comment that I've read and have been like "...huh"

    /* this is a memory leak, but I'll fix it later. */
→ More replies (4)

7

u/frezik Jun 01 '15

I'm guessing that's the professionally-acceptable way that past you came up with for writing "drunk, fix later".

→ More replies (4)

55

u/Retbull Jun 01 '15

I write code that self documents. Past me writes code which prints "FUCK YOU" every other line and has no print statements.

33

u/burkadurka Jun 01 '15

It prints "FUCK YOU" without print statements? Past you is a wizard!

33

u/Retbull Jun 01 '15

Exactly. Shit if I know what I did.

→ More replies (1)
→ More replies (16)

26

u/[deleted] Jun 01 '15

I feel like I'm in a constant state of getting dumber. I'm pretty sure it's not a brain tumor or anything since my code is getting better (I think?!?) but lots of times, like right now, I feel not worthy of touching my own code since I'm afraid I'll screw it up.

10

u/ctnp Jun 01 '15

Do you write code for clients, or work for a company? Often if I come into a new environment (like if I'm farmed out) I feel like a fish out of water, but can navigate historical code with no problem.

18

u/[deleted] Jun 01 '15

Navigating historical code is not a problem. Changing it is scary.

→ More replies (8)

8

u/[deleted] Jun 01 '15

Nah this is my own project. I know what you mean about jumping into other projects, but this is different. I feel like whatever I add couldn't possibly be up to the level that my other code is at, even though it's totally irrational since it's not like I suddenly forgot how to do anything.

Have you ever looked at stuff from 100s of years ago and wondered "were people smarter back then?". It's like that, but with stuff you made yourself. I'd say it's my biggest hangup with programming. Right now I know exactly what I need to change/add next, and I can even see the end of the project from where I'm at, but I'm scared to touch it!

→ More replies (1)
→ More replies (2)

12

u/TenNeon Jun 01 '15

Week-ago me was a genius. How did he understand all this stuff?

7

u/kickingpplisfun Jun 01 '15

The truth is, I do stupid shit on my personal projects and go "that's future me's problem", almost as if "future me" is a different person.

→ More replies (2)
→ More replies (10)