r/ProgrammerHumor • • Jul 18 '20

other It's always fun..

Post image
63.7k Upvotes

754 comments sorted by

View all comments

Show parent comments

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.

2

u/Canadianingermany Jul 18 '20

Great point. It is about knowing your search terms. For example right now I am trying figure out the best way to provide a "User Portal" for a b2b app where I can drop some reports Google data studio) and webforms (cognitoforms) with multi-tenent and multilevel user access (clients with admins and users).

I believe this has got to have been done a million times, but I have no idea if these are the words people use to describe it as Google / stack overflow is not giving me love. But I have no idea if those are the actual

Maybe I am expecting too much, but there are plug and play services for EVERYTHING.

I

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.

2

u/Qinjax Jul 18 '20

thats what real talent is.

3

u/idownvotefcapeposts Jul 18 '20

he was sarcastic.

→ More replies (1)

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.

1

u/i_forgot_my_cat Jul 18 '20

No, but they remember the most commonly used data and the less common stuff either partially or know how to access that data.

→ More replies (1)

6

u/IamImposter Jul 18 '20

Can confirm. Wait... what were we talking about?

1

u/mikehaysjr Jul 18 '20

Where am I?

Who are you? Who am I?

10

u/dion_starfire Jul 18 '20

This concept is actually the basis of the Vancian "spell slot" system that D&D uses. He remembered cramming for exams and not remembering anything the minute he walked out of the exam room.

7

u/theghostofme Jul 18 '20

This is why I notate the shit out of everything. I realized very early on that I’ll forget just about every damn reason why I was doing what I was doing within hours, and I could pick back up where I left off and it was like someone else wrote complete gibberish.

It got the point where, even if I was making one tiny change, I’d copy then comment out whatever I was changing to keep a direct record, paste, change it, then leave an extremely detailed explanation as if I were leaving a note for my future self suffering from amnesia.

And I’m the only person who’s ever actually read any of my code.

5

u/[deleted] Jul 18 '20

The reason we write code is so we can forget how it works.

Wow holy shit... in 12+ years or whatever I have never heard it put quite this way but you are absolutely correct and I am going to steal this immediately and start repeating it. Thank you.

1

u/camerontbelt Jul 18 '20

It was an insight I had immediately after reading this tweet. I hadn’t quite articulate either but I’m glad I was able to help 😄

2

u/Vortesian Jul 18 '20

You know I wonder if Margaret Hamilton forgot any of her code that got people to the moon. I think she was probably forced to remember, what with no internet and not being able to instantly look up literally anything.

2

u/RoboDowneyJr Jul 18 '20

I got accused for plagiarism in an assignment a while back. I knew it was 100 % my own code, but I had shared it with some class mates, and figured they must have straight up copy/pasted it into their own assignment. Even so I was SO FUCKING WORRIED about the meeting I had to have with my professor, not because I was guilty, but because I had no clue how the code I wrote a month ago worked.

1

u/camerontbelt Jul 18 '20

Just tell them it was an open sourced library you wrote 😂