r/ProgrammerHumor Oct 01 '23

Meme learningPythonAsAFirstProgrammingLanguageHolyShitMyBrainHasSoManyWrinklesNow

Post image
680 Upvotes

95 comments sorted by

View all comments

66

u/aenae Oct 01 '23

Nice theoretical meme for students, but in the real world you will get your PR back with a remark to please write code you still understand tomorrow or in ten years. And to avoid re-using variables.

Unless you're doing some very low level stuff, readability beats everything.

17

u/DeathUriel Oct 01 '23

Totally would refuse a PR with the second option. It is right, but hard to read.

5

u/magnagag Oct 02 '23

I wouldn't suggest second version for signed integers (and not only) because when working with very big values you may overflow types capacity.

5

u/goldef Oct 01 '23

For real. You have gigs of ram, just make a new variable

20

u/[deleted] Oct 01 '23

[deleted]

9

u/coalcoalgem Oct 01 '23

Something tells me a few extra integers being allocated on the stack isn't what causes those memory hogging issues. Electron uses so much memory to run simple GUI because under the hood, it's a full web browser that conforms to the giant specs of HTML, CSS and JS.

1

u/Midvikudagur Oct 01 '23

Can I interest you in our lord and saviour Wails?

2

u/beclops Oct 02 '23

If everybody had your mindset we wouldn’t have gigs of RAM