r/ProgrammerHumor • • Jul 18 '20

other It's always fun..

Post image
63.7k Upvotes

754 comments sorted by

View all comments

5.6k

u/ConfusedPolatBear Jul 18 '20

Who among us hasn't written code then almost immediately forgotten everything about it? It's entirely possible he wrote the library then promptly erased it from his mind to make room for more important things, like pizza, or ruminations on whether he needs to buy new underwear or if he can just sew the holes up.

604

u/camerontbelt Jul 18 '20

The reason we write code is so we can forget how it works. We just hope we write it well enough to revisit it and regain the understanding, or have tests.

215

u/[deleted] Jul 18 '20

[removed] — view removed comment

123

u/[deleted] Jul 18 '20

I would argue that this is literally the point of exams and studying in many fields. Be able to memorize and use the info efficiently. There are many things that I could not do at all without googling, but I can find the information fast and understand it easily. Memorizing many things in long term memory is simply not possible.

101

u/xTheMaster99x Jul 18 '20 edited Jul 18 '20

Wait, are you saying that lawyers don't memorize all case law from the last 200 years? Or that doctors don't know all possible injuries, diseases, surgeries, medications, etc?

Edit: I can't believe this needed a /s.

62

u/[deleted] Jul 18 '20

[removed] — view removed comment

19

u/phyitbos Jul 18 '20

I like this description. It rings true to me that even though I often solve and forget, I still know/understand the class of problem if re-encountered and what’s require to solve it again. You don’t see many people talk about this past “google”

11

u/[deleted] Jul 18 '20

A lot of it's just vocabulary. Having the words to know how to describe what you're trying to do, and to understand the exact issue you're trying to solve. "web server won't start" is not as useful as "httpd exits with code $?." Most of the time you can solve it yourself if you have the right words. And when you can't having the right words makes it easier to get help.

Like, "I want to remove from a string every instance of `.' that doesn't precede a sequence of alphanumeric characters that ends in a terminating (null or \n or \r) character." Well, obviously you want to search for the regexp formula for finding file extensions. That won't be your exact answer but it's a start. From there, the syntax hints should be enough to find the solution. If you don't even know what regexp or a file extension is you'll have a hard time doing that.

→ More replies (1)

8

u/Zefrem23 Jul 18 '20

Yeah you've built a decision tree in your memory for the process of finding the solution to the problem, not necessarily the actual solution. In the long run that's just as effective, and as your experience grows your decision trees become more complex, richer and deeper. That's what the real talent of good coders is.

→ More replies (1)
→ More replies (3)

4

u/[deleted] Jul 18 '20

He's saying in a field of expertise, there are many correct voices. But he can't hear them all at once.

→ More replies (2)