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 - "condition"
-
Toilets and race conditions!
A co-worker asked me what issues multi-threading and shared memory can have. So I explained him that stuff with the lock. He wasn't quite sure whether he got it.
Me: imagine you go to the toilet. You check whether there's enough toilet paper in the stall, and it is. BUT now someone else comes in, does business and uses up all paper. CPUs can do shit very fast, can't they? Yeah and now you're sitting on the bowl, and BAMM out of paper. This wouldn't have happened if you had locked the stall, right?
Him: yeah. And with a single thread?
Me: well if you're alone at home in your appartment, there's no reason to lock the door because there's nobody to interfere.
Him: ah, I see. And if I have two threads, but no shared memory, then it is as if my wife and me are at home with each a toilet of our own, then we don't need to lock either.
Me: exactly!12 -
If EA had developed their own Programming Language:
Iteration DLC ~20€
Condition DLC ~15€
Connectivity DLC ~12,99€
Gold Edition ~120€14 -
if (condition) {
//code
}
if you place your brackets like this, you're an awesome individual. Let's be friends30 -
Just went jogging again for the first time in ages.
Mother of god, I was convinced that I had a quite good condition.
Yeah.... that convincement is now veeeery gone 😅17 -
I really hate people who prefer this coding style:
if (condition)
{
// something shitty here
}
Instead of this:
if(condition){
// perfectly clean code
}41 -
DevOps is like development, except there is zero test coverage, everything is a race condition, and there are a million variables declared as global. 😡8
-
Sometimes I wish I was allowed to just strangle my colleagues...
Example from the 'code base':
try:
do_something()
except Exception as e:
log(e)
do_something()
When I asked why they would redo the same call right after it failed I was told that 'It works the second time because it takes time to raise the Exception '.
Bitch, you've got a race condition in your sensitive banking software. You know it's there. Do you really want to trust the time needed to raise your exception will always be enough to synch that dumpster fire you call code?
Show some fucking respect for your craft and fix that shit. But of course they won't, because it will work flawlessly until it suddenly stops working. Taking down who knows what in this damn, undocumenred monolith with it....
Sometimes I'm honestly afraid to trust banks with my money.7 -
once you start using linux on laptop. here is a condition of your mouse.
i don't know when I touched it last time.16 -
Got this today 😍 It's not in the best condition, but meh, got it for free with a charger and everything.25
-
So a coworker wrote this -- a function that returns a view if a specific object exists in the database. Now what would happen said object doesn't exist in the database? Forget about returning false and handling it properly, he decides that the function should print (echo) a zero! Not to mention almost all his if-else blocks prints a fucking zero when the if condition is false (there are 8 of them, if you're asking). Error messages? The hell with those.
He is now the PM btw. I've had enough of this shithole.14 -
In this case the person who quit was me.
Agency didn't pay the past 4 months, we asked at least the reimbursment of expences.
They told in a 2 hour arrogant speech that we must thanks them becouse they make us work even if they aren't paying. They said that "in this period these are the rules and we must accept this condition." So, I stand up, I went to shake the hand of the boss and others, I went to the door saying "good luck".
All the coworkers stand up and applauded.
Two months later the agency was closed declaring failure.6 -
if( !condition ) vs. if(condition == false)
Pointless debate started with readability, turned into heated insults under 30 seconds 😂20 -
Preface: This client, let's call him dickhead, is running a successful brick-and-mortar based business in one of the top cities of the world. He is highly qualified in a non-IT field.
Rant: This son of a shitbag things he knows everything because he can search on Google, has a degree, owns an expensive business, and of course has money. Does not listen to my suggestions on which framework to use, how to integrate stuff, etc. because he thinks he is the fucking father of Linus Torvalds, and Linus built Linux kernel out of his super-intelligent sperm.
But that titbag can't understand the simple fact that he has spent the last 2 fucking years building stupid websites which he thought from his brain located alongside his balls. None of those websites are in the condition to launch, forget making a difference. Primary reason being using wrong frameworks for wrong purpose, but his half-assed brain can't understand this.6 -
Still haven't been paid for completed a retail shop project. But all is well, since the system will not start on Black Friday till I remove the if condition 😈9
-
PRO LIFE SAVING TIPS FOR DEVS (long rant, not clickbait 😝)
I have a medical condition called DVT (Deep Vein Thrombosis). It clots blood in veins near lower body parts. Affected leg swells and become red and it is very painful. It happens when you very frequently sit for very long.
I used to play games, code and stuffs for hours and sometimes I used to stay at home without taking decent walk for weeks. I am only 18 and did not see it coming. But its really early stage and I might be fully recovered real soon.
This condition is not rare and happens to millions of people every year. And it can be avoided if you avoid sitting at computers for long hours and take 5 mins to walk or stretch. Even if you can avoid this condition, there are many others if you dont pay attention on your body. Please take some time to google how you can avoid anything such.
(Please don't comment sympathies, I really know you wish well for me. Instead you can throw tips what you do to relax after long hours of work).15 -
My first poem for programmer girl 😘😘😘
My life is incomplete without you,
You are semicolon of my life
You are my increment operator,
you make my value increases
I am username and you are my password,
without you No one can access me
You are my initializer,
without you my life would point to nothing (NULL or “0”)
If I were a function you must be my parameter,
Because I will always need you
Can you be my private variable?
I want to be only one who can access you
You are my compiler,
My life wouldn’t start without you
You are my loop condition ,
I keep coming back to you
My love to you is like recursive function,
It will never ends & Will never enter into infinite loop
Forever and Ever10 -
I have a certain condition with my eyes which i can compensate with glasses with prisms in it. Due to these prisms, all glowing colors become displaced in height. When i look on editors with syntax highlighting enabled, red is two millimeters behind the screen, green 4mm in front, blue 2mm in front, and gray exactly on 0. This is amazing, and sometimes is just watch this and wonder when holographic screens are becoming a thing. Id really wish for you to see somerhing like this.13
-
Hey you,
yeah, YOU.
Listen here: Don't EVER lend a book to a friend. Why? Just got back a book I lent to a friend, was in perfect condition. Got it back SOAKED in coffee and as CRUSTY as a KEYBOARD used by someone who EATS CHEETOS without washing their HANDS.
It twas a good and useful book on Linux commands... most valiant in my early days of exploration. R.I.P. my good friend.12 -
I so hate the following statement
if (condition)
makeOperation()
I prefer
if (condition) {
makeOperation()
}
Who is with me?14 -
Why the fuck do teachers take points off for coding style. Like really placing my open house brace on the same line as an if is what looks good TO ME. And breaking from a while loop with an inverted condition is nicer than a huge if TO ME. Fuck it I like the m_ for member variables too. And yes C++ usually names functions like someFunction, but I like how c# does SomeFunction. Like shit, it's personal I don't care that I lose 5points every test I do it just to say fuck you21
-
What kind of dumb fucks are making these job application forms, initially I thought asking my “sexual preference” was weird but then I saw these !!!!
How does my earlier financial condition or what my parents did when I was 14 help my job application when now I am 28 !!
The fuck8 -
"I strive for code quality and maintainability. I actually do. And i will not work for a company that does not care about it and just wants something done as fast as possible.
The only time i will do something quick and dirty is if it's actually urgent. And even then with one condition - my next task will be to fix it properly.
I do not care about your deadlines. I will do my best to meet them, but not at the expense of code quality. I've seen too many projects fall into technical debt, where productivity is so low, that the only way to move forward is hire more people and start working on a project 2.0
And please do not lie about how great your company is, if it's not. These kind of things surface very soon, and you will have wasted both of our time, because as i said - i will not work for a company that does not care about code quality."
you think i'll ever get a job again if i put this on my CV ? :D10 -
Oh boy.
I recently, I switched job for an open source company in Lyon, FR.
They had struggles to find me something to do (still has, tbh), so they sent me to a client of theirs, to help for a biiiiig project that's really old (created in 2001)
The thing was... Horrible. Lots of styles were set via JavaScript without condition, I found 3 different versions of jQuery, at one time they added Object oriented development in a context where they had HTML, JS, (inline) CSS and... PHP of course, inside of one PHP file. The architecture was more "uuuh these files in this directory will be about this functionality".
And it goes on forever. I told them that I hadn't the required level of PHP knowledge to have an excuse to get the fuck out of there, my company didn't like it but it was either that or my mental health.3 -
So yesterday I deployed a build on our release environment and i had added a new rest api end-point which I needed to test.. A heads up though, its written in java spring and the entire flow consisted of too many calls/returns from various other java & python services.. Also to make things worse, the entire deployment is a really cumbersome process as you need to copy the build from one box to another..
After like almost 4-5 hours of debugging, adding logs left right & center, crazy upload speeds (yaa this is sarcastic) and frustation at its peak, I found the issue..
There was an if condition that was checking for equality between an enum constant & an enum in a request aaaannnnnddd
*Drum roll
THE CONSTANT ENUM BELONGED TO THE WRONG PACKAGE HENCE ALWAYS EVALUATING TO FALSE... ALSO, BOTH THE ENUMS IN THE DIFFERENT PACKAGES ARE IDENTICAL... FUCCKKKKKKK MY LIFE
😑🔫rant i am done with life why you do this java someone kill me now no tags nope i am not time to die i am dead1 -
Got this from boss (a few colleagues got it as well):
Sites have been down over the weekend and seems the only person cares is PM! There is a condition about working when required (i.e. unpaid OT) on your contract! It is essential that sites are properly managed even at weekends - we run a online business! If anyone has problems we'll discuss next week
*Note: site was partially down and there was no major impact on the business
When I explained why we need to rebuild the sites, you said not now - almost 2 years now, still nothing happens.
When I asked if we can get managed hosting or load balancer, fecking NO again
After asking for my opinion on the sites, you & the puppet think my honesty is me being negative and incorporate, and exclude me from meetings and major part of my work
Go fuck yourself! I've warned you about the status of the sites and you did not want to listen SO DON'T TELL ME I'M NOT DOING MY JOB WHEN YOU'RE THE ONE STOPPING ME FROM DOING IT PROPERLY!
I'm sure we'll have our meeting very soon, cheapskate.10 -
no matter how big shot programmer you are, you 90% time you will only code
if(condition)
{
// do something
}
else
{
// do something else
}8 -
me: "aye im a cool functional programmer, monads are useful, whats up loop using plebs'
also me: *passes input argument as terminating condition*1 -
I write blocks of code like this:
If(condition){
code
}
I'm trying to fix a bug and the previous dev is doing it like this:
If(condition)
{
code
}
Does anyone know any good nerve calming pill ? 😜19 -
condition == true
is for boys,
public static boolean isTrue(boolean condition) {
try {
return new Boolean(condition).equals(Boolean.parseBoolean(new String(Boolean.toString((boolean) Boolean.class.getField(String.valueOf(true != false).toUpperCase()).get(null)).toString().toCharArray())));
} catch(Throwable t) {
return condition;
}
}
is for men.6 -
I have previously seen this in a production code base. The same code base included nested if statements (20+ conditions)...
If (condition == false) {
return false;
} else if (condition == true) {
return true;
}11 -
TLDR: Skills and background or dedication for becoming a good programmer?
So I almost finished the bootcamp on my company, there is only 2 people. Me and another guy who is from math major. He wanted to learn programming so he applied for the job. He doen’t know sql, any backend language, and not even html or css when he joined. The only thing he knew is for looping and if condition logic. He survived 1 months or so by learning a lot here. C#, .net mvc, sql, decent css and html. I believe he worked hard by learning it by himself. But the company he can’t continue anymore. I doesn’t know the reason but probably because he is seen as not good enough. Sure he is kinda slow when adding some feature to our small project but we need to find how to do it by ourself mostly. Now I’m alone with another few weeks to continue4 -
My Javascript professor explained Boolean to me using an allegory about pizza: "If I give you pizza, under what condition do you eat it? Your hunger must be true or false. Boolean does the same thing, but with things less exciting than pizza."
It didn't even begin to make sense to me until it became about pizza.
I vote for ALL future computer classes to be taught in terms of pizza.12 -
Was forced to code like this:
if(condition)
{
//code
}
Instead of this
if(condition){
//code
}
Also I should mention that this happened 4 years ago and my mentor (27 years old economy major at the time) did not know how to use git, we stored projects on a shared networking folder.15 -
Kids use "if(condition)"
Men use "if(condition == true)"
Legends use "if((condition == false) == false)"12 -
Online friends: "So what's your plan for new years?"
Me: "We will do some amazing stuff! This will be fun"
Online friends: "Great!"
*Real condition: alone, no plan, and miserable*
Who else having the same?17 -
This is an example if statement:
if(bla.boolean()){
}
Bill does NOT put comments into the condition brackets.
Be like bill.
Please.11 -
Omg so I've been stuck on this function I'm writing that checks if a certain array value is so many characters long and well, it just wasnt returning false when outside the conditions..
I tried taking it step by step, echoing out every line and it all made sense to me and there were no syntax errors.
Time goes by and inside the configuration file I was testing.. I was changing the value of a DIFFERENT array property than what I was using in my condition. They looked really similar.. fml xD2 -
Lisp code was live-debugged and fixed with REPL on a spacecraft 100 million miles away
“An even more impressive instance of remote debugging occurred on NASA's 1998 Deep Space 1 mission. A half year after the space craft launched, a bit of Lisp code was going to control the spacecraft for two days while conducting a sequence of experiments. Unfortunately, a subtle race condition in the code had escaped detection during ground testing and was already in space. When the bug manifested in the wild--100 million miles away from Earth--the team was able to diagnose and fix the running code, allowing the experiments to complete. One of the programmers described it as follows:
Debugging a program running on a $100M piece of hardware that is 100 million miles away is an interesting experience. Having a read-eval-print loop running on the spacecraft proved invaluable in finding and fixing the problem.”
https://gigamonkeys.com/book/...4 -
When you spend 3 hours looking at your project's code and debugging it to find out you forgot to add a '!' to your if condition.... Brilliant4
-
doNotMessWithITTeamInAFuckingProject();
Last night me with my team have a discussion with my project team. Currently we have a project for our insurance client building a Learning Management System. The project condition already messed up since the first day i join a meeting. Because since its a consortium project with multiple company involved, one of company had a bad experience with another company. It happened few years back when both of company were somehow break up badly because miss communication (i heard this from one of my team).
Skip..skip... And then day to day like another stereotype IT projects when client and business analyst doing requirements gathering, the specs seems unclear and keep changing day by day even when I type this rant I'm sure it will change again.
Then something happened last night when my team leader force our business analyst to re index the use case number (imho) this is no need to be done, and i know the field conditions its so tough for all team members.
So many problems occured, actually this is a boring problem like lack of dev resource, lack of project management and all other stereotype IT projects had. Its sucks why this things is happening again.
Finally my fellow business analyst type a quite long message in our group and said that he maybe quit because its too tired and he felt that the leader only know about push push pushhhhhy fcking pussy, he never go to the client site and look what we've done and what we struggle so far.
I just don't know why, i know this guy earlier was an IT geek also, but when he leading a team he act like he never done IT project before, just know about pushing people without knowing what the context and sound to me like just rage push!
Damnit, i maybe quit also, you know we IT guy never affraid to quit anytime from the messed up condition like this. Even though we were at the bottom level in a project, but we hold the most main key for development.
Hope he (my leader) read this rant. And can realize what happened and fix this broken situation. I don't know what to say again, im in steady mode to quit anytime if something chaos happen nearly in the future.
doNotMessWithITTeamInAFuckingProject();1 -
Got an email from a stakeholder about a $0 transaction for an item that was not meant to be $0. Found someone put a condition in the code to set the price to $0 if it couldn’t be queried from the database. Wut…that is…not logical 😵💫😵9
-
15 minutes
if ( very long condition here );
{ Stuff here was correct }
Error!
Shit!...
Testing all the 'stuff here'...
oh. !!
That's where the missing ones go to have fun.5 -
Wow i must have been brain dead when i wrote this code. Needed to exclude certain elements from response for the the list of objects.
for (obj : objects) {
If (obj.skipFromResponse()) {
break
}
add obj to response
}
I used break instead of continue at the if condition which meant it would break out of the loop at the first instance of condition being met.
This went through qa and has been in production for 4 weeks so how did this not break before. Well little did i know the list of objects was sorted and all the test data, qa data and everything so far in production coincidentally only had the last element with matching condition. This meant it returned everything correctly so far.
Today was the first time there was a situation where this caused incorrect output. Luckily as soon as I heard the description of the issue I remembered to check the merged PR and hung my head in shame for making such trivial error. I must have written way more complicated code without any problem but this made me embarrassed to even admit. 🤦♂️4 -
Who's got time to be an imposter. 🤷♂️
I am out of my depth 90% of the time, always diving into areas that are foreign to me, you just need to enjoy the buzz of knowing you are coming out the other side more knowledgeable then you did going in.
But if you do get overwhelmed with this condition, step back, take a breather, and use that moment to think things through at the big picture level before moving forward again, sometimes the right solution is hard to think off when you're to focused and drowning your way through a bad one.4 -
While getting a pro in Kotlin, I started using
when(condition) {
true -> doOneThing()
false -> {
xyz = whatEver()
blaBla()
}
}
instead of simple if-else.
It looks nice but also distracting.
What is your opinion on that?
I guess most will be like:6 -
Oh don't know why my "if" condition never execute.
Happens very very often.
Small things are hard to find.11 -
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 -
Preparing to debug racing condition between 20 different threads.
Not looking forward to this sprint :(5 -
!rant
Neighbouring nursing student asked me to recommend her a good laptop. I take a look at her existing one and it's an ultra book in pretty much decent condition. I ask her what her issue with this one is and turns out there's not enough space on the hard disk (30 GB SSD). I advice her to consider upgrading instead of buying a new laptop and she agrees. She also asks me if I can fix the track par of the laptop as it's not working. I take a look at the system tray and then work my computer science magic (press the fn+F9 to activate the trackpad) and boom! It's a miracle and she's squealing with delight. I even ran a disk cleanup and wiped 3Gigs of space so that she could continue downloading the episode from Netflix.
I hear a lot of you people complain about being asked to do outrageous tech shit because you're a computer person but man, I sure love being the "tech guy". :D16 -
1) That loud ass mother fucker sitting besides me, shut the fuck up.
2) Air motherfucking condition turned all the way to the max makes me horny and want to fuck your motherboard.
3) Illiterate assholes writing code without any comments and half assed function name just to look cool when we approach them for doubts.
4) Onsite motherfuckers enjoying their lives, taking photos of it and posting it in a monthly magazine while we s(h)it behind the fucking systems all day.
Thank-fucking-you, y'all can die suffocating in your own smelly dierraea poop.6 -
Shit. Today I found out I have a serious condition - severe case of hypocaffeinemia.
I don't feel like I'm gonna make it through the day2 -
I've just spent 20 minutes swearing about this to a friend. I'm now past "blind incoherent rage". 50% of managers in a survey said they'd be "uncomfortable recruiting and line managing a neurodiverse individual". Why the fuck should I have to hide my condition? FUCK THEM.
I may still be a bit angry.
Reference for managers being bad people: https://peoplemanagement.co.uk/news...86 -
I spent two weeks writing a WordPress plugin to take some form data, process it through another website, and take the result to Salesforce. the client had a "Salesforce specialist" doing everything on the Salesforce side and refused to give me access to see if the data was properly pushed through.
Finally I got it in working condition when suddenly it stopped working, I hadn't changed anything since it worked so I asked if he could have possibly changed something. We argued for over 4 hours about who changed something, the whole time I was looking for the error in my code. At 6pm I finally told him I would need to take a look at it tomorrow.
Overnight he sent me an email:
"Hey, sorry about the confusion yesterday, I set Salesforce to deny duplicate email entries, looks like once I removed that everything is working."6 -
Tldr: hilariois scam website is hilarious
Today I saw a website that was obviously a scam, but it was quite hilarious: it said you could download an ebook and they tried to trick the user into clicking the fake download links. It was a textbook for engineering and at the botom of the page they had those fake user comments that encouraged people to du those things you are asked for after clicking the wrong download button (like entering your bank info). They described how their friends couldn't believe what an awesome book they got for free and so on and that they really loved reading it. Reading an engineering textbook. Also, and that made me lol quite hard: they discribed the condition of the book as "used with a few water marks". A fucking pdf with water marks...3 -
if ( condition ) {
callback(data)
}
callback(error)
--is a lot different than--
if ( condition ) {
callback(data)
} else {
callback(error)
}
callbacks are not return statements 🤦♂️9 -
8.5 hours spent trying to figure out a race condition ultimately caused by this line.
There really are no words.11 -
Just did a transplant on my friend's phone. He dropped it one too many times, and fucked it up real bad.
We were first going to simply put his SIM card into another phone. I had an old S6 that bricked itself during an update before I really knew much of anything about phones, so I dug it out and spent a day trying to restore it with heimdall, adb/fastboot, and eventually odin when I found a laptop with windows. Unfortunately it's a Verizon phone, and because Verizon likes to keep a tight chastity belt on everything, it was pretty much impossible to unbrick. After giving up with finding a custom recovery or flashing a stock ROM, we moved to Plan B.
We took both phones apart, switched the boards, switched the SIMs, and he now has a working phone in much better condition than before he dropped it seven feet from his girlfriend's bunk.
It's always fun to make life from two dead things.3 -
It was the first time I worked on a big project with a big team, I looked at the given code and copied their code style.
I finished very fast and everything was working fine, was really proud of myself. I'd like to add some logging though.
Programm failed it was heavily async and parallel so 2 days of debugging had past the whole team was on board nobody knew what went wrong there.
As I stared into the darkness of my code I suddenly saw what went wrong 😂
As I adopted no curly braces style of the Team for
If (condition)
Justine();
And I added logging above without braces everything broke 😂 it was indented properly so as a heavily python user everything looked fine2 -
Operation PiBM 5150 XT is continuing this morning!
Raspberry Pi B+ 900mhz
Raspbian Pixel Linux
LG 21:9 2560x1080 monitor
HDMI cable
/boot/config.txt updated for 21:9 monitor
Nyko PS3 USB Compact Flash / SD Reader
4gb CF card as HDD in 5150
4.77mhz IBM 5150 in like new condition
CGA Graphics and Monitor
Late 2012 Macbook Pro
HyperTerm app
USB to DB/25 (RS-232) serial adapter
Devrant Sticker5 -
#LifeRightNow
- need to find a new place and roommates to live with
- my gf's father doesn't want us to marry.
- my joint family wants to get separated.
- my boss wants me to be at our primary office ( i work remotely ) asap irrespective of anything since it is our biggest production yet.
- i am about the least productive i can be from last couple of weeks.
- going through a serious allergic condition.
#FuckMyLife8 -
Fucking incompetence
Senior level developer with 15 years of software development experience ...
ends up writing brute force search on a sorted data - when questioned he's like yeah well dataset is not that large so performance degradation will be marginal
He literally evades any particularly toil heavy task like fixing the unit test cases , or managing the builder node versions to latest ( python 2 to 3 ) because it's beneath him and would rather work on something flashy like microservice microfrontend etc. -- which he cannot implement anyway
Or will pick up something very straightforward like adding a if condition to a particular method just to stay relevant
And the management doesn't really care who does what so he ends up getting away with this
The junior guys end up taking up the butt load of crappy tasks which are beneath the senior guy
And sometimes those tasks are not really junioresque - so we end up missing deadlines and getting questioned as to why we are are not able to deliver.
Fuck this shit ... My cortisol shoots up whenever I think of him4 -
Tech Lead: We need to exclude logged in user from our all users API as we don't want to show user's self card on the frontend with other users.
Me (Backend dev): This should be handled by the frontend and they should exclude it by a condition in their loop:
If (user.id != loggedUser.id)
{
// Add card
}
We also need self user at several other places.
Tech Lead: Create a query param filter for that.
Me: We should keep our APIs as generic as possible.
(Real thing starts)
Tech Lead: Which has more processing power frontend or backend?
Me (confused): Backend
Tech Lead: This will add a break to our loop and Do you know how much processing power it will take because of this condition?
Me (dead): WHAAAA....?18 -
spent half an hour debugging an if statement that won't return anything but false. Apparently, the condition was:
if (check === true). and the check var was a string! so yeah, spent half an hour to realise I was checking if 'true' is true..4 -
" 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 is the condition to join two tables ?
Programmer: primary keys match.
Non-Programmer: The tables height must match.😐1 -
A fellow mate I graduated with recently asked me to help him with his interview sample coding questions. Basically he had to write a function to test different conditions using Java. I wrote the function, pushed it to git and asked him to go check it out. He told me afterwards that, my function was wrong..lol, really? (BTW, I tested it and it produced the results the company wanted)
I asked him to send me his code and all he did was write a "main", created an instant variable and passed it in a switch statement. Mind you, the test condition was big that, switch statement was the worse to use...
I told him to do whatever he wants but he should remember that the question wants a damn function given a certain input. Didn't hear from him again...then later asked me to help him with a SQL question...hah, I didn't even bother looking at the question. -
When you think the code from companies like Google and Facebook is flawless, but then you look at the source code of Parse 1.5.0 and find an if statement with the condition 'browser' === 'browser'2
-
This customer's dev is going to be the end of me. I had to explain to him why it doesn't make any sense to return a value after throwing an exception.
In a function that was supposed to insert a record amd return its id, in the error handling code:
catch(Exception ex) {
//logs the exception
throw ex;
return - 999; //this code will NEVER be reached, and why the f.... - 999?
}
The customer wants us to develop the project together, but he won't listen and always write whatever he wants. Some might be differences in taste. Like me preferring
if(condition) {
return a;
}
return b;
And him preferring :
Foo result = null;
if(condition) {
result = a;
} else {
result = b;
}
return result;
Ok, that I can accept. But things like the one I'm ranting about... I wont.
I'm starting to wonder what was he doing during his "9 years of coding experience"10 -
Just had to write an old-skool for loop. Index...termination condition...whole works. I feel dirty.
Bit embarrassing as someone saw me writing it, thought I was a hacker and informed the authorities. Spent the last hour being waterboarded.
We had a big laugh about it when they realized I was just fixing bugs in a legacy app.
National Security. Hilarious.10 -
dev/ChoosingBeggars
Condition : Deadlines in 7 Hours. Submit on Class
MyClassmate : "Have you done the last Assignment?"
Me : "Technically Speaking, yes, i've done that in Python, since we need to use C, i need to Translate it first"
MC : "Can you teach me?"
Me : "I wouldn't say i won't, but it's 1 AM, time is short, need to sleep, I can give you the python code tho"
MC : "wait, so you will submit the python code without Translating it first?"
Me : "Of course not, i can translate it less than 30 minutes, i'll finish and submit it before class"
MC : "can you translate it now, so you can email that to me at <his email address>, so i can sleep now and we can submit it together this morning"
Me : "i can't tell you are serious or not, anyway, see you in class"
🤦♂🤦♂🤦♂🤦♂🤦♂ <screenshot in indonesian, just for proofs>12 -
>Be client
>Have an issue with incredibly slow webpage load time
>Blame memcache issues
So... I look into the problem. Yes, the page either loads up fast, or times out. So, into the logs I go. Webserver is fine (except the timeout), PHP though... Error log is fine (just notices), but slow log shows the issue is the database (of course... its always the database... ugh)
So, checking the database, there is one ugly query that seems to be an issue. 5 joins and a huge where condition.
So I run EXPLAIN on the query and... Proceed to bang my head against the wall.
OF COURSE ITS SLOW YOU FU******, NONE OF YOUR TABLES HAVE ANY INDEXES.
What do they expect when the database has to always go down the whole table and do everything in memory, until it runs out and has to dump it all on disk and work with it there.
Ugh... Some clients... -
Writing some code to sift through some demographic data. Thought I could parallelize a few calls. Now I have a race race condition...
#blackcodematters1 -
*knock knock*
Race condition!
Who's there ?
And thaaaat's the lesson i learned today after I spent two hours staring at code, to find out that the solution was just moving an unlock_mutex() a few lines down. -
So today at the beginning of the class, our teacher asked us to write a function that translates a given string to "leet speak" (basically having to replace every character to another).
Some used python dictionnaries, some used arrays...
And the two people arround me wrote a program with a condition for EVERY SINGLE CHARACTER.
It kind of made me wanna die or kill them 😥7 -
Anybody do anything cool with their leftover Androids / iPhones ? I recently came across a good amount of them from extended family. They’re all in pretty good condition. I think it’s a waste because they are fairly recent devices with good processing11
-
Guys seriously why would you buy a macbook if apple will support it for like 7 years then you won't be able to upgrade to newer OSX versions? whereas a good laptop machine could run Linux for a lifetime, you could even change distros if you got bored.
Let me dive into it, If I buy a brand new macbook and use it rarely, its condition will barely change however one day I will get the message you need a greater version to install X app, seriously apple?
Real life scenario: I have an ipod touch 5 i rarely use it, one day i decided to install an application and boom no you can't buddy you need to upgrade the iOS however the currently version of iOS is the latest version i could get for that ipod touch model, so the thing is, I have a perfect condition product that is unusable unless for some music playing and what i already installed as apps, does it look fair to you? I have the same issue with an ipad mini, its condition is perfect, battery life is decent, I can't receive anymore updates, the youtube app stopped working, im stuck again with a product that i can use only to read some ebooks or use youtube through the browser, apple wants me to buy a new ipad which is absurd.
I will never buy an apple product again
Fuck you Apple46 -
I was working as an intern at small company, and after a month we signed contract
But each month they had some excuse for not paying me, or any of the employees
So I quit after 3 months without any payment
But I would not have been where I am, if I was not in that difficult condition, it made me work harder, and thought me to always keep my options open :-) -
When you find this in the PHP code:
if(condition) {
// code
} else {
die('horrible death');
}
Cheers to the fellow devRanter who added it and also to whoever is going to get to "else" part :D1 -
Google's new feature is to show you a quick overview of a medical condition and it's so cool, I'm having a little stiffy as a medical IT student 😍7
-
I'm trying to explain to this dumb mf-er why we can't use send data simply.
It's a mobile platform I said, you can't rely on having network I said, the dumbass users might try it on 2% battery I said.
DO'H BUT MY INTERZ CAN DO IT IN 5 MINUTES.
Yeah, enjoy crashing the app with asynctask like a stupid bitch. When it fails under nearly every possible condition that deviates from the ideal, you can go write down how great your interns are, eat it up, shit it out and when you grow a flower from that, then I might help you again.
Retard server people.6 -
I made some substantial changes to the codebase.
I run all the unit tests, as usual.
A test that has nothing to do with the feature I'm working on breaks.
"Huh that's odd, let me debug that"
I set a breakpoint with the condition set so that it pauses before the test assertion goes red.
I start the debugger and.... all tests pass
Turns out it only happens like 500/10000 times....
This will be fun6 -
Literally spent the whole day debugging a race condition that only showed up in the release build. Resolved it with a Sleep(0).
Where is my beer.5 -
I need a way to explain to a coworker that nesting if statements beyond 3-4 is too much and needs to be re thought out. The dude is the biggest arrow head programmer I’ve ever seen. And he claims nothing is wrong with it, it works.. so what’s the problem.
Since we follow the rule of only one return per function he claims it’s the only way to accomplish the stuff he’s doing.. like if blah function passes... if blah function passss if blah functions passes do this then if blah functions
The if statements arnt just checking some variable conditions.. the conditions are checking returns of functions at each nested level the condition, executes a different function and thus checked for success.
Uggh I just don’t know how to explain to him it’s shit and needs to be re designed
Any ideas??20 -
Watching all the StarWars for the first time (to fill in the gaps in my cultural knowledge).
I think Yoda may have had some syncronization issues -- some race conditions in his speech I noticed have.5 -
When a condition is true and false at the same time...
var_dump(0 == "x"); // true
var_dump(!0 == " x"); // true
WTF?!
I started using the === more often...5 -
People often rant about a missing semicolon,
I added an extra after if condition
if(...);{
}
Compiler can't take this as error.
Debugged the logic for hours,
Wasted a lot of time, lol5 -
A big project in my company. Had some annoying race condition that caused data to get deleted when two processes finished in the wrong order they hit the dB and override each other’s work.
Long story short. Fixed the bug and in the process the codebase shrunk by 60%. I didn’t have to delete the rest of the code, but the bug was due to a function in the legacy section of the code, and found out that it was the only function used in that section.
So I deleted it. Rewrote the function so it upserts. And bam. Smaller, cleaner code :)1 -
Whenever I hear a developer on my team say "I think it's a race condition" all I hear is "I don't know what I'm doing"4
-
This is the current condition of tcs in india.
Fucking servers are busy providing sessions from 3 hours.
This is a contest organised by tcs india for college student and this was a demo round(mockvita). Just to prepare students for the real challenge.
6 hour challenge , i completed it in 3 and now when its my turn to upload the java file its showing me this fucking shit. I fucking coded for 3 hours straight and now when the shit is working, their servers just say fuck off.
Its a global contest and this shit is happening for real.5 -
Fucking hate Qt.
Spent all morning trying to figure out how their bullshit QThreadPool works with their bullshit QRunnable but after a bunch of bullshit asynchronous testing I figured that my thread object was being collected and deleted before I was done with it, for no reason. Now if the race condition was documented... This wouldn't be an issue. But every google search brought up nada. Eventually I resorted to turning off autoDelete on the runnable, but then I just have a memory leak, obviously.
I couldn't find a way to manually clean up a QRunnable in Python. What the fuck.
I just went back to good old fashioned QThreads... This is why I quit Qt in the first place.18 -
In an encryption-module, I had a bug, that caused my PC to crash, every time I tried to encrypt something.
Turns out, the loop, that appends
0-Bytes to the string, to make it Block-Cipher compatible,
Had an logical-bug in its exit-condition, that caused it to run infinitely and allocate an infinite amount of memory. -
I keep seeing the word “privileged” thrown around, and this one, I actually understand to be right.
But if you have a mental disease or another serious incurable condition, kick like 5000 points off your privilege scale.
Money and medication don’t always help. I’m ready to give a very, very thick stack of money to anyone who can actually cure what I have. I wish I could do it.10 -
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 -
Just my opinion, but Code reviews are a shit practice. In my previous company, we used to have one every Saturday. I presented my code and when everyone couldn't find anything to bitch/moan about, they said my code isn't "aesthetic" to look at. It's because I wrote this
if(condition)
do_thing;
instead of
if(condition) {
do_thing;
}
I cringe everytime I remember that incident.17 -
I'm a .Net developer from Morocco, i'm currently working on an accounting software for this fucking company owned by an American boss. And i'm handling every single aspect of the project including the back-end (C#), Database (Sql Server), Reports (crystal reports, ABAP, VSTO), and design (UI, logos, animation...). For a salary of 300 USD/month, with no insurance, no transportation fees, and no fuck given about my health or my coworkers'. Not mentioning the shitty working hours and condition.
This is my first (job)9 -
Oh my god. I woke up and read stan lee was rushed to the hospital. I was actually feeling horribly sad and then I read that he was in stable condition and was like heck yeah!!! No one taking him yet.
-
My grandmother recently died and me and my brother were wondering what was to happen to her 10+ year PC (Dell optiplex 760). I could find a use for the monitor and my brother wanted to use it as a server. We asked around at the family and everyone seemed ok with that except for one guy..
Apparently the PC is still in "prime condition" running Windows 7 after an upgrade from Vista. It has 'a graphics chip or something like that' and is better than any laptop on the market right now. (I actually had my HP zBook 15 g3 with me). He claimed it wasn't some old worthless piece of junk and most family members would probably be interested in this machine.
I didn't try to argue because I realized he was not at all knowledgeable about technology and I didn't want to be disrespectful.3 -
I found this weird line in a library while debugging, though I really don't know php that well but wouldn't this condition return a boolean anyway?9
-
Guess it's time to ditch ProtonMail as well.
Translation: "[Update Google play services.] ProtonMail won't work until you have updated Google Play Services."
I know I'm almost an anti-Google nazi at this point, but ProtonMail was one of the only remaining apps not needing Google to work, and now it's a "sin equa non" condition. I'm very disappointed. Guess I'll have to switch this address to Tutanota or host my own email server.
Edit: why the fuck would my autocorrect capitalize nazi?13 -
Today we found out that my brother has a condition, triggered by a stressful event, that causes his heart to try and shutdown.
The dev in me is screaming "fix the bug!"
The crazy in me wants to start punching doctors in the face til we find a solution.
But the rational side of me knows there's nothing that I can do because that magical asshole in the sky didn't commented his code...3 -
I regularly diss on PHP in office but the truth is just that the developers before me wrote bad code. It was bad code in PHP alright but they had a whole framework to use and at least organize their code better but they didn't use it.
I have seen their JavaScript code too and it was all in one file.
P.S. I have no idea under which condition they had to write the code. The app was initially outsourced.5 -
"Racing condition, meet deadlock"
"Deadlock, meet racing condition"
And they were never heard from again -
One of my coworker change the code from
```
void foo() {
if (condition)
{
}
else
{
}
}
```
to
```
condition ? ifTrue : ifFalse;
```
and add it to changelog
```
- fix bugs // yes with an "s"
- feature added
- some list of the bug fixed.
```
I refer back to the commit, only one Fucking commit and on changes. Bro, what the fuck?8 -
Heard a story about an interview taken by one of my teammates..
The guy had approx. 9 years of experience of full stack development having current exp in JS based work.
He was stubborn on the condition that he'll work only on JS for the rest of his career and nothing else.
I can't understand people having a raging boner on one language...
P. S : I am a JS developer too!2 -
One more startup proposal
And
I accept it
$500
One condition
I will not maintain anything.
Plot twist : it was my toy project
Every week I will show progress.
😂😂😂😂😂😂😂6 -
So I just had this amazing thought
What is an operating system?
Any system that is in a working condition is an operating system5 -
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 -
If PyTorch > Tensorflow:
print("True")
Output:
True
True
True
True
......
......
.....
True
Wait a minute? Is this a While True loop?
Doesn't look like an if condition xD3 -
You guys upvoted a lot my previous rant and this makes me partially sorry, because it means you either witnessed or lived a situation like mine!
So to all the devs out there dealing with an awful work condition, an awful manager, awful teammates or awful wathever: stay strong and remember: you are not married to your company nor you are forced to stay there! Search for a better place, because you deserve it! (And also because happy devs make better code, if you don't believe on yourself and want one more excuse!)2 -
so apparently Windows 10 Pro build... 1803? 1806? (somewhere in there) refuses to allow over 1TB of pagefile if there's more than one volume with pagefiles. The system just hangs when pagefile is used if this condition isn't met.
I know because *i'm batshit fucking insane and am trying to cram 64GB of data into a PNG in PYTHON*.
(this might also only apply to me. your mileage may or may not vary.)8 -
Checking out a project on GitHub:
> Using advanced condition-based AI logic, Compactor can skip over files that have been previously found to be incompressible, making re-running Compactor on a previously compressed folder much quicker.
> (Yes, it's an if statement and a trivial hash database, hush)2 -
Why for fucks sake can't I motivate myself to finish my thesis?
I mean I guess it is because I already got my third raise in my current (full-time) job because of hard work, which left not much time for side projects (or thesis writing).
On top of that, there is nothing which forces me to finish. My Prof. does not really care. I would probably not earn more because of a higher degree. Only thing is I have to pay the fee for enrolment once a semester.
Also, going back to my thesis project after some time, and having to upgrade all the npm modules in there does not help.
Even though I already have a working backend and proof-of-concept app, something blocks me from finishing all this work.
It is a curse. I would do so many side projects, but I tell myself that I first have to finish my thesis before doing anything else.
It is some kind of loop and I have yet to find the return condition.3 -
Fucking customer industrial machine doesn't work properly because the dumbass who designed the control algo failed to consider basic physics how this shit is even supposed to work. Just to be sure, he also included some race condition in the measurement part of the software.
-
!dev but definitely a rant.
Ordered a lovely new UHD HDR tv for the family on Monday.
MFW I see the courier is Hermes (notoriously bad).
It arrived today.
Any guesses as to the condition it was in?
Yep. Lovely crack on the screen.
Took all day to clear it up with Amazon.
And the best they could bloody do was a refund, but I have to organise the collection and pay for that (which they said they’ll refund).
FFS.1 -
Ffs
var filteredList = HugeList. Where(Condition);
if(filteredList.Count() > 0)
DoSomething(filteredList.First());
Just no. Please.10 -
Yesterday, I was perf testing my small app (my first NodeJS app). I thought I'd do a small, ghetto test: bash forloop with curl and payload to be saved.
My favorite is "for i in {0..100}; do ... ; done". I start firing these bad boys in separate tabs. Everything works fine. I check the DB... Saved results: 303.
I break into sweats. Do I have a race condition? Holy shit, is my DB layer unsafe? Fuck fuck fuck.
I fire the forloop only once. Saved results: 101. FUCK.
I run the for loop for 0..10. Saved results: 11. Huh?
I promptly realize 0..10 runs 11 times. I'm a dumbass.
/Me proceeds to deploy my code to a kubernetes lab instance with https://youtube.com/watch/... playing in the back of my mind.6 -
One time someone decided to make a "Condition Checking Framework" so you could check conditions at runtime using pre-configured XML files.
...yeah, someone made XML based if statements.
...they were very proud.
...4 -
So I'm in a meeting with the Company director where I'm contracting for a few months. She is explaining the company history, goals etc. I can feel my eyes drooping, my head tilting and my body sloooowly sliding of my chair. Im literally fighting to stay awake. She is about to explode and go crazy BUT the business manager flies in explains to her that I have a medical condition known as narcolepsy...meaning I could be half way through a conversation and I fall asleep and it's not anything more than that
....When she said my name is thought to myself yep I'm outta here...4 -
Yes, they given all of us plastic chairs for sitting 36 hr instead of been bag. Wow you can imagine the condition of our back. They also don't know the password which they created for guest...
-
Guess what below if condition evaluates to true in javascript
-- and they say Javascript is beautiful 🙃🙃
if(test == 7 && test == 9 && test == 11) {
console.log('Hello World!');
}4 -
/** Null until this web socket is connected. Used for writes, pings, and close timeouts. */
private ScheduledExecutorService executor;
Dear boys and girls.
If you ever do this again and release this as a public library (even better - an official client of your solution, e.g. kuber-fucking-netes), I will get my way into dR's gateway servers, trace down your IP in nginx's logs, find your location, probably use some means to get your first and last name (you prolly have a domain registered under your IP anyways...), buy a ticket to your town, get to your home and wait for night to fall. Once it's dark and you're asleep, I'll make sure to leave a real nice, warm and extraordinarily smelly turd on your doorstep (I'll also make sure the process of manufacturing that gem is as noisy as it gets - you just have to bend the right way, and....).
Gents. If you really, REALLY want to make writes asynchronous, at least provide a way to either get a notification once the write is synchronized, or allow the user to handle the threads/executors himself!
https://youtube.com/watch/...5 -
Damn race condition! I know you're hiding in there, just waiting for the morning to arrive and shit my day.
-
My biggest influence on coding style is working with other people's code. I know the temptation to write "clever" code and I've been (and probably still occasionally am) guilty of it myself, but it's not until you have to debug someones oneliner iterator which has !(i-j) as the stop condition that you start to appreciate dumb, boring, obvious code.
If having a series of if checks in a long list makes it readable, keep it that way. If it makes it more readable to rewrite it into a nested switchcase with a couple of ternary bits, go ahead. Just don't spend half a day wrapping it up into two layers of abstraction that will require an onboarding process for the rest of the team.2 -
I once tried to create a client for the fonds bank of Frankfurt. But I didn't expect their JSON API to be designed by a trainee.
Look at the API.
Stringified numbers, decimal commas (Germany), separator dots for thousands, and even one breaks as if it came from a pjp script where they just put an if condition in each line.
I documented the API and tried to create a Jax rs client, but stopped completing it. Not useable atm. Just look at what I spoofed.
https://github.com/bmhm/...7 -
I have a medical condition where my palms sweat too much. I can't use touchscreens for a very long time. I really hope there is a product that makes touchscreens hyper sweat friendly. It's annoying and embarrassing. :/4
-
I drank too much last night. I was scared shitless since I really can't deal with hungovers and I am not supposed to drink a lot because of my stomach condition.
Mind you, for me, 8 beers is a lot(drank them in about 2 hours) and went to sleep. I was not all fucked up or anything, i was very lucid and scared of what i was going to deal with.
As i was trying to relax, my psychosis kicked in and I can swear that a little voice told me to calm down, i have been working out like if I was about to fight McGregor and my metabolism is through the roof(which is sometimes alarming) and that I will be good by morning.
Woke up at 11 feeling like a million bucks.4 -
Working with LEGAL is the worst!
They say yes to all reviews and once it's in prod they want to completely change the whole thing cause they think every user reads the Terms & Condition!
To be honest I deployed 5 times. I have not read that shit once!1 -
Got 'em stickers woohoo! All the way from Philippines. Letter got wet in the rain but the stickers are in good condition. Thanks devRant!4
-
This condition over here which is never supposed to be true sometimes becomes true, no one know how or why, just change it manually in prod whenever that happens...
-
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 -
When devs clash:
-See, I've got this *condition* where myDick() is bigger than yourDick(), so Try{} me and see what you Catch{}2 -
As nobody's ranted about it yet per search results on dR: XXXTENTACION was shot in a supposed drive-by and is now hospitalized in an unknown/unconfirmed state. A witness also reported him not having a pulse
https://daytondailynews.com/enterta...
https://variety.com/2018/music/...7 -
What do people like more?
if(condition){
return true;
} else{
return false;
}
Or just
if(condition){
return true;
}
return false;7 -
The second you write `else { return false; }` you should lose the privilege of calling yourselves a dev, from then on. Period.
Example,
if(condition) {
// ...some code
return true;
} else {
return false;
}14 -
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 -
> Finally write some wicked code that fixes a weird race condition bug we’ve had for two weeks now
> xCode breaks for absolutely no reason on a build so we can’t release a new version
🤦♀️1 -
Yo vim what the fuckin fuck.
I like vim, i try to use it as much as possible since i feel more confident with just using a keyboard BUT WHAT THE FUCK.
I am developing an application to improve my python skills and I chose vim to do so. I made some “big” changes today to it using vim. Every time i made a change that i had to test, i was saving it with :w and then running it on my second screen. All good until now.
Then i wanted to make a minor change using vscode because i thought it will be easier there. Anyway, i used :x, opened vscode AND MY CHANGES WERE REVERTED to the first condition my file was when I opened it today.
Vim is awesome, maybe it was all my bad, but how the hell did that even happen?2 -
Can I go to CTO and demand that he will demote a "senior engineer" (who takes senior's paycheck) who don't know what "race condition" is, and how to design/deal with it?
Why? Why I can't?15 -
I am currently writing a software product for NHS patients and one of my tables was named 'condition'... guess who lost 2 hours of debugging...5
-
I've seen some posts on remote work. I believe all companies should permanently implement remote work if they cannot arrange a proper office.
I have been working for a company where programmers and project managers work in the same room, and sometimes I was trying to understand some problem in code when managers were screaming next to me at other developers or on the phone, because they couldn't hear themselves.
This happend so often that I would literally go home burned out.
Also there were people coming in the room to talk to the managers or just passing next to my screen every couple of minutes which was extremely distracting.
I bought a pair of over ear noise cancelling headphones and on top of that used ear plugs, but eventually I developed a very strange stress condition over the course of a year. Also listening to music while trying to focus for 8 hours a day while at work is very tiresome.
Also couldn't quit because it was my first job. -
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 -
TL;DR: There was a Steam bug and I fixed it locally.
Some months ago, Steam had the problem, that if you tried to add anything from the Steam Workshop to a collection, you would get an error like "Process failed: 2", while it was loading the collection list.
I realized, that it would work, but there was a bug in the JS (Watched the network tab in chrome while trying to add to collection). I searched after "Process failed" in each js file and after 30 seconds I found the buggy if. It said something like
if (json.success != 2) {
//do error
} else {
//show list
}
After I changed that if condition to
if (false)...
it worked perfectly, although it would make problems if there would be a server side error.2 -
F*ck software updates..
So while working today, one of the IT support guy came and asked to update my windows machine due to some stupid company 'security policy' they were following .. That update took more than 3hrs.. The reason it took so long because I somehow managed to avoid any updates for 6-8 months.
But that is not the end of the story... Windows update was followed by a bios update, some softwares, and at this point I just gave up and went for a cup of coffee, and left my machine locked in a drawer still updating and it will stay in this condition until tomorrow.. We'll see if something breaks after updating.
F*ck why are there so many updates and why each of them requires a f*cking reboot...
Productivity today was less than the number of side projects I completed. 😪6 -
After a few months of working in an actually well coded project, I'm back in the one where I find abominations like this every day:
boolean result=false;
<do stuff>
if(<condition>){
<do stuff>
return true;
}
<do stuff>
return result;
Do they even read their code before submitting? -
Someone tell me should I just give up because I'm stupid and simple shit escapes me or tell me bro calm the fuck down the guy is full of shit...
Dude says he can't verify 3rd statement in a nested IF - elseif logic because the third check for a false condition is the True condition in the first 2 statements.
So
If (mode) = manual and then
Data(g) /= Status1
Or else Data(g) = Invalid
Then
Do this thing that sounds cool
Elsif
Data(g) = Status1
And then Data(g) /= Invalid
Then
Do something else equally cool
Elsif (mode) /= manual
and then Data(g) /= Invalid
and then Data(g) /= Status1
Then
Do some less cool stuff
end if4 -
one more time, I proud of my team and MD too.
XYZ is our office boy. He completed his BSc IT from 3rd Grade college due to family condition and lack of knowledge, he has to work as an office boy.
So my team decided to teach him web development. We are starting it from very basic. We get total 1:30 hours of a lunch+snack's break so each one of us will give 1-day to teach him but It is not free. We will need good coffee in this deal. Our MD like this idea and promised us that once we gave him a green signal. He can do his first internship here. -
Do you prefer?
var foo = true;
if (some condition){
var foo = false;
}
Or
if (some condition){
var foo = false;
}
else{
var foo = true;
}9 -
Coolest project I'll continually be working on.
http://jimquessenberry.com
Selling my Dad's famous BBQ sauces and rubs has been my hobby and passion for years. I'm lucky that my Dad was a computer enthusiast in the 1980's and also had a knack for marketing himself. All the while also being a somewhat famous character in the pioneering sport of competition BBQ cooking.
My brother and I shared the following machines growing up:
Commodore 64 w/ 2 Disk Drives, VicModem, & Tape Drive
Tandy 1000 Original Radio Shack IBM PC Clone
IBM 5150 w/ 20mb Hard Drive Expansion (Still Have This In Near Mint Condition)
Tandy 1000 RSX 386 with Win 3.11 For Networks
A Homebuilt Pentium 90 MHz Tower with Soundblaster and 16bit onboard video.
All that time on those machines learning various flavors of BASIC and crude graphic design got me where I am today.
That and learning how to BBQ... ;)8 -
After weeks of burning the candle at both ends you finally get a good night's sleep.
You wake up and either have a skin condition or a beard had grown and you didn't notice. All joints sound like a bowl of rice crispies when you move and you're seriously beginning to identify with Rip Van Winkle. -
I meet a CEO of a company. Having attitude like he knows everything. And give speech on any topic. But speech won't match the topic at any condition.
I meet him I asked what project do u have and all.... He showed me some website projects... With source code it was fine to me...
The thing is before showing the website project. I asked him in which backend language Website are developed...
Answer: php. I ohh php ok.
And he suddenly replied we have also used HTML & CSS.. 😵 😵 I was shocked I thought wtf?? how can a website can be developed without HTML & CSS...3 -
I'll reply to your long email if I'm going poop. This permutation of events is a necessary condition.2
-
" 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" -
Them: "We need you to do this thing this way because it isn't possible to do the right way."
Me: ... *codes script that works the right way*
Them: "But it was actually this other thing we didn't say anything about that isn't possible."
Me: ... *codes script with new condition, still works*
Now repeat daily for 2 weeks and we may get to where I don't just silently provide a working script.
Maybe I should have just done it the wrong way to begin with? -
Stack overflow is full of useless assholes, like I asked a specific question about a problem I am having that is similar to another problem that exists but it is not the same at all in terms of how to fix and instead of helping I’ve got 2 downvotes on it and a comment linking me to a completely unrelated stylistic based question based on something I SAID I HAD ALREADY TRIED CHANGING IN MY QUESTION!!! Here’s my question btw in case anyone can help here before I smash up my laptop 😑:
I have a piece of code in which I am trying to read in words which have been categorised using a number and then placed in a text file in the following format "word-number-" with a new line for each word. However, despite not mixing cin>> and getline and having tried a number of methods I still cannot get it working.
So far I have attempted using a cin.ignore() call to clear any '\n' char's from the buffer, as well as checking if the file is opening in the first place (it is), and using the >> operator instead throughout my code however I could not get that working either. When I place the get line call inside the condition of the while loop, the while loop doesn't run, however when I make the while loop condition a .eof() call it will run once however when I try to print the text that has been read from the getline call it just prints a blank line.
if(file.is_open()){
while(!file.eof()){
getline(file, text, '-');
count++;
cout<<count<<endl;
cout<<text<<endl;
if(count%2 == 1){
wordBuff = text;
}else if(count%2 == 0){
if(stoi(text) == wordClass){
wordList.push_back(wordBuff);
}
}
}
file.close();
}
While I recognise there are a lot of other questions on this out there I cannot seem to get any of their solutions to work and the vast number being related to people mixing the >> operator and getline doesn't help, so any tips or solutions will be of great help -
I see a lot of people ranting about programming exams on paper. I acknowledged that not having a texteditor is not ideal. But not having a compiler is essential in testing the students programming skills in the first few courses.To many students are completely dependent on the compiler.
Syntax:
Some students writing C++ code have to try to build their program as many times they have lines because of all the syntax errors they make. Why think about all the ; if your compiler will tell you where they are missing?
Computational thinking:
As a programmer you should be able to look at (your own) code and be able to tell what the result should be. Of course this has its limits, but in the small exam questions they get in the first few courses they should be able to do that. To many first year students write a for loop without thinking about the starting value and the end condition. With the repeated process of running the program, changing the starting value or the end condition randomly they eventually get to the loop they need.
I think people underestimate the value of an exam without being able to compile or run your program. But I like to hear your reactions. -
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 once sat hours over a bug I couldn't understand until I finally saw the '!' in the condition. I started to use triple '!!!' for a while to avoid overseeing them.
If (!!! enabled) {// like really really not enabled
enable() ;
}2 -
The condition of software development in 2019: “Please don’t apply if you don’t have the core concepts of programming, and you depend upon copying and pasting the code from StackOverflow/saved file.”2
-
The heat. Is fucking unbearable. Im sweating my fucking face off. I turn on air condition for a while and then its good but cant turn it on nonstop cz high electricity bill (fuck off) so when i turn it off i stard meltdowning19
-
DevRant might not be a perfect place for that question but what the hell.
This is a question for people that do side projects, not only programming but electronic and mechanical as well. If you are a student even better.
(I dont wanna discourage non students but i have limited resources here...)
So the question:
While making a project have you ever had a problem where a limited access to tools was the problem?
(maybe tools was here but nobody wanted to borrow you because of paperwork or some bs.)
I mean that you had a idea or was in middle of a project and you didnt finished/(finished but in crappy condition) because lack of proper tools didnt allow you to?
I realy need your opinion on that subject, i have a nice idea i just have to test the waters.
And please tell me if you are a student or not.8 -
Process forking, signal handling, socket communication and race conditions. If I smoked I would have gone through a carton today.
-
Ever given access to production data to correct a data entry that doesn't have a PATCH api ready?
Ever ran UPDATE table set COLUMN="value"; without WHERE condition?
Ever done both of these sequentially?
Yeah. DB snapshots cost a bomb to restore :( -
So I found a bug in Azure's alerting platform that means we cannot use response time as a condition.
A month down the line after having raised a support ticket, recreated the bug multiple times in different resources, being told a fix had been made, bouncing emails around to supervisors and having the case moved to other people they finally have come back to me saying they have the real fix.
Done with it4 -
When your co-worker thinks he's funny by adding a semicolon at the end of a condition resulting in a way too long bug search...1
-
Wrote some code, not realizing code has TOCTOU race condition until a healthy 4 hours later, and the fix was to move two lines of code upward. I hate me, myself and I.
P/S: What happened to PrivateGER, devTea and linuxxx?3 -
Some time I just love comments that are brain twisters.
```
( [ helpers.must_not(helpers.prefix("response", "10")) ] if _type=="detractors" else [] ) )
# Above line prevents the condition 10 is 1 but 1 is not 10 making 10 is 10 and 1 is 1 and 1 is not 10
```1 -
I've just realized that I am too damn annoyed when somebody touches my workspace without me knowing. It's not right to flip out that easy and probably it's about my current mental condition.
And the thing is I'm more annoyed due to knowing that. Ironic.2 -
I give up. I am having trouble understanding Go lang *, & stuff.
attached code does print what fmt.Println has, but the function calling: FindByID is throwing invalid memory address or nil pointer when it attempts to use the result of the code.
Can someone please explain where I'm wrong?
Error log blames the line of "if" condition even though fmt does print its output to console16 -
Bad coding style:
bool condition = false;
if(condition) { /* enough whitespace so that braces appear offscreen in editor*/ }{
std::cout << "hahahahaha" << std::endl;
}6 -
Been debugging a sp in oracle from 2 days a fucking sp of 2000 lines to see why it was not not giving desirable result. Turns out a fucking variable had a null value which was always satisfying the greater than condition an fucking up the flow. The fucking sp is being used since ages and nobody fucking noticed i mean what the actual fuck. And also the fucking indentation of the code how the fuck are u supposed to know which if ends where i mean come on put some fucking comments to your fucking code if u are gonna make it like it is gonna be the ultimate fucking sp which is being used god only know how many places.
-
#define someError ( -1)
int func(params *param)
{
//some code
if(condition)
{
someError ;
}
}
Spent like half and hour on debugger thinking why the fuck does it skip my statement. My manager who was passing by saw me puzzled and asked if he could help, so we spent another 10 minutes without success(tho my manager is technical guy but he had an unlucky moment I guess). Eventually senior manager saw our wtf faces and asked what is going on, it took one question for me to light the bulb "someError is a macro right?"
I guess you can imagine my embarrassment at that moment..
PS: Forgot return keyword before the error code. -
A few days ago I took some time off at short notice to help someone close to me with their medical condition.
On the same day the CEO of the company made a request that only I could've fulfilled out of 12 devs so yesterday I was reprimanded for it.
Why don't companies do something to actively increase the bus factor on projects? -
According to project manager :
You will just write an 'if' and two 'for' condition in the code. That's it. 😉
According to developer :
Should I code that generically. 🙄
According to software architect :
Change those variable names. And also that code was written huge unexpectedly, you must move this another service.🤔
According to DB Admin :
Put on an index this table. 🤬😠 -
I knew concurrency is *bad*, but *that* bad‽, just shocked: https://blog.bugsnag.com/bug-day-ra...2
-
What's the funniest, coolest, programmer slang you've heard?
I love the Rubberduck, and Yoda Condition.. cracks me up :P3 -
I’ve abandoned the classic for loop from my tool belt for quite a long time now. The vast majority of the code is functional.
But today I’ve encountered a problem where I’m considering to use the imperative for loop again because I can’t come up with a good functional approach.
Maybe you guys have an idea.
I have a list of items and I want to make a new list which is like the original list, but it has extra items in between of some other items.
The tricky part is that there is a condition that needs to be checked for each pair of items to determine if the new item should be inserted in between. Otherwise nothing should be inserted.61 -
A videogame that I play has an achievement for getting all the achievements.
Has a developer, this just reads as an always false condition. -
From: https://cloud.google.com/vpc/docs/...
---
Updating firewall rules:
You can modify some components of a firewall rule, such as the specified protocols and ports for the match condition. You cannot modify a firewall rule's name, network, the action on match, and the direction of traffic.
If you need to change the name, network, or the action or direction component, you must delete the rule and create a new one instead.
---
REALLY???? goddamn delete and create a new rule to damn changing even its name???
And they wonder why their goddamn cloud won't take off? hell... how can this even be a Google product!!??5 -
Recently our management department discovered the advantages of setting up CloudFlare DNS and their CND for a website. In our case that made perfect sense and also helps a lot with the performance.
A while ago someone noticed that in the backend of the CMS the site uses, stuff that is being loaded via AJAX is not loaded at all and just displays an empty container.
3 hours into debugging I discovered why: Someone thought it would be a good idea to base a condition on whether there was a certain HTML comment inside an element, rather than using a class or something else.
A comment.
The HTML minifier removed that, so I ended up having to disable HTML minifying, at least for the backend.
Thanks, whoever thought it would be a good idea to base logic on the existence of a comment.1 -
When you test your code, it passes all 100 tests & still shits in the rehersals of a competition 😌 Only because I wrote a wrong if condition🔥
-
This simple task will finish in the next 10 minutes I thought...
4 hours later it is just in workable condition and still needs to be tested for bugs...🥺 -
Wanted to add alerting for systemd services in Prometheus today, which spontaneously turned out to be a huge pain in the lower human backend.
For some reason, on Ubuntu 16.04 systemd adds services without unit files for software, that isn't even installed on the damn server (in this case for mysql-server / mysql-common and mysql-client are installed) and lists them as "not-found" and "inactive". The prometheus node exporter that we use, has a little bug in the systemd collector that makes sure that the states of *all* services are collected - even those without a unit file.
so those metrics are pulled by prometheus and now I have to take with those faulty metrics in the condition logic of the alert, because I'm trying to trigger that one on a service which is listed with state "active" = 0 or "failed" = 1.
now guess. right! If the unit file doesn't exist, the regarded systemd service is marked as "inactive", which is another possible state of the metrics in the node exporter. the problem is that the value 1 for state "inactive" means, that "active" has the value 0 (not even wrong) and the alert is triggered.
so systemd fucks up somehow, the node exporter collector fucks up because systemd fucked up and I have to unfuck this with some crazy horse shit logic. w.t.f. to that.
the only good news is, that it works like a charm on Ubuntu 18.04, as far, as I can tell.
while writing this little rant, I thought of a solution.
I could try to change the alert condition to state "active" = 0 AND "failed" = 1.. but that will wait till tomorrow.
one does not simply patch monitoring conditions at midnight..3 -
"It is not easy to know what you like. Most people fool themselves their entire lives about this. Self-acquaintance is a rare condition." - Robert Henri
-
Yay, nothing better than good ol' change request... Right?
Let's see...
Limit user's ability to do sth, if this condition is met, allow editing global parameter of this condtion, than add per action overrides, on top of that add per-user override, on top of that add per-user overrides to ignore certain overrides.
Shiit man, reading this took me 3-4 times and still Im not sure if I 100% understand
Okay, I think I got this.
setting
per-user ignore flag to setting
override to setting
per-user ignore flag to override to setting
override to override to setting
per-user ignore flag to override to override to setting
design assumption: automatic system that can make life easier
me: designed system to be fully automatic
every single change request: be less automatic, require more user manual and more attention to work2 -
One of the worst practices in programming is misusing exceptions to send messages.
This from the node manual for example:
> fsPromises.access(path[, mode])
> fsPromises.access('/etc/passwd', fs.constants.R_OK | fs.constants.W_OK)
> .then(() => console.log('can access'))
> .catch(() => console.error('cannot access'));
I keep seeing people doing this and it's exceptionally bad API design, excusing the pun.
This spec makes assumptions that not being able to access something is an error condition.
This is a mistaken assumption. It should return either true or false unless a genuine IO exception occurred.
It's using an exception to return a result. This is commonly seen with booleans and things that may or may not exist (using an exception instead of null or undefined).
If it returned a boolean then it would be up to me whether or not to throw an exception. They could also add a wrapper such as requireAccess for consistent error exceptions.
If I want to check that a file isn't accessible, for example for security then I need to wrap what would be a simple if statement with try catch all over the place. If I turn on my debugger and try to track any throw exception then they are false positives everywhere.
If I want to check ten files and only fail if none of them are accessible then again this function isn't suited.
I see this everywhere although it coming from a major library is a bit sad.
This may be because the underlying libraries are C which is a bit funky with error handling, there's at least a reason to sometimes squash errors and results together (IE, optimisation). I suspect the exception is being used because under the hood error codes are also used and it's trying to use throwing an exception to give the different codes but doesn't exist and bad permissions might not be an error condition or one requiring an exception.
Yet this is still the bane of my existence. Bad error handling everywhere including the other way around (things that should always be errors being warnings), in legacy code it's horrendous.6 -
Freaking coding conventions...
Just chose something and stick to it.
How hard can it be?
Apparently this hard:
if(condition){
//SomeCode
}
else
//SomeCode1 -
Docuware, oh Docuware.
Meant to be an archiving system, but the moment work flows were seen by our director the ball just went out of the court in terms of implementation.
We've gotten to a point where we don't want to use Asana for ticket tracking and task assignment, we don't want to use a tool that acts as a man in the middle to push information to dbs, we want to use workflows with set conditions to automate every single process in the company. Why? It's cheaper.
The syntax is alrightish for arithmetic expressions, but there are so many limitations that we've gotten to the point where we're absolutely circumventing the entire point of the software.
Initialise variables, Condition, condition, condition, draw data from external sheet, process based thereof.
"oh, why doesn't it display images on the populated forms? I don't want it just as an attachment I need to click next to see".
Frustration is paramount, but the light is at the end of the tunnel.
"Oh, did I mention that we need digital signitures?" you need an additional module Mr boss. "no, I bought the cloud bundle. Make it work".
Powerful tool, I'll give it that, but it's downfall is its lack of being comprehensive.
Month 3, here we go.4 -
I'd tinkered with computers for a long time but the breakthrough moment for me was a robotics class in elementary school where I programmed Legos in TC Logo.
That summer, I made a washing machine with multiple cycles and a door sensor to interrupt the cycles.
Soon after, I played with the code for Gorillas in QBasic to fix a race condition when running it on my 486 at home.1 -
I have not been able to work for quite some time already due to a chronic condition getting worse. Even when I have been at work I wouldn't get anything done due to chronic pain (a literal pain in the ass), so this year hasn't been very fun so far. I cannot sit nor stand for extended periods of time. I just want to be able to work again! :C5
-
I have a biorhythm thing. Every day at around 5pm I get so drowsy I fall asleep in my chair while working. If I happen to be driving at that time then my drowsiness becomes a potentially lethal condition.
It lasts for ~30minutes to an hour. Every day, no matter what. Coffee won't help at all - if anything, it makes it a lot worse.
It's been like that for well over 10 years. Anyone else has smth similar? How do you fight it? Powernaps help, but if I'm in a meeting I can't have them.12 -
I want to create a condition on my webpage that only when a user is a YouTube subscriber he/she can make downloads.
Someone have any idea how i could do that? 🤔 I tried github and stack overflow but had no success
I looked on github, but had no success.11 -
I once declared and initialized a variable with a default value all together. (var a= "default";)
And in a certain IF condition the variable value has to be changed, so i was changing the value of the variable inside IF condition. If (x==y) { a=" newVal" ;}
During a code review i was asked why i am not assigning the default value in ELSE condition. And i was like whut 😑.
So........ Some Programmers be like IF shouldn't exist without ELSE.6 -
Is any of it real? I mean, look at this. Look at it! A world built on fantasy. Synthetic emotions in the form of pills. Psychological warfare in the form of advertising. Mind-altering chemicals in the form of... food! Brainwashing seminars in the form of media. Controlled isolated bubbles in the form of social networks. Real? You want to talk about reality? We haven't lived in anything remotely close to it since the turn of the century. We turned it off, took out the batteries, snacked on a bag of GMOs while we tossed the remnants in the ever-expanding Dumpster of the human condition. We live in branded houses trademarked by corporations built on bipolar numbers jumping up and down on digital displays, hypnotizing us into the biggest slumber mankind has ever seen. You have to dig pretty deep, kiddo, before you can find anything real. We live in a kingdom of bullshit. A kingdom you've lived in for far too long. So don't tell me about not being real. I'm no less real than the fucking beef patty in your Big Mac.3
-
ITS VBA again!
I made two misstakes today.
The first one was touching vba, the second one was assuming things.
The two statements are almost the same except the braces. VBA uses IF [condition] THEN..i soo foulhardly assumed that, when you just chain conditions together with an AND its taken as one statement. While in reality it apparently ignores some conditions and not some others.
I really dont bother with VBA a lot and try to avoid it, but upon occassion the need arises. I still dont know why the brace variant does the expected behaviour while the without does not. It seemingly does not ignore thew first two conditions but the third which makes it even more confusing. But as i dont know enough about VBA to say with confidence its on Excel and not on me i squelch my rage and tend the happiness that it now works..somehow. -
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
-
Somehow I found Rousseau's the social contract.
I'm early into it since you know fucking chomo faggots with no balls keep screwing the world up trying to steal real peoles personalities and make them queer which eventually will lead to a generation that murders them being bred.
Anyway I found a love phrase.
Slaves loose everything in their chains even the desire of escaping them.
He continues.
Force made the first slaves, cowardice perpetuated the condition.
In short
The world being full of cocksucking perverse house niggers that love the taste of table scraps is the problem of the free man whose life is being devoured by scum like tosensei5 -
there is time when you're bored to death and you don't have any project ro work on, and again there is time when you have plenty of projects offer started.
BOTH CONDITION SUCKS,
I'm only one person who need atleast 4 hour of sleep -
program, which should save report from db to file, running a couple of minutes:
1) despite prefetch precompiler option no fetch was prefetched, because for every next line fetch cursor was reopened with condition WHERE some_val > prev_val
2) allocated array of host variables to fetch 100 rows per call to db client api
program is running under 3 seconds now -
Ugh, fuck the SSRS web service. Spent all week trying to consume the service with PowerShell, doesn't make it any easier when there are undocumented behaviours. TypeName property has to be Type, for instance, when creating a search condition, TOTALLY contrary to the documentation.
Want to change the data source for a report you uploaded? Gl;hf! Back to it next week, think I'm close to having a working deployment script...so close. -
Spent almost 2 hours looking at the apache conf I was given only to find out all the rewrites were broken due to a missing '/' on the mod rewrite condition. Fml
-
Recently I've purchased a new laptop and so far it's working smoothly as I expected.
And yesterday I had a dream in which, laptop was got broken in the middle where the screen gets attached. And there was a last day for replacement as per return policy (idk really whether they allows if laptop got physical damage). But I was trying very hard to get the internet to submit a request for replacement and suddenly I woke up and very first I checked the laptop condition.
Anyway today I'll goto sleep and again will try to place replacement request for my laptop before date get expired.7 -
ENOSPC = random things go wrong.
There are many synonyms for ENOSPC, like "disk full", "space storage full", "space storage exhausted", "no more space left on device", and those other repulsive errors. For the sake of simplicity, I am going to refer to it as ENOSPC.
If you are in this condition on the operating system partition, get out of it quickly or random things will go wrong. Text editors which write directly to a text file rather than creating a temporary file and then replacing the text file could end up blanking the text file, softwares' configuration files might fail saving which causes a reset, and web browsers might spontaneously reset cookies and lose history.
For example, Firefox has created a gap in the web browsing history, as shown here. The history that is now memory-holed initially appeared to have been recorded successfully. Apparently, a failed write to the places.sqlite database when closing the browser created this gap.4 -
So I just made a deal. I am selling my Galaxy S5 16gb + 16gb mem stick, which is in excellent condition along, with the original flip case and a Spigen slim armor case and a protective screen, for 150€.
I'm replacing it with a Galaxy S6 32gb with a slim case and protective glass along with new headphones and also in excellent condition, for 200€.
For 50€ as true cost to go from S5 to S6, I think it's a pretty decent bargain people and also a nice upgrade. What do you people think? -
Merging datas using spark sql with two conditions.
my code:
1.merge with first condition
2.merge with second condition
3. 1.unionall(2)
This gives some extra datas(total=10000 and result=10220)
$better way?any way? -
PAGE BREAK AFTER IS FUCKED UP. FML
ok guys, if you have any recommendation or alternative to page-break-after, please let me know. im desperately in need of a goddamn solution.
heres my problem, ive got a table, inside the table is the tbody, now i only want two rows to be displayed in each page (im doing html for pdf docs). so what ive been trying to do is adding <tr class="display:block;page-break-after: always !important"> whenever it meets the condition (rowCount%2!=0).
Ive been trying to figure this out for the last 12 fucking hours. cheesus fucking crust. ik this isnt stackoverflow but stack hasnt really been helpful as well :( FML6 -
can 2 modal which is static have a race condition error? I’m trying to fix a bug and when I showed it to my senior , I said maybe because of the first modal the style is not being applied on the second modal he then said “it might be a race condition” and I almost choked on my own saliva.
Ps: the first modal will show a loading text and a gif after that the second modal shows with some data.
I got confused how he think that it might be a race condition. We’re not doing webworks on the front end. Weird.2 -
!rant
Once I was in a programming class, and the teacher was explaining the subject for the class, and this guy asks something (about using an else after an if condition, because of efficiency, I think) and he replies with something like "yeah, you know, I like to live dangerous". I kid you not (yes, he said DANGEROUS instead of DANGEROUSLY). I had to try not to laugh out loud. -
Can someone please explain me why the fuck the following doesn't work in C#?
Dictionary<string,object> mex=Json.Deserialize(data.ToString())as Dictionary<string,object>;
if(mex.ContainsKey("sessionId") && mex["sessionId"].ToString()!=tkn.GetSessionID())
the previous condition is NEVER true, but the following:
Dictionary<string,object> mex=Json.Deserialize(data.ToString())as Dictionary<string,object>;
if(mex.ContainsKey("sessionId") && mex["sessionId"]!=tkn.GetSessionID())
will actually work as expected.
tkn.GetSessionID() returns a string, of course
and mex["sessionId"] is always an object that contains a string in form of a number, like 152, 552, 6246 and so on and no, it won't ever contain any blank or other character
Fuck this fucking shit from C#8 -
God damn it!
Tried to use scipy's UniveriateSpline on some (x,y) coordinates that I have and it throws errors because I have multiple x values with different y value. UniveriateSpline expects all x values to be incresasing. Problem is I want to use these values, otherwise the result might be different than expected. B-Splines shouldn't be dependent on this condition or have I missed something in my studies? Documentation doesn't tell me anything.🙄 -
Hypothetically, if you had a disease and needed to fix it on your own or would open the possibility of a worse condition… how would you manage that situation…. And let’s say, you were also the only one that knew about it; and, it had to be that way?…21
-
Recently joined new Android app (product) based project & got source code of existing prod app version.
Product source code must be easy to understand so that it could be supported for long term. In contrast to that, existing source structure is much difficult to understand.
Package structure is flat only 3 packages ui, service, utils. No module based grouped classes.
No memory release is done. So on each screen launch new memory leaks keep going on & on.
Too much duplication of code. Some lazy developer in the past had not even made wrappers to avoid direct usage of core classes like Shared Preference etc. So at each place same 4-5 lines were written.
Too much if-else ladders (4-5 blocks) & unnecessary repetitions of outer if condition in inner if condition. It looks like the owner of this nested if block implementation has trust issues, like that person thought computer 'forgets' about outer if when inside inner if.
Too much misuse of broadcast receiver to track activities' state in the era of activity, apપ life cycle related Android library.
Sometimes I think why people waste soooo... much efforts in the wrong direction & why can't just use library?!!
These things are found without even deep diving into the code, I don't know how much horrific things may come out of the closet.
This same app is being used by many companies in many different fields like banking, finance, insurance, govt. agencies etc.
Sometimes I surprise how this source passed review & reached the production. -
So, I have a problem I'm working with mongoose in nodejs and I want to make a dynamic query like I have 2 fields gender and type of room and these are optionals so what I did I wrote an if condition that if gender is not undefined a variable which is q += "gender:" + " ' " + gender + " ' " + ","; and when I pass this variable in find() it doesn't work but if i write the same query directly there in find() it works what seems to be the problem?1
-
[`script(x) ` for x in iterable if condition else command] [#:#]
Complex code in one line
#python
PS. That can be more complex, but I am lazy to continue with this -
In honor of https://devrant.io/rants/875346/... let is graphically show threaded race conditions:
0
1
2
36 -
So pissed off at aws. My goal is to deny the creation of any taggable resource without having a specific tag on the organizational level. (tag policies, service control policies, etc)
Tag policies do not have any effect if the resource is created without any tag. WTF.
I managed to put together a service control policy, that makes it impossible, but since not all resources are taggable, I had to list every taggable resource in the policy and put every read action on a condition. Surprise: the policy exceeda the max size limit. FML. -
Trying to fix an urgent issue with our Xamarin iOS app and a known bug in Xamarin "IOException: Sharing violation on path /Assets.xcassets/AppIcon.appiconset/Icon-1024.png" is blocking me.
Luckily I still have my old laptop from my last upgrade on standby, boot it up and it's not using the affected version of Xamarin. 😃
Instead this one has the also know "/ios/release/mono/mini/mini-arm64.c:5439, condition `native_offset % 4 == 0' not met" blocking issue when debugging. 🤦♂️
I just want to do some work. ☹3 -
I could calculate the percentage of a value from a total set right from the top of my head. This includes large numbers like for example; finding the percentage of 1040 from 75000 = 1.377%, 344 from 5400 = 6.37% and so on...
But most times when I come across scenarios to apply such calculations on code I find myself googling for formulas and then I wonder; how am I able to come to a valid result when faced with similar challenge but could not recall or tell the formula my funny brain is deriving it's results from.
Maybe my brain isn't even using a formula. :/
So I guess because from pondering on how I arrived at results, I could tell I'm starting from an "if"...
Like:
If 25 of 100 = 25%
and 45 of 250 = 18%
Then 450 of 2400 will equal 18.7...%
Ask me what formula was used in the first "if" condition and I can't tell because that's common sense for me.2 -
hello i'm trying to do a loop to all of our users account and see if they have already a partner or pair but the problem is after 2 user, the loop just stops and won't loop to all user accounts that's available. Please don't leave me hanging or leaving comments with no solution just like stack overflow.
<?php
$sqlo = mysqli_query($conn, "SELECT `username` FROM users");
$i=1;
$counter = array();
while ($h=mysqli_fetch_assoc($sqlo)) {
$counter[$i] = $h['username'];
$i++;
}
for($i = 1; $i <= Fixed_count($counter); $i++){
$b = $counter[$i];
$query1 = mysqli_query($conn2, "select * from `$b` where username='$newuser'");
$query2 = mysqli_query($conn2, "select * from `$b` where `status`='yes'");
$user1 = array();
$user2 = array();
while($result = mysqli_fetch_array($query1)){
$user1['username'] = $result['username'];
$user1['status'] = $result['status'];
/*more user info*/
while($result2 = mysqli_fetch_array($query2)){
$user2['username'] = $result2['username'];
$user2['status'] = $result2['status'];
/*more user info*/
if($temp_counter < 4){
if($user1['username'] != $user2['username'] && $user1['status'] == "yes" && $user2['status'] == "yes"){
if(/*more condition*/){
/*if condition's are met execute process*/
echo "Success!";
continue 2;
}
}else{
continue 2;
}
}
}
}
}
echo "Loop stopped at user: ".$i;
?>7 -
Mantaray Trailer Hire Mackay offers trailer rental services. We have trailers of all sizes, from small to large, capable of carrying payloads from 400 kg up to 1300 kg. Hire a trailer for rubbish removal, furniture transportation, or car transportation. A trailer ramp is available with the caged trailer. Hand winch available for flatbed car trailers. For those looking for a reliable trailer rental service provider, Mantaray Trailer Hire Mackay is a one-stop shop for all your needs. We are committed to providing quality and reliable trailer rental services. We guarantee that our trailers are well maintained and in good condition. Now in two convenient locations. Simple online click and collect.
-
I want to jump into android app dev. My first plan is to start build one using flutter and dart language but my workstation is slow. Android studio is hogging my memory and it really slow me down plus bad experience. I plan to uninstall android studio and using other tools. Can anybody suggest what kind of tools that suitable for my current condition right now?9
-
Python working non-deterministic on VSCode? That just happened ... somehow, wtf??
Getting a list from a method and comparing its last element with an int value. Always worked before like a charm, didn't change a thing. All of a sudden TypeError, cannot run anymore? Restart VSCode, run again, still not running ... ?? Retry and print the element, in case I've surprisingly actually been an idiot all along ... nope, value looks in print as expected. Continue execution, suddenly condition works again. WTF just happened??? Caching, python extension bug, anything like that to blame?1