They don't anymore? Which company doesn't have free coffee. That is like the most basic employment benefits possible.
Ping pong tables are maybe not the norm as they take up space. In our office we solved this by having a conference table that can be converted into a ping pong table.
I like good selfdocumenting code more, because a lot of comments and co can be fast outdated on changes, only docstrings on public/lowlevel api and outside context that cant be inferred from the code is a must for me. Spending more time refactoring before commiting helped me a lot.
// Finds the middle value
int calculate_midpoint(int low, int high) {
// Subtract low from high
int diff = high - low;
// Divide the difference by 2
int half = diff / 2;
// Add low to half
int result = low + half;
// Return the calculated midpoint
return result;
}
That’s how I commented when I first started. I was self-taught, and the book I was reading emphasized commenting often, but at the time, I had no idea what made a comment good or bad.
I sort of think bad code without comments is probably better than bad code with a lot of comments.
A lack of comments indicates that you weren't thinking much about what you were writing, you were dashing it off so you could go do something else.
Good code with comments, so that the next person who comes along and sees something that looks wrong to them knows what aspects of the problem you spent time thinking about is good.
Bad code with a large, elegantly worded pack of lies next to it that you have to wade through is not necessarily helpful.
Thee has changed completely from yesterday and i say it was better to write from scratch than debug that yesterday code which you claim to be written by "I, yesterday"
It actually does make sense. You're not setting it to false if Input(key) returns false, which perhaps you wouldn't want to do if it means overriding needToRedraw already being true.
If anything, maybe you could have done:
needToRedraw = needToRedraw || Input(key);
Using an if is just an unnecessary branch (probably optimized regardless).
Well it makes sense. But I came to this project 3 months later and just saw this line and I thought I was stupid. It appears, that I’m sometimes not as stupid as I think I am.
Anyways, maybe I will implement your way, if I return again
Some people love to take shortcuts when writing code and then forget what it all meant. When writing code manually, I'll always split complex math into separate lines and comment each one explaining the reason for each variable, where it comes from and what values I should expect most of the time. I also write summaries on top of files to know the purpose of said file and stuff.
When AI first came out I hated how bad it was. Now I use Claude on a daily basis and love how it comments the shit out of everything it writes. I even spend some extra time reading all comments it makes and editing/adding some of my own so that I can read the code and understand its purpose in the event that Claude becomes unavailable.
When used properly, AI is just waaay too good to pass on.
I have logging statements (or print for less official apps), but I only use comments when I am doing some very complicated parsing or the handful of instances I am doing something weird.
Highly descriptive variable and function names are much more useful and get updated as a normal part of the functionality. Also using Hungarian typing which works really well with "strCameCase" means I can determine what a variable is immediately without having to scroll over (especially if a variable might not be just defined by its raw type, like an index (ix) versus an int).
We had a huge project that stopped me from working on something I'm building at work by myself. It was like a solid month away. When I came back, I couldn't understand the last feature I built. It was a good sign that I needed to refactor my code.
85
u/Foorinick Oct 12 '26
This meme dates back to when tech companies had ping pong tables and free coffee
24
u/JackNotOLantern Oct 12 '26
The main reason i document everything in detail is so i so be able to know what the fuck i wrote
205
u/L4r0x Oct 12 '26
“I” wrote
21
u/rustyscythe Oct 12 '26
Sometimes i go like this though
25
u/gustix Oct 12 '26
You guys are writing code?
8
u/zman0900 Oct 12 '26
Nah, fuck that.
git reset --hard origin/master5
u/_Weyland_ Oct 12 '26
Literally me at 4 AM on Sunday trying to fix shit I conjured up on Friday before it's shipped to prod on Tuesday
Wish me all the things
3
u/Sakul_the_one Oct 12 '26
Throwback to the time I wrote this:
And it actually makes sense
3
u/nasandre Oct 12 '26
Who wrote this shit!?
Oh it was me.
3
u/skippy_smooth Oct 12 '26
Temporal pair programming. I get to correct what yesterday wrote.
8
u/gilmeye Oct 12 '26
You guys are still writing code ? I let the ai write everything and hope he will understand tomorrow the code he wrote today
2
u/Bokbreath Oct 12 '26
Yesterday: Ah that my man, this is true genius
Today: Why the fuck did I ever think that would work
2
u/Anima_Watcher08 Oct 12 '26
This applies to almost anything
3
u/TerribleFault7929 Oct 12 '26
I _literally_ never experienced that. Are you guys coding on drugs or something?
1
u/gravesent1337 Oct 12 '26
You guys write code?
1
u/Sherlok12345 Oct 12 '26
🤣🤣🤣👍🙂
1
u/SoulPossum Oct 12 '26
We had a huge project that stopped me from working on something I'm building at work by myself. It was like a solid month away. When I came back, I couldn't understand the last feature I built. It was a good sign that I needed to refactor my code.
1
u/mr2dax Oct 12 '26
*after taking a pee break
1
u/mcampo84 Oct 12 '26
ADHD?
1
u/po1k Oct 12 '26
yeah, kombucha-gal-like mood change all the time
1
u/Pure-Asparagus-2547 Oct 12 '26
Is this how women call sandwiches these days?
1
u/PresentAstronomer137 Oct 12 '26
and that mf who asked me to rewrite random 30 lines from 3 days ago to prove it wasn't LLM, fuck i hate that dude
1
u/magic-one Oct 12 '26
Complex regex after coming back from lunch.
1
u/thanatica Oct 13 '26
"code I wrote" is a pretty broad term these days 🤖
1
u/KTVX94 Oct 14 '26
At least you wrote it. Right?
1
u/zenos_dog Oct 16 '26
I was there, Gandalf. I was there three thousand years ago.
1
u/cam2023nguyen Oct 16 '26
wrong date for this post, it should be 2 year old.
1
u/Right_Ear_2230 Oct 17 '26
Scrap that, code I just wrote
1
u/AndiArbyte Oct 18 '26
When your yesterday you was smarter than your today you. ^^
1
u/YrnCollo Oct 12 '26
You mean the one you told claude to write it?