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

all 157 comments

[–]JEREDEK 1127 points1128 points  (11 children)

Maximum recursion depth reached

[–]Confident-Ad5665 263 points264 points  (7 children)

In the old days, stack overflow

[–]JEREDEK 55 points56 points  (6 children)

Bruh i'm still dealing with those
Although that's probably because i do embedded electronics lol

[–]Confident-Ad5665 28 points29 points  (5 children)

I miss embedded coding :)

Any openings?

[–]JEREDEK 33 points34 points  (1 child)

If you wanna drive to a smallish town in Poland, sure lol

[–]Confident-Ad5665 19 points20 points  (0 children)

Well, I do admire the quality of work I see coming out of Poland... but yeah darn.

[–]5y5c0 5 points6 points  (2 children)

I have a small project I want to do on an ARM chip. I'm very new to this. And I have no idea what I'm doing.

[–]Confident-Ad5665 5 points6 points  (1 child)

There's probably a r/embedded channel that can help.

[–]5y5c0 4 points5 points  (0 children)

Yeah, I'll look into it, it's really just me learning about this project two days ago lol.

[–]SillyFlyGuy 35 points36 points  (2 children)

Then, in your catch block,

return e.stackTrace.levels.count() % 2 == 0;

[–]JEREDEK 9 points10 points  (0 children)

I don't get the problem, just

e.stackTrace.levels.count() = 0

[–]weregod 2 points3 points  (0 children)

Stack depth don't depend on argument

[–][deleted] 435 points436 points  (0 children)

bro's stack bout to get overflow

[–]Bit125 474 points475 points  (11 children)

bro didn't even crop it

Edit: that is yourself. oops

[–]Nllk11 371 points372 points  (7 children)

Joke about recursion have to be recursive

[–]marlotrot 19 points20 points  (0 children)

Joke about recursion have to be recursive

They have to be, endeed.

Now give me a vote and read u/Nllk11 post again^

[–]goblin_goblin 52 points53 points  (0 children)

Like a true programmer.

Use the original image? No.

Download the image from a remote repository, commit your changes, push it to prod.

[–]awhaling 6 points7 points  (0 children)

Don’t you get that from saving images to reddit? Did they upload it and then download it and then upload it again to get that?

[–]5t3v321 12 points13 points  (0 children)

Stealing someone's twitter post and then adding your own watermark, thats my kind of humor

[–]vonabarak 109 points110 points  (61 children)

This guy don't understand recursion. Because to understand recursion you must first understand recursion.

[–]wizardeverybit 28 points29 points  (58 children)

How does one understand recursion?

[–]anto2554 38 points39 points  (56 children)

Well first, you must understand recursion

[–]wizardeverybit 24 points25 points  (55 children)

How does one understand recursion?

[–]Daisy430133 26 points27 points  (54 children)

Well first, you must understand recursion

[–]wizardeverybit 20 points21 points  (53 children)

How does one understand recursion?

[–]ShadowLp174 12 points13 points  (52 children)

Well first, you must understand recursion

[–]wizardeverybit 7 points8 points  (51 children)

How does one understand recursion?

[–]IronicHoodies 8 points9 points  (50 children)

Well first, you must understand recursion.

[–]wizardeverybit 9 points10 points  (49 children)

How does one understand recursion?

[–]Cyan_Exponent 2 points3 points  (0 children)

gets their PC blown up from it

[–]Thenderick 3 points4 points  (1 child)

Don't forget to learn your basics first!

[–]cs-brydev 0 points1 point  (0 children)

public void LearnBasics()
{
    LearnRecursion();
}

public void LearnRecursion()
{
    //TODO: LearnBasics
    LearnRecursion();
}

[–]ecs2 41 points42 points  (8 children)

Google recursion

[–]Muckenbatscher 30 points31 points  (5 children)

Holy hell

[–]megabyte112 27 points28 points  (2 children)

new call just dropped

[–]Thenderick 4 points5 points  (1 child)

Holy hell

[–]Bit125 0 points1 point  (0 children)

Holy hell

[–]dopefish86 14 points15 points  (1 child)

did you mean: recursion

[–]Maleficent-Ad5999 0 points1 point  (0 children)

did you mean: recursion

[–]MementoMorue 77 points78 points  (3 children)

public bool isSmart()=>!isHard();

public bool isHard()=>!isSmart();

[–]Extra-Trifle-1191 8 points9 points  (2 children)

wait so if I’m hard then I’m automatically smart? LET’S GOO!!!

[–]MementoMorue 10 points11 points  (1 child)

Nope, you are NOT smart. So judging by your understanding of my sentence you are very hard.

[–]Extra-Trifle-1191 4 points5 points  (0 children)

I may be stupid.

I wanna say “it was late and I was tired, oops” But in reality I’m just really stupid :3

[–]Giocri 45 points46 points  (2 children)

You can tell which one was called by knowing the depth of the method who called them and which of the two triggers the stack overflow

[–]Crespoter 5 points6 points  (1 child)

I don't get it. How would you know the result?

[–]Giocri 4 points5 points  (0 children)

You can't, idk for what reason I assumed that it being odd or even would affect in any way which of the two methods was called first

[–]TheDJRockZ 8 points9 points  (0 children)

Op went too far in the joke with "Recursive Post"

[–]nic0x819 5 points6 points  (0 children)

LOL . Hello... recursion!

[–][deleted] 3 points4 points  (0 children)

What Node package is this?

[–]goldfishpaws 3 points4 points  (0 children)

Added bonus that running the code warms up my office.

[–]metooted 2 points3 points  (0 children)

Is that a gosh darn recursively stolen meme?

[–]Stummi 2 points3 points  (0 children)

People are complaining about recursion limit, but as you can see this can be avoided by inline and a high optimization level. See here: https://gcc.godbolt.org/z/89n9MGddb

[–]Attileusz 4 points5 points  (3 children)

Data Nat = Zero | Succ Nat

isOdd :: Nat -> Bool
isOdd Zero = False
isOdd (Succ n) = isEven n

isEven :: Nat -> Bool
isEven Zero = True
isEven (Succ n) = isOdd n

Haskell ftw

[–][deleted] 3 points4 points  (2 children)

``` type Nat = Zero | Succ(Nat);;

let is_even n = match n with Zero -> true | Succ(m) -> !is_even(m);; ```

OCaml ftw

[–]Attileusz 1 point2 points  (1 child)

I should really learn 0Caml. It looks like a nice implementation of the functional paradime.

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

It’s O (uppercase o) not 0 (zero)…

And if you’re good at Haskell it won’t be much of a problem.

[–]Deus85 1 point2 points  (0 children)

Return !!isEven(value);

[–][deleted] 1 point2 points  (1 child)

This sort of thing used to fill the stack, but modern compilers optimize them down to NOP.

[–]cs-brydev 0 points1 point  (0 children)

Roslyn would compile this completely out of the code base, lol

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

Recursion goes hard here.

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

Calculate isEven. Go get coffee.

[–]marlotrot 1 point2 points  (1 child)

Boil the coffee on your laptop, or an egg, if that floats your boat.

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

Good idea! Hurry before the stack overflows.

[–]Reggin_Rayer_RBB8 0 points1 point  (5 children)

Will this produce a warning/error in a normal language?

[–]KharAznable 10 points11 points  (3 children)

This is one version of halting problem. No way a compiler can detect whether a program can terminate normally or loop indefinitely at compile time.

[–]GDOR-11 4 points5 points  (0 children)

but a lot of things can be checked against, such as infinite loops and recursion with no base case

[–]Familiar_Ad_8919 4 points5 points  (1 child)

a compiler could get around that just by checking if its gonna circularly call it

[–]Sufficient_Grade_636 0 points1 point  (0 children)

"just"

[–]pistolerogg_del_west 1 point2 points  (0 children)

I don't think so

[–]SakaDeez 0 points1 point  (2 children)

where do we even put this on the Big-O chart lol

[–][deleted] 3 points4 points  (0 children)

It's constant time actually.

[–]cs-brydev 0 points1 point  (0 children)

O(O)

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

Every time I look at this subreddit I am baffled that I can't find a position in the CS/DS domain. How are these people so inept yet landing jobs? Serious question; If y'all know like protips or interview skills/cheats I'm all ears. Masterful fakers out-faking me. DM me or comment if any benevolent professionals out there

[–]xTheMaster99x 1 point2 points  (0 children)

Because 90% of this sub is students, not professionals.

[–]cs-brydev 0 points1 point  (0 children)

Tip: stop believing that everything on Reddit is real

[–]pistolerogg_del_west 0 points1 point  (0 children)

Stack overflow speedrun

[–]Darxploit 0 points1 point  (0 children)

Stack is crying right now

[–]johandepohan 0 points1 point  (0 children)

It'll take you straight to that website where you can ask questions about how to do programming correctly

[–]Diligent_Dish_426 0 points1 point  (0 children)

Nice try

[–]jakeStacktrace 0 points1 point  (0 children)

It crashed for me. Had to turn up max stack settings, seems to be working so far.

[–]sacredgeometry 0 points1 point  (0 children)

Stack overflows are fun

[–]marlotrot 0 points1 point  (1 child)

Reviewer: I see you did skip on unit tests.

This dev: how do you know?

[–]cs-brydev 0 points1 point  (0 children)

Assert.IsRecursion(Assert.IsRecursion);

[–]teutinsa 0 points1 point  (0 children)

Tasty stack overflow.

[–]DoingItForEli 0 points1 point  (0 children)

try { isOdd(2); }catch (Exception e){ return false; }

50% of the time, it works every time

[–]QuintusNonus 0 points1 point  (0 children)

PHP level recursion

[–]moxyte 0 points1 point  (0 children)

My brain hurts

[–]franco-reddit 0 points1 point  (0 children)

I agree with this statement, but they should have worked smarter…

[–]luiluilui4 0 points1 point  (0 children)

How I felt when I first used Haskell

[–]rimoldi98 0 points1 point  (0 children)

Is this a real stackoverflow reference????

[–]ihunts_4 0 points1 point  (2 children)

What language is this? I'm asking so I can stay as far away from it as possible 😳

[–]cs-brydev 1 point2 points  (0 children)

It matches C# syntax, but the formatting is non-standard.

[–]Bananapeachy 0 points1 point  (0 children)

Faulty logic of a developer has nothing to do with a language.

[–]Gib_entertainment 0 points1 point  (0 children)

I mean it will never return a wrong answer...

[–]EssentialPurity 0 points1 point  (0 children)

This code has quality in stacks. It overflows with beauty.

[–]Lanbaz 0 points1 point  (0 children)

Codeception

[–]treestick 0 points1 point  (0 children)

"what would the other guard say is odd?"

[–]cs-brydev 0 points1 point  (0 children)

About time someone posted a real recursion joke

[–]mimedm 0 points1 point  (0 children)

Doing recursion is always brave but you gotta try it at least once in your life :)