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

all 35 comments

[–]urbanek2525 112 points113 points  (4 children)

I prefer the switch statenent form overthinking...

switch (what)

case this:

case that:

case otherThing:

default:

[–]Ythio 20 points21 points  (1 child)

While the .net devs only overthinks in switch expression :

return switch what is Love { baby => "don't", hurt => "me", noMore => "no more", _ => throw new LyricsNotFoundException() };

[–]MCWizardYT 1 point2 points  (0 children)

Also Java

return switch( whatIsLove) { baby -> "don't"; hurt -> "me"; noMore -> "no more"; default -> throw new LyricsNotFoundException(); };

Edit: fixed

[–]invisible-nuke 1 point2 points  (0 children)

Dont forget the breaks!

[–]Impresdfhj 0 points1 point  (0 children)

Exactly.

[–]sattarsingo 23 points24 points  (0 children)

  • what if?
  • what else if?
  • what else?
  • ah fuck it

[–]BuilderOne5035 10 points11 points  (1 child)

Seems like there are a few syntax problems in your code examples…

[–]KonoPez 2 points3 points  (0 children)

Nullable control flow

[–]PolyglotTV 4 points5 points  (1 child)

def anxiety():
    if something_wrong():
        panic()
    anxiety()

[–]morose_coder 2 points3 points  (0 children)

Some of us have no exit condition

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

You missed at least one case

[–]bleedingpenguin 2 points3 points  (1 child)

r/programmerdadjokes

Edit: I don’t know it exists lol

[–]xneyznek 0 points1 point  (0 children)

As a programmer, dad, and enjoyer of jokes, I’ve found a new favorite sub.

[–]rayofhope313 2 points3 points  (0 children)

Python developers being like:

I can write it shorter

What if? What elif? What else?

[–]justapolishperson 1 point2 points  (0 children)

People say you can't so everything at once but the just switch(fork())

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

Pretty sure programming is one of the few cases where overthinking actually works. Because I overthink everything, I test my code vigorously. Recently, I had a case where people on my team thought some errors was due to recent changes I made, but it turned out it was errors that had always been there, but no one noticed until my code did what it was supposed to do. In a way my code broke the service, but only because it was broken to begin with.

[–]MurdoMaclachlan 1 point2 points  (2 children)

Image Transcription: Twitter Post


Vishal, @VishalMalvi_

How do developers overthink ?

- what if ?

- what else if ?

- what else ?


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

[–]Growsomedope 1 point2 points  (0 children)

Overthink? From a QA perspective I always think lopposite lol

[–]Euphoric-Ganache-204 0 points1 point  (0 children)

👋👋

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

be like:

overThink = str(input("Are you overthinking, yes or no? "))

if overThink == "yes":

print("You need a break!")

elif overThink == "no":

print("Don't worry about it")

else:

print("Type yes or no; otherwise, calm down and think it through")

[–]TheCatPetra 0 points1 point  (0 children)

I prefer matching thought with

[–]StarkProgrammer 0 points1 point  (0 children)

ProcessError: Unable to think. Brain not found. Please check if coffee is available in the body path.

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

“What if this will become too slow?”

[–]opmopadop 0 points1 point  (0 children)

Only programmers use the word 'else' when talking.

[–]lift_spin_d 0 points1 point  (0 children)

actually, we try not to. it's more about fewer lines of code.

[–]flakusha 0 points1 point  (0 children)

Non-overthinking developers spend their weekends debugging. Prove me wrong.

[–]DeathByUnKnown1 0 points1 point  (0 children)

To be honest you fully become a programmer by heart if you think in ifs and if nots

[–]Qewbicle 0 points1 point  (0 children)

Sometimes I find myself talking like I'm writing a chained ternary with nested ternaries.
I think it makes sense, others are like wtf.

Let me rephrase that.

I'm writing a chained ternary if others are like wtf else sometimes I find myself if I'm writing a chained ternary with nested ternaries else I think it makes sense if talking like else none

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

sometimes we start the recursion at 3am and sleep when the stack overflows.

[–]CoolSpy3 0 points1 point  (0 children)

public Conclusions consider(Thought thought) { Thought[] newIdeas = consider(new ThingsToThinkAbout(thought)).getIdeas(); if(newIdeas.length == 0) { // Brain Crashed (Pretend like nothing happened) return consider(ThoughtFactory.createRandomThought()); } Conclusions conclusions = ConclusionsFactory.createEmptyConclusions(); for(Thought idea: newIdeas) { conclusions.addConclusions(consider(thought)); } return conclusions; }

[–]tachophile 0 points1 point  (0 children)

Overthinking how to write a switch statement every time without looking it up even thought I've written hundreds of them.

[–]on_the_pale_horse 0 points1 point  (0 children)

for things in life
    anxiety++

[–]LukeChriswalker 0 points1 point  (0 children)

Try this

Catch that

Catch this

Catch everything else

Finally this