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 - "while"
-
GF: Did you watch a movie while you were sleeping?
ME: (Syntax Error): How could i watch a movie while sleeping?
GF: No, the name of the movie is "while you were sleeping"
ME: oh, you forgot quotes for string17 -
<?php
wakeUp();
goToWedding();
while (atWedding() && bored()) {
browseDevrant();
}
goToTrainStation();
sleep(2700); // got there 45 mins early
while (trainIsMoving()) {
try {
workOnDevrant();
} catch (ProcrastinationException $e) {
// got distracted by devRant
}
}
goHome();
while (unrespondedStickerRequests()) {
sendResponse();
}
goToSleep();
?>11 -
While reading through the Elasticsearch (Java search engine) source code a while ago I found this gem:
return i == -1? -1: i;
I think someone should stop drinking while coding.
Some other nice lines:
int i = 0;
return j + 1000 * i;
Are these guys high?11 -
Parents who, despite clearly seeing a code on my monitor think that I'm playing games, and need to nag me to study cause they "rarely see me with the textbook".
I'm in an IT university and explaining that everything's in PDF or just online doesn't help9 -
I don't understand the phrase "once in a while".
If you execute something only “once“ then why you keep it in a “while“?10 -
Today I discovered MIT OpenCourseWare.
I hate university, and I usually doze off during lectures, but my god, I've been listening to "Introduction to Algorithms" for about 6 hours now, and I'm hanging on to every word.9 -
Wanted to make a python script that makes a file, deletes it, make another one with incremented title, deletes it and so on.
Fucked something up and ended up with ~20k files before ending the script few seconds later.
Gotta love the ideas you get in the middle of the night4 -
Fucxing finally! Payday! I've been living below poverty line this entire month and it feels good to be rich again 😎27
-
I am not a smart man.
Usually when I abandon project, I abandon it hard. Delete every trace of this failure, it never happened.
Well my friend doesn't, and two weeks ago he applied for a job as a game dev, and in resume he showed all of his work. Even the ones so barely functional that I wouldn't feel comfortable showing to my most compassionate friend. Somehow, he got it.
So for the past two weeks I've done nothing other than painstakingly recreating most of my projects in order to apply for the position before it fills.
Save your projects kids, no matter how crap they are. One man's trash is another man's treasure.4 -
My GF said I look so silent and innocent while working. She has no idea how much I curse the monitor in my head while working.3
-
I just had to update my BIOS while trying to update Windows while trying to update the Visual Studio Updater while trying to update Visual Studio while trying to update my C++ Compiler while trying to update the drivers for... my mouse. Mouse, of all things....3
-
Some dude in my university used Squarespace to make a webstore, presented it as his final exam in Web developement and passed with flying colors.
They didn't even look up the code or anything, just gave him max score and that's it. I hate my school...
Edit: a friend just told me that the guy didn't even made the site. He paid someone else to do it.
I honestly don't know what makes me more sad14 -
Ten hours of making a fully responsive website for a gf's university class in only pure HTML and CSS made me realize how much I take frameworks for granted.18
-
Reinstalling arch. I broke it while grading homework. Sad. Also worried my phone is going to ring and I'm going to not have my laptop ready.16
-
I'm a self taught "code enthusiast" (don't think of myself as a programmer just yet). I love to play around with simple code, but I could never get into a "serious" project cause in my mind, to be a programmer you need to know every single line of code and not rely on the internet.
The fact that I got into programming at 23 doesn't help cause I also feel like a parent learning to use a piece of modern technology(even tho I'm tech savvy).
Anyone got any advice?22 -
!rant
**Getting ideas to solve a bug**
While Coding:
🤔
While Eating:
💡
While Sleeping:
💡💡
While in Bathroom:
💡💡💡8 -
Monday : SSD dies
Thursday : HDD dies, so I take one out of the laptop to have a working pc
Today : Said HDD dies
Due to lack of hardware components for my pc to kill off, my current setup consists of 1 usb for live system and two more to act as storage
Next paycheck can't come fast enough9 -
I saw this code while searching in our QE repo... All our dev bay started laughing while I showed this... 😂😂😂😂3
-
I hate seeing Bootstrap under "Required skills" for the front end jobs.
Why? Why is it REQUIRED? Why not "Bootstrap is a plus"?
I know HTML,CSS and JS well enough to be able to do anything without a framework.
I know it might be faster, but that's only is you want similar looking websites.
I'm sorry Bootstrap, it's not you, I'm just not ready to make a commitment yet.8 -
Adventures in security land, part II:
I’m getting pulled off the security review team and instead relegated to part-time security tickets alongside my usual dev work. (So, someone else finds them, i fix them.)
Guess I found and debated too many problems with the lead dev’s code. 🙄13 -
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 -
I usually have a pen and notebook at my table while coding, to scribble while I'm figuring out stuff. Anyone else does this?14
-
Today at work while reading legacy code:
do {
...
} while(false)
Wanna cry and laugh at the same time22 -
Got a message yesterday from a company about some dev job that I applied for a while ago...
Don't remember anything about the requirements, but I know that they were exclusively looking for people highly proficient in spoken and written English.
From our brief chat, I can only hope that the position is for a FUCKING ENGLISH TEACHER!6 -
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 -
First year at uni, during c++ basis.
The professor has just finished explaining the while cycle.
Professor: We want the code to print all numbers from 0 to 40 using a counter. How would you do?
Classmate puts up his hand: we do 40 if statements and when we reach the 40th one we stop.
Professor: *face palm*9 -
XCode.........pffft....... more like
Xcuse-me-while-I-hang-myself-while-you-Code
Or more like
Xcuse-me-while-I-crash-myself-while-you-Code
Or
Xcuse-me-while-I-make-you-angry-enough-to-throw-the-fucking-iMac-out-of-the-goddamn-window-while-you-Code
Like WTF, I got reassigned to iOS development after a year being in web development and was genuinely excited to work in swift again. The excitement quickly faded away, seeing the goddamn IDE struggle to compile or run. I dont remember facing these issues in version 7 or 8. FML ;-;5 -
I don't swear while in office.
I don't swear while at home.
It takes me about an hour to get home, during that time tho ...6 -
Missed the opportunity to participate in a company wide gamejam cause I don't read my business emails 😢
but then I found out that anyone who doesn't participate gets those days off, which coincidentally fall on Thursday and Friday, and the Monday after that is a national holiday 😁1 -
While coding, I always listen to music. After a while, if I skip a song I know it's time for a break. The flow has been interrupted2
-
Let's do photorealism they said,
It'll look beautiful they said,
...
...
...
NO!
Fuck it, we're going with low poly. I'm not rendering one fucking tree, for three god damn hours!
(That's presuming that it doesn't crash during that period)
And yes I know it doesn't actually look that photorealistic, but hey, give me a break I just started. Plus I don't even wanna know how long it would take to render if it was done to look really fancy.13 -
A programmer heads out to the store. His wife says "while you're out, get some milk."
He never came home.
The poor guy is stuck causing serious problems at a grocery store somewhere.
BREAKING NEWS: Man stuck in 'while' loop crashes global milk market. Will authorities resort to ctrl-x? This story, and more, at 7:00.
UPDATE: keyboard interrupts proving ineffective, authorities discussing resorting to kill -9
Aaaand he's broke.
And he has ALL the milk.
Should read as "return home"
Unfortunately, she gave no instructions for terminating the loop.3 -
Fuck wordpress themes without documentation.
(Fuck wordpress alltogether but hey when it's mandatory it's mandatory)6 -
Two months ago, I went to an interview that I thought I aced... Time passed and I heard nothing. Got bummed cause it's one of the rare positions that doesn't require industry experience, plus a friend works there so that would be fun.
Yesterday tho, i received a phone call from said friend saying that he finally got an update on a situation (since the whole thing was kinda in the dark even inside the company).
Apparently, the boss who directly interviewed me fought to the nail to hire me cause I was most qualified (even tho I'm very modest and generally nervous as fuck on interviews), but was denied funds for the new department at the moment.
Still bummed about the whole situation, but god damn it feels great to know that I'm still the first choice if/when they get funds3 -
I don't remember desperately looking past page 1 of google search before I started coding.
So that's something -
Unpopular opinion: Fuck laptops
Even with proper care and monthly maintenance, they're still loud as a vacuum cleaner, and hot as a fucking stove. Yes I know it's a bit hotter these days and maybe mine isn't the latest top of the line model, but even my gf's Inspirion 17R (old I know, but she got one unused) tho relatively quiet, heats up as all hell even when it's on a cooling pad as soon as you try to do anything on it.
Maybe I'm alone on this, but I just think that when it comes to laptops, it's go big or go home. My Desktop PC is a relic of the past, but it still purrs like a fucking kitten, even under heavy loads in this weather20 -
Just got a whiteboard as a present from my gf. Decided to use to for flowchart, but I literally never made a flowchart. This...this doesn't seem right. Anyone got any experience with it? Where could I learn and are they actually useful?5
-
6 am, searching for the reason that put the programm in a non-responding state since 4 am. Turns out I forgot to manipulate the count variable in a while loop, so unless the first object wasn't the correct one, it hot stuck.
FML, don't programm when tired2 -
So, I told my programmer friend to bring food for us while you are out.
He has still not came, Should I be worried ?2 -
We are the 31, it is 00:54, I have a full specification to deliver on the 1rst at 00:00, and there is only half of it done.
Wish me luck for my doc New Year Eve2 -
this code is messy .. it has to be refactored..
abstact those classes to commom interfaces .. create a base class for all those common classes .. make this a parameter, make that a setting.. generalize this, pass a behaviour to that.. separate responsobilities..
hmm .. need to handle that special case .. let's just add a temp method for now to get it compiling .. //todo this later .. maybe add a couple virtual bools to handle the base class behaviour
238 compilation errors! .. let's do a static var for now on this.. and just add this for backward compatibility .. maybe hardcode that dll name, I know it'll NEVER change..
aah finally, all compiles..
oh..
this code is messy .. it has to be refactored.. -
Just got my first callback for a technical interview in JS tomorrow morning.
WOOOOO
*Brain*
"That's cool fam, but you just lost any ability to write anything in it."
...8 -
Probably the store owner talking to a customer about jerking off while he went like 5 years without sex.
(Im working a basic job while in college)1 -
Can't work on a project cause I need to study for an exam.
Can't study cause I keep thinking about the project.
FUCK!1 -
Life of dev
birth();
while(alive()) {
....code();
....debug();
....insertRandomBugRant();
}
while(dead())
{
....ThereWasBugInMyCode();
}
Fatal error: Call to undefined function birth(); on line 11 -
Earth keeps rotating
Seasons repeats
Life goes and come back
Machines in factories doing repetitive job
You sleep, you wakeup, you eat daily
... and y'all think loops are bad?2 -
Some of my colleagues have a joint birthday party, I'm here with them drinking beer. A friend here knows that actually today is my birthday. No one else knows and I hate boasting about myself and bringing attention to myself. I'm fucking sad today... Should have gone home to my family. If you have a beer at hand, have one on me!9
-
Amazing! My joke functionality worked and the server delivered it's content successfully to the client. The joke: malloc is wrapped to give that message and retry IMMEDIATELY. Expectation is that the computer that was already in panic mode gets even fucked up more because it's out of memory. My malloc is literally while((ptr=malloc()} == NULL) { show_warning()
;malloc();}. Imagine if it didn't give that warning, I would've never known that a malloc failed. Who checks their freaking malloc result? You should, but i do not see much people doing it.
The previous crash on screen is what happens if you're doing a get instead of a post. I just declare my server app indestructible btw. Ffs!5 -
int hairsLostCount = 0;
while(!Code.isWorking){
Code.tryNewUglyFix();
++hairsLostCount;
Console.WriteLine(
"While fixing the code you lost "
+ hairsLostCount
+ " hairs already."
);
}
Coder.doCoffeeBreak(); -
*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 -
There's this little, self-loathing sigh I do every time my program locks up because I forgot to iterate inside a while loop
-
Pick fun and enjoyment over money. I make considerably less than I could somewhere else, but I enjoy doing it.
Good and friendly co-workers are also a huge plus.1 -
So enlighten me here. Am I the only one that doesn't lose his absolute shit when it comes to privacy?
I know that some companies are collecting data, and to a certain extent, I'm fine with it as long as the trade-off is good.
I like that Google is "learning" who I am and what I like, cause now, I only see news and articles relevant to my interests, and search predictions are much better. Same with targeted Ads. On an off chance that I'm not using Adblock I like seeing products that I might like, which I otherwise probably wouldn't even know existed.
Except for Microsoft. I have no idea why, but that's where I draw the line.96 -
As a person who has a problem with authority (in group projects, not the law), I never really understood the need for the boss until I started making a game with a few friends.
IT.WAS.BAD!
I'm not just taking about noone actually doing anything other than throwing ideas ifbthey bothered to show up at all, but...and this is the worst of all, whenever we came to a mechanic that we all agreed upon, everyone had their own vision for it, that they defended like it's their firstborn. For two months we accomplished nothing, other than a few half baked ideas.
It wasn't until we "promoted" one of us to a "boss" status, that people actually started working.2 -
A funny story I just remember while my code is compiling :
Back in high school, in Math, we were taught how algorithm works, and we made some exercises with practical examples.
I didn't know anything about it back then, so was curious. Was pretty fun, but one day, my teacher said that a IF is a loop. I said "no, this is a test" but she keeps saying that it was a loop, ignoring me (I dunno if she actually heard me) and no one actually noticed it as she repeated it several times (while I was saying that it's not). I just gave up trying to say it's wrong.8 -
while(true){
while(beTired()==true){
goRelax();
}
while(beBored()==true){
goProgram();
}
}
That's a fucking infinite loop4 -
I wonder what kind of website's people like DaVinci, Van Gogh, Tesla Einstein, etc. Would've had nowwadays4
-
Ever turned the music off when facing a serious problem while coding? I do it too when driving in busy traffic. At least turn the volume way down.2
-
I love, love, LOVE Unity Engine!!!
Great tutorials, good documentation, helpful community, easy to understand interface...
It's all just... so beautiful.
I swear to god that I'm not shilling for them, I'm just so happy that, as a generally lazy SOB, I've been working for about 10+ hours now in one sitting, and I'm still not bored or frustrated that I don't get something.
God bless you Unity, I might actually make something outta myself...maybe...someday.8 -
I haven't touched a repository in a while, but my group had been committing to it for a while. I sometimes wish I could be this creative.3
-
Things common people do while in the toilet:
Facebook, Twitter, WhatsApp, Games, etc...
Things I do while in the toilet:
DevRant3 -
Computers fear my devaura. Everytime I get called to fix something it magically starts working when I enter the room. 5 Minutes after I leave it broke again.
Repeat like while(true)3 -
!Rant
Got my first job last week as a junior gameplay programmer. Dream job 😁
Well, more like a dream position than the actual dream job.
Proprietary engine and a new language are kinda hard to wrap my head around, but I've been having so much fun that by the time 4 rolls around I usually don't notice it and stay for an hour or so more.
I love it!4 -
*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 -
Been using Snapchat for a while.
But yesterday I uninstalled it. Since morning, while using YouTube, I've been getting advertisements to install Snapchat. Where is the privacy?3 -
"How do I make this AI work?"
[Debugs]
[Dirtyphonics and Sullivan King - Vantablack plays in background]
o shit here we go son
[ends up typing its lyrics while testing the chatbot]
Chatbot's response to the clusterfuck: "I don't understand"2 -
From last night:
Decrypting a LUKS volume group from a different install is a major pain in the drinking time. I can’t get this crap working no matter what I try. Ugh.3 -
Had my junior test at work yesterday, and...oh boy. I don't think I've ever been so stressed in my life.
>inb4 "welcome to the real world kid"
Yeah yeah I know but god damn, this was too much. I heard from seniors that you get used to everyday stress, it comes with the job, but junior test ( aka "stress test") is the breaking point for most "new" arrivals.
The test itself tho is not even that hard. Dealing with so much stress and time pressure for the first time is what gets you. Not knowing what happens if you don't pass certainly doesn't help.
I broke down at one point and even after finishing, going home (got no sleep) and coming back today, that feeling of hopelessness is still there.
No real point to this rant, I just needed to vent6 -
Facebook be like
We put react-dom in your react so you can dom while you react and we also put react-native in your react so you can native while you react but we also put react-native-web in your react so you can dom while you native while you react3 -
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 -
It's 6am and I could only sleep for 4 hours, if I don't get my morning coffee soon I'm going to cut a bitch
.
.
Also please save the usual "I didn't sleep for a year while climbing a mountain while breast feeding orphans while curing cancer" kind of comments4 -
My Frankenstein monster.
Scraped out of discarded parts thrown away by friends and ex's (in most cases easily fixable by changing fried parts).
It looks like shit and runs even worse, but considering that out off all the setup only mouse and keyboard are actually bought and not 8+ years old or held together with glue and hope, I'm quite fond of it.2 -
So my friend told me that he recommended me to be a new Creative Engineer.
-Oh shit, sweet, what are the requirements?
-I don't really understand that kind of stuff man, just look it up, here' the link
*Hmmm*
-Html,
*ok*
-Css,
*mhmm*
-Javascript
*sure*
etc etc...
and,
Actionscript
...
Excuse me?
Who the FUCK use actionscript nowadays ???2 -
Pet peeve #1: those guys who iterate over a whole array with 'for' and 'break' on a condition. Have you ever heard of fckng 'while'??
Git source code will be the death of me.3 -
Actual production code:
while(1):
//A few lines of code here with a conditional break.
while(1):
//More code.
Have you ever just had nested infinite loops...4 -
"Deal with the difficult while it is yet easy;
Deal with the great while it is yet small." - Tao Te Ching -
I get in to the office today, and I'm informed that my ceramic origami swan (https://devrant.com/rants/1231342/...) fell and broke during office cleaning.
I'm now afraid to bring new stuff into the office for my desk2 -
I just spent a whole day learning wordpress cause it's mandatory for my graduation project and I'm still not quite sure what I'm doing.
I'm proficient with HTML, CSS, Javascript and PHP enough to make the damn thing in less than a day, yet here I am strugling with the damn plugins and themes... It just looks too chaotic for me.6 -
So the gf just came home, threw this in my face (literally, but not intentionally) and said "they were giving these away, thought you might have fun".
I've only heard of raspberry pi, arduino and such, but never actually used one.
Anyone have any experience with this thing in particular? Can I actually do anything with it or is it mostly for learning?7 -
Well it's been a while I suppose. Sorry I haven't been around for over a month guys. That's what happens when you're a full-time student with a full-time job.
Unfortunately, or fortunately depending on how you look at it, I need some advice/help. I've been working on a senior thesis project that I'm trying to deploy but I'm going crazy trying to figure out how to do it. It's a Spring Boot Java application built as a micro service. I've tried for the past 5 days to get this sucker working on Cloud Foundry with no luck. I've got a deadline to get this fucking thing live in 2 weeks and I'm getting closer to being in a panic. My question basically is, would it be easier to learn a different service/build my own solution from scratch then trying to fuck around with this? I'd appreciate anyone's advice who's had more experience with deploying Java web applications.
Here's a link to the project if anyone's interested: https://github.com/starrynights89/...21 -
Programming while drunk:
if (not drunk !== yes) { then return dance.png } else {return 'idk"}
I shouldn't rant while crunk let alone program 😂🙄5 -
From what I’ve seen and experience while messing around with other languages, PHP and Rust have some of the best while C# has the worst.8
-
I hate sleeping, I always think about the possibility of the work I can do in the time I would have saved from not sleeping
Lou
Looks like a waste of time, but can't skip this one!4 -
Spent 2 hours wondering why Unity Engine sees my 2 joysticks as Joystick 1 and Joystick 5 (or 6 depending on a UBS port).
Turns out, for some reason, Unity remembers ALL the ports that were ever used (even with the usb extender). That's documented...exactly nowhere. Ok, at least I figured that out, but what am I gonna do about it? Nothing, there's no way to change the order.
So after a quick nervous breakdown, and a cigarette break, I decided to build and run the game, just to see how it looks, and...what's this?
Everything's working! Unity removes all the joysticks from it's array and puts only active ones in the right order and that too is documented...NOWHERE!
Ugh... Unity I still love you, but god damn, GET YOUR SHIT TOGETHER!!!
Needless to say, this day is an emotional roller coaster.1 -
!dev
I just discovered that I could use a comb to shave myself while retaining some facial hair. Something is wrong with my life.7 -
Going to a student study center. (Not sure how to explain, but it's basically huge library without books?)
Huge quiet space with tons of people studying just makes me want to focus on my own things.
So, group mentality I guess1 -
Do you test your codes while coding or after completion?
I test while coding.
PS:- I'm web developer.15 -
I'm new to speech recognition game, so I was wondering what's the advantage of Tensorflow's audio recognition over Microsoft.Speech in Visual studio, if any.
Also open to any other suggestions/lectures on the matter.1 -
So my gf told me about a job offerin she heard. They're looking for Python dev for a weather website.
Cool sound good.
Thank god I went for a drink with friends that night cause when I mentioned the job...well.
Apparently this dick pays about a 100$ LESS than a MINIMUM wage (not to mention the hostile work environment).
Honestly idk how they even stay afloat. I mean you can make almost DOUBLE working at McDonald's. -
So my rant of Squarespace few days ago got me thinking:
Do you think that with the rise of Squarespace, Wix and similar WYSIWYG services, knowledge of HTML, CSS and to some extent JS will become obsolete as a career?4 -
boolean experience = false;
boolean get_a_job;
while(!experience){
get_a_job = false;
while(!get_a_job){
experience = false;
while(!experience){
get_a_job = false;
.....
«To infinity and beyond!»8 -
*coffee time 5 issues*
*While solving issues 4 more issues*
*Total 11 new issues while leaving office*
Do testers realise the gravity of time?3 -
Just heard about Malbolge and I just need to ask...why???
How border do you need to be to make something like this? And why?
I mean I heard about brainfuck , small and huh? before, but this is some next level shit4 -
-get an idea for a game
-lay down the plan
-prototype with basic shapes
-max hype
-realize that I can't draw/model to save my life
-give up3 -
Started learning React recently cause the job I applied for reqires it.
So far so bad.
I...I don't get it.
It might be that I'm just starting out, but I can't see any practical use for it. I don't GET it.
Ugh..never been this frustrated (which I'm guessing isn't helping the learning process.)
Gonna have to wing the shit outta that interview.7 -
anyone here has experience coding high before? can you even focus. 😂 Just really curious, please share.10
-
Been in the zone for a while..emm a long while...a pretty long while.
Need human interaction. So, umm Hiiii !!!2 -
One thing that i found in common among most of rants was devs getting annoyed by people who interrupt them while coding, obviously it's because we love what we do while in most jobs they wish for someone interrupting them so they can stop working for a while
-
Google apparently blocked users of small browsers like Konqueror, Qutebrowser or Falkon from loggining into their account, because of "security" concerns. Well played, Google! I hope you will be happy if a few users will switch to your data crawling machine.9
-
Class constantEnergyStruggle():
def energyLevel(self):
while work.working():
drainEnergy()
while work.dayOff:
thinkAboutWork()
drainEnergy()
while dreaming:
thinkAboutWork()
drainEnergy() -
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 -
So, a while ago i thought i was the inventor of the while-if. If a while statement fails, it would execute the else behind it. I had that idea for the C language:
It looks like this:
while(false){
// will not be executed since while condition is false
}else{
// will be executed since while condition is false
}
I've contacted the C work group if it is something to build in C since it prolly won't break any existing code bases.
I was enthousiast. Imagine if you could invent a new feature to such a classing language.
I got response back: is it like the python while-else?
Me, been while have been python developer for a while, finds out NOW that python has it already! Damn, such a great language.
while False:
# won't be executed
else:
# will be executed
DAMMIT! Still, they said that it doesn't mean it won't become a standard and got requested more examples. Did that ofc. Let's hope20 -
Not so much of a "tool" but as someone with a small monitor, I can't imagine my life without workspace in linux and/or virtual desktop on win 10
-
There's a 3 Lane street and 2 self driving cars are in the middle Lane but heading for each other.
What do they do so they don't crash?
What if they can't brake?14 -
define myDay() {
if (time==0600) {
while (sleeping == true) {
xiaomi.miBand.vibrate();
}
}
morningCoffee = new coffee("Strong");
sleep(120); // Gotta let that cool
while (morningCoffee.state.empty == false) {
morningCoffee.drink();
}
while (time > 0630) {
putFaceOn();
}
leaveForStation();
while (train.overground.atStation() == false) devRant.scroll;
getOnTrain();
while (train.overgrond.atStation("Kenton") == false) devRany.scroll;
getOffTrain();
getBus();
while (getToUni == false) devRant.writePost.wk4;
devRant.uploadPost.wk4;
while (time > 1300) project.workHard();
while (time > 1400) lunch.obliterate();
while (time > 2100) project.meetDeadline();
walkToFlat();
goToBed();
}3 -
So this isn’t a programming related question.
Does anyone know if learning things while listening to something while you sleep actually shows results?7 -
I'm fairly confident that my PC has grown sentient, and is fucking with me on purpose.
It crashes about 2-3 times a day, but never when I'm actually on it, only when I go to the bathroom, to the store or out with friends so that I don't get to see the error on the BSOD. -
Lessons While Installing Linux #37: Trying to install GRUB on a GPT drive while in non-UEFI mode doesn't work.1
-
While while is still useful sometimes, all hope is lost for for.
For each for each that I use, I love it more and more.15 -
Do we have any White hats in here?
Looking to get into it, but no idea where to start. Any tips/recommendations are welcome.
Also how much is CWHH necessary to be taken seriously?3 -
Sooo I was wondering what you guys listen to while coding?
I mostly listen to instrumentals, feel like anything that has words can sometimes be distracting.
Was thinking of listening to audio books though lol. don't know how it'll go XD.
What do you think?31 -
def haveNiceDay(){
while code.works():
if frustration == true:
game.play()
food.eat()
keepCoding()
if error.notResolved():
while giveup!= false:
screen.stare()
} -
Need help with choosing a JS framework for making games. So far I heard only posotive things about Phaser. Any other recommendations or thoughts on Phaser?1
-
Any OS recommendations for my old HP Pavilion g6?
Something a bit less known, along the line of elementaryOS (but stable) or Deepin (but not Chinese spyware).22 -
My company laptop is windows so while working there it auto restarted out of nowhere while I was working and in the verge of something. Fck windows!4
-
Today is bank holiday in the UK. Fucking boss slacked me to say he needs graphql n mongodb wired up by tomorrow. I almost tell him to fuck off, today is not work, bitch1
-
Choose my editor/ide based purely on other people's opinion.
It started when I knew literally nothing about programming. It got better over time, but I still tend to trust other people's opinion before mine1 -
import datetime as dt
while(True):
time_left = 24
work_hours = 8
trained_today = False
while(work_hours>0):
do_work()
listen_to_music()
browse_interesting_feeds()
work_hours -= 1
time_left -= 1
while(time_left>0):
if trained_today == False:
train()
trained_today = True
eat()
if dt.datetime.now().hour > 23:
time_left -= time_left -
If my thinking was stuck in a while statement but didn't know what a while statement was, would I know I was stuck in a while statement?1
-
While everyone is hating proper programming languages... Let's talk about quotes in batch files.
What the actual fuck did Bill smoke while developing this boolshit?2 -
What music do you prefer while writing / reviewing codes, that is, when you do not need immense concentration and can afford to listen to music?
I generally open a playlist of any band I like on youtube.6 -
Finally created my first thing ever, a chrome extension. It was only when I finished it and tried to upload it to the web store that I saw that all new extensions are bound to Chrome OS.
FML2 -
#!/bin/bash
# An ideal work day
# Wake up naturally, keep sleeping until I won't wake up as a zombie
TIMETOWAKEUP=$(while ps -eo state,pid,cmd | grep "^Z"; do sleep 1; done)
# Work, between 9AM - 5PM, weekdays only!
TIMETOWORK=$(while [ $(date +%H) -gt 09 -a $(date +%H) -lt 17 -a $(date +%u) -le 5 ];
# Do cool work and get paid, every second.
do $COOLWORK && $GETPAID; sleep 1; done)
# Home
TIMETOCHILL=$(while $ATHOME;
# Do cool work, without getting paid, and spend money made from $TIMEATWORK
do $COOLWORK && $SPENDSPENDSPEND; sleep 28800; done)
$TIMETOWAKEUP; $TIMETOWORK; $TIMETOCHILL
# I don't get out much -
Hi,
Maybe this question has been asked before..But
What music or radio you listen to ( if you do ) while working ?
Do you have any recommendations? Share pls
For me I mainly listen to Deephouse mixes or piano complications
Soundcloud && YouTube9 -
What kind of music do you guys listen to while coding?
For some weird reason my concentration increases while listening to pop, which I usually hate.13 -
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
-
Today I found this while filling my examination form, I think somebody gone crealess while handling production db........
-
I wonder if anyone ever put something like brainfuck, huh? , small or anything similar in their CV alongside something useful, and got hired by the sheer absurdity of it.
-
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 😂
-
*coding while day* "no motivation not inspiration.. need more coffee" && *coding while night* "I can see the matrix and bend it to my will"
-
quit dev rant for a while but thought i’d bounce back here while i’m taking CS50x so: hello, world6
-
I'm wondering if anyone worked in Microsoft as Data Labeler?
I'm supposed to have an interview in about a month, but since I stated that I know at least basics of C#, Java, and Python, they said I'd have different kind of interview.
I would appreciate any kind of advice, since I'm getting anxious cause I don't know what will be expected from me now cause u usually don't need any coding skills for that job
Edit: the new position is somewhat of an alpha tester I think5 -
How’s the tech layoffs doing? I was considering leaving a while ago. But maybe it’s a smart move staying for a while…4
-
while(!me.isDead){
if(!dayStar.isOverhead)
me.Thread.Sleep(dayStar.riseTime() -DateTime.Now);
var totalCodeTimeToday = new Timespan();
while(dayStar.isOverhead){
if(me.isHungry())
me.Eat(food);
totalCodeTimeToday.addTime(me.Code().Duration(tenMinutes));
if(totalCodeTime >= eightHours)
me.Relax();
}
} -
Woohoo! Devrant on HN! Kinda reminds how when you google "xcode sucks" the top result is a devrant post.
Heh, I was just thinking how I never really used devrant in past while. It's almost like a sign.7 -
Never disturb a programmer in heat !
.
.
.
.
.
[RIP to all the lives lost in Uri and NYC.
this planet has no place for terrorism.]1 -
Primary debugging tool while working with PHP: print_r();
Primary debugging tool while working with Angular: Developer Console logs
Primary debugging tool while working with Node JS: Node Terminal.
What's yours?3 -
I've been working on a problem for the last few hours and not getting anywhere ... so here are a jokes ... coz im bored
What do you get when you cross an insomniac, dyslexic, and an agnostic?
Someone who stays up all night wondering if there really is a dog.
-----
I went to a bookstore and asked the saleswoman, "where's the self-help section?" She said if she told me, it would defeat the purpose.
-----
I'm addicted to drinking brake fluid , it's ok I can stop when I want
-----
what type of monkey explodes - a Baboom
-----
my brother has. taken being sent to jail really. He has been refusing food and drink, spitting and scratching anyone who comes near and he smeared the walls with his s**t.
I'm not inviting him to monopoly night again. -
!dev
For fuck sake I hate this day already and its only 10am. I had to go to an exam. I live 200km away from my uni (only have a few classes, so collage is not worth it). I woke up at 4.30 to arrive in time. My car was wrecked 2 weeks ago so I've asked for my mother's car and guess what?... That fucker died on the road. Had to call my dad at 5.50 AM.
I've managed to arrive 7.58 at the classroom, and that retarded dimwit dared to tell me that next time I should hurry (exam started at 8), because they'd already started.
During the exam while I was literally sweating blood that same asshole comes to me that his pocket device detected data traffic coming from where I sit and whether I have a device switched on. It was me though, a devRant notification to be precise. Luckily he just asked me to switch it of, but that 2 minutes of fuckery could cost my pass grade.
Now I am heading back for the broken car to be towed back home. What a wonder-fucking-ful day I have today. And it is still a question, whether I will be able to go to work tomorrow or not. -
Maybe it's just me, but:
1. Never works on first try:
doStuffWithWhile()
while (someShitIsNotOver)
doShit()
2. Works like a charm:
doStuffWithManualLoop()
doShit()
if (someShitIsNotOver)
doStuffWithManualLoop()6 -
accidentally drop my phone while streaming this app and hit my lips... cursing and bleeding. feel like Angelina J lip for a while... damn this is hurt3
-
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
-
Code while listening to John Oliver's Last Week Tonight in the background. Sometimes it gets so hilarious you forget what you were coding while coding... :)1
-
Hey Listen..
Aren't You the one Who makes life decisions while doing shit and,
Does Shit while Taking Life Decisions. -
The music which I listen while programmimg <3
https://youtu.be/TkZmwoRy__c
It makes me feel like HACKERMAN while im only doing HTML/CSS stuff 😂
By the way... What music do you listen while programmimg?2 -
Anyone experiencing grub installing error while installing new distributions???
The only time I don't experience the grub error is while installing POP OS by system 764