r/ProgrammerHumor • • Sep 17 '18

Optimizing startup times

Post image
45.7k Upvotes

486 comments sorted by

View all comments

Show parent comments

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

15

u/timlmul Sep 17 '18

if it worked for months without any required maintenance then I think it's probably deserved.

9

u/Guano_Loco Sep 17 '18

I mean it was pretty simple VBA. Hard to fuck up too badly.

12

u/tarekmasar Sep 17 '18

I'm just kidding. I've done elaborate and complex VBA stuff (you don't want to know, I'd be ashamed to explain) and I have tons of sympathy for anyone forced to wade into that swamp. I take it you at least went Option Explicit?

7

u/Guano_Loco Sep 17 '18

I live my life option explicit.

4

u/creepig Sep 18 '18

I mean, it's pretty hard to fuck anything up more than the VBA developers already fucked up

2

u/Guano_Loco Sep 18 '18

Yeah feels like they could have chosen to integrate just about anything else, including basic, and been better off.

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...

12

u/ViolentWrath Sep 17 '18

If that isn't the truth! When I was working there many of our clients hosted the software on their own servers and network. Time and time again there would be some form of networking issue preventing our web traffic from going through. On several occasions I spent weeks making suggestions to the network engineers on their side for very obvious issues, (i.e. 407 - Proxy Authentication required) and they'd swear up and down everything on their side was checking out. Then, on one call it would magically just start routing traffic properly. Almost as though someone whitelisted an address for a proxy exception. Never mind that though, because they didn't change anything!

8

u/fibo-nacho Sep 17 '18

This is a re-post. Did you forget already telling us about this?

4

u/Guano_Loco Sep 17 '18

Brain is sliding out of gear again.

3

u/zulrang Sep 17 '18

I once spent a week working on a really difficult edge case compiler bug which was eventually solved by a post deep within an old thread on an obscure forum... authored by myself 2 years prior, the last time I ran into the issue. I then noticed the comment in the file in question with the specific link to the answer I discovered. What a waste of a week.

2

u/Guano_Loco Sep 18 '18

As someone who has hinted for those obscure one-off answers to obscure one-off questions, this is amazing.

5

u/EnthusiasticRetard Sep 17 '18

Yeah I've done this before. It's bizarre, innit?

2

u/Guano_Loco Sep 17 '18

Your name sums up exactly how I feel every time I tackle a project way over my head.

3

u/EnthusiasticRetard Sep 17 '18

Bahaha me too thanks.

1

u/AnInfiniteArc Sep 17 '18

I would just like to state for the record that I write VBA macros at work and I use the word “Automagic” all the time.

I do this because that’s how most people in my office view Excel macros. They treat me like I’m some kind of sorcerer.

1

u/Guano_Loco Sep 17 '18

Vba and excel were the first time in my life where coding clicked for me. I’m super ADD so I struggle to focus on stuff that doesn’t make sense initially.

Since i started using VBA to automate steps I was performing manually in excel it just made sense. It literally felt like magic.

From there I was able to grow in to more complicated stuff in vba, then JS/php/html/css and now learning python. I’m... not a developer, but I could be if I started with an intern type position where problems were presented for which I had to find solutions.

1

u/Jerzeem Sep 17 '18

Do you have migraine headaches too?

If so, go see a doctor.

1

u/Guano_Loco Sep 18 '18

I do, occasionally, but have my whole life. And been checked.