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"
-
Client : Can you make some adblock?
Me : Why? There is a lot of good things already...
C : I mean... Listen carefully.
M : ok
C: i have some google ads and user blocks with adblock
M : yeah, that is normal
C : so i implemented adblock blocker which blocks adblock so that i can show the webpage plus ads when the user disables adblock.
M : i bet users hate that.
C : yeah, so users found out a way to disable adblock blocker which disables adblock blocker which i implemented to show the ads! So i cant earn revenue..
M : so what?
C : Can you make ad block block block block?
M : Sure. How much will you give me ?
C : 20 to 30 dollars
M : great ( the most generous client ever seen)
*couple of years later*
Client : can you make ad block block block block block block block block block block?
Me : i cant understand
C : count the number of block
If there is odd number of block i means to block ads.
If there is even number of block ads, it means to show ads making user to disable ads.
M : so just tldr your request this time
C : even number
M : ok how much will you pay
C : 20 to 30 dollars
*next day*
C : can you..
M : offline
Who in the fucking world made ads, made adblock and made adblock block?15 -
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 stupid7 -
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, really7 -
Aaaah...I just got back from a meeting because of a production data problem caused by an analyst who keeps making mistakes that screw up client data. I wrote a program to automate most of it and everybody initially accused me of having a buggy program, only to find out she wasn't using it, never did.
"Why aren't you using the program then?" was asked. "Oh, well, I just understand my way better," she replies, "When I make a mistake at least I understand why."
Pause....
"Then, um, if you know you're making a mistake, why don't you fix it?"
"Because my process is so manual and labor intensive sometimes it's not worth it to go back and fix it, because I'd have to do everything over again, and you guys are much better at fixing this stuff than I am."
I indicated that everyone is too busy to stop and fix her mistakes, to which she then asks:
"So if you can't fix my mistakes, what am I supposed to do?"7 -
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 -
Someone wrote a piece of code half a year ago. It's fuckin complex and recursive. And uncommented. Today it's my job to figure out WHY and HOW it works.
If it wasn't clear before, that someone who wrote it was me. I'm not sure if I was on some substances back then, but that shit is fast and I have no clue how I was able to create it. Perhaps it was the coffee overdose...
However, wish me luck figuring this thing out.5 -
My own programming language (still WIP). I got SO excited when I found recursion worked, I even got the simplest factorial recursive function wrong. And then again, once arrays worked, bubble sort it was. I shit you not, once I saw all the numbers printed in order, I had to stand up and walk or I would have jumped out of the chair in excitement.
In case someone is interested, I use LLVM for the backend.4 -
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
-
What happens when I open devRant:
0. Check my rant
1. Find my rant is still at 19 upvotes
2. Go and look at some other rants
3. Realise that you're procrastinating
4. Close devRant
5. Catch interesting rant whilst the app is closing
6. Open devRant1 -
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....6 -
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?
...5 -
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.
#devspickupline9 -
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 -
The index to Sedgewick's Algorithms book says:
recursion, 35
see also base case,
see also recursion1 -
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 -
My younger sister has to write a story for her assignment and she isn't getting any ideas . So I suggested this :
A story about a kid who has to write a story but isn't getting any ideas ,so he writes a story about a kid who has to write a story but isn't getting any ideas ,so he writes a story about a kid who has to write a story but isn't getting any ideas... till 200 words.11 -
!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 -
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 -
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 -
So I've got a recursive function that calls a recursive function that has a nested recursive function inside it.2
-
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 -
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 -
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 -
Don’t know that I’ve seen this posted here yet. Either way, the Google devs definitely have a sense of humor
-
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 -
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 sakes8 -
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 -
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
-
Random citation by p100sch (https://devrant.com/users/p100sch)
today while playing Minecraft:
"That moment when your family tree software throws recursion errors..."3 -
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 ?17
-
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... -
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 again4 -
That feeling when recursion finally "clicks", and you begin instantly identifying candidates in your code for recursive solutions.20
-
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 -
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!2 -
0. The conference room TV has no sound.
1. I submit ticket to Facilities.
10. Facilities closes ticket saying that's up to Service Desk.
11. I submit ticket to Service Desk
100. Service Desk closes ticket saying that up to Facilities
110. ???
111. Profit2 -
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 -
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 -
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 -
1. Hard reset his Android phone
2. Install the same junk apps again
3. Complain why the phone is lagging
4. goto 1.1 -
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 -
That member of staff* that decided to write a batch script with calls to SVN, and named it svn.bat
*me -
Today I wrote the most epic code.
The kind that breaks your brain, but when you're done with it you know it's time to go home and kick back coz you've done good.
It used recursion, did backflips to avoid unnecessary db calls, featured no code repitition. Hell I even commented the business rules it was following in there to explain what was happening.
I hope it works tomorrow when I test it 😂😂😂6 -
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 -
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 -
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 -
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
-
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 -
They should rename computer science at secondary school/a level to "recursion in action"... I really don't enjoy having to learn fundamentals again...
-
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 -
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 -
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 -
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 -
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 🐢
-
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 -
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 -
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 -
Creating side projects for the side projects which are supposed to make the coding of side projects who are supposed to speed up coding on main project. Ends up in sideprojectception...3
-
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
-
*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. -
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
-
function stressBall(previousPost){
post = makePostAboutWinningStressBall(previousPost);
return stressBall (post);
}2 -
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 -
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
-
self refrencing tables awesome concept but it pisses me off that mysql doesnt support "select with" query i had to think about writing recusive functions that builds a tree of n level i must say im kinda proud :p2
-
"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.
-
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.
-
We are dependent on dependency injection and package management... which also comes with a lot of dependencies installed by another package manager1
-
I was bored, spent an half hour writing a non-recursive, relatively-high-allocations, somewhat slow Fibonacci function.
Here you go:17 -
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 -
Me: *watches programming video on Y-Combinator*
Also Me: "why the heck are they talking about recursion and not funding startups?"2 -
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. -
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.
-
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 -
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
-
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 -
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
-
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! -
Apparently my superpower is writing exponential time algorithms to solve puzzles and games. If you need someone to write a recursive DFS to solve your shitty word search, hit me up.
-
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?