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 - "true=true"
-
Girlfriend thinks the only reason I feel her breasts is because I don't have a DevRant stress ball 🙈🤔🤓17
-
Me: I’ve been in the web since 2006, of course i know html,css,javascript.
Also me: Google how to center a div.28 -
Me-
/ / / / / / / / /
if (bool == true)
{
bool = false;
}
if (bool == false)
{
bool = true;
}
/ / / / / / / / /
My friend-
/ / / / / / / / /
bool = !bool;
/ / / / / / / / /
*not a real story*15 -
My boss asked me to do tech support today as one of tech support employee was not feeling well.
The very first call i attended, went like:
Me : Sir, this is xyz support desk. How may i help you?
*Listening his problem*
Me : Sir solution is pretty simple. Just do a Right click on application shortcut icon and then select "Open File Location".
Client : where can i find "Right Click"?2 -
Support: A customer complained about a nasty bug.
Senior Dev: There are no bugs in our software, just challenges that need to be solved.2 -
Why have you not yet approved my PR?!!?!
The PR:
```
role.filter(elem => elem !== "view" ? elem !== "use" ? elem !== "admin" ? false : true : true : true)32 -
Where I work, in our database, we use 3 to indicate true and 7 to indicate false and 0 is true but null is false
In another table, we use 'P' to indicate true and 'I' to indicate false and 'Y' is also false and null is false
And the most used table, we also use 'Y' to indicate yes and 'N' to indicate no, but null is also Yes.
We also store integers as varchar in a live table, but stays an integer in all the other tables. I hope I'm not there when the number of digits exceeds the varchar limit.
These are all live and used in production all created by my boss, the head of IT.8 -
Want to piss off the person reviewing your PR?
don't just return true or false use 1 == 1 for true and 1 == 2 for false.
Watch the glorious rage unfolds 🤘🤘🤘6 -
Just found this while trying to understand some code:
```
bool ok = true;
if(ok) {
// lots of code here
} else {
// even more code here
}
```
I thought this was worth my first rant...6 -
Everything but UI/UX
Because I suck at it, lame but true, I love every kind of code, from MEAN and LAMPP to assembly, but when it comes to UI I just lack of the imagination and creativity to design something that looks averagely good.6 -
// Just in case
if ($scope.currentPlatform === 'android') {
$scope.enableDatePicker = true;
} else {
$scope.enableDatePicker = true;
}5 -
If (index == 3) {
return true;
}
else {
return true;
}
Apparently the number 3 is magical or aomething.7 -
Is it true that the seo guys get more ++ because they know how to tag the post in a manner that keeps it on top in algo list?4
-
Not kidding. I just woke up from a dream where Linus Torvalds invited us to his house. We were talking about early days of git and his views on Cloud bleed. I don't want to wake up 😭😭😭
-
bool True = false;
bool False = true;
if (True == true)
{
False = True;
}
else
{
True = true;
False = !true;
}
if (!False == !!true && True == !false)
{
False = True;
True = (!!False)true;
}
Console.WriteLine("Banana");5 -
Time to shine!
Laptop [Check]
Coding Playlist [Check]
Motivation [Check]
Focus...
Oh look an Interesting YouTube Video that is probably just clickbait... *click*
Started coding 2 hours later... -
this code is messy .. it has to be refactored..
abstact those classes to commom interfaces .. create a base class for all those common classes .. make this a parameter, make that a setting.. generalize this, pass a behaviour to that.. separate responsobilities..
hmm .. need to handle that special case .. let's just add a temp method for now to get it compiling .. //todo this later .. maybe add a couple virtual bools to handle the base class behaviour
238 compilation errors! .. let's do a static var for now on this.. and just add this for backward compatibility .. maybe hardcode that dll name, I know it'll NEVER change..
aah finally, all compiles..
oh..
this code is messy .. it has to be refactored.. -
Amazing client.
Want to add parallax effect to whole website (yes I also don't understand) after everything is done and final.
After they have moved up the launch date.
After they have asked me to also do the data entry not only the development.
After I specifically asked for ssh access, PHP7+ server and then they asked me to deploy it to their shared hosting through cpanel.
After ...
After ....
After .....11 -
Pet peeve of the week: code with "== true" at the end of boolean expressions.
if (coin.isSilver() == true) ...
which is just as sensible as
if ((coin.isSilver() == true) == true) ...
or
if (((coin.isSilver() == true) == true) == true) ...6 -
So I just had my another CUTSOM (code-until-the-start-of-meeting) practice. 🤷
Proud of myself for pulling it off when yesterday was a day of OS reinstallation-fuckartory and a night of stormy-no-power. 🕺
And at the same time, hating at myself. 🤦♂️3 -
She asked for it...
Me: being happy with my first rant, scrolling through the app on mobile in bed
Gf: aah are you now on instagram for nerds?!
Me: ... (sudden realization how 'our world' may be perceived by muggles)
'5 minutes pass, both on mobile'
Gf: hey can you help me get this *feature* to work on my iPhone?
Me: why don't you can ask for help on your photo platform for cool people?
Gf: ... (sudden realization to be nice in order to get help with iCrap)
True story4 -
My man said "What should I return if the True/False field is left blank?"
WHY WOULD A BOOLEAN BE ANYTHING OTHER THAN TRUE OR FALSE???!!!
I'm gonna have an aneurysm. I shouldn't be educating people on best practices for something that's already been written about time and time again. RESTful philosophy has been documented so much, and all it takes is a quick google search, but noooo! I have to take time out of my day as if I'm a regular old stakeholder to explain that I want the exact thing that I sent in an email two weeks ago. Amazing.20 -
It really pisses me off when people write
if (true)
{
// Something
}
instead of
if (true) {
// Something
}12 -
Colleague: Let's see the luna(r) eclipse.
Me: But that was a while ago.
Colleague: No it is today. Let's go out and see.
Me: Out.!! But how could you run eclipse there?
Colleague: What??
Me: What..?? Oh...!!
*awkward silence*
All the while I was thinking why would a node dev require eclipse, when he could perfectly work with something like vscode. Feels so stupid. -
Looks like I'm @dfox evil twin.
class nerd-san extends dfox {
constructor() {
evil = true;
sunglasses = true;
}
}2 -
while(true){
while(beTired()==true){
goRelax();
}
while(beBored()==true){
goProgram();
}
}
That's a fucking infinite loop4 -
A previous colleague of mine had plenty of years in the industry as a Java developer, but somehow still had absolutely no idea what he was doing. We used to send screenshots of his PRs to each other just to give our eye balls something to roll about - I have never seen anything like it, anywhere.
After multiple warnings of never delivering a single thing he eventually "voluntarily" left the company. He now works at a school teaching programming to students. The circle is complete. -
Computers fear my devaura. Everytime I get called to fix something it magically starts working when I enter the room. 5 Minutes after I leave it broke again.
Repeat like while(true)3 -
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 -
So they are back, wanting another quick PR approved.
The PR:
```
let isDisabled = switch quantity > 0 {
| true =>
switch value !== "" {
| true => false
| false =>
switch inputStatus {
| Valid =>
switch inputData {
| Ok(a) => a !== 0.0 ? false : true
| Error(_) => true
}
| _ => true
}
}
| false => true
}
```6 -
javascript generated captcha and javascript captcha validation in my university website... over hundred thousand students use this website to check results
function ValidCaptcha(){
var string1 = removeSpaces(document.getElementById("AVCODE").value);
var string2 = removeSpaces(document.getElementById("UVCODE").value);
if (string1 == string2){
return true;
}
else{
alert("invalid captcha");
return false;
}
}
function removeSpaces(string){
return string.split(' ').join('');
}1 -
German saying:
Die Hälfte seines Lebens
wartet der Admin vergebens.
means in English:
The Admin waits in vain for half of his life.1 -
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 -
$test = TRUE;
$baby = TRUE;
$egg = 1
$sperm = 1;
if ($test != 'TRUE') {
print "No Baby.";
} else {
foreach($eggs as $egg)
{
$baby = count($egg + $sperm);
return $baby;
printf("Congratulations");
}
}10 -
I hate complex boolean logic.
(true||false) && true || false || (true && false) ... etc (continue for at least ten clauses four times as long)10 -
I have come up with a weight loss program with developers in mind. It involves scaring the crap out of your fellow developers while they work and play on a computer. When you are scared you expend a bunch of energy reacting to the scare. Any number of scare tactics can be employed. They can be surprise (jumping out), conversational (your fired type), screamer videos or programs, etc. The type of scare is up to you. Get creative.
I am calling this program: Boo-Lean
You can choose to use this program or not.5 -
I'm quite shocked today after receiving an email which acknowledges me with so much respect that I cannot handle, I mean this has never happened in my entire life, I can't even handle it2
-
another true story time:
be me
read about banned pokemon episodes on wikipedia
electric soldier porygon: an episode that red blue flashes caused 685 viewers taken to hospitals by ambulances
😈lets try it
write a simple program that makes same light effects
try it on myself
no kill
try it on roommates
no kill
try to send it as many people i can reach
omg people why don't you die?
gave up after 1 week of unsuccessful attempts3 -
const silicon_valley = true;
if(silicon_valley == true) {
watchSiliconValley();
} else {
work();
}
// yeah I know it's crappy1 -
//Happy Monday!
if (DateTime.Today.Contains(school))
{
athlon.Location = new Point(school_X, school_Y);
studyUselessThings = true;
}
else
{
code = true;
}2 -
I read the other day that tech companies are trying and failing to make chips smaller and faster by reducing transistor size.
Yet Apple does this with ease. You know how?
They remove or REDUCE the number of transistors to make it smaller.2 -
I said and will say again (over and over) Microsoft WTF!
Set-CalendarProcessing -Identity $userUpn -AutomateProcessing AutoAccept -AllowConflicts $false -BookingType 'Standard' -BookingWindowInDays 365 -MaximumDurationInMinutes 1440 -AllowRecurringMeetings $true -EnforceSchedulingHorizon $false -ScheduleOnlyDuringWorkHours $false -ConflictPercentageAllowed 0 -MaximumConflictInstances 0 -ForwardRequestsToDelegates $true -DeleteAttachments $true -DeleteComments $true -RemovePrivateProperty $true -DeleteSubject $true -AddOrganizerToSubject $true -DeleteNonCalendarItems $true -TentativePendingApproval $true-EnableResponseDetails $true -OrganizerInfo $true -AllRequestOutOfPolicy $false -AllBookInPolicy $true -AllRequestInPolicy $true -RemoveOldMeetingMessages $true -AddNewRequestsTentatively $true -ProcessExternalMeetingMessages $false -RemoveForwardedMeetingNotifications $true
ok I "splatted" that command but yet does not look much better :-)
Oh how I miss my dear old VIm and SSH sessions can't wait to go back to where I belong!4 -
Poll time/input requested. Multiple assignments in one statement: yay or nay? For a (painfully) simple example:
a = b = true;
vs.
a = true;
b = true;7 -
You gotta love PHP:
<?php
$bool = true && false;
var_dump($bool); // false, that's expected
$bool = true and false;
var_dump($bool); // true, ouch!
Source: http://php.net/manual/de/...
http://php.net/manual/de/...3 -
True story: We had once a project where the manager tells the client we are using the Waterfall but internally the devs are actually doing Agile. >_<1
-
Alright ya clever kids, what's a possible value for a and b here in this JavaScript type insanity:
> a == b
true
> !a == !b
false
> !!a
true
> !!b
false
> a == b
true14 -
if($scope.soup && $scope.checkout.broken){
$scope.fixCheckout()
};
$scope.fixCheckout = function() {
$scope.accrueTechnicalDebt = true;
$scope.writeDisgustingCode = true;
$scope.feelsGood = false;
$scope.maintainable = false;
}; -
When elements of an union are distinguished by a boolean, VSCode's Typescript plugin can only do type elimination if I branch by "== true" and not if I just branch by the boolean.
This is because Typescript treats booleans as an union of the constants "true" and "false", and compile-time elimination can only be done if I use syntax that makes sense with unions. Logical evaluation, for some reason, doesn't.
The fact that this issue can even appear is deeply concerning.1 -
Has any else noticed the True Tone brightness on IOS 13.6.1 going really dark at times to the point it's almost pitch black?
I've had to turn it off and on again a few times for the brightness to be correct again.1 -
{
while(time_to_exams > 0){
me.shouldBeLearning(true);
time_to_exams--;
}
public void shouldBeLearning(boolean bool){
if(bool){
should_be_learning = false;
waste_time_on_DevRant = true;
} else {
waste_time_on_DevRant = true;
}
}
} -
Who writes something like this!?!?
if (result == "True")
{
return "True";
}
else
{
return result;
}1 -
private boolean didWakeUpForNothing() {
if (mathTutoring.isClosed()) {
return true;
} else {
studyForExams();
}
}
private void studyForExams() {
feelEmptyInside = cryInShower = true;
}1