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 - "if"
-
buzzword translations:
"cloud" -> someones computer
"big data" -> lots of somewhat irrelevant data
"ai" -> if if if if if if if if if if if if if else
"algorithm" -> something that works but you don't know why
"secure" -> https://
"cyber security" -> kali linux + black hoodie
"innovation" -> adding something completely irrelevant such as making a poop emoji talk
"blockchain" -> we make lots of backups
"privacy" -> we store your data, we just don't tell you about it40 -
I have decided to learn how to fix the printer. Because it seems like it is the number one skill in demand..11
-
GF: "The Internet is broken!"
Me: "WHAT?! Sound the horn! Raise the alarm! Call gondor for aid! The Internet is broken! Does the president know?! Save yourself fools!"
*skips away on pretend horse*4 -
Typical paranoia's when developing a website
- what if the user has JS turned off ?
- what if he is using the site without a monitor ?
- what if the user's electricity is off ?
- what if there's no user ?12 -
If money is lost,
Nothing is lost.
If health is lost,
Something is lost.
If CHARACTER is lost
8 bits are lost.2 -
if (num == 1) suffix = "st";
else if (num == 2) suffix = "nd";
else if (num == 3) suffix = "rd";
else suffix = "th";12 -
Is it just me or am I the only one who gets pissed if someone checks the expected result of a variable first?
For example:
if(true === $var)
Instead of:
if($var === true)19 -
So Python doesn't have switch-case statement... I feel so dirty having to use multiple if-elif-else
*sigh*12 -
F in Internet explorer stands for fast!!
U in client stands for understanding!!
C in iPhone stands for customizable!!
N in US stands for net neutrality!!
B in devRant stands for boring!!20 -
Why the hell do people call smartphones by Apple "iPhones"?! Whenever people call their phones iPhones I start calling my phone by the model number.
Idiots: Oh no! I've lot my iPhone 7s!
Me: Oh no! I've lost my Oppo A37f pink edition!
See, sounds stupid right? Imagine it in everyday life!
-We're packing for camp! You! Take your North Face N638 grey
-Done!
-You, other guy! You will ride your BMX X Black!
See? It does sound stupid!
TL;DR
If you're saying iPhone, you're a fucking idiot. (it's like saying Googling instead of searching the internet)39 -
It's also my only finished project so far: an alarm clock
Made for ~2 days, because I couldn't get up on time.
Currently flashes light into your eyes and buzzes with a piezo crystal and has wifi15 -
So I hear Christmas is coming, right? Here's a christmas tree for you!
P.S. this is the real thing. It's a Java project we have to work with... For Christ's sake! The guy who wrote this has recently left the company and handed this code to us as his legacy.
fuck.16 -
Just found this precious gem in the legacy code I am maintaining! How do you check if a string is empty :-D ?5
-
me: your code base is vulnerable, you are not using prepared statements
him: not an issue, nobody knows
me: ...
me: ¯\_(ツ)_/¯13 -
Opens Facebook
Sees ad: "this machine uses AI to make pizza bread".
Closes Facebook
Goes back to sleep1 -
You know what I realized we should always say no for demo driven application development.
We should always ask for enough time do a proper development and if its not enough, shouldn’t write a single line.
Because once we deliver a working demo. Its release ready for them because its FUCKING WORKING..
And trying to explain why this is just a demo and cant be put to production is even bigger pain in the ass than saying no in the beginning.
LESSON LEARNED .4 -
I write code,
I am a writer.
I fight with bugs,
I am a fighter.
I optimise code,
to make it tighter.4 -
Seniors: Welcome to the team. Feel free to ask anything if you need help. There is no such thing as stupid questions.
New Dev: Sure. Thanks.
*a few minutes later*
New Dev: How to comment a code?
Seniors: Google it....and please don't ask stupid questions.11 -
I just changed a bunch of comments, log entries, and removed some blank lines from one of my controllers. Zero functional code changes. Everything worked before; now it runs only half the code, breaks, and throws strange errors.
Fucking hell.
Screw today.6 -
string work_it, make_it, do_it, makes_us;
if(work_it=="harder") {
make_it="better";
if(make_it=="better") {
do_it="faster";
if(do_it=="faster") {
makes_us="stronger";
}}}3 -
AI in a nutshell
if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if if else6 -
I love devRant. But the people constantly saying "Python is shit" OR "Windows is for idiots" OR "Never use C it's ancient" OR "Microsoft sucks" OR any other fucking subjective opinion that's absolutely worthless drive me crazy.
I see many people here asking "Should I do [option1] or [option2]?" And the only responses are "[option3 which is not a fucking option you degraded fuck who thinks his/her opinions somehow matter in this discussion while they are clearly NOT helping]"
Sorry but this place has "Rant" in it's name so I thought this would be appropriate.22 -
My team mate has just found the best conditional statement I've ever seen, in a source code he received from the client.
if (1 == 1)... and it has an else branch :D11 -
bool success = false
if !success {
success = try()
}
if !success {
success = try()
}
if !success {
throw new GiveUpException()
}8 -
So my team lead told me in a code review that you shouldn't use 'else if' in code.
Instead you should best them like:
if
else
if
else
if
else
Apparently that would improve readability...
Am I crazy, or what?18 -
to the guy who writes indented IF statements all one liners and brackets removed
please fuck yourself6 -
What’s wrong with me?... Found myself spreading my finger and thumb on some food packaging cooking instructions hoping to zoom in and read it.5
-
I so hate the following statement
if (condition)
makeOperation()
I prefer
if (condition) {
makeOperation()
}
Who is with me?14 -
StackOverfllow -> Copy Code -> Doesn't work -> Study its working -> Read related info on other websites -> Code starts to make sense -> Do the required changes in code as per the understanding -> Got it working.
I only learn if the initial 2 steps fail. Else I skip the latter. -
*bunch of if statements*
Friend shouts proudly everywhere : I implemented an AI!
Me : but that's not how AI works
Friend : but it works just as an AI, so it is one, who cares?
😥3 -
If programming languages had honest slogans, what would they be?
C: If you want a horse, make sure you feed it, clean it and secure it yourself. No warranties.
C++: If you want a horse, you need to buy a circus along with it.
Java: Before you buy a horse - buy a piece of land, build a house in that land, build a barn beside the house & if you are not bankrupt yet, buy the horse and then put the horse in the barn.
C#: You don’t want a horse, but Microsoft wants you to have a horse. Now it’s up to you if you want Microsoft or not.
Swift: Don’t buy an overpriced Unicorn if all you wanted was a horse.
JavaScript: If you want to buy a horse & confidently ride it, make sure you read a book named "You don't know horse".
PHP: After enough optimization, your horse can compete the top most horses in the world; but deep down, you'll always know it's an ass.
Hack: Let's face it, even if you take the ass from the ass lovers and give them back a horse in exchange, not many will ride it.
Ruby: If you want a horse, make sure you ride it on top of rail roads, even if the horse can't run fast on rails.
Python: Don't ride your horse and eat your sandwich on the same line, until you indent it on the next line.
Bash: Your horse may shit everywhere, but at least it gets the job done.
R: You are the horse. R will ride you.
Got this from Quora.
https://quora.com/If-programming-la...7 -
Just found this while trying to understand some code:
```
bool ok = true;
if(ok) {
// lots of code here
} else {
// even more code here
}
```
I thought this was worth my first rant...6 -
“If it happens once, it’s a bug.
If it happens twice, it’s a feature.
If it happens more than twice, it’s a design philosophy.”1 -
Someone asked me what a full stack dev is... I replied:
"A highly sought after programmer with the world of opportunities and no time to pursue them."
I think I nailed it.3 -
Unpopular opinion: I hate when people start their rants with "unpopular opinion". Most of the time it seems like a pretty standard opinion too! "Unpopular opinion: I hate Wordpress" Yeah so does a lot of people! Just rant for rantings sake! Don't give me your inaccurate market research as a part of the deal!5
-
Just waiting for the day were a head hunter mail starts with: "We saw your profile on devRant and found it very interesting how you comment your daily anger while being a dev....."3
-
the fuck kind of manager are you that you tell your leads not to fucking answer their damn phones when services need restoring????? If your fucking team member can do his damn job like a grown ass adult, but sees that you (his lead) made a change and has questions, your ass better answer the phone, or i will rocket launch it up your ass, straight into your brain so it's the newest, latest, fucking hippest trend and hooked into your system so you answer every fucking call hands-free. Even when fucking "Windows Tech Support" calls you every 30 minutes because your keep expired.
There are people counting on you, worthless fuckwipe. Get. The. Fuck. Over. Yourself. And do your fucking job.
Edit: phone tried to censor me5 -
You have a question.
You google it; nothing comes up.
You read the documentation; no good.
You ask it on stackoverflow; no answer.
You are in... The Twilight Zone4 -
I'm torn -- shiny new macbook pro, want to keep it pristine for as long as possible, but I've also got a burning desire to sticker it up.25
-
found this in our codebase today
try {
//do something
} catch () {
try {
//do something else
} catch () {
try {
//do something else else... this goes on 4-5 levels deep
} catch () {
//log... couldn't do
}
}
}9 -
What if we were the AI created by God to automate repetitive tasks and now we are making AI to automate those repetitive tasks and this goes on and on until the world gets a stack overflow.9
-
If money is lost,
Nothing is lost...
If Health is lost,
Something is lost...
But, if character is lost,
.
.
.
8 BITS are lost 😜1 -
Refactoring nested ifs.
I'm not a pro but I despise working with nested ifs. It's hard to debug and read.
If you cant chunk the if using method, i think you can use ifs like this:
If(){return}
If() {return}
Not like this:
If() {
If() {
If() {
}
}
}
😠😠😤🙅😢8 -
Kids use "if(condition)"
Men use "if(condition == true)"
Legends use "if((condition == false) == false)"12 -
You know what drives me crazy.. seen this inside code of "senior devs"
If(something() == true){
// do something
}
Dude!!! The if only happens if its true!
Code this..
If(something()){
// do something
}
OHHH but if i say something I GET IN TROUBLE.4 -
What if devRant made this app just to see how to improve their own company without looking like shit?1
-
This is an example if statement:
if(bla.boolean()){
}
Bill does NOT put comments into the condition brackets.
Be like bill.
Please.11 -
Please Google, allow us to disable that retarded Google translate thing you've got going on the play store.
Seriously, 90% of the apps' short description are absolutely unreadable because they insist on translating it to my device's language even if no translating is available.
I know it's probably useful to some people (the ones who don't understand English but somehow understand the human language equivalent of spaghetti-code, which I suspect is not many), but this needs to be disable-able, it makes the experience of discovering apps extremely awkward.9 -
1. Hit everything you do. You will learn more faster. Don't accept things at face value, care about why things work.
2. Study and experiment constantly. Be aware of your surroundings and what is going on. If you're not ready with a solution when a power vacuum appears, you will always be a grunt. Or worse, eventually a manager who everyone hates because you constantly tell the people who report to you how "back in your day," your code was amazing, there were no bugs and your shit doesn't stink.
3. Be honest with yourself: If you just want to keep your nose to the grindstone and make manager so you don't have to code anymore:
Quit. Stop now. Do not pass go, do not become a cancer on the industry.
Go get a job as a PM, you'll have a better career and you won't be the weak link holding everyone else back.
Tl;dr When the shit goes down, you better be ready.1 -
Google:- Google home is using machine learning to remove all type of back noise like traffic, air, and others so the call experience goes smoother.
Microsoft:- In Skype we are using machine learning to catch all type of back noise and mix it with your voice. Skype will try every possible way to make your call experience as bad as possible. Every type of noise Trafic, Air, hardware, your breath if there is nothing! the software will cut your voice and send only a few parts.4 -
Here I am trying to get some tickets for a theater, and I noticed an interesting thing. It seems that the website holds no session persistence. In other words it doesn't check to see if the user has stopped trying to order tickets, instead it holds the seats for about 30 minutes. This is kind of stupid because when you back out, your treated as a completely new session, you have no way of trying to get back the seats you had chosen.
Sooo, what does this mean? It means that I can start selecting a bunch of seats and continue selecting a bunch of seats. There appears to be no server-side checks to prevent someone from just booking the entire theater.
Soooooo, what does this mean? I could potentially spam the entire country's theaters (any that use this website as a booking system) and make it impossible for people to book seats through this website.
What do you guys think? Is this a bug or feature?6 -
What's the point of abstraction layers if you're riddling all the code with
if (AbstractionLayer.SomeType instanceof ImplemantationLayer.SomeTypeIml1) {
// do stuff
} else if (AbstractionLayer.SomeType instanceof ImplemantationLayer.SomeTypeIml2) {
// do stuff
} else if (AbstractionLayer.SomeType instanceof ImplemantationLayer.SomeTypeIml3) {
// do stuff
} else if (AbstractionLayer.SomeType instanceof ImplemantationLayer.SomeTypeIml4) {
// do stuff
}
???
Seriously.. Guys. Am I missing some point here?9 -
I swear, if I ever were to develop a support ticket system, I'd require credit card credentials for P1 tickets - "for covering potential costs to get the developer to the computer at this point in time". Let's see how many of your fucking tickets are Business critical after all!5
-
I miss cigarettes.
Sometimes I am dying for a smoke.
This would happen to you after dealing with the web services of 2 campuses. Should have never stopped smoking eh?
Fuck11 -
Else if, elif, elseif, if else garrgghj. I can never remember what it is in whatever language I happen to use...13
-
Hello (World)! Noob here. I installed devRant around 5 days ago. I just keep reading the rants and didn't created my account because i was not sure if i will stay here for long time coz most (cr-)apps are boring.
After 5 days:
I owe all of you a tons of '++'.
I want a boss like @Linux have. (i know tags work only in comments)
Gonna stay here till i stay in IT industry.(maybe)10 -
Today I finished my robotics project. I had in my team a total idiot (the one who used the hidden divs, some might remember from another rant). I wanted to share with you the beginning of a ranting adventure.
Me: "you can begin with a simple task. I will send you the obstacle avoidance sensors values from Arduino, and you will send the data for the Arduino motors to dodge the obstacle".
The sensors give 1 if clear, 0 if obstacle is detected.
Below is his code (which I brutally rewrote in front of him).
Now, in the final version of the robot we have something like 9 sensors of the same time to work with.
Imagine what would have happened if we kept him coding. (Guess it: 2^9 statements! :D)
I was not that evil, I tried to give him some chances to prove himself willing to improve. None of them were used rightfully.
I'm so fucking glad we finished. I'm not gonna see him anymore, even if I'd like to be a technical interviewer for hiring just to demolish him.
I'm not always that evil, I promise (?)
Ps. He didn't even have any idea on what JSON is, even if we had already seen it during FIVE YEARS of computer engineering. (And should've known anyway if he had a bit of curiosity for the stuff he "studies")10 -
I’m privileged to work with hEaD oF eNginEeriNg.
If site == ISO:
from ISO import *
If site == ISO:
from ISO import *
If site == ISO:
from ISO import *
If site == ISO:
from ISO import *
If site == ISO:
from ISO import *
….
This repeats 11 times.12 -
O'joy has come, it is time to make the best if/switch statement...
Worst part I can't see a pattern in this, so I have to hardcode all this shit.
Even worser part, it has to be updated yearly... woop w00p9 -
I guess someone couldn't be arsed to dedent a whole load of code. I can't really criticise though: I do it too.4
-
We upgraded to Dyn Managed DNS last month, now we're down with the DDoS attack! If we didn't upgrade from their standard plan, we would be online still 😂1
-
COBOL is something I use at work. Typically, you see IF blocks like this
IF condition
Stuff
END-IF.
But the END-IF part if actually optional. You can just use a period and it does the same thing.
IF condition
Stuff.
Many headaches if not caught when reading.6 -
That time you waste hours searching through a perfectly good method. Turns out the outcome is overridden because you forgot an else in an if-else statement....
-
*code reviewing someone's work*
OMG! if-statements within if-statements! This is an IFception! *prays*4 -
I have one confession.
I have never ever in 15 years of coding used switch case...
Never liked the syntax.
Am i the onlyone ?17 -
So, for my C class, the computers in the lab are using VS 2015. To be able to compile C we have to change some settings to allow the program to compile.
I like to use my computer (with Arch Linux) and use my tools (Vim and GCC).
The guy next to me was trying to do the homework, but he was struggling. I decided to give it a shot and I was able to do it, so I showed him my code and he tried it in the computer.
The program crashes every time no matter what. We asked the professor. I show him my code and how it's working. Apparently he was confused because I was using the terminal and not VS. So he proceeded to said that it's because I'm not using VS2015 and GCC is doing the whole work for me.
I'm like ಠ_ಠ and then he keeps saying that he doesn't know what or how GCC works (for real? Someone that teaches C and has a Ph. D on CS doesn't now what GCC is?) but that it is apparently doing everything for me. So my code should be wrong if it crashes on VS2015.... ಠ_ಠ
What do you think? I'm thinking about talking with the head department of CS (I know that he is a Linux guy) and see what happens. Should I do it? Or should I just use VS2015 as the "professor" is asking?
I even tried online compilers to see if it was just working on my computer, but even they use GCC to compile.5 -
I've been working late nights for so long that falling asleep when it's still dark is an achievement for me. So is waking up when it's still morning.1
-
I reckon in other countries people are generally nicer... In England ... We are all assholes. Even when we know we are wrong.3
-
When my client boss made me a Front-end Developer, Back-end Developer, Graphic Designer, UI Designer, and an Architect (using AutoCAD) with an annual salary of $6,000USD (i live in the third-world hell in Asia).
i escaped after a month1 -
" What's the big deal ?
It's just an if condition right ? " - Every manager / product owner ever.
And all the devs be like #facepalm !rant facepalm moments stupid people change requests doomed facepalm stupidity fml if statement idiots at work nodejs managers2 -
What if - when you want to switch off the light or anything, you are supposed to get electrocuted and die.
But instead, your consciousness switched to an alternate reality and live, and you wouldn't notice.
Jeez..I need to stop watching scifi. I wont look at switched the same again.2 -
Boss tells me to cleanup prod drives deleting anything older than a year.
So I find a script for that and run it after making sure works.
Told them it's done and freed up 20% but now they've gone silent.... 🤔🤔🤔🤔😥😥😥😥😥😟😟😟😟😟😟😟😟3 -
Being the dumbest smart person is way better than being the smartest dumb person. Here is looking at anyone ever trying to tell me how to do my job yet you cannot read a fucking error messag. Yes incorrect password means you got it wrong, dim witted cunt
-
Java teacher writes code on blackboard in comp lab
He tells us to try it out at our workstations.
We do. The code does work. We tell him.
He says: "There is something wrong with your compiler..."
Question is...we were around 30 students. Can all our compilers not work if we had used the lab before and the code we run worked clean??!?!?!?
We were flabbergasted2 -
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 -
I just wrote this code, let's see if the dude who is going to work with it after me will rant about checking state right after setting it as null.
I wonder if he will know why I did this ...30 -
Finds interesting looking "graduate' software development role...
"PhD desirable, leading university, straight As at A level"
Wow.3 -
Somebody pays for this domain 👍
Translation: www.if-loop.de
There are no if-loops, just if-statements! -
In a few hours, I will know if my PC is going to be finally working again (or if not). Wish me luck!10
-
I hate when people call any sort of program that does anything even remotely intelligent looking “AI.” No, there is a very specific distinction between actual artificial intelligence, and a bunch of if-statements.4
-
Today in programming class.
FizzBuzz on a sheet of paper. I mean, of course I aced the one thing I do in every language I learn. :)
Our teacher then proceeded to talk about the fact that some people, even having studied Computer Science, were unable to make a FizzBuzz program.
w h a t ?11 -
The way this if statement is written (across multiple lines) is really weird to me. Anyone here that writes if statements like this?14
-
I was working on a section of code and had to make a change to an if-statement. So I searched for "if" to get there... Idiot...7
-
Wondering why I haven't received deposit for new job yet. Check for signed quote and contract... Yep, both there. Look I account program to see when I sent invoice.....
I haven't sent it yet!
I'm a dick!1 -
So I wrote a python code and was waiting for +1 on code review and I needed to merge it fast. That shit of a reviewer took his time to finally NOT give a +1 with comment, "if statement has no else part". OF COURSE IT DOESN'T HAVE ELSE PART. I DON'T NEED A ELSE PART. But to give him the benefit of doubt, I'd like to ask devRant community if they believe all ifs should have elses.14
-
Being told code is "production ready" only to find this:
if name == 'foo' or name == 'bar' or name == 'someothershit'
What's wrong with:
if name in ['foo','bar', 'someothershit']?
Oh and they had 10 different values they were matching, not just 3. What kind of joker am I dealing with?1 -
When you have to made a little game with javascript, and because it's your first game you made a beautiful maze with lot of wall.
Ahahah... i'm shit.
I forgot wall have collision.
I'm here now, with 40 different fuckin' walls and much if and else if conditions.
I hate me.
Yeah i know, I can just change my maze but no... I'm lazy. Cry against the collisions is better.
Have good day.9 -
Yesterday a scammer spam me with emails. So I decided to write a code to automate writing emails using SMTP methods for spamming them back... In a while loop...
So today I look at their website (using Tor in VM) the website is gone. Seriously I want to know what happened. Yesterday I visit their site, they are a gambling platform blablabla...but today the site is gone.
http://moneydot.com/
Btw , I'm not a hacker , but I am just an ordinary software engineer (nothing special about me here) who know how a while loop function.14 -
-- What if JavaScript never existed?
-- What if HTML was a programming language?
-- What if our data online isn't abstract but physical?
-- What if geeks have their own country?
-- What if humans exist and we are the aliens?
-- What if the internet is state-owned?
-- What if we could download food just like every other downloadables?
-- What if my VSCode won't kill me when switched to light theme?
-- What if there was no gender and the word "female" is just an alias for "male"?
-- What if bugs could find and fix themselves?
-- What if there's no need for an account password?
-- What if Linux was owned by Microsoft?
-- **What if I could tell my boss that I'm tired of his fucking job without actually telling my boss? This is the actual what if.**27 -
What’s your preference for a simple if without shorthand:
if ($variable == ‘test’) echo ‘’hello’;
if ($variable == ‘test’) { echo ‘’hello’; }
if ($variable == ‘test’) {
echo ‘’hello’;
}26 -
if (a == 0 && b == 0) {}
or
if (a + b == 0) {}
What do you think is more readable? Is there any (performance) difference in the compiled programme?
For a and b >= 0.8 -
"If it ain't broke, don't fix it
I gave it to you straight don't mix it"...
Since when did DMX take on Programming?1 -
So I am managing some legacy code and I found quite the gem last week.
The code went something like this :
IF(methodA()&&methodB())
However, methodB returned ! methodA...2 -
A couple of years ago I was working on a fairly large system with a complex (by necessity) access control architecture.
As is usually the case with those projects, it's awkward for developers to repro bugs that have to do with a user's accesses in production when we are not allowed to replicate production data in test, let alone locally.
We had a bug where I ended up making myself a new row in the production database for a thing I could have access to without affecting real data to repro it safely. I identified the bug so I could repro it in dev/test and removed the row and ensured everything worked normally, whew scary.
Have you ever walked into the office one day, and everyone is hunched over in a semicircle around one person's workstation, before one turns around to look at you and says - after a pause - "... ltlian?.."
Turns out I had basically "poisoned the well" with my dummy entity in a way where production now threw 500 for everyone BUT me who had transitive access to this post-non-entity. Due to the scope of the system, it had taken about a day for this to gradually propagate in terms of caching and eventual consistencies; new entities coming in was expected, but not that they disappear.
Luckily I had a decent track record for this to be a one-off. I sometimes think about how I would explain testing in prod and making it faceplant before going home for the day, other than "I assumed it would be fine". I would fire me.3 -
Is it legal to destroy other company's site or app. because they didn't pay your money in the past?
and also app they created is not secure.
The company is in another country.
.
.
.
If "No"
I'll still do that. I don't care.4 -
function myLife(time){
if(time.current() < time.alarm1)
sleep();
if(time.current() = time.alarm1){
wakeUp();
if(tired || hungover){
snooze();
sleep();
} else{
getReady(speed.Normal);
goTo(work, speed.Normal);
doMyJob(function(){
goTo(home);
});
}
}
if(time.current() = time.alarm2){
wakeUp();
if(tired || hungover){
snooze();
sleep();
} else{
getReady(speed.Fast);
goTo(work, speed.Normal);
doMyJob(function(){
goTo(home);
});
}
}
if(time.current() >= time.alarm3){
wakeUp();
if(tired || hungover){
workFromHome();
} else{
goTo(work, speed.Fast);
doMyJob(function(){
goTo(home);
});
}
}
}3 -
I work on many projects at work. There's divisions of teams and each team typically has one project. Each one of those projects have weekly Sprint meetings.
That's great! For the team. That means each team has one meeting a week so it's not too disruptive for those individuals.
Me on the other hand? I've got my hand in all the buckets. I'm on every team. I'm the only person on every team. This means I get to go to every meeting.
Let me rephrase that:
This means I -have- to go to every. Single. Meeting.
Which means I have a meeting every. Single. Day. Even if I didn't touch that project that week.
It is literally THE biggest waste of time. I sit there in a 1-2 hour long meeting saying absolutely nothing, not even being spoken to. I could be working on other projects.
And these meetings normally interrupt something I'm working on. Conveniently in the middle of me being in my zone. It makes me completely un-motivated to work for the hour before the meeting because why bother if I'm just going to get interrupted? And then it takes an hour to get back into everything after the meeting because everyone is fooling around or complaining about the meeting.
So that's three hours of my 8 hour work day completely wasted.3 -
Mind blow of the week: JavaScript has no "else if".
It's always two tokens. Not one. It's NOT like python's "elif".
It's ALWAYS chaining an additional and DISTINCT if statement in the else clause of the first. It is NOT creating multiple comparison paths in the same if statement as it would seem.
For example:
if(a) console.log(a);
else if(b) console.log(b);
else console.log(c);
Simply needs more proper indentation to show which "if" the "else" actually belongs to:
if(a) console.log(a);
else
if(b) console.log(b);
else console.log (c);9 -
Anyone else just nest a bunch of ifs and loops and feel absolutely disgusted but it works so you don't want to refactor it?5
-
IsIdentical(object l, object r {
if (l.m_Lorum == r.m_Lorum)
if (l.m_Lorum2 == r.m_Lorum2)
if (l.m_Lorum3 == r.m_Lorum3)
if (l.m_Lorum4 == r.m_Lorum4)
if (l.m_Lorum5 == r.m_Lorum5)
if (l.m_Lorum6 == r.m_Lorum6)
if (l.m_Lorum7 == r.m_Lorum7)
if (l.m_Lorum8 == r.m_Lorum8)
if (l.m_Lorum9 == r.m_Lorum9)
return true;
return false;
}
//FML..
Just do this:
return (l.m_Lorum1 == r.m_Lorum1 &&
l.m_Lorum2 == r.m_Lorum2 &&
l.m_Lorum3 == r.m_Lorum3 &&
l.m_Lorum4 == r.m_Lorum4 &&
l.m_Lorum5 == r.m_Lorum5 &&
l.m_Lorum6 == r.m_Lorum6 &&
l.m_Lorum7 == r.m_Lorum7 &&
l.m_Lorum8 == r.m_Lorum8 &&
l.m_Lorum9 == r.m_Lorum9);13 -
best ad services to use? I really don't want to use google. even if they paid double, I wouldn't use them. anyone know? I'm talking about for websites and/or apps21
-
Found this in production code.
For those who doesn’t understand Delphi:
switch (some boolean) {
case false:
// some code
default:
// some code
}7 -
var myLove =0;
var myLife = 'you';
if(yourHeart =='Me'){
myLove =+1;
else {
myLife = null;
myLove = undefined;
}4 -
Anyone else hates this kind of statements:
if ( doSomething() != SUCCESS ) {
//log error
}else {
//continue doing other stuff
}
I simply find that confusing. This is much better:
If ( doSomething == SUCCESS ){
//continue doing other stuff
}else {
//log error
}
Maybe just my opinion.17 -
What if an enormous asteroid hits the entirety of earth and all our codebase, hardwork, passion, and js frameworks get wiped out?6
-
I just solved (high level with a bit of POC) a problem that has been an issue for my team for over a year...
Not sure how I should feel...2 -
"If it sounds good, you’ll hear it. If it looks good, you’ll see it. If it’s marketed right, you’ll buy it. But if it’s real, you’ll feel it." - Kid Rock1
-
Me: What if I use navigation props in EF Core, what might go wrong?
*tests API call*
*120 seconds later finally got result*
Me: I better undo my changes and stick with 2 seconds response time O_O -
FIRE DRILL!!!!!
Customer who decided to deploy our system in the middle of their busiest time ... and kinda ad hoc-ed their ... human processes (not sure what to call it). Just to get by, and then sort of let things rot.
So last week they contact us and say "OMG some poor soul at this company was spending hours making spreadsheets to track what they were doing... and they keep fucking it up because it's nigh impossible to get right".
Real story, big shake up at the company, and someone said "lets look at our process" and they discovered "holy fuck we have this software but we're doing shit like it's the damned civil war".
This naturally raised questions about the competence of the folks we work with ... who chose our software, and thus our software.
So now we're flushing out all the stuff we asked the customer to figure out months ago that is usually done via a months long implementation / integration ... in a few days. Also ... I'm making some new things for them.
WEEEEEEEE
Granted, we're billing them like mad for this so no big deal really.1 -
I woke up this morning thinking "what if Trovalds doesn't GPL-released Linux" and i got like all:
Edit:
*Shooting stars music
:v1 -
Probably one of the sweetest bugfixes is when you can solve random application freezes by rearranging the operands in the if() condition :)
if (isCondition1() && isCondition2()) {...} // freezes the app
if (isCondition2() && isCondition1()) {...} // works just fine6 -
A programmer's wife sends him in a grocery store with instructions "Get a loaf of bread, and if they have eggs, get a dozen". He comes back with a dozen loaf of Bread and Tells her "They had eggs"4
-
Everyone out here talking about Arch and the setup process. My first experience with Linux was with Slackware Linux. Zero dependency resolution.. Holy shit what a ride that was for my first foray.1
-
That moment where you see code of someone who riddles their code with nested if-else and if-elseif statements.
I don't remember writing an else statement for years. It almost always can be avoided (and the rare cases where it makes sense I prefer the switch statement).
Yet I never grasp why people do:
```
if(someCondition) {
// huge nested code block
} else {
throw new Error();
}
```
Instead of
```
if (!someCondition) {
throw new Error();
}
// continue in the normal scope
```
And then we have experts that like doing:
```
if(someCondition) {
if (bar) {
$foo = 'narf';
} else {
$foo = 'poit';
}
// huge code block
if($foo == 'narf') {
if(yetAntherCondition) {
// huge code block
} else {
throw new Error();
}
// huge code block
} else {
throw new Error();
}
} else {
throw new Error();
}
```
Help!
If ever was to design a programming language, I'd forbid the `else` and `elseif` keywords. I have yet to find an instance where I could not replace some `else` by either a guard or an early return or introducing some polymorphism.1 -
I wonder if people would still post pics on Instagram if Instagram hid the number of likes..
I wonder if people would still buy branded clothes if every item of all the brands both big and small were sold at same rate..
I wonder if people would still pursue their current career (jobs) if all the jobs in the world gave equal wages to every employee..
I wonder if people would still donate if they were not allowed to tell anyone about it or post their contribution on social media..
I wonder if people would still by fairness creams and stuff if we removed the mindset of superiority of whiter tones over the darker ones..
Sometimes , i just wonder...8 -
What would you use for building the baclend of a moderately complex web application that probably will have a small userbase?
Ruby on Rails
Django
ASP.NET Core
Spring/Springboot
Node.js
Deno
If what you would like to use something else that is not listed feel free to tell about it in the comments19 -
" Under the hood... the program is using a mix of condition-based learning, procedural generation of sentences/questions, and relational queries based on weighted 'topic' identifiers. It can create its own original statements and questions. It is real-time, and it really does 'think' (an internal dialogue feedback loop)." = If Statement
I saw this in the description for an app aclled "Real AI" -
I want a staycation by myself away from all of life problems and the stresses that occur from interacting and having to negotiate with other people4
-
User: "help pls! Cant login! Works on my notebook but not on the clients"
Me: "Sure. Have you tried entering your username and password?"
*finally resets password. Problem solved*
ASSHOLE -
"If it sounds good, you’ll hear it. If it looks good, you’ll see it. If it’s marketed right, you’ll buy it. But if it’s real, you’ll feel it." - Kid Rock
-
Interesting definitions
1. Project Manager is a Person who thinks nine Women can deliver a baby in One month.
2. Developer is a Person who thinks it will take 18 months to deliver a Baby.
3. Onsite Coordinator is one who thinks single Woman can deliver nine babies in one month.
4. Client is the one who doesn’t know why he wants a baby.
5. Marketing Manager is a person who thinks he can deliver a baby even if no man and woman are available.
6. Resource Optimization Team thinks they don’t Need a man or woman; They’ll produce a child with zero resources.
7. Documentation Team thinks they don’t care whether the child is delivered, they’ll just document 9 months.
8. Quality Auditor is the person who is never happy with the PROCESS to produce a baby.
9. Tester is a person who always tells his wife that this is not the Right baby. -
Program seems to work better when there is about 2-3 times the amount of code related to error handling the task than just the task. I'm always glad to see quality stuff that accounts for the edge cases especially with helpful error messages.1
-
The hardest thing about writing code that works can be logic. For example, figuring out how to say you want to go to the next page when the form submit button is pressed, but not actually move to the next step is an error was thrown during processing.
This is one of those times when. I force a random member of my family to sit there and listen to me talking, pretty much to myself, until I figure it out. But hey, it generally turns out pretty good! (If not my energetic nephew)4 -
We had programming classes in school today and I was using same computer yesterday but today it wouldn't boot up properly. So what I did is I have just restarted it multiple times and now it works again. I don't know why this happened but if it works I won't question it. ¯\_(ツ)_/¯1
-
Wasted so much time because I used or instead of and in an if statement. Why am I so fucking stupid sometimes.
Edit: Spelling3 -
Not loving the implicit return statement within Scala. I like to avoid else statements to keep the level of nesting low and do early return yet Scala doesn't allow that.
(I am aware that I should flatMap that shit though in some cases I just want a simple if not foo then throw exception line. And continue with the next block until I return something.)
So you either have to create if-else-nesting beats or use pattern matching. The latter seems overly complicated for this use case (though it has its moments).
I know that I can make the return explicit yet the linter warns against that. It feels so verbose and I currently do not see any benefits and would argue that the code becomes both harder to read and maintain.3 -
"If it sounds good, you’ll hear it. If it looks good, you’ll see it. If it’s marketed right, you’ll buy it. But if it’s real, you’ll feel it." - Kid Rock5
-
The more I work on the backend forms validation side of my .NET Core project the more I understand how to fuck up web forms in general... 😈
Never underestimate the necessity of a backend validation other then the frontend one. 👿4 -
Not a rant but a question/style.
What do you prefer and why?:
if(condition)
vs
if (condition == true)
and
if (!condition)
vs
if (condition == false)
vs
if (condition != true)17 -
I'm about to graduate and I have no idea what I'm doing. I tried learning the basics and even went through a lot of extra stuff. I can only say I dabbled in scripting, web scraping and a little bit of software development. However when I compare myself to my peers, I feel so out of place. I can't confidently say I know even the concepts I practiced. I am really interested in the field but I feel like I'm way behind and this is constantly nagging me. Is this normal or is there anything I can do about it?3
-
Most companies, if they have a 1 person bus factor, only have one of them. My company has 3. Not 3 people that would have to get hit by a bus for things to fall apart, but 3 people that if any of them get hit by a bus, everything falls apart... Woo!3
-
“20” twenty static code if conditions...
if() {} else if(){} else if(....
with static code contains the different names of some users... and he still thinking that it the best way to do it!!!! -
That's gonna be a quick rant about Golang.
Anyone else here frustrated by the fact that you can inline assignment in the if statement, but can't inline the if-else itself?
You can do:
if thing := hey.getThatThing(); thing == theThing {
return 'this'
} else {
return 'that'
}
But can't do:
return 'this' if hey.getTheThing() == theThing else 'that'
Or is it just me using too much Python everyday and connecting that with Go in free time?5 -
I do contracting for different companies who get too much work on their hands and a deadline on their ass, and it’s always a trip to see how amateurish some of their developers are.
Like who the fuck names a major variable ‘abc’ or ‘xyz’ !!!!
Also they clearly don’t know how to ask equivalence if statements as I got a chain of if else statements that were written like
if (decision>0 && decision<2)
//Code
else if (decision>1 && decision<3) ...etc1 -
Hey guys, could use some opinions. So I live in a country with a pretty small economy. I've been working at a big company out here for about a year now. Initially my plan was to work here for a year then apply for grad school in the states, try and use that leverage for one of those big us dollar jobs and potentially one of those magic green cards I've been reading about. I work about the equivalent of 35k/yr in my current position. It may sound pretty ordinary to some of you guys, but here it's a pretty huge salary. It's pretty hard to walk away from it. It's now becoming difficult to make the decision of giving up such a high salary, to make the time and money investment in school. Running the risk of spending a year or 2 in school and then not being able to work in the states. Putting the money aside i know that there'll be greater oppurtunity for learning and growth in the states, so it may be worth it for the experience alone. What do you guys think ? Take the risk? Stay safe in my job? look at other countries maybe ? I'm all ears.6
-
Wanted to know what you guys think about "Dev" jobs that also include making slide shows and presentations?
Eg. Imagine working on an analysis engine. And just when the core functionality is working, your boss wants your team to make presentation for every client that it's going to be used for - using the raw data given by the engine.
Instead of maybe adding that function to the engine itself.
Suddenly your work is now 12+hours of MS office instead of 8 hours of coding.
And a year later. You have 10 unfinished skeleton code architectures, poorly documented and 90% of the test cases never written.
And most of the devs who were on the initial project have either left out of frustration or have been fired because apparently fresher's who can not code with a senior coder level proficiency is not performing well.9 -
var me = new Developer();
while(TimePassing())
if (time > 9am && time < 10am)
{
bool success;
me.TryStayAwake(out bool success);
if (success)
me.Code();
}
else
{
if (bedtime)
me.ActivateSuperAwakeMode()
}1 -
PR (tested)
-- if(a){ x(); }
++ if(a && b(x)){ x(); )
Reviewer: what if a'?
Me-think: but da'/dx not defined, :'(4 -
Just found a 'Maybe' class that wraps an instance for null-safety. With arbitrary behaviour.
Like a good ol' if was a scary thing5 -
*Wakes up*
*Message from aunt*
Aunt: Hey sweety I can't find this movie anywhere on the internet plz use ur cyber superpowers and help me thx
Aunt: *Link to the movie's trailer on Youtube*
*Clicks link*
*Scrolls down*
Youtube comment: *Link to the movie*
*Copies and pastes to aunt*
Aunt: omg thxxx <3
*Goes back to sleep*
Because why even try when you can ask your nephew to do it for you?3 -
!rant
When I discovered the usage of (statement) ? : after two years in programming school, I feel like an explorer landing on a new continent.
It looks so much more like the cool hacker code from television. I can use it as a parameter for function calls.. and everywhere else.
But it makes my code unreadable.
But it's new and fancy.
But unreadable..
What should I do?3 -
If you had a billion dollars tomorrow, would you attempt to buy your current company, just so you could fire everyone, close all the offices and burnt it all to the ground?2
-
@dfox Bug report:
Pressing the close button on a post you create does save the post details, but tags are lost. So you aren't able to post the next rant you have, with all the tags prepared.4 -
I believe ternary operators should be banned in python/ruby. They are confusing, irrelevant and people use them in bizzare places.4
-
I’m back for round two!
Anyone else have to use Feature Switches in their codebase, and if you do, what do you think?3 -
What is everyone's opinion on companies/organisations 'too big to fail'...?
I was just pondering on how 'just Google it' has become so 'natural' as a way of saying search the Internet. The more I think about it, the less I like it.
I know the chances of them failing/crumbling are neary zero (hence the name) but if an org, Ie Alphabet, made some shit decisions and bankrupted their company, what would happen then? Any ideas? I don't mean in terms of social fallout, economic etc.
I mean in terms of network infrastructure, them being such a central part of 'the web', all their Dns services, their backbone links, Google drive, Google fiber etc. What would happen to all user data? Just be destroyed?
I've never 'seen' a large tech company collapse, but just wander as to how that process would work for such a huge organisation, and the literal mountains of data they have which will need destroying or relocating.
Inb4 watch Mr robot hurrr5 -
Last week I found this on some spaghetti code I was analyzing:
if (boolVar) {
...
}
if (!boolVar) {
...
}
if (boolVar) {
...
} -
So, are we gonna ignore the fact that Pied Piper could have been successful, had they used if else on the encryption to block the AI from tampering with an encrypted data?3
-
"If... else" Artificial Intelligence
because it's not self efficient but limited to the developer's logic. -
Im done wih you "switch"
I have a viewpager and have its on page change listener from it i change some ui stuff like reseting previous page icon and color the new one and set the page title .
Inside of the code i used "switch" to change the stuff depending on the position.
The color did changed but the title stucked at last switch case for every page so i spent hours to find why its doing that ...
The input was ok .
So i just said lets try "if" instead and it worked ._.
Defaq switch ?
Why to use something that has a big chance to fail and theres not much to debug there ?
Whats your comment about it .
Do you ever faced something similar ?2 -
!Deno
Being now able to write import 'npm:<name>' and it just working is quite hilarious, not having to use nodejs but still using the projects built on it .. wwwwww25 -
Well, how i can start...
[Inspired on CipherSaber]
I wanna disguise arcfour as a game (board or virtual), give it for free to kids, and someday tell them the goverment has banned the game because it's basically undistingable from arcfour, and then i'll try to explain for them the crypto controversy, and i know i did my work well if at least one of them decides to write a letter to the goverment.
I mean, i clearly know this is so frigged up, but i wanna know if it could actually work. -
Enough already! I am more sick of the posts complaining about people posting about hating fucking windows than the original posts about hating fucking windows.1
-
Everything from https://devrant.com/rants/4289918 but on the side of projects I happen to work with and dependencies. Applying this scope of change on one human is a bit cheap, don't you think? 🤷♂️
-
In my last company, there was a method with so much nesting and if conditions that just putting my condition on top increased the efficiency by 500%.1
-
$estimationTime = Experience::get($work)->timeSpent() || "Sorry, can't tell, will do as fast as I can";2
-
It's so easy to use for-each loops instead of if-else chains, yet when I write a system in for the first time, I always find myself doing the latter.
"It's placeholder code" saves me every time as long as I rewrite it later.6 -
A register machine with strings and hashmaps as the only data types and no stack. You have to make one from a linked list of hashmaps.1
-
https://youtu.be/5OhJ00an0mI?t=148
As per this ad Samsung use HTML & bootstrap to change voice of bixby.
can someone tell me how can i do this?
(If anyone from Samsung. Inline CSS is bad practice)3 -
When you want to investigate what a function does, you read the name and say "ok, seems reasonable what it should be doing" ... and then you encounter an adventure of if-else's, nested if's and else's, some promises here and there (with more nested if's and else's) and also a bunch of dispatches sprinkled all over the place. You want to refactor it into tinier functions but can't because you don't know what happens where ... help ... 🙄😩
-
An programmer guy works at home. His wife ask him to go buy some bread and if they have eggs to buy six. The guy come back from shopping and put the things in the kitchen and go back to work. His wife go in the kitchen and ask him why there are only 6 breads and no eggs!
-
Sorry if this has been been asked before and asking useless questions
What are your thoughts on the mac ec2 instances1 -
"The employee handbook has gone paperless starting this year to help the environment! Please print out the acknowledgement form and deliver to HR that you acknowledge receiving the enclosed PDF of the handbook."2
-
On Friday I talked about a program that I copied and pasted into my own, and when I was testing it, it didn't work like the original.
If I kept it as the original, it wouldn't even move. If I tried to change it (taking the queries out of the loop. I know I know, I didn't make the original), it would give me a dump saying I was out of space.
So, my solution: delete some records as I go.
Can't wait to see the problems I'm about to have with this 🙃 -
Avoid the words blockchain, microsoft, competitive, startup, and equity. This works well for a primary screening. Second at the interview talk to them if they don't know shit either the company is shit or don't give a shit who they hire. Third figure out what you need to make to live without stress, any company that will pay it cares about their employees as long as it's somewhat reasonable
-
Unlocking your potential takes time.
Throwing away time is so easy to do and we are all guilty of it. How much of your time have you wasted not living up to your potential? The answer is brutal and may overwhelm you.
You have probably wasted some of your time but at least you haven’t wasted your whole life, yet.
You still have time and that’s the best reason to stop wasting it and unlock more of your potential. It hurts to know you have been lazy or procrastinated, but it hurts even more to ignore that fact and pretend everything is great.
source: https://psiloveyou.xyz/overwhelming... -
Firstly give me the skill equivalent to the best in the field. If the rules allow it all of these skills listed and if not any of these :-
1. Computer networking to the point of having the same knowledge as the best in the field. Why? I am curious about that stuff and being able to work as a network engineer if I don't get a good Dev job
2. Cyber security. Why? I enjoy it and being able to make sure my code is not easily exploitable is a cherry on top. Also having a backup job in case I don't get a good dev job
3. Being able to communicate with non dev people about developer or non developer stuff easily and being a really good leader.
4. Being a good developer in whatever language I use and instantly being able to learn new programming languages and frameworks or libraries with ultra in depth information. -
Sorry for asking this question again but I got no replies or releated replies.
Is app academy open good for learning fullstack web development for a newbie or somewhat new to web development. There are barely any reviews on the internet about it. I did kinda ask about them in one of my previous rants but was recommended fullstackopen by @100110111
. I started fullstackopen pretty recently. App academy seems good too but it is a 1000+ hours soo I wanted to know if I am learning anything useful there.
Also thanks @100110111 fullstackopen is pretty good5 -
I’ve noticed a large uptick in these AI = if statement jokes. Is there a catalyst for this or am I just noticing them more?1
-
How are we doing devRanters?
Upvote if you hate racism.
Downvote if you hate Jews.
Do nothing if you love trannies.12 -
Not exactly a rant but some annoyances
Whenever I copy paste code from kindle it does not space the code. Stack overflow says that kindle is using characters for space which are not present in UTF-8 which causes the issue and the find and replace option coes not work in vs code which the author is using. And if you copy from kindle whether you use the button or Ctrl + C it will add the book title and the author at the end. Who the fuck though this was a good idea.
Oh a table does not fit on the screen render whatever fits even if it is the top line of the table. This is probably not an issue and they cannot fix it and I shoild just deal with it.
The author introduces me to the language compiler and lists a command to what versions are available. I get an error which says the command is not found on windows. I dont find any solutions on google, so I go the next place and author says that he knows about it and shows a link to fix it and tells to folloe the instructions. But the link does not have any instructions and just has instructions to configure the compiler itself. The only releveant information was the path to the compiler which the author could have included there or said that was the only relevant information. The path was correct but I needed to install some stuff through Visual Studio2 -
i can never understand the theme behind kotlin.
THEY DON'T HAVE A FUCKING TERNARY OPERATOR!!![?:]
Like before realizing this, i thought yeah jetbrains has decided to make android development a privileged hobby and non beginner friendly , so its now creating an encoding like language, in the false theme of " reducing code size"
But now they remove WORLDWIDE KNOWN, OPTIMIZED , EASY TO READ AND USE AND UNDERSTAND FEATURE of ternary operator and replacing it with less powerful but same looking elvis operator.( and stating that using if else for that is a better option)
Like why? if your goal is to make a shitty encoding language that makes everything shorter and most of the things optional, why remove the already efficient if else encoder?
God knows when this stupid language is going to stop my brain from getting blasted11