Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "recursion = recursion"
-
Me: *types "recursion" into google*
Google: Did you mean: recursion
Me: *clicks the suggestion, even tho I see no error*
Google: Did you mean: recursion
Me: ohh I see. I feel stupid6 -
New Guy Day 2: He has deleted the git repo on the project he was assigned to 4 times, written a recursion formula that crashed a server, & knocked my coffee cup onto the floor.
I messaged my boss telling him I am going to hide the body in his trunk.8 -
The day I send myself about 76k mails
> be me
> be working on a rest api
> implement an error handler that would send me a mail with exception details
> use same error handler in mail send error handler
> Summoned the recursion devil by accident
> Test error handler
> Forgot port forwarding to SMTP server
> keep the debug session open
> throw new UnexpectedInterruptionException()
> get back to work
> Add the missing port forwarding rule to putty
> The error handler starts doing it's thing
> The handler chain starts to pop
> handler after handler executes
> PCFreeze.png
> WhatTheFuckIsGoingOn.gif
> VS finally accepts stop debugging
> PhoneVibrationSpam.mp3
> Peek into webmail
> WowFinallySomeFanMail
> Look into it
> Realizing what I have done
> Delete mailbox
> Remove recursion
> Wow that's how randy must have felt in southpark
> Feel weird
> Shutdown, go outside
> What's up anon?
> Nothing, really6 -
Have you ever had a recursive meeting? A meeting about a meeting, about a meeting, about a meeting...9
-
Trying to learn X on wiki. Immediatelly learn that you suck at everything and need to research more about Y, Z to understand the basic meaning of X.
And that goes on recursivelly.6 -
There are two types of people in this world: those who understand recursion and those who don’t understand that there are two types of people in this world
-
Yeah GDPR emails are annoying, but you know what's worse? People complaining about GDPR emails!
And you know what's worse than that?
People complaining about people complaining about GDPR emails
And you know what's worse than that?
...4 -
Just noticed on "winehq" that the acronym for "Wine" is "Wine Is Not an Emulator". This is great and all, but all my mind can think about is the infinite recursion problem they've got there.11
-
Hey girl,
I want our relationship to be a poor recursion, so that it never terminates.
#devspickupline8 -
Is it just me or does this shirt make no sense? If your coffee was empty, then it would return true and you would keep coding. If it was not empty you would fill it.
Plus it's not a while loop, so unless this is some sort of recursion you wouldn't keep going....4 -
The index to Sedgewick's Algorithms book says:
recursion, 35
see also base case,
see also recursion1 -
A lot of phrases we use in software would make awesome alternative-rock band names.
- Integer Overflow
- Curly Braces
- Recursion
- Callback Hell
- Daemon Processes
- Nested Loop
- Regular Expressions
Source: Twitter2 -
!rant
When I was in 8th grade and was learning to code (c++), I sincerely believed that calling a function within a function simply calls it again (like in a loop) . I had never heard of recursion.
And I actually made a small project in which I called a function again and again thinking that calling another terminates the previous one.
No wonder my program kept crashing. I have still kept that code with me as a wonderful memory.
I know this isn't particularly interesting, but I just saw that code today and felt like sharing this...3 -
When I die, I want the R.I.P on my tombstone mean something different
Recursion Investigator Program
On my computer, there will be a file with that name
and when you decompile it to assembly
it will tell my life story in assembly
this will be a death propper for an assembly programmer6 -
What the hell was I thinking at when I wrote this nice interface wrapper...
What bothers me more is that gcc didn't warned me about such obvious recursion...3 -
Me: *spends 5 hours screwing around with recursion and performing operations in reverse order*
Unit tests: *pass*
Me: Wow. Okay, that’s interesting.
*run tests again*
Me: Right, well, that’s just dandy. Now, how did I get here and how do I document this...
TL;DR I spent 5 hours fucking about and accidentally came up with a working solution that I can’t explain
EDIT: RIP wrong category1 -
So I've got a recursive function that calls a recursive function that has a nested recursive function inside it.2
-
5 more mins on devrant and I'll finish that project.
Starts project, *buzzz buzzz* new devrant notification. Oohh, I'll just check that notif. Okay, while I'm hear, better check some rants to get it out of my system. Just 5 more mins....1 -
Yesterday was the first time i used recursion to solve an issue in our project..Never felt so good 😁6
-
Trying to install .NET Framwork 3.5 and this message comes up *headdesk*
WHAT DO YOU WANT FROM ME, MICROSOFT!?7 -
At a restaurant in Augustow there was a sign: "please wait for the waiter"
it confused me. If I'm waiting for the waiter, then what/who's the waiter: the one who's being waited for or the one waiting?
If I'm waiting for the waiter, do I become the waiter?
I think this is a good spot for a recursion bug to occur, resulting in waiter leaks.4 -
I used to prefer, think, and code in loops rather recursion.
Now though somehow it's the other way around...
And I have to assure myself why a piece of code I wrote won't cause a Stack overflow... and that if I really had to I could convert it back to a loop.
Haven't done it though for a awhile tho...7 -
Top 3 times:
1) When I amazed myself by solving a problem using recursion.
2) When I taught myself how to make my a restful api and consumed it using Ajax.
3) When I converted a psd in to a responsive pixel perfect webpage.
Writing code makes me feel I am worth something in this world.1 -
Our boss demands us to implement machine learning to an obscure project.
So we use machine learning to find what to use machine learning for.5 -
I remember when I was first learning recursion, i thought whoever thought of it must've been on some kickass drugs because it all sounded like sorcery. Just solved my first problem at work that recursion actually made simpler. Does that make me a wizard?10
-
I have successfully employed a function that uses recursion....
Because I stubbornly tried every possible iteration of the code until it became right.
I still don't get why it works.7 -
Expectation: I'm going to make an app that would remind me to finish my side projects.
Reality: I'm going to make an app that would remind me to finish the app that would remind me to finish the app that would remind me to finish the...
*stack overflow*1 -
Took me 9 hours to write what ended up being a 10 line function to sort messages and replies in the proper order.
I at least knew it would employ recursion, but goddamn... 9 hours.
Fuck sakes7 -
Got stucked in a problem with recursion in php, almost 2 days no sign of progress until i told my co worker how my code works, then i found the error and it work. I think developers need to talk about the code to realize whats wrong with the code.9
-
Here it is.
The CS final.
I reached this point in my life.
I hope I won’t forget the base case in recursion like last time and fuck up an entire question.11 -
I just came across this piece of recursive code, as much as I can guess this should be an infinite recursion but somehow it executes and does terminate. Can anybody tell me how this happens and what will be it's time complexity ?15
-
Haven't used it since and hopefully never will again, but understanding recursion and keyboard input in Assembly (uni project)
After a long (4 days) sleepover with my friends, with 14 hours a day of slamming our heads against abstract registers, we could finally program the factorial and take floating numbers as input and output them on the screen. It was nothing but pain, but the moment we got it, the sky had opened before us :D
Never again3 -
Random citation by p100sch (https://devrant.com/users/p100sch)
today while playing Minecraft:
"That moment when your family tree software throws recursion errors..."3 -
Job description: designing and building microservices and API contracts for enterprise use. Deep understanding of api/rest design, AWS, etc.
Interview: in this weird IDE while I stare over you, go through and parse this multi-dimensional primitive array using recursion.
...Wtf does this have to do with the role?8 -
Me after using Prolog for 6 hours because of University...
Sometimes prolog gives me brainfuck (pun intended)3 -
HR Interviewer: Where do you see yourself in 5 years?
Interviewee: I have your job and I'm asking the interviewee: "Where do you see yourself in 5 years?" His response?
I have your job and I'm asking the interviewee: "Where do you see yourself in 5 years?" His response... -
I just wrote a function with a while loop AND recursion because I wasn't paying attention.
That was fun. Also, MySQL isn't happy right now. I'm posting while I'm waiting for my local service to restart.3 -
What happens if i rant a rant that everyone knows?
"A different error message! Finally some progress!" -
Another rant reminded me of one of my dad’s favorite sayings about experience...
Some people have ten years of experience. Others have one year of experience repeated ten times.
..and for ohers, the recursion interval is shorter still...
As a bonus, here’s another personal favorite: “Nobody’s completely useless. They can always be used as a bad example.”1 -
That feeling when recursion finally "clicks", and you begin instantly identifying candidates in your code for recursive solutions.20
-
Time math is one of the most headache inducing parts of any programming project. I'd rather deal with uncommented recursion and regex.8
-
Programming contest assignments, first level:
1. "...if you don't know how to return values from a function, you can just print them"
2. "...if you don't know how to read files, you can assume data is in global variables"
3. Required recursion
4. "...and estimate its time complexity.", "You may pre-process the data, but use at most o(n^3)", "your algorithm must use under n^3 operations"
That escalated quickly!1 -
Was wondering why my callback wouldn't run when I intended.
> console.log each iteration
> realizes it skips the goal and goes up one
> decided to cheat use greater than instead
> ACCIDENTAL RECURSION
> Oh, there's the problem
> Thinks about going to bed for the night7 -
Someone made an infinite recursion loop through the aws cloud and racked up 86,000$ of bills in a few hours16
-
when you read an awesome @practiseSafeHex rant and share it on Slack
OMFG WHAT-THE-ACTUAL-F
this is soooo fucking broken, my eyes now have many relations to periods
shit... @DevRant fix dat...4 -
I just solved a recursion problem without using recursion.
Yes, it's roughly 4 times more code, but at least I understand what the hell is happening.4 -
That member of staff* that decided to write a batch script with calls to SVN, and named it svn.bat
*me -
one thing I don't get from Kubernetes
if a group of containers are called pods, and pods are containers, and containers in Kubernetes are also inside containers, therefore, its a clusterfuck of containers?1 -
1. Hard reset his Android phone
2. Install the same junk apps again
3. Complain why the phone is lagging
4. goto 1.1 -
Took 6 months off from coding...
sat in a JavaScript class today and couldn’t remember what a base case for recursion was...
Dear tutor,
I swear I can be stupid but please bear with me, I try really hard
😭😭😭8 -
Sometimes I start writing a sentence that ends with parentheses (only to realize what I put in the parentheses is as important as the rest, then I could use a regular comma instead).
I call this "grammatical tail-call recursion".2 -
Meetings.
Too many meetings.
"Why do you explain...." 10kv electrical shock.
Explanation so everyone has the same knowledge.
"But CD ES process of LCE..." Water. From the emergency hose. In the face.
For fucks sake, we are using speech in a meeting so stop using motherfucking abbreviations you shit hole.
"We had bugs". Taking an hot iron and shoving it somewhere nice.
Explain - what the fuck are you talking about? What bugs? Tickets? Documentation? Implications of the bugs? Hate. Much hate.
Um. I don't know. Maybe. But if.
Thumb wrenches.
Please, stop wasting time, if it's non important, a " No " doesn't hurt....
Let me show you. (4k Monitor, 10 px font, bright neon colors, IDE looks like LSD trip in bad).
Crucification.
If you present stuff, good - but for christs sake, shove your motherfucking shitty IDE setting in your own arse and turn on presentation mode with neutral colors - bright or dark mode, I don't care, but readable without danger of seizure.
I can't stream my monitor right now because of "bla" "blabla" (some private shit that has ZERO to do with work).
I'll need some oxy if this goes on.2 -
They should rename computer science at secondary school/a level to "recursion in action"... I really don't enjoy having to learn fundamentals again...
-
I don't really get why the word inception is used as a synonym for recursion.
Inception is about injecting a tought in someone else's mind.
... or is that just me? ...2 -
Hey Guys!
@alexdovzhanyn and I just released the third episode of Runtimerror Live!
We talk about various things like the DynDDoS attack, recursion and much more.
https://runtimerror.com/podcast/...
We hope you enjoy it as much as we enjoyed recording it :)1 -
from Windows host->run Ubuntu container A
-> from Ubuntu container A, run Ubuntu container B
-> from Ubuntu container B, run Ubuntu container C
-> from Ubuntu container C, run Ubuntu container D
-> ....
Recursion-mode ON16 -
had an incredibly productive day today on the ultradark blockchain. wrote a bunch of tests, updated documentation, split the repo into 3 seperate ones because it got too big and had too many different things in it, AND accidentally fixed an annoying, deep-recursion bug that ive noticed for a while now.
seems too good to be true...1 -
So I have this code written in node:
Function connect(){
const client = net.blahblah
client.on('close', () => {
Connect()
}
}
As the connect is called from within the close call back, it wouldn't be recursive right? Like if it disconnected a million times, it shouldn't throw a recursion error or use up a bunch of memory right? Or am I thinking about it wrong?2 -
wow, I have to say, tail recursion, slices, iterator transformers and shadowing are great building blocks for parsers. I'm actually way faster at defining and modifying procedural parsers with Rust's tools than I am with Chumsky. I actually understand which of my checks are greedy and lazy now!
-
Gonna teach someone conpletely new to programming some C#. What are some good exercises I can give them to understand general programming well?
So far I'm thinking FizzBuzz, some progressively more complex math+logic stuff and maybe fibonacci using recursion.11 -
Possibly my favourite function is Clojure's "recur", which isn't really a function at all, but a special form that gives you a guaranteed tail-position call to the current function.
Basically what that means is you can write recursive functions (functions that call themselves) and know that you're not creating a potential stack overflow.
Um. Okay, I can feel people looking at me like 🤔 Basically what *that* means is: normally when a function calls another function, a "stack frame" is allocated, holding all the local variables for that call. If a function calls itself 1000 times, 1000 stack frames get allocated. "Tail call optimisation" is a process by which if you call yourself as the very last thing in a function, the language doesn't need to remember the current frame; it just has to pass the return value upwards. The trouble is, it's sometimes hard to notice that you've turned a tail-call optimisable function into a non-optimisable one. Clojure's recur keyword makes it explicit, and therefore safe: if you try to do anything with the return value of recur, it's an error.
PS I'm sure another language did explicit TCR first, but Clojure is where I first saw it.6 -
Scheduled an on-site. *internal screaming*
Does anyone have any resources for studying distributed computing and operating system topics or have any pointers for studying for a systems design interview?
Also, how did y’all get comfortable with recursion? I don’t have issues with problems I already know the solutions to but it’s like when that’s not the case my brain just goes into panic mode for a bit.
Teach me your ways?7 -
I just watched a video where a guy used a homemade band saw made of wood to make another homemade band saw made of wood. This is the very definition of recursion, amirite?3
-
When I first met the Logo turtle I was hooked. Then learned Pascal. Saw recursion and my brain exploded. 23 years and still love it every day 🐢
-
You might need to take a break when you get a "max recursion depth exceeded" error when you weren't even trying to build a recursive function.5
-
Couldn't find any satisfactory explanation online, so here is a question. Discussions idea etc are welcome.
How is the colour fill tool implemented in paint or other software?
I remember it running superfast on old 98 machines. Got me curious to think how they achieved it.
(correct me if I am wrong, recursion won't be a good idea for large images.)4 -
does recursion have any practical use outside of being a cute/elegant solution under constraints where stack overflow isn't a concern due to small input size, and leetcode?
im having trouble thinking of anywhere you could justify using recursion in industry outside of leetcoding people
i assume the iterative approach would be preferred in scenarios where scaling matters18 -
*me to myself* okay this time I'm not solving that problem with recursion. The assignment is hard enough already.
*A ton of sweat, blood and hours later* Whoops. -
It is Saturday 19:30 and I am spending my time writing functions for save/load data in a binary tree. Recursion and fscanf are not a good combo so far, but that is the task. When the code is done I have to get some math done.
-
Spending days on a recursion problem and never solving it. That was a low time for me-especially when I looked at how short and elegant the solution was online. I've recovered now and have gotten better at it, but damn that's one thing I need master or it'll haunt me to I die.1
-
OCD driven development
- level of recursion determined by how much the algorithm bothers you
- too much and nothing is ever finished
- not enough and code is shitty and unmaintainable
- can result is longer variable names
- takes longer to name a variable
- text slightly misaligned requires hours of debugging time
- balanced by "OMFG that will take forever to fix" Sometimes...
- can lead to unobjective code reviews1 -
function stressBall(previousPost){
post = makePostAboutWinningStressBall(previousPost);
return stressBall (post);
}2 -
An old sysadmin configured the idrac interface of a company VMware server to get the IP address trough DHCP. Of course, without a valid IP, the server doesn't start. For you, where was hosted the VM with the DHCP server?1
-
ChatGPT can solve a Rubik's cube in less than a second, but it still can't find its way out of a recursion loop!8
-
Challenge#1 26-01-2020
Implement document.getElementsByClass without using document.querySelector or using document.all.
Part A : Write a function getElementsByClass(className){...} such that it returns the same result.
Hint to solve: `Recursion`.
Part B: Give a solution without using recursion.
@COD4 @Wack @NoToJavaScript @Root @don-rager @Ranchu28 -
I just found this in the code I'm working on:
function checkDateValidity() {
function checkDateValidity() {
...
}
}
Obviously a bad copy/paste. Not even sure how it was working before; it probably wasn't.1 -
The distance between two nearest hydrogen atoms inside recursion function is the key to understand the universe.
But which hydrogen atoms we need to pick from the whole universe to see it ?
How to identify them if after each iteration the order of operations changes based on results and we only see the previous state as an argument of function.2 -
I was bored, spent an half hour writing a non-recursive, relatively-high-allocations, somewhat slow Fibonacci function.
Here you go:15 -
Me: *watches programming video on Y-Combinator*
Also Me: "why the heck are they talking about recursion and not funding startups?"2 -
We are dependent on dependency injection and package management... which also comes with a lot of dependencies installed by another package manager1
-
what do you think about the idea of... "pseudo-recursion"?
as in, language construct that looks basically like recursion except one detail that makes it translate into iterative execution where the "recursion" calls just add to the list of "execute in next layer" ...iterator-type variable(?)
also, if you understand what I mean and if it's not complete nonsense, any syntax suggestions that would seem most natural for you? (also for context tell me what language that syntax suggestion mostly draws from (and why))
just a bit of idle thought/idle talk, don't take it too seriously.5 -
Imagine you have a dream about dreaming about unfinished code that triggers recursion, because it is unfinished and that is why you are dreaming about it.
-
"String reverse with recursion" - I know it's a small thing for seasoned coders but back when I was starting It opened tons of possibilities.
-
Yeah it's just me.
*when your recursion function suddenly worked and you still can't figure out why it worked...*
Guess I need to improve on my algorithms more. Just can't wrap my head around even a quite simple recursion. I'm certain this won't last long. -
Ok so.. thoughts on MySQL,
SELECT max(column_name) from table_name;
Outputs the max value in the column by kinda traversing the whole column huh... Recursive🤔
While
SELECT concat(column_name) from table_name; outputs simple endl separated srrings. . .. no recursion. PHP backend sucks
😣7 -
Recursion: Good or bad? I mean, it's very few lines, efficient and pretty but can be so damn hard for others to read and debug.3
-
I got to a point where I have a multi-level recursive promises within loops and my mental map is by far not enough to process this. I wish there were some visualisation tools for this - though I don't even know how it could look like. All I know is that at some point I'm returning a wrong promise and the recursion is not correctly handled.7
-
Hi devs, any of you tried to do something big with ELM lang? I made a clone of 2048 a few years back just to learn its hows and whens, but was disappointed that it can't handle simple recursion to test a winning AI, and left it at that
-
well... Fuck you ackermann and your damn interesting function!
Spent three hours searching for an error in rasoning but well... Who'd have guessed...
FUCK! I need to get my stuff done... Fuck! -
Seems like latex does not like recursion. Defined a command as itseld by accident and got lots of strange error. Will there be a time where i can accept that copy-pasting code only generates problem?
-
I wouldn't be surprised if JavaScript reached the maximum allowed stack size without needing infinte recursion2
-
IF I see something infinite and more than three.
and never more than three in real world.
I use recursion.
because who knows, people are crazy.
myself included.