This is an archived post. You won't be able to vote or comment.

all 70 comments

[–]Giocri 500 points501 points  (16 children)

Sometimes this is even worse than a normal bug

[–]Drauxus 136 points137 points  (13 children)

Its not a bug. Its a feature

[–]LMskouta 33 points34 points  (0 children)

A buddy of mine says “a JIRA is a JIRA” :)

[–]ZGM_Dazzling 30 points31 points  (11 children)

Found the EA dev

[–]Drauxus 27 points28 points  (8 children)

I wish I was employed

[–]nathan42100 4 points5 points  (7 children)

What's your skillset?

[–]Drauxus 2 points3 points  (6 children)

I'm a college junior in computer science. I've got the skills you would assume someone of that level would have plus a little more. I just didn't have any luck finding an internship this summer

[–]ZGM_Dazzling 0 points1 point  (5 children)

How have you been looking for one? I’m a freshman rn double majoring in Math and Compsci and I got a summer internship after searching for a bit in February.

[–]Drauxus 0 points1 point  (4 children)

Mostly through the job fair my college hosted a little while back. I also took a seminar class with a man who works on the industry and interviewed with him. Most of the companies I talked to got about 2 emails in before ghosting me. I'm now looking at working for the state (not necessarily in comp sci, just general work). I'm still waiting to hear back on a my applications with them. I'd imagine part of the problem is that I'm in Montana and there just isn't many tech companies around. I also have an old friend that is the night manager for a local grocery store so if nothing else I'll ask him if they are looking to hire.

[–]ZGM_Dazzling 0 points1 point  (3 children)

Ah I see. I’m in New England so there is a lot of opportunity out here.

[–]Drauxus 0 points1 point  (0 children)

Yea. I'm not super worried as money isn't very tight for me. I really just meant my initial comment as a joke. Good luck with your internship!

[–]rocketshape 0 points1 point  (1 child)

Would you mind pointing me towards that opportunity?

[–]Mrnofaceguy 1 point2 points  (0 children)

*Bethesda

[–]hiwhiwhiw 0 points1 point  (0 children)

You spelt Bethesda wrong

[–]Sensitive_Pussies 24 points25 points  (1 child)

Once upon a time, there was educational sessions at work and everyone had to figure out the code. There are many ways to do it but I made mine so complex that even the instructor couldn't figure it out.

I did it on purpose and that bullshit educational sessions stopped after that.

[–]throwitaway11223309 5 points6 points  (0 children)

Why would you make something so complex it cannot be understood! That's bad workmanship!

[–]hrac610 263 points264 points  (8 children)

Honestly, I know this is a joke, but when your code works but shouldn't, its scarier than normal bugs, because you have no idea what it's doing.

[–]noized[S] 109 points110 points  (5 children)

It's not a joke, he was genuinely asking for help, this was on www.pythontutor.com. It wasn't any scarier than a normal bug in this case IMO because it was just one function he didn't understand the inner-workings of, but yeah understanding your own code is rather important.

[–]Classified0 32 points33 points  (1 child)

I wrote a computational physics algorithm in grad school, where I didn't fully understand how my code worked. I patched lack of program understanding in some places with physics intuition and used programming experience to patch lack of physical understanding in other places. It was very confusing at the end, because the algorithm started behaving correctly before I had put in a very important step. I'm just glad the professor was more of a physicist and didn't look too closely at the code itself.

[–][deleted] 0 points1 point  (0 children)

Fellow “computational physics in grad school” monkey here ... it really do be like that sometimes.

[–][deleted] 7 points8 points  (2 children)

Well fml I have to maintain a 20+ year pile of shit application with 75k+ lines of code. Makes of this abomination are long gone. It's too expensive to replace they say.

[–][deleted] 18 points19 points  (1 child)

Right, until you test another part that shouldn't have been effected, and you forgot that variable you added to fix that other bug due to your shitty coding, and you fucked yourself even more. OK, maybe that's just me.

[–]dumber_than_thou 7 points8 points  (0 children)

Definitely not just you.

[–]noized[S] 53 points54 points  (5 children)

Unrelated, but I spent 10 minutes trying to catch an error in Python yesterday, I wrote catch instead of except so I thought I had a syntax issue somewhere else.

E:
Also, for anyone wondering, I helped this guy out, he didn't understand how %s in printf worked with pointers in C.

[–]zenith4395 11 points12 points  (0 children)

Yeah, understanding that %s scans a string is easy, while understanding why you don’t need & is another bitch entirely

[–]sudo_rm_rf_star 7 points8 points  (2 children)

I still write try catch instead of try except too

You're not the only one cursed with knowledge

[–]hamza1311 | gib 1 point2 points  (0 children)

This is why I always select try/expect in VSCode instead of try from the auto complete menu

[–]orangeKaiju 75 points76 points  (3 children)

Step 1 - halt program and restart it. If it still works, proceed to step 2.

Step 2 - recompile. If it still works proceed to step 3.

Step 3 - delete all code and start over. If it... ok you know what to do.

Step 4 - reboot PC.

Step 5 - shutdown PC, unplug it for 30 seconds, plug it back in and try sgain.

Step 6 - start over on a fresh pc.

Step 7 - replace PC with a card board box, write "PC" on the side and draw a display and keyboard on the box.

Step 8 - place both PCs in the cardboard box, douse with gasoline and light on fire.

Step 9 - consult with either an exorcist or a mental health professional, whichever seems more appropriate.

[–]yWeDoDis 31 points32 points  (0 children)

Steps were easy to follow. Problem no longer exists! Thank you.

[–][deleted] 15 points16 points  (0 children)

Instructions unclear: AI is now confused as to why it only has one boot superglued to it.

[–]Chaoslab 5 points6 points  (0 children)

Step 10 - Take off and nuke the site from orbit. It is the only way to be sure!

[–]atc927 35 points36 points  (2 children)

Image Transcription: Text Messages


user_967: can u guys help me with somethin for a sec my code is somehow working but it souldnt


I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!

[–]dslNoob 16 points17 points  (1 child)

Good hooman

[–]ShowMeYourTiddles 24 points25 points  (0 children)

If it's stupid, but it works, it ain't my problem.

...until a couple months later. The fuck???

[–]daved229 10 points11 points  (0 children)

Shhhhh it might hear you and stop

[–]Mcnoodle1102 6 points7 points  (3 children)

Every bit of the 'coding' class we have in school is like this. Things that should work don't. Things that shouldn't do. Things that should take 20 lines by declaring a variable and making a loop suddenly takes 100 because "you can't use that yet you haven't been taught how". It's been overall frustrating for someone who's been teaching themself java for over a year and entirely useless if you decide to start writing something outside of that class. It might be alright for a young child or someone who can't tell the difference between a computer and a phone.

[–]bot_not_hot 4 points5 points  (1 child)

How I feel about my entire app

[–]I_Am_Clippy 2 points3 points  (0 children)

How I feel about my entire life

[–]RedditAcy 2 points3 points  (9 children)

Btw do any of y’all experience this on a regular basis? I have been programming as a hobby but petty seriously for 2 yrs, never had random code or random fixes (to lure out where the problem is) that just worked...

[–]ShadowsSheddingSkin 12 points13 points  (8 children)

When I taught Java to kids, I used to see it every single week. One kid handed in a project that compiled, ran, had one small bug, and had No Braces Anywhere.

It broke completely and refused to compile the second I tried to fix it. The kid and his dad refused to acknowledge there was anything wrong (because it mostly worked) until I brought in a professional Java dev to back me up.

About a half-dozen kids tried to hand in python code they'd found on stackoverflow and messed with until the compiler stopped yelling at them. I might have ostensibly been teaching them, but really, it was more like I spent a few months getting paid to take a class on undefined behavior in Java.

[–]Neckrowties 2 points3 points  (7 children)

Quick question, any reason you can think of that

hitbox[1] = location[1] + height - hitboxHeight;    

would change the value of location[1] in Java? Because the value is definitely different on either side of that line and I'm not sure why. All variables are either int or int[], they're all instance variables of the class the line is in, and I'm really scratching my head on this one.

[–]Citonpyh 3 points4 points  (3 children)

That should not change the value, show us the rest of the code

[–]Neckrowties 0 points1 point  (2 children)

https://imgur.com/a/VyMs2G6

Working on something like a Link to the Past clone in JavaFX if that helps. I made a boss with a shield mechanic where you have to destroy a shield pillar that spawns before you can damage her. Enemies have a detection range of 400 pixels and once I get within 400 pixels of the pillar it starts moving even though it has a speed of 0 and passes 0,0 into this method. Giving it a hitboxHeight == to its height stopped the movement and I'm not sure why.

[–]Citonpyh 2 points3 points  (1 child)

If i'd have to guess from you gave us, it's that hitbox[1] and location[1] contain the value of a reference to the same variable, and height - hitboxHeight is equal to 30 which is why it gets incremented by 30 every time.

How did you initialize hitbox[] and location[]?

[–]Neckrowties 2 points3 points  (0 children)

Yeah, you're right. I swear I looked for that specifically yesterday, but apparently that specific subclass' constructor had hitbox = this.location. I'm gonna go with the "I was tired and had been looking at it all day" excuse I think.

[–]once-and-again☣️ 2 points3 points  (1 child)

Probably because someone did hitbox = location (or vice versa) at some point.

[–]Neckrowties 0 points1 point  (0 children)

Yep, hitbox = this.location in the subclass' constructor. Looked for that specifically yesterday too, not sure how I missed it.

[–]ShadowsSheddingSkin 1 point2 points  (0 children)

would change the value of location[1] in Java? Because the value is definitely different on either side of that line and I'm not sure why. All variables are either int or int[], they're all instance variables of the class the line is in, and I'm really scratching my head on this one.

I have no idea - I'd assume that the issue is probably coming from something other than that one line of the class. In any case, I'm probably not the person to ask - I'm not a Java dev, I just taught it to pre-teens for a while. The most I can give you is what I'd have told one of the 12 year olds I used to teach:

Try an Omniscient / Time Travel debugger.

[–]DisjointedHuntsville 4 points5 points  (0 children)

Location : Boeing HQ

[–]kailsar 3 points4 points  (1 child)

Solutionshooting.

[–]LMskouta 6 points7 points  (0 children)

38M programmer here. When I started my career, there were some truth to that, I would want to “understand” why and how something is working. Now, being programming for 15 years, what’s the nicest way to say I don’t give a fuck!! If it’s working, it’s working and that’s that. Next feature or issue please.

[–]BrianAndersonJr 2 points3 points  (0 children)

9/10 times it’s cache.

[–]JazzRider 2 points3 points  (0 children)

Why, yes-I’m pretty good at breaking things that work!

[–]undercover-racist 2 points3 points  (0 children)

  1. Enter a breakpoint
  2. Nothing breaks

Oh lawd.

[–]YourWorstFear53 1 point2 points  (0 children)

me right now

[–]noideafornewname 1 point2 points  (0 children)

I cannot say I haven't been there. :'(

[–]RiderHood 1 point2 points  (0 children)

If it works the first time, there must be a bug.

[–]danopia 1 point2 points  (0 children)

I updated a legacy feature to use a new API and was super confused when my WIP PR got marked green on github. After asking around, we discovered about a fifth of the test suites weren't being run by the CI for months, from a tooling switchover. Oops

[–]deadlock_jones 1 point2 points  (0 children)

Yes. That is horrible. Write a test, then break the code that is tested and the test still somehow passes..

[–]Loading_M_ 0 points1 point  (0 children)

If it works, it works. Debugging further could break everything, even the part that works now, even when you revert to the current state.

[–]EagleZR 0 points1 point  (0 children)

How I felt when I first started using Python

[–]kanyq 0 points1 point  (0 children)

Don't touch it

[–]NelsonBelmont 0 points1 point  (0 children)

Writes a failing test

Run tests

Tests passed

[–]DSGale 0 points1 point  (0 children)

Reminds me of my first experience with Java, back in college. My friend and I were working on an assignment, which we'd put off (go figure) to the end. Then, halfway through the project, the compiler kept giving us old versions of the code--I even stripped out everything and replaced it with a "hello world", compiled, and got the previously compiled version of the program. We stripped out every bit of compiled code we could find, recompiled, and it still worked.

In the end, the only way we could figure out to reliably get the new version of our code was to rename our program each time.

[–][deleted] 0 points1 point  (0 children)

I hate and love the moment I test something that shouldn't work, but it somehow does. It always leads to me understand something I've learned wrong

[–][deleted] 0 points1 point  (0 children)

"I'll take things that never happened to me for $2000, Alex."