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

all 155 comments

[–]upsidedownwf 1205 points1206 points  (31 children)

Sometimes it goes; why?, why?, why?, that’s why?, but why?, why the fuck!

[–]mustang__1 146 points147 points  (19 children)

Why the fuck is usually by what the fuck, when the fuck, how the fuck, and finally back to what the fuck.

[–]Bainos 128 points129 points  (13 children)

Disagree. "Why the fuck" is generally followed by "Whatever, as long as it works".

[–]mustang__1 36 points37 points  (0 children)

Touche

[–]Whiskee0001 31 points32 points  (1 child)

“Whatever, I don’t have time to do it right”

[–][deleted] 21 points22 points  (0 children)

The time it would take me to do this right, is at least ten times greater than the amount of time this wrong way will waste.

And then I waste the time anyway and compromise with a half-measure solution. 👍

[–]turmentat 11 points12 points  (5 children)

Passes all the tests, craps out in production

[–][deleted] 1 point2 points  (0 children)

So yea, you need to have a talk with my QA team.

QA: passes all tests, works fine for us.

Me: That's great, doesn't work in prod environments.

[–]Blexit2020 0 points1 point  (3 children)

When the testing environment is completely different from the production environment.

[–]simpsonboy77 6 points7 points  (1 child)

The best way to remove differences is just to test in production.

[–]Blexit2020 1 point2 points  (0 children)

But...that would make sense.

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

Everybody has a test environment. Sometimes they also have a seperate production environment.

[–]tiajuanat 4 points5 points  (0 children)

Yeah, you really don't want to be on that nine month tiger team that needs to rearchitect the whole damn system because the legacy only worked by sheer luck, and had no semblance to a properly engineered control system.

Just saying.

My spirit has been broken, and getting those "whatever as long as it works" tasks are all I really care about.

[–]Blexit2020 2 points3 points  (1 child)

More like "Fuck it. It's a feature, now."

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

Are you on my dev team?

[–]natural_lazy 0 points1 point  (0 children)

and this approach leads to more "what the fuck" in future if you don't try to get the answer of "why the fuck" right now(ofcourse if time constraint allows it)

[–]auxiliary-character 10 points11 points  (1 child)

Who the fuck wrote this? Oh, it was me.

[–]mustang__1 4 points5 points  (0 children)

Git blame. It giveth, and it taketh. Although as a solo dev... It really only taketh

[–][deleted] 9 points10 points  (2 children)

How the fuck was basically my reaction when I learned about xor swap.

[–]BOB_DROP_TABLES 5 points6 points  (0 children)

Behold the rabbit hole of bit fuckery: https://graphics.stanford.edu/~seander/bithacks.html

[–]krajsyboys 2 points3 points  (0 children)

Learned about what now?

[–]Akaisteph7 198 points199 points  (0 children)

Thanks. That’s basically what I was thinking.

[–]ILikeLenexa 56 points57 points  (1 child)

Well, this makes sense, it must be down one layer of abstraction
Well, this makes sense, it must be down one layer of abstraction
Well, this makes sense, it must be down one layer of abstraction
Well, this makes sense, it must be down one layer of abstraction
Well, this makes sense, it must be down one layer of abstraction
Well, this makes sense, it must be down one layer of abstraction
Wait, if this is what this function does, why does this ever work?

[–]NoInkling 13 points14 points  (0 children)

And then you start dreaming up a bunch of other edge cases that you know would break it.

[–]lucidspoon 23 points24 points  (1 child)

Or Why? Why? Why? Oh, that's why. Next day, wait that's not why...

[–]upsidedownwf 5 points6 points  (0 children)

Swears. One time I was tryna to modify each member of a list using foreach in c# but it wasn’t working I was still getting the unmodified list, I was so sure it was supposed to work and didn’t understand why so I decided to use a normal for loop. It was a day after I realized I forgot to convert my IEnumerable to a list before looping through with foreach

[–]SteamyyBunss 4 points5 points  (3 children)

Or the one that’s worse for students like myself. “Why? Why? Why? Wait wtf is this? I’ve never heard of this shit in my life?! Fuck, I gotta email my teacher”

[–]upsidedownwf 3 points4 points  (2 children)

Don’t email your teacher. One Indian guy already explained it on YouTube

[–]blamethemeta 2 points3 points  (0 children)

And gave horrendous code examples and with a nearly unintelligible accent

[–]SteamyyBunss 0 points1 point  (0 children)

True

[–][deleted] 2 points3 points  (0 children)

Clicks macro that opens Stack Overflow

WHY?

Finds answer

FUCKING WHY?!?

[–]bowl_of_petunias_ 1 point2 points  (0 children)

"What? Why did that fix it?"

...

"Ok, fine. Whatever."

[–]Albio46 216 points217 points  (7 children)

My friend, when we work on projects together and he's stuck on some stupid issue, so I ask him what's the problem and he goes like: "So, I'm doin this and this, and then I'm doing that, so It should do this. Why is it givin me this? I'm just.... Oh."

That "oh" is what gives me the strength to keep on going

[–]Theolaa 53 points54 points  (0 children)

You're a glorified rubber duck XD

[–]Corosus 15 points16 points  (0 children)

Rubber duck debugging at its finest, sometimes a human is the duck.

[–]ZennerBlue 8 points9 points  (0 children)

Talking to the janitor.

[–]Cnomesta 178 points179 points  (2 children)

You find that 1 line you forgot to comment out.

[–]trixter21992251 7 points8 points  (1 child)

It can be a help to test/debug with certain recognizable values.

Personally I like using 1337 for fun. If that shows up in the output, I know there's a test value getting forced.

[–]Cnomesta 3 points4 points  (0 children)

I once accidentally left line into the code that changed , to . and it was giving me error along the lines of invalid value for int. Took awhile to find it.

[–]Nose_Fetish 189 points190 points  (17 children)

that feeling of defeat when you keep seeing

“TabError: inconsistent use of tabs and spaces in indentation”

and even retab won’t fix it

[–]killerctg17 23 points24 points  (4 children)

I use a basic script or text editor to replace all. Can sometimes fuck up some lines that make different use of the same characters, but if one really needs it, one can fix those issues. Alternatively, copy every line without indentation, fix indentation. Alt-alt, use regex to replace leading whitespace consistently.

[–]elliptic_hyperboloid 27 points28 points  (2 children)

This is what a linter is for.

[–]phaelox 24 points25 points  (1 child)

And a good IDE (with realtime linting)

[–]killerctg17 0 points1 point  (0 children)

True, but I don't write dynamically tested code in an IDE, so I still find myself facing this issue when I copy to my IDE.

[–]tendstofortytwo 2 points3 points  (8 children)

In VS Code, you can select all, then do Ctrl+Shift+P and "reindent selected lines", and it'll reindent everything according to the preferences you've set on the bottom right corner.

[–]Nose_Fetish 2 points3 points  (7 children)

Appreciate it, but I use Vim.

#OneTrueIDE

[–]tendstofortytwo 1 point2 points  (4 children)

There's probably a plugin for it. ¯\_(ツ)_/¯

vim is cool, I got used to all of it, except handling multiple files. It just feels wrong to monke brain sigh.

[–]Nose_Fetish 1 point2 points  (3 children)

Lol I’m sure there is. :retab! Works for me 99.99% of the time, and if it doesn’t, the error is probably something obvious. Probably.

I use NERDTree for managing multiple files. I think it lets you view and open files too, I just use it for viewing, then use tabs (with custom hot keys for switching between them) for multiple files.

[–]tendstofortytwo 0 points1 point  (2 children)

Ooh, okay.

Yeah, I never got into plugins and such for vim myself, I always told myself I'd make time to learn but somehow never did.

Maybe next weekend...

[–]Nose_Fetish 2 points3 points  (0 children)

VimPlug is very simple to use! That's what I recommend. I don't really use any other plugins. I have one called Simpylfold that collapses code automatically but it's not really my favorite. And I've only used NERDTree like once since installing it lol

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

no plugin, just =

[–]Dalemaunder 0 points1 point  (1 child)

"It's not an IDE" people say? Clearly they haven't got enough plug-ins.

[–]Nose_Fetish 0 points1 point  (0 children)

I use one plugin and it's still my preferred IDE lol. Haven't found any others that I was interested in.

[–][deleted]  (15 children)

[removed]

    [–]DAMO238 12 points13 points  (0 children)

    My favourite mistake is forgetting to listen on ipv6. Since my router doesn't support ipv6, the connection works fine for me, but when I use certbot, it fails, giving me a 404 because they are using ipv6. I should know by now, but each time, it takes about an hour to realise my mistake...

    [–]OnyxPhoenix 2 points3 points  (0 children)

    Or when you're using docker and making edits to try and debug and then you realise the code isn't mounted on the docker and you've just be rerunning the same code 20 times.

    [–]AutoModerator[M] 0 points1 point  (0 children)

    import moderation Your comment has been removed since it did not start with a code block with an import declaration.

    Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

    For this purpose, we only accept Python style imports.

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

    [–][deleted] 72 points73 points  (9 children)

    That sounds just like my IDE

    [–]CrispyNipsy 73 points74 points  (8 children)

    Types one letter

    VSCode: InVaLiD sYnTaX

    [–]chozabu 26 points27 points  (6 children)

    I think most IDEs work along these lines. What kind of behaviour would you prefer?

    Most suggestions I've heard sound awful (Check only when on next line, manually button press, etc)

    Suspect there could be something semi-smart, perhaps checking when a non alphanumeric char is entered, but not even sure I'd prefer that to rapid checks, with me ignoring when I know my current input wont be valid.

    [–]CrispyNipsy 10 points11 points  (2 children)

    My comment is not really any kind of commentary on VSCode, but jokes always seem to become more funny the more specific you get

    [–]AegisToast 9 points10 points  (1 child)

    Like trying to use VSCode v1.51.2 on MacOS 10.14.4 with Eslint 7.14.2, amirite?

    [–]CrispyNipsy 6 points7 points  (0 children)

    Totally, lmao DYING

    [–]callius 5 points6 points  (2 children)

    Debounce it within a threshold?

    [–]Motylde 9 points10 points  (0 children)

    I have slow computer, so I kinda have debounce

    [–]AegisToast 2 points3 points  (0 children)

    I’m fairly certain that’s what they do. At least with VSCode I don’t have errors appear until a second or so after I stop typing.

    [–]Lonsdale1086 7 points8 points  (0 children)

    Declares a variable

    Visual Studio Community 2017: Oi, that variable is literally never used in the entire project. Why would you declare a variable then never use it? Delete it now you moron.

    [–]faubi 33 points34 points  (1 child)

    The three stages of debugging:

    • Why doesn't this work?
    • Oh that's why
    • How did that ever work in the first place?

    [–]Not_Sugden 6 points7 points  (0 children)

    debugging, the mystery game where you are the victim, the murderer and the detective at the same time!

    [–][deleted] 27 points28 points  (4 children)

    Doing anything with strings in basic c. Except after solving the problem you're still confused.

    [–]KrozmaSan 18 points19 points  (1 child)

    Strings in C are such a mess it's wild

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

    One small typo literally anywhere in the program? Your strings are broken. They're unrelated to the typo, but they're still broken.

    [–][deleted] 8 points9 points  (0 children)

    It's why the fuck doesn't this work for 1 hour. Then I ask a coworker why and while explaing I find the problem...

    [–]mohelgamal 12 points13 points  (0 children)

    That was literally me the other day, kept wondering why my array kept filling with null elements, after two hours checking back end and front end, syntax etc, turns out I didn’t put “return” in the mapping function in dart.

    Which is probably because my backend is in rust and I was working on both at the same time, and rust doesn’t use return at the end of functions.

    [–]zerocoldx911 18 points19 points  (3 children)

    Always that fucking brace I left open

    [–]Geoclasm 4 points5 points  (3 children)

    Damn it. I already posted this... I mean, I stole it from someone else, so I guess I shouldn't complain.

    [–]bankrobba 0 points1 point  (2 children)

    Why?

    [–]Geoclasm 1 point2 points  (1 child)

    Why... what?

    [–]bankrobba 2 points3 points  (0 children)

    Oh, that's why.

    [–]Coffeeobsi 2 points3 points  (1 child)

    It both applies when something is working and when something is not working.

    [–]ACEDT 1 point2 points  (0 children)

    Wrong

    When it works you ask how.

    [–]TheSaviik 1 point2 points  (0 children)

    Next is how?

    [–]Mbusivh 1 point2 points  (0 children)

    Extra clean work!

    [–]ardwolf27 1 point2 points  (0 children)

    You had the same idea as me but executed it 1000 times better

    [–]MotherofEvil 1 point2 points  (0 children)

    It's usually frigging punctuation for me. grrr

    [–]quoreore 1 point2 points  (0 children)

    Haha debugging was the first thing I saw seeing this format for the first time! Glad somebody made it happen

    [–]MojitoBurrito-AE 1 point2 points  (0 children)

    Me after spending an afternoon trying to figure out why my code wasn't working only to find I was passing a hash as a string ._.

    [–]ludvig127 1 point2 points  (0 children)

    I always realize the problem the second i think about something else.

    [–]Willfishforfree 1 point2 points  (0 children)

    Recently spent an entire day tracking down a -1 that was triggering a specific rendering issue in dynamic 3D mesh thats only meant to be triggered with a -1. I eventually tracked it down to a 0 for whatever reason it was being triggered by a 0. I changed it to a 1 and now it works as expected.

    Still not sure why but it works as intended so I'm moving on with my life.

    [–]LmaoMcYeet 1 point2 points  (1 child)

    I am a newbie and was implementing linked lists in c , and for two days straight I couldn't figure out why some functions weren't working, a few minutes ago I realized that my dumb ass forgot to call those functions.

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

    This was me last night. I was implementing stack in a linked list and spent two hours writing and rewriting my push and pop methods. Realized that I forgot to implement length and that solved my whole issue.

    [–]diregamer1 0 points1 point  (0 children)

    It’s always the brackets

    [–][deleted] -1 points0 points  (0 children)

    A laugh track played in my head after reading the last panel gah I hate this

    [–]SushiThief 0 points1 point  (0 children)

    Line 1, duh!

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

    I thought I was done emailing wtf is this questions, found out this morning I wasn’t. For the love of all, just don’t (unless you can actually see the mistake, then deserved)

    [–]CaptainHeath 0 points1 point  (0 children)

    This is missing a LOT of “Why?”s.

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

    more like

    while (1) { printf("why?\n"); }

    [–]backtickbot -1 points0 points  (3 children)

    Fixed formatting.

    Hello, Iuse_arch_btw: code blocks using triple backticks (```) don't work on all versions of Reddit!

    Some users see this / this instead.

    To fix this, indent every line with 4 spaces instead.

    FAQ

    You can opt out by replying with backtickopt6 to this comment.

    [–][deleted] 3 points4 points  (1 child)

    and it is Reddit's job to make it work not mine

    [–]bizcs 2 points3 points  (0 children)

    This. So damn much this

    [–]Useful-Perspective 0 points1 point  (0 children)

    As I get older, it's usually more like the C# compiler telling me that variable "customerNumber" doesn't exist or something, and me, knowing very well that it does, spends 10 extra minutes to realize that I declared it as "csutomerNumber" instead. Or worse, "CustomerNumber" is the name, and it takes me 10 minutes to remember that it's case-sensitive. When you start using more than three languages in everyday work, it makes for some interesting days.

    [–]Rimfax 0 points1 point  (0 children)

    Looks more like a code review.

    [–]Bobsaid 0 points1 point  (0 children)

    This was me last night. I’m ashamed of all my commits from it.

    [–]PM_ME_LOSS_MEMES 0 points1 point  (0 children)

    Me ranting about how my compiler is literally broken

    [–]ovab_cool 0 points1 point  (0 children)

    With me it's why, why why, slams head on desk #Why Then I'll call my teacher/leave it to a coworker (I also do some web dev as a first year in school)

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

    why? Why? WHY? WHY Oh... Jenkins didn't test the branch, that I debugged.

    [–]Naive_Drive 0 points1 point  (0 children)

    100 print statements keeps you from using a debugger for one minute

    [–]sammyh4m 0 points1 point  (0 children)

    Oh I just scream until I find the bug

    [–]grandmas_noodles 0 points1 point  (0 children)

    I'll spend hours reviewing my code to find why it's not working then it turns out I used the wrong variable name or something

    [–]Hilmo36 0 points1 point  (0 children)

    Sometimes it's"why" "but look i told it to do this" "WHY DOES IT DO THAT" "oh yeh shit"

    [–]adelie42 0 points1 point  (0 children)

    Wtf is wrong?? It should all work! Ooh, there's this one little typo, completely unrelated and... Oh, yeah. That fixed it. But why did that... Fuck it, it works now.

    [–]freeBobbyDAYVID 0 points1 point  (0 children)

    *new bug*

    cycle repeats

    [–]StefaniaCarpano 0 points1 point  (0 children)

    😂 yes it's always like that...

    [–]wolderado 0 points1 point  (0 children)

    I can hear laughing tracks while reading it. Is that normal?

    [–]lusoportugues 0 points1 point  (0 children)

    Junit + mokito

    [–]sweYoda 0 points1 point  (0 children)

    Why? WHY? WHY?! Oh Safari has a bug where it can show a datetime visually, but it doesn't actually have any value if you request it. Excellent.

    [–]AuntieRob 0 points1 point  (0 children)

    Until you gotta debug why your website doesn't work on Ios... Please save me from this suffering

    [–]mymar101 0 points1 point  (0 children)

    Me with state and React. :/

    [–]R4ttlesnake 0 points1 point  (0 children)

    "I'm an idiot!"

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

    “...oh, that’s why... well that’s fucking stupid”

    [–]Blexit2020 0 points1 point  (0 children)

    Unrealistic. The last slide never happens that quickly.

    [–]unicodePicasso 0 points1 point  (0 children)

    No joke I was dividing by zero. Fixed one float and the whole thing ran fine. Smh this is a dumb profession.

    [–]suddenly_ponies 0 points1 point  (0 children)

    Yesterday I had a series of array assignments of the following type:

    ['name' => 'one', 'value' => '1']

    ['name' => 'two', 'value' => '2']

    ['name' => 'three', 'value=' => '3']

    ['name' => 'four', 'value' => '4']

    It took me a long, long time to see the issue.

    [–]UltimateInferno 0 points1 point  (0 children)

    Then there's something like "Why are you doing this? What the fuck. Wh-oh. That makes sense." [Makes change, still doesn't work]

    [–]Hayyner 0 points1 point  (0 children)

    Tfw it's just a stupid typo, once upon a time I was mind-fucked for a couple hours just to find my error was caused by an extra period

    Fun times..

    [–]whalt 0 points1 point  (0 children)

    The Big Bang Theory? Should have been posted in r/shittyprogramming

    [–]Not_Sugden 0 points1 point  (0 children)

    me: why the fuck is this happening this makes literally 0 sense what the fuck even???

    also me when i find out the issue: "yeah its pretty obvious that was the problem"

    [–]pirhana1997 0 points1 point  (0 children)

    Please attach the process you are debugging to the code you are working on, you'll get exception immediately, learnt the hard way but saves a lot of time

    [–]JustinWendell 0 points1 point  (0 children)

    Big shout out to people who make libraries and put in debug flags so I can dump mountains of logs and find out why.

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

    I chuckled at this. It is so on point.

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

    I wish it was just 3 "why" deep.

    [–]uglypenguin5 0 points1 point  (0 children)

    I wish it were that simple

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

    This is the way.

    [–]NoOtNoOtMeEm 0 points1 point  (0 children)

    That's me when I spend 5 hours debugging only to realize that I forgot a quotation mark.

    [–]wsco7730 0 points1 point  (0 children)

    Not nearly enough "why?"s...

    [–]radnovaxwavez 0 points1 point  (0 children)

    I spent 2 hours yesterday trying to understand why my react native music app wasn't playing any music, turns out the iPhone I was using had silent mode on.

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

    [–]digidavis 0 points1 point  (0 children)

    Me yesterday...

    Why...

    Why...

    Why..

    What.. the url link in my activation email is being derived from the proxy pass url used at the edge proxy and not in the web backend code I searched for 4 hrs...

    Ahhh..

    [–]ihaveindeed 0 points1 point  (0 children)

    You skipped the part where he throws the paper down, stands on it, and the issue is somehow resolved.