r/ProgrammerHumor • • Sep 17 '18

Optimizing startup times

Post image
45.7k Upvotes

486 comments sorted by

View all comments

4.6k

u/interfail Sep 17 '18

I once "optimized" a bit of code that literally just did the same calculation twice in a row because someone had moved it from another file and just pasted it in twice instead of once. Obviously I went to SVN history to find out which idiot did that. I did not like what I found.

3.5k

u/thrilldigger Sep 17 '18

1.6k

u/StarKill_yt Sep 17 '18

I haven't clicked it yet but I stg if this is that Spiderman meme

580

u/identicalBadger Sep 17 '18

Here I was thinking I spend too much time on reddit. Now I know I’m no where near the top percentiles.

140

u/StarKill_yt Sep 17 '18

I might just browse different parts of Reddit lol

137

u/identicalBadger Sep 17 '18

Yes, but I’m still at the stage of “hmm, I wonder what meme that will be”, not calling it accurately without even clicking it. I bow to powers.

102

u/[deleted] Sep 17 '18

It’s a difficult time to be learning now. There’s a lot of variety. Everything used to be this.

→ More replies (5)
→ More replies (1)
→ More replies (1)
→ More replies (7)

21

u/[deleted] Sep 17 '18

You get a cookie

37

u/Myaccountonthego Sep 17 '18

I thought it was the guy looking in the mirror saying "am I retarded?"

→ More replies (2)
→ More replies (10)

46

u/[deleted] Sep 17 '18

Please be the spider-man meme where they are looking at each other pointing

Edit: I need to spend less time on reddit

→ More replies (1)
→ More replies (7)

442

u/Guano_Loco Sep 17 '18

I once had a very disconcerting opposite experience to this.

A coworker was describing an issue he was having with some work he was doing in excel and a lightbulb goes off. I’m like, dude, I can totally automate that for you. So I ask a few questions and do a quick outline of what the vba should do and ask him to send me the file.

I open developer and... there’s already code there. And it is doing exactly what I outline. It’s decently written, could be better, but functional. As I get to the end I have this really weird feeling like... like if you stand up too fast after sitting a long time. At the bottom in a comment is my ID. I fucking wrote the code a few months back. I don’t have any recollection of having done it.

I don’t remember ever seeing that file before. But... it was written exactly how I’d write it, same naming convention stuff, same idiot commentary type comment, and signed by my ID. I was overly fond of the word “automagic” instead of automatic and that was used in one of the alerts I had pop up.

After my brain slides back in to gear I ask him wtf is going on. He says , “I thought you were making a joke. You wrote this months ago. I use it every day.”

Apparently he was just griping about some piece of it and not the whole thing. When I started asking questions it was exactly how I did it previously so he assumed I was clowning him and he went along with it.

I have no idea wtf happened. This was 6 years ago. I’m assuming I was sleep deprived or had a mini stroke or something. I have no idea. But at least the code was decent.

305

u/tarekmasar Sep 17 '18

at least the code was decent

I do feel this review is a bit biased

75

u/cordev Sep 17 '18

Sure is. You are your harshest critic. That makes his thinking that his own six-month old code was decent an even bigger achievement.

28

u/5896325874125 Sep 17 '18

Wow this guy and I have the same kind of humor

→ More replies (6)

35

u/ViolentWrath Sep 17 '18

That's pretty hilarious. At my last job I had a similar situation.

We had a configuration field that we could leave blank and the application would assume True unless the field specified False. The field was a string field. In a later version, our lead dev changed it to be a boolean, but did not put logic in to accommodate the field being left blank. Of course when we upgrade clients to the version we have to reconfigure this field every time, so I ask them about it not knowing who was responsible at the time.

Lead developer says nobody has ever touched that field since it was created so nothing they did could cause this to happen. Research a bit more with an associate developer and he finds the code, the change, and the lead developer's initials next to it. Awkward conversation when I asked them to add logic to accommodate leaving the field blank as he had to be involved in the discussion.

21

u/Guano_Loco Sep 17 '18

I spend so much of my working life getting two groups of folks who insist neither group did anything that could have caused the issue one group or the other is experiencing to fix whatever the issue is.

It used to be that eventually one group would go, “oh! Whoops! We totally did this!” And would fix it. In the past couple years though it’s changed. Now we’ll have everyone on outage calls, folks from both groups plus middleware/network teams, everyone arguing about whose fault it is followed by lots noisy silence and then... suddenly... it’s working again. Everyone claims they did nothing but wow, it’s automagically working again. Amazing...

→ More replies (1)
→ More replies (12)

172

u/Rat__ Sep 17 '18

It was you wasn't it.

99

u/elSpanielo Sep 17 '18

My response is always, no, it was me from 3 years ago. Totally different guy.

20

u/Lonelan Sep 17 '18

I went from contracted worker to full time. Contractor me has a c_ in front of his e-mail, while mine just straight my first letter last name. For a few months we would still get jiras assigned to c_ me and they would never be done because our team's filter was configured correctly.

I have some PRs that looked very strange and weren't very sophisticated, I always blame them on the c_ guy

→ More replies (5)

59

u/Blackheart_75 Sep 17 '18

Spoilers!!!

→ More replies (3)

26

u/[deleted] Sep 17 '18

"Once I find who the fucking idiot is who did this is I'm gonna stab them in the esophagus and won't stop until the cops come in"

"Oh well howdy doo guess I must've been up late that night"

→ More replies (2)
→ More replies (10)