I honestly needed to hear this today, so thank you. I’m at work trying to work out someone else’s uncommented code and have just been staring at it mumbling to myself. I’m new to the position so I’m anxious my new coworkers will think I’m just dicking around… This is the validation I needed. Thanks everyone!
Stare at it.
Submitted 5 months ago by fossilesque@mander.xyz to science_memes@mander.xyz
https://mander.xyz/pictrs/image/74389864-4713-4be6-b409-49f81767d03f.jpeg
Comments
Yondoza@sh.itjust.works 5 months ago
kersploosh@sh.itjust.works 5 months ago
Say out loud to yourself, “What the hell is this?” or, “Why did they do it this way?” once in a while. Everyone around will think you know exactly what you’re doing.
Deebster@programming.dev 5 months ago
@Yondoza@sh.itjust.works this is good advice
sasquash@sopuli.xyz 5 months ago
exactly. like a former boss of mine said: if they are complaining, they are working!
ElCanut@jlai.lu 5 months ago
From what I learned in my workplace, it seems that for most people the best way to appear competent is to continuously criticize the work of your colleagues
daddy32@lemmy.world 5 months ago
I don’t know your circumstances, but is usually OK to just ask. Especially if the original author is around. Don’t do it all the time and you’ll be OK. Even can come with positive image out of it, if you ask the right questions.
Other than that, I found that the current alms like ChatGPT (an perhaps Claude) are very good at explaining code, most of the time, for some languages ;)
Lmaydev@programming.dev 5 months ago
I find for coding problems it’s actually better to walk away and let it tick over in your mind.
You’ll often get a shower thought type moment.
Dagwood222@lemm.ee 5 months ago
That works for pretty much anything.
Get up and do anything else for a while. School teaches us to sit at our desks and work on the problem. Stop acting like a sixth grader.
brbposting@sh.itjust.works 5 months ago
That works for pretty much anything. Get up and do anything else for a while.
This got me fired from the daycare
Deebster@programming.dev 5 months ago
One place I worked had a small park, so sometimes I’d go for a lap or two to think something through - the fresh air, mild exercise, change of scenery and lack of distractions wroked wonders.
frauddogg@lemmygrad.ml 5 months ago
Nothing more enchanting than when the answer to your coding problem literally comes to you in a dream. Had an array issue in C++ where I literally woke up saying "I don’t need a ghost array to search after all is said and done, it’s already sorted!"
lennivelkant@discuss.tchncs.de 4 months ago
Me, staring at my code, fiddling around, retrying it over and over: “WHY WON’T YOU WORK, DAMMIT?”
Me, late at night, trying to sleep, suddenly wide awake: “Oh that’s why!”
Me, the next morning, staring at my code: “…what was it again?”
dependencyinjection@discuss.tchncs.de 5 months ago
A true software developer will also raise their hands in celebration when they finally solve a problem that’s been plaguing them.
Even if you’re working from home, alone.
leftzero@lemmynsfw.com 5 months ago
I often cackle maniacally when I solve something in a particularly effective way.
el_abuelo@lemmy.ml 5 months ago
Sometimes I even stand up.
dependencyinjection@discuss.tchncs.de 5 months ago
Granddads standing up, I’ve heard it all. /s
model_tar_gz@lemmy.world 5 months ago
Palacegalleryratio@hexbear.net 5 months ago
My personal favourite is to break from staring after 30 mins, exclaim, “Hang on, we’re going about this completely back to front!” then spend the next hour deriving from first principles, only to arrive back at the original problem, but now with slightly different notation. At which point I realise that all I’ve done is get myself back to my starting point… Then it’s back to the staring.
corsicanguppy@lemmy.ca 5 months ago
Aside from “learning to spell hypnotized or just trusting your phone knows better than you,” there are a bunch of tricks we use.
- Staring at it and going over the code path
- Talking to a proverbial duck
- Going out for a proverbial cheeseburger
- Sleeping on it
Half of these tricks force the brain to stop confirming and start seeing, which is our biggest error source. The rest of these tricks let the problem ruminate in our subconscious which is sometimes really good at solving shit.
qprimed@lemmy.ml 5 months ago
1, 3 and 4 (in that exact order) have almost always gotten things moving again. rubber ducling it just feels “forced” to me.
GreyEyedGhost@lemmy.ca 5 months ago
You can just talk to one of your more inept coworkers.
Alexstarfire@lemmy.world 5 months ago
I talk to myself almost constantly, even when not programming. Rubber ducking is second nature to me now. Though, IDK which came first.
tooclose104@lemmy.ca 5 months ago
Haven’t heard of the proverbial cheeseburger… gonna stare at this phrase for a bit.
psud@aussie.zone 5 months ago
If you don’t get it, go for a proverbial cheeseburger
sep@lemmy.world 5 months ago
Maggoty@lemmy.world 5 months ago
And this is why I moved to using white boards.
jadedwench@lemmy.world 5 months ago
I wish I understood how to use them. I have half written scraps of paper and random text in random text files. Notebooks are about the best I can do. I can’t write very well on a vertical board. It is really really uncomfortable and I end up obsessing on how bad it looks over solving the problem. Sometimes drawing on my iPad instead works, but that is another place to look for things.
I do like using Markdown + Mermaid. Obsidian is a nice little note taking app once I got it configured. It just takes me forever.
perishthethought@lemm.ee 5 months ago
I used to work in an office with 4 other developers. It was a common occurrence to have the lights go off in the room, for energy saving.
Simone would wave their arm, then go back to staring.
zalgotext@sh.itjust.works 5 months ago
God bless Simone
henfredemars@infosec.pub 5 months ago
At least they’re moving. Sometimes it goes off and nobody reacts at all.
Sometimes figuring out what you’re supposed to do is most of the project.
perishthethought@lemm.ee 5 months ago
True, true. Working in the dark was kinda nice on those days
model_tar_gz@lemmy.world 5 months ago
I work in a dedicated room in my house (remote developer). During the day I don’t really need to turn the lights on. The sun sets and sometimes I really just don’t notice. My wife will come in at some point and scold me for working in the dark, claiming it’s bad for my eyes (as if staring at a screen all day isn’t already).
I actually rather enjoy that rather not-subtle marker of the passage of time and how entrancing “the zone” can be such that I fail to even notice that.
justme@lemmy.dbzer0.com 5 months ago
My math teacher in high school always said “math is 90% looking” and if you didn’t get the task directly: “look again” … Funny part is, that actually worked for most of the class xD
Kolanaki@yiffit.net 5 months ago
If staring at it isn’t giving the results you expect, try not staring at it. Math functions differently when observed.
Leate_Wonceslace@lemmy.dbzer0.com 5 months ago
What I do is I read over something, take a nap, and then read it over again. If I don’t get it after that I’ll ask someone for help.
shasta@lemm.ee 5 months ago
Taking a break helps a lot. I like to multitask for this reason and to not feel like wasting time. Also, important to remember to eat. There’s an obvious drop in my clarity of mind right before lunch.
TheGiantKorean@lemmy.world 5 months ago
100%. Really, just go do something other than what you’ve been focusing on, then come been to it. When I was coding, I would go take a walk when I’d get stuck. 9 times out of ten the answer would pop into my head when I’d stepped away. A few times I even dreamed of the answer while sleeping.
daddy32@lemmy.world 5 months ago
First taking a nap and only then asking for help. I like this approach.
rockerface@lemm.ee 5 months ago
I refer to the process as “loading” and it helps so much when coding, debugging or even playing puzzle games
GreyEyedGhost@lemmy.ca 5 months ago
I had a theoretical math professor. He said something along the lines of, “Being a theoretical math professor is the best job in the world. You can lean back in your chair, put your feet on your desk and close your eyes, and no one can tell if you’re working or having a nap.”
Hugh_Jeggs@lemm.ee 5 months ago
Tbh a good builder/technician will do this too when faced with a complicated fix
Same thing; every action has an opposite reaction, whether it’s code or physical engineering
Swemg@lemm.ee 5 months ago
I’m a carpenter, I do high end stuff for rich people with really expensive pieces of wood. I’ll stare as much as I need to on the issues I have or even before starting anything. Need to think about every way it could go wrong.
Alexstarfire@lemmy.world 5 months ago
How do you prepare for “world ends in nuclear holocaust?” Seems a bit difficult to account for.
MonkderDritte@feddit.de 5 months ago
Don’t ask him, he will be angry and mumbling something about “the zone”.
dohpaz42@lemmy.world 5 months ago
I’ve often been accused of looking angry when I’m thinking about a problem. Of course I’m angry! How dare the solution allude me! 😡
ma11en@lemmy.world 5 months ago
Allude what to you?
Viking_Hippie@lemmy.world 5 months ago
Probably alluding to the fact that it’s eluding them 🤷
MystikIncarnate@lemmy.ca 5 months ago
I don’t like coding, so I became a systems administrator.
Today, I spent about three hours “coding” a script. Before I started my testing phase to see if all the code put together would work as intended, I just did a pass over the code. I literally just stared at it for a solid 20+ minutes to make sure it made sense.
I imagine and form of “real” programming is going to require a lot more staring for a lot longer just to make sure the code isn’t profoundly screwed up.
Aux@lemmy.world 5 months ago
Sometimes, very rare but still, I can stare at the screen for the whole day and write zero lines of code. These rare days are the most demanding and the most stressful. Any monkey can “write code”, understanding the business logic of a complex application - that’s a very taxing mental work.
Diplomjodler3@lemmy.world 5 months ago
If I intimidate it by staring at it long enough, it’ll work eventually.
CarbonScored@hexbear.net 5 months ago
Whenever I’m asked for help by IT colleagues, I never say I’ll help solve an issue. I just say “Sure, I’ll come help stare at it for a while” - it’s the most I can really promise.
lightnsfw@reddthat.com 5 months ago
Damn, I can’t think about something for more than a minutes or two without getting distracted… Maybe I’m the one who’s broken.
el_abuelo@lemmy.ml 5 months ago
That’s the fun part. We’re all broken in some way.
nobleshift@lemmy.world 5 months ago
[deleted]clif@lemmy.world 5 months ago
Sometimes the first, then eventually the second when you realize you did it but forgot you did it.
essteeyou@lemmy.world 5 months ago
“Ok fine, I’m going to see who committed this atrocity,
git blame
, oh crap.”
chetradley@lemmy.world 5 months ago
Wait until she walks in on him explaining the problem out loud to a rubber duck.
xantoxis@lemmy.world 5 months ago
Look IDK about math, but I know about programming: “stare at it” is bad advice. Give it a minute or two, then get up and go for a walk or go to bed. Let your subconscious stare at it instead; it’s actually better at this stuff than you are.
Gustephan@lemmy.world 5 months ago
If I’m ever staring at math, I’m absolutely not processing visual information while doing so. It’s more that like, I’m staring off into space and thinking and “math on a whiteboard” just happens to be the last thing I was looking at and my face is still pointed that way
DozensOfDonner@mander.xyz 5 months ago
Programmers do that a lot? I always just start trying stuff in the command line until it works. It’s in research though, so maybe different from what is typical developer stuff?
mindbleach@sh.itjust.works 5 months ago
“Fuck it, let’s try [blank]” is absolutely a valid debugging mechanism. Whether you get the same problems or fascinating new problems - you learned something about what’s wrong.
Now go take a walk and let your brain figure out what it means.
Sabre363@sh.itjust.works 5 months ago
The most valid learning/troubleshooting technique I’ve found is to push every button until something new happens. Seems to piss everyone else off tho
mathemachristian@hexbear.net 5 months ago
True!! I love that part!!
then I have to somehow explain what seemed obvious to me for that split second where magic struck…
MBM@lemmings.world 5 months ago
Meetings where you’re working on a problem together are also fun. Just a bunch of people staring silently at a whiteboard.
Longpork3@lemmy.nz 5 months ago
I like to inch my diagrams closer and closer to penises until someone notices.
thomasloven@lemmy.world 5 months ago
Sounds like Feynman’s algorithm.
- Write down the problem
- Think about it really hard
- Write down the solution
keepcarrot@hexbear.net 5 months ago
After 15 minutes I switch tasks and come back to it at a later date. Do the dishes or something
tripartitegraph@hexbear.net 5 months ago
Proof by ponder
lowleveldata@programming.dev 5 months ago
As a programmer we sometimes might look like we are not doing much from the outside but actually we’re dead inside thank you
insufferableninja@lemdro.id 5 months ago
ptogrammer, i think you mean
anarchrist@lemmy.dbzer0.com 5 months ago
Shhh don’t tell my boss I’m a PTOgrammer 😎🍹
ibasaw@lemmy.world 5 months ago
pardon his spelling… he was hiphotized
VSpartan@lemmy.world 5 months ago
The p is silent.
mr_satan@monyet.cc 5 months ago
common mistake, the t is actually silent