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 - "loop"
-
“That regex almost worked, lemme just tweak it a bit–”
*2 hours later*
“Fuck it we’re processing strings character by character with a while loop like granddad did.”5 -
Math: the imaginary unit is i.
Electrical engineering: no, it's j.
C hacker: hands off my loop variables!13 -
Just replaced a 300 line switch case with a simple if statement inside a foreach loop.
Feels sooo good man9 -
Boss: Oh can you add this feature?
Me: I added that function already and you said to take it out.
Boss: Can't you just copy and paste it from an earlier version?
Me: No its really not that simple, I removed a bunch of tables and went to town cleaning the code so it's super quick and "sexy fast" as you put it.
I go home, work all night and forget to eat.
nextDay++;
Boss: Actually just hold back on that, I'm having second thoughts.
When a project seems to be in an endless for (fucks sake) loop.8 -
Going to forums asking for help as to why my nested for loop wasn't working correctly after the first loop only to realise I was using the variable i for both loops...
Felt like an absolute twat4 -
in python script; a for loop inside a recursive function to slow down stdout. i don't know time.sleep(n) back then4
-
Took me 2 fucking days to figure out why the loop wasn't working, biggest facepalm ever.
if(iterator.hasNext()){
// some awesome code
}8 -
Son: Dad what's a infinite loop?
Dad: I don't know ask your mom!.
Son: Mom what's a infinite loop?
Mom: I don't know ask your dad!.
Son: Dad what's a infinite loop?
Dad: I don't know ask your mom!.
Son: Mom what's a infinite loop?
Mom: I don't know ask your dad!
........ 😒4 -
Infinite loop...
Got a story assigned with no requirements listed this sprint. Since I finished the rest already I was like, lets be pro-active and see what it's about during the stand-up.
Me: Hi, I only have story X remaining, what's it about, there are no requirements listed in Jira?
SM: Yeah person Y is going to reach out to you with the reqs.
Me: Ok, when is Y going to reach out?
SM: Y doesn't have time now, will probably be in 2 weeks.
Me: Ok, so why is the story included in this sprint then?
SM: Because they want X implemented this sprint.
(Me wondering if the Scrum Master is familiar with infinite loops, thinking let's try this out)
Me: Ok, if X should be completed, can Y reach out to me with the requirements?
SM: Y doesn't have time now, will probably be in 2 weeks.
Me: Ok, why is the story included in this sprint then?
Stand-up lasted a lil' longer today... Hope the SM got the message not to assign stories without reqs or clear communication anymore.5 -
Damn you stackoverflow!
Why can't we declare an answer as outdated or deprecated or just plain out wrong!
I like that you have so many questions, yet when the correct solution is a 0-upvoted by a 0-rep user hidden at the very bottom between a huge amount of wrong answers and whereas the *accepted* yet wrong answer has upvotes that are skyhigh, it just wastes my time.
All that is achieved is a feedback loop enforcing a faulty answer will accumulate ever more upvotes. And waste somebody else's time in the future as well.
I cannot add the correct information, as that would harm the author's intent. I cannot edit the faulty answer to state that there is a better answer, as that would be an attempt to reply. I can downvote it, yet that just a tiny drop on a very hot stone.
All I can do is add a comment pointing to a correct answer, yet that is easily overlooked.
Come on, stackoverflow! This is madness!6 -
Always remember: Every time you write a for loop like that: for (int i = 1; i <= n; i++) a cat dies!5
-
ORG 0000H
MOV R0,#00H
MOV R1,#50H
MOV R2,#00H
MOV R3,#60H
MOV R4,#05H
MOV DPL,R0 LOOP:
MOV DPH,R1
MOVX A,@DPTR
CPL A
MOV DPL,R2
MOV DPH,R3
MOVX @DPTR,A
INC R0
INC R2
DJNZ R4,LOOP
END9 -
Getting stuck in a while loop Getting stuck in a while loop Getting stuck in a while loop Getting stuck in a while loop Getting stuck in a while loop Getting stuck in a while loop Getting stuck in a while loop Getting stuck in a while loop
Getting stuck in a...[read more]4 -
Ticket : "I have a blank page when I load this page"
I open the script (php), I see at least 7 nested foreach loop starting with a 2600+ long array. I spot the buggy loop. I mark the ticket "may need refactoring". I go drink a beer with colleagues. -
GF: Honey... What is that thing called... It's like a neverending if statement...
Me: ... A while loop?
GF: YEAH!! It's a while loop in the brain!2 -
me: "aye im a cool functional programmer, monads are useful, whats up loop using plebs'
also me: *passes input argument as terminating condition*1 -
Writing a tic-tac-toe player in Prolog. So much fun solving a problem with only rules and no loop control 😍2
-
My brother is just like f*cked up program:
Fortnite > Movies > TV Series > Fortnite > Movies > TV Series > F...
Yes, infinite loop and memory leak at its' best.8 -
literally lol'd out loud when I saw this. Found in the source of popular event loop library libev, in ev.c line 214:2
-
This F***ing government college faculty crossed my complete answer of a F***ing bubble sort in 3rd year of Mathematics & Computing by saying and I quote, " Why is this i loop inside of j loop?" and after getting again on my feet after listening and understanding this absurd statement, I tried to explain to which he asked ne to show any book where it is written like this.
To i loop and j loop he meant the variable name in for loops, 🤬🤬🤬🤬
these f***ing reserved government professors in elite institutions like IITs15 -
// to understand infinite loop, see the bottom of this file.
At the bottom of the file:
// to understand infinite loop, see the top of this file.2 -
Seen on HackerNews, couldn't left it for myself.
Mail loop from hell: https://blog.dbrgn.ch/2012/7/...2 -
How to make loading animation in terminal quick and dirty
Loop through these, print them, and replace them with the next one
\ | / --2 -
Opening visual studio prompts me visual studio is not responding hit debug opens up visual studio then not responding again.
Endless loop!2 -
I once saw this comment inside two embedded empty loop :
// WHY, OH GOD WHY!
Turns out somebody deleted the content but not the loop. The next dev added the comment but kept the loop. -
God damn it lastpass, how the hell do you get a memory leak and an infinite loop in a fucking browser extension?! Using 7GB of RAM and all 8 cores @ 3,4GHz!!9
-
Infinite loop in real life :/
X: Where is your house?
Y: Near Ramesh's house.
X: Where is Ramesh's house?
Y: Near my house.8 -
Wanted to play a new game this WE.
It's quite demanding so decide to boot into Windows, because NVIDIA driver support.
Haven't booted Windows 10 in a month so I start early in the morning to do the updates.
After about 3 hours all Windows and steam updates were installed and I finally start the game.
I play for a couple of hours until suddenly - blue screen
I rebooted and was faced with another blue screen right after the Windows logo. Didn't even reach the login screen.
So here I am with a Windows install that is stuck in a boot - blue screen - boot - system repair - blue screen loop and a shitty gaming WE.
Thanks Microsoft!12 -
Ah, the old locked up non-gui thread. Bastard gets me every time. My monkey brain says "Button still work, so no infinite loop". Oh, but there DO be infinite loop.
-
Once made simple .bat file that opens itself.
Changed the icon to Internet Explorer(yea i know what you are thinking but it was like 2003 or smt.)
Victim clicks the shortcut.
BANG! Endless loop of same application eventually freezing everything.
12 years old and feeling like a damn hacker feelsgoodman.jpg. -
Regarding my last rant: I AM FUCKING DUMB!
When I receive data from the master Arduino, a hardware interrupt runs and oversteps my main loop stuff!
Lesson? NEVER WRITE HARDWARE LATCHES ON THE MAIN LOOP WITH A HARDWARE INTERRUPT WHICH IS MOST OF YOUR FUCKING CODE!!13 -
-six months ago-
"Yo! Let's learn a web framework and build some sick apps!"
"Fuck yeah!"
-yesterday-
"Yo! Should we start doing that thing we talked about?"
"Fuck yeah!" -
int counter=0;
void loop()
{
if (counter>=10)
{
// nothing
}
else
{
Serial.println(counter);
counter++;
}
}
This is what I call bureaucracy3 -
My IT teacher in high school. Got me into programming, helped me take programming from a hobby to a career and is still helping me today. Honestly one of the coolest people I know.1
-
My loop checked a variable, then the next 5 nested loops checked it again, then started over. It was a hard coded variable I forgot about.
I just made my code OCD -
Here I am wondering why the array only has 1 item after the loop finishes. I wonder if it's because the array I'm pushing too is INSIDE the loop...😁1
-
Making a loop is like taking a dump:
If you dont manage all the shit, you'll end up with an overflow. -
Made a backup script today that backs up our site files and database (total size 34gb, we have 70gb storage)
the script takes 1:10 hours to far the website files and backups up the database and somehow when running in a detached terminal because my boss wanted me to run it at 4:20pm when I'm leave at 5:05pm( what could go wrong) it went in a infinite loop and filed our storage.
Our provider just called our boss that his drive is full ( why can you even see that)
Well it will not be a fun morning tomorrow6 -
There's this little, self-loathing sigh I do every time my program locks up because I forgot to iterate inside a while loop
-
*Program crashes*
Colleague looks over my shoulder : While loop?
Me : ...while loop.
It's been two years...my brain just refuses to write non-infinite while loops. I tend to avoid them as much as I can cause every time, without fail, first time I create one I crash something.2 -
Just had to write an old-skool for loop. Index...termination condition...whole works. I feel dirty.
Bit embarrassing as someone saw me writing it, thought I was a hacker and informed the authorities. Spent the last hour being waterboarded.
We had a big laugh about it when they realized I was just fixing bugs in a legacy app.
National Security. Hilarious.10 -
When I was really new to JavaScript, I wanted to create an image gallery with images which I stored in a MySQL database. Well, I did not really had a clue how to load all the image sources into my JavaScript to load the images. I also didn't know much about fetching an endpoint of my website to get the data asynchronously.
I also wasn't a good database architect at that time and my database had an image table wich was for the gallery. Within this table there were multiple columns for one image slider (there should be multiple sliders on one page in the gallery (I know... 🤢)).
So I ended up writing an PHP loop wich printed Javascript loops for each row in my images table. Within my JavaScript loop I created the sliders and set the images.
In my defense I can say: It worked. 😅
It hurts to remember this. And I hope you won't judge me.2 -
Times I have run into event loop / closure related issues in my 10+ years of JavaScript app development: 0
Times I have run into event loop / closure related issues in my 10+ years of interviewing: Uncaught RangeError: Maximum call stack size exceeded
SHEESH3 -
while(true){
while(beTired()==true){
goRelax();
}
while(beBored()==true){
goProgram();
}
}
That's a fucking infinite loop4 -
Here's something not quite a rant, but relatable. And an issue. For me at least.
------
You get really proficient with a set of tools.
- Can solve things in an efficient & elegant manor.
But it's now boring.
You find some new exciting stack, research like a madman. Possessed.
Your perfectionist self, seldom doesn't want to settle.
You burn out from pressure & deadlines.
You feel inadequate, imposter syndrome settles in.
You reminisce of the easy days when you (thought) knew everything.
Decide to rebuild using that past stack.
Gets bored.
You notice something new & exciting.. loop iterates to next repetition.1 -
Help, please :D
My girlfriend came to visit me and now her laptop is bricked (boot loop). She has the WIP of fall creators.16 -
Somebody pays for this domain 👍
Translation: www.if-loop.de
There are no if-loops, just if-statements! -
I swear I NEVER hated PHP before, but after seeing this shit, I just can't love it anymore, I feel betrayed
I mean, WTF? Just bc I'm using the variable as a reference in the NEXT loop the LAST element changes? What even is the fucking reason?
Yeah, I read the answer on StackOverflow, but seriously...
SO ref: https://stackoverflow.com/questions...12 -
We should get rid of loop invariants. They are cumbersome and counter-intuitive (hopefully someone gets the inside joke).1
-
My brain goes into infinite loop when an Interviewer asks, what was the hardest thing you did at your job?2
-
When mysql_query gets called inside of a loop that is inside of a loop.. While the could've used a one liner mysql command...
Best of all they don't think that this doesn't effect performance...1 -
Debugging a java program for hours only to find that the mistake was a semicolon just after the for loop declaration FML
-
"IM IN YR loop UPPIN YR index"
That's it, I'm using LOLCODE wherever possible 😅
https://github.com/justinmeza/...3 -
*Puts the same music in infinite loop through a whole afternoon of coding*
*Gets tired of the music after 2 hours and a half (my playlist contains some dope musics)*
*Removes the infinite loop to let the next music come*
*Head starts to headbang by itself when the next music starts*
*Puts said music to infinite mode*
*Repeat*6 -
When you spend half an hour long at your code wondering why your do while loop only works once.
Then you realise there is a return just before the end of the loop.
Today was not a good day2 -
Yesterday I killed a production server with a handful of sites running on it. 😬
Created an observer for one of my Laravel models. It was generating new translated slugs when another post gets translated by an API. While implementing also an updated method besides the created observation I obviously updated the models slug.
Pretty confident this small update will work I just pushed to production. Tested it live.
BOOM
Hard reset on the server redoing the changes. Searching where I fucked up this time...
Finding me observing the updating while updating the updating of the updating by the updating. 🤦4 -
Found this on prod
Don't know who did this but wwhhhyyyy do you need to add foreach loop😅
Just add directly9 -
I solved this bug today just to get good sleep at night by not brainstorming every solution.
Here I am thinking about the different scenarios to test my code!!I think I'll sleep peacefully tomorrow!! -
uni prof: "you can't make an infinite for loop. Infinite loopsnare only possible with while loops"....
I think it's not what he meant, but it was a while ago and I forgot the context, but multiple students made a 'what the fuck?' noise.5 -
Manager: Why not use the alibaba cloud?
Me: Because balbalbal...
After two week
Manager: Why not use the alibaba cloud?
Me:....
Infinite loop!!!3 -
Someone made an infinite recursion loop through the aws cloud and racked up 86,000$ of bills in a few hours16
-
a meeting on why we are behind on a project. a meeting about meeting about being behind.... too many useless meetings
-
Life can be simplified with code. We're all running on an infinite loop. Eventually, we come across an unexpected bug and crash.2
-
Time Wasted: 30 Minutes
Problem: Put the .add(myObject) statement OUTSIDE the for loop.
Solution: Today.Quit() || Coffee.Make();2 -
that ankward moment when you generate a javascript infinite loop and you are not able to close or reload the window
-
The worst infinite loop of all.
while(hasPoopOnTP( )){
if(goodEnough( )){
break; //it's never good enough
}
ass.wipe( );
}1 -
So I'm writing this code, that does 2 important things, that cannot be seperated. I run the code, thing1 is correctly executed, thing2 not. No fucking idea, why this happens. Execute again, same result. Debugg the wohle thing, now everything works fine.
WHAT?
I check the code, there are no background tasks, no paralell processing, nothing that should go wrong.
Asking a Senior developer for help, he also has no fucking idea. He tells me to try to wait one second between the two things. Looking for a delay() or wait() function in my programming language but there is none. Ok, building my own delay, writing a "do 1000 times" loop, calculate some shit in it. Execute the code, it works perfectly.
Nobody has a fucking idea, why this is happening and why this solution is working, but now the code is productive and it works fine.9 -
Oops!! I just forgot to increment a loop variable in a while loop. ended up in an infinite loop :(6
-
Not a rant, but I was offered dev positions at 2 companies. Excited to start working as a developer! I guess I'll get to post actual rants soon.2
-
Windows Update prompted me to install the 1809 update for Windows 10 recently.
I left the machine for a while and came back to find it frozen at a completely blank screen.
It eventually restarted...and got stuck in a continual loop where the Windows logo would flash for a second and then instantly restart again.
The restart occurred so early in the boot process that I couldn’t even get it into recovery mode or do anything with it to fix it.
So I had no choice but to reinstall Windows from scratch and reinstall and restore all my software and files. Took about 7 hours.
Not happy!2 -
int rantLevel = 0;
while(true) {
rantLevel++;
}
Join the army! Create an infinite loop with your favorite language and comment it 🤔29 -
i have been browsing trough my gists and this is what I have found.
HAI
HOW DUZ I PRINTSMILE
VISIBLE "SMILEZ!"!
IF U SAY SO
HOW DUZ I PRINTSMILEZ NUMBERZ
I HAS A SMILEZLINE ITZ ""
IM IN YR LOOP NERFIN YR NUMBERZ WHILE NUMBERZ BIGGR THAN 0
SMILEZLINE R SMOOSH SMILEZLINE AN "SMILEZ!" MKAY
IM OUTTA YR LOOP
VISIBLE SMILEZLINE
IF U SAY SO
VISIBLE "O HAI! NOT MY WERK! LOL!:):)DIS WAY CUZ I LIEK SMOOSH:)"
I HAS A COUNTER ITZ 3
IM IN YR LOOP NERFIN YR COUNTER WHILE COUNTER BIGGR THAN 0
PRINTSMILEZ COUNTER
IM OUTTA YR LOOP
VISIBLE ":)N DIS WAY CUZ QUESTION. LOL!:)"
COUNTER R 3
IM IN YR LOOP NERFIN YR COUNTER WHILE COUNTER BIGGR THAN 0
I HAS A UDDERCOUNTER ITZ COUNTER
IM IN YR INNERLOOP NERFIN YR UDDERCOUNTER WHILE UDDERCOUNTER BIGGR THAN 0
PRINTSMILE
IM OUTTA YR INNERLOOP
VISIBLE ":)"!
IM OUTTA YR LOOP
VISIBLE ":)LOLOLOLOLOLOLOLOLOLOLOLOL!:):)KTHXBYE"
KTHXBYE9 -
loop {
So I want to write a simple program in language X. Create a new project. Language X does not have this feature. Okay, Let me write a library that does that for language X. Create a new project. What was I doing again?!
}1 -
Error in linux be like D∈∀DL❍⊂κ:
Can't install module <a> dependent on 3 other.. trying to install one of those 3 and here comes again.... Can't inatall this module depends on <a> -
The programmer got stuck in the shower, because the instructions on the shampoo bottle said:
Lather, Rinse, Repeat -
Was writing a multithreaded program in Java with an infinite while loop (for waiting). The thread was never preempted. Added a print statement inside the while loop and everything started working :/
Now I need to print a stupid message just so the program works :P3 -
To preincrement or to postincrement?
for(var i = 0; i<length; ++i){
}
or
for(var i = 0; i<length; i++){
}
I would imagine on a good vm or compiler this would be optimized anyway. So does it really matter?14 -
Public transport is slowly getting quieter and quieter. One side of my enjoys the silence and space, but the other side wishes I had the option to not take it either.
Everyone WFH, I envy you...2 -
> Teacher uses a for loop to draw random dots
> Teacher explains we can't adjust the individual dots after the loop
> Teacher says we need to use classes
> Teacher creates classes
> Teacher doesn't show a solution to the initial problem
> Me is triggered as fuck3 -
So I spent all day today trying to debug a C++ Program and after hours of digging into the code , I realized i had copy-pasted a for loop and had forgotten to change the loop variable from i to j. 😑4
-
When you are dreaming about you being stuck in a never ending loop of string escape... Nightmares...1
-
The stupid shits I see...
Dt = dateadd ("s",5,now)
Do while Dt < now
Loop
WHY DO YOU NO THREAD.SLEEP ()?2 -
vscode for now. I swap editors when I get bored of one. All editors have something cool to them. Except Vim. Screw Vim.1
-
My Coding Loop :
while (working) {
coding();
createNewBug();
if (bugs != 0) {
fixTheFuckingBugs();
if (bugs != 0) {
fuckMySelf();
} else {
continueWorking();
}
}
}1 -
As a beginner at programming, I've never really appreciated or understood the point of a simple for loop until I've had to use an if/else loop 200 times2
-
He: Please help me understand loop vs iterator..
Me: Loop is which iterates over data
He: Then what's Iterator?
Me : Iterator is when we loop over data6 -
parse_str($_SERVER['QUERYSTRING'],$qry_arr);
when you see tha 4 time before he actually uses the qry_arr in a loop... -
Someone just explain me why. I really can't figure other reason that beeing too lazy to think a condition while writing a "while loop".
At university, a colleague asked me what i think of his code. I see something like that:
while ( 1 ){
...
if (condition)
break;
...
}
Am I a fucking genius thinking that just moving condition into while will improve readability, or am i a fucking stupid ? Really not the first time seeing this, maybe i am missing something.4 -
After spending almost all the day trying to find out what was wrong with my code, re-reading all my class, thinking that the universe does not make sense anymore, I find that one loop control variable that I was changing had a duplicate inside the loop. Damn you compiler, why did you not warn me?1
-
Set the AI to run a while loop until it has finished watching/playing every video on YouTube from start to finish;
-
Wordpress: add content beneath the loop on category/archive pages. WHY IS THIS NOT JUST A PART OF ALL THEMES AT THIS POINT???
-
Start teaching it terrible standards and a misrepresentation of the world so the feedback loop breaks.
-
I makes a React mistake, alright I is fool.
I caused an endless loop, but Chrome won't let me diagnose it, because when you have an endless loop, you can't close the tab, can't open devtools, can't debug to find the source.5 -
Going back to a php project after writing loads of typescript on a node stack, I suddenly miss the instantanious feedback loop on file save via `nodemon` for basic scripts and `mocha --watch --reporter min` for tests.
Using phpunit, I currently have to rerun the test manually whenever I feel like. Which now feels so annoying. Cause I didn't know besser.
Now I was searching for something similar in php and I find answers[1] pointing me to use either set up some npm hooks or set up gulp task or to use pywatch. phpstorm also is supposed to support file watchers and run test on every save, yet setting them up feels clunky.
[1] http://stackoverflow.com/questions/...1 -
Anyone know of OSSU? It seems cool, but I don't know anyone that has any experience with it. Would be doing it part time to fill all the gaps of my self learning journey5
-
executing back to back awkward experimental snippet successfully.... a dream come true... thinking 💭 of making loop of that day.
-
I'm learning Rust as a case study for my own programming language. It's funny how many approaches exist to the humble loop.
- In classic procedural languages, a loop's job is to repeat actions, and as such it provides a multitude of tools to control this repetition.
- In all languages with iterators, a for-in loop is a construct that does something with every element of a collection. In languages with both iterators and generator functions, this can even be used to define a sequence in terms of another.
- In Rust, a loop is an expression that obtains its value through repeated execution. It can also be used like a classic loop, of course, but this is the interesting part.
- My little language is a functional language, so "loop" is the Y combinator. To loop means to define the value of an expression in terms of itself. It's the only looping construct, gets special treatment from the type checker and it's also used in recursive type definitions. -
One of our departments works only on Thinclients and one of my colleagues made an loop. You can think what happened.7
-
Which one is IPv6 loop-back address ?
A. ::01
B. 127.0.0.1
C. ::1
D. ::10
E. I put a loop-back on your loop-back
F. None of the above16 -
Found an infinite loop in SQL. One proc called another and then that one called the other. Woooooo.....
-
Updated to pop_os 19.04
Xorg stuck on a login loop.
Checked the basics, still failed.
Guess who has a fresh Pop_os 19.04 install?7 -
Whenever I make a loop or any block in general and then look it up just to verify and mine is overcomplicated
-
What's your first instance of a infinite loop which ended badly?
Mine was a loop to calculate prime numbers.
My computer came to a halt within 5 seconds :S4 -
So I start up the Windows Upgrade Assistant to upgrade my Windows 10 to the anniversary edition and it shows me that I'm running version 10240 and I can upgrade to the latest version 14xxx.
So I hit upgrade now, wait for 10 minutes for the update to be downloaded and another 10 minutes for the update to be installed. Then it does the customary reboot after update.
So now I assume that I'm running the anniversary edition of Windows 10 but it shows that I'm still running 10240.
WTF was the upgrade assistant doing in those 20 odd minutes. And now it does it in an infinite loop. Is Microsoft trying to explain me what an Infinite loop looks like practically.2 -
So I have an array of length 20 which stores a 64 bit decimal number by digits. The starting address is let's say array64. When I am trying to build up my number in ECX:EBX, I am using EDX as the iterator to access the individual elements of the array (I am loading them into AL)
.LOOP:
....
MOV AL, [array64+EDX]
INC EDX
....
JMP .LOOP
The problem is: somehow EDX cannot get higher than 10, so the program just stops and waits for input, when I try to work with a 12 digit number...
This module is outside the main function, and I thought about some Far Pointer problems, but all of my ideas just failed...
What is wrong here?1 -
Fuck angular.
Syncing formControl errors?
Fuck you. Infinite loop.
Debounce formgroup validator?
Fuck you. We clear all asyncValidator errors on every change12 -
Have you tried to look up documentation for some module and find another module that better does it? and this loop continues...
-
Hello there, long time no see.
Back in the day I asked you for a book that goes deep in the C programming language, now I'm asking the same but for Nodejs, especially a book that explains the event loop down to the line of code.
There are some articles on the internet but they are all copy/paste of one another and don't even scratch the surface of what the event loop does2 -
when you used to functional programming, every time you see a for loop, you can not resiste but to refactorit.
-
Feels good to be able to clean up code! Just changed an ugly 5-line while loop into a clean 2-line do-while. Now I just need the rest of my program to work 😂
-
Deep learning. Working on an image classification problem for a big company. The "boss" ask me to teach an AI to classify images into a few classes.
"Mmm, ok...I just need to create the dataset and then build the AI...so.."
Where is the problem??
The problem is that the classes are so perfectly similar that no one knows how to help me create the dataset and I have to do it alone.
That's how you spend your weeks in a loop where you look at thousands of images over and over just to have something decent start your work.
After that I felt like...
"I'm the hero they deserves, but not the one they need right now" - Cit2 -
I had network problems.. and you know.. no shit.. the problem solve thing which might actually be just a for loop solved it.2
-
I kinda miss the do while loop. It seems it fell out of style, compared to a for each or a while. I always feel a bit guilty when IntelliJ tries to autocomplete the do while loop and you just want a variable that starts with do.2
-
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
-
Endless loop from workstation to bathroom.
Enough coffee to make your central nervous system depends on it.2 -
Putting my draw_char routine in a for loop breaks everything... Doesn't when I just sequentially call it... Only when called from a for loop...
-
TFW you can’t figure out why your code is only running once, then realize that you forgot to put it in a loop.
(It’s in a try catch block so my brain interpreted that as a loop) -
I came across a website today when I was searching for some banking related stuff on Google and this is what happened...
Types search term in Google
Gets the results
Opens a result in a new tab
Finishes reading it and clicks back
Tab refreshes to go the website's home page (What!?)
Clicks back again
Refreshes to the same result page (seriously?)
Back
Home page
Back
Result
Back
.
.
.
.
Back
Google home page (wtf?)
Back
Website home page (again?)
Back
Result page (NO! I'M DONE)
Closes the tab
What sort of wicked loop did I get myself into? Did the website devs ever think how frustrated it will be if they ever open their own page?
And what a clever technique to open Google home page for people who keep on pressing the back button! 👏👏 /s1 -
My life:
Int main(nothing){
while(1){
drink(beer);
code(c);
sleep(the_next_time);
}
return 0;
}
/* compile error -infinite loop found- */ -
A v dumb C language question....
Consider this code snippet:
{
while( getchar() != EOF )
printf("a");
while( getchar() != EOF )
printf("b");
}
Is there some way to get inside the second loop? After I input some text, ctrl+D sends in the text stream and loop 1 executes, then the control waits at the test for loop 1 again, pressing ctrl+D again triggers EOF, but it ends up skipping all loops after24 -
I often read CSS and HTML are turing complete, but I can‘t figure out why. How can you loop with them?4
-
Was gonna talk to my PM today about stand ups going long, but then standup lasted right through our scheduled meeting. Feels cyclical.
-
while(projectManager === isAlive) {
me.work();
(!isAlive) ? new.projectManager : me.keepWorking();
} -
Do you have multiple screens? If yes, in what orientation?
I'm personally using 2. 1 horizontal and 1 vertical.
The vertical one is nice for long documentation and the horizontal one is mainly used for gaming.12 -
Are there any certifications worth focusing on? I'm fresh out of high school, doing an internship at a web dev company.
Everyone I've asked has told me to focus more on experience and the things on my github to prove that I can code, but I'm pretty sure have some certifications will help me somewhere in life.
I've looked into Cisco, Microsoft, Google, AWS and many more, but I have no idea where to start.
Any help will be appreciated :)1 -
My bos told me that you can't create a loop with glass fibre cables is that true? Why is it different from copper?13
-
If anyone is good with dart (or) other single threaded programming languages, i have this small doubt about the inner workings of the event loop and such and i would like an explanation if possible.
If you're too lazy to goto the link:
1. I have a future returned from a http request.
2. a future.then is declared that prints the http result.
3. A separate while(true) loop is declared that runs forever that just prints natural numbers.
4. the while loop also has an await future.delay that waits for 1ms before continuing with the next iteration
My question :
1. There's only one thread so how does the http download code run WHILE my main loop is still executing.
2. my future.then event is not processed unless i await a future.delay separately for 1ms. returning control to the event loop ? i don't get it how does adding an event help it process a prior event? It's FIFO ?
gist :https://gist.github.com/TheAnimatri...
discussion:
https://groups.google.com/a/...5 -
You ever want to keep figuring out a nested loop solution so it executes beautifully, but a deadline forces you to use a cheap solution outside the loop (module import) instead?
-
tabs spaces oses languages what about using I instead of counter or index as a variable for for loop2
-
Ooh, so you are a PRO JS programmer with *900000* years of bloody programming experience and don't know about the Event Loop..1
-
Trying to figure out what the API your company has been using does with 2 pages of documentation sucks! The explanation given to me was also pretty stupid: "So... you click here and then... uhm... this link, and uhm..."
-
Sometimes I feel like making a password cracker and hack someone's password using any API in a while loop6
-
Am only me gets bored during internship with java ee? Just robotic stuff, that repeats with every sansara loop
-
So i was told to make a code to iliterate through some categories from web... And then boss added subcetagories... And sub subcategories... And after a while a sub sub sub sub categories... Code was piling up and boss says "dont worry, you can do it"... So i ended up with a loop within a loop within a loop within a loop... About half a milion combinations... HOW DID YOU BECAME A BOSS WITHOUT LEARNING TO DO MATH BITCH?!2
-
in my country they create an authority to liquidate another authority. how do they liquidate that authority? inevitable stackoverflowexception2
-
How could one write a parser for BNF without causing and infinite loop in the following case:
Something ::= AnotherThing|Something
?6 -
Stacktraces of exceptions thrown in async code. When walking up the callchain just gets you in the schedulers dispatch loop...
-
Trying to add the loop function in my programming language, and for some reason it doesn't work, more specifically, it runs once and then stop, or it runs once and then trapped in a loop. So tired of this.2
-
I can work productively and for very long hours with a lot of stuff which many dev considers productivity hurdles:
- single small monitor? No problem (in fact in one occasion in which my roommate accidentally broke my laptop charghing port and I couldn't get a spare I worked on an iPad connected trough SSH to a Linux machine completing one of the hardest tasks I ever did without significant loss of productivity)
- old machine? That's ok as long as I can run a minimal Linux and not struggle with Windows
- noise and chatter around me? A 10€ pair of earbuds are enough for me, no noise cancelling needed
- "legacy" stack/programming language? I'd rather spend my days coding in Swift or Rust but in the end I believe which is the dev and its skill which gets the job done not fancy language features so Java 8 will be fine
- no JetBrains or other fancy IDE? Altough some refactoring and code generation stuff is amazing Neovim or VS Code, maybe with the help of some UNIX CLI tools here and there are more than enough
despite this I found out there is a single thing which is like kryptonite for my productivity bringing it from above average* to dangerously low and it's the lack of a quick feedback loop.
For programming tasks that's not a problem because it doesn't matter the language there's always a compiler/interpreter I can use to quickly check what I did and this helps to get quickly in a good work flow but since I went to work with a customer which wants everything deployed on a lazily put together "private cloud" which needs configurations in non-standard and badly documented file formats, has a lot of stuff which instead of being automated gets done trough slowly processed tickets, sometimes things breaks and may take MONTHS to see them fixed... my productivity took a big hit since while I'm still quick at the dev stuff (if I'm able to put together a decent local environment and I don't depend on the cloud of nightmares, something which isn't always warranted) my productivity plummets when I have to integrate what I did or what someone else did in this "cloud" since lacking decent documentation everything has do be done trough a lot of manual tasks and most importantly slow iterations of trial and error. When I have to do that kind stuff (sadly quite often) my brain feels like stuck on "1st gear": I get slow, quickly tired and often I procrastinate a lot even if I force myself out of non work related internet stuff.
*I don't want this to sound braggy but being a passionate developer which breathes computers since childhood and dedicating part of my freetime on continuously improving my skill I have an edge over who do this without much passion or even reluctantly and I say this without wanting to be an èlitist gatekeeper, everyone has to work and tot everybody as the privilege of being passionate in a skill which nowadays has so much market2 -
The time I can get a while loop to not crash the tab/application when I'm testing it for the first time will be the happiest moment of my life.1
-
Annoying monday - nearly no code but useless things like trying to use a Windows keyboard on some old MacOS X
On the other hand: for the first time I wrote a one line for loop in bash that worked - without googling!1 -
I watched my short duration YouTube video and i wanted to play it on a loop but mobile app doesn't have that feature so the only option was to manually tap on play button again and again. I just forgot about it and went watching other YouTube videos and suddenly this exact option appeared in three dot menu.
Do they analyze my app usage behaviour and turn on experimental features or what...3 -
I don't really like the way how JavaScript does a foreach loop. Either you have to use the "for in" loop, or you have to use the "Array.prototype.forEach" function which opens a new scope.2