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
Feed
All
Post Types
- Rants
- Jokes/Memes
- Questions
- Collabs
- devRant
- Random
- Undefined
Cancel
All
-
In my latest installment of "Swift, WTF?", we look at the "if" conditional in terms of the Swift convention of:
if let x = y { /* ... */ }
so what this does :
1. declares x in the scope of the braced code
2. sets x to y (an ahem, "optional")
3. decides if x is not *nil*, then executes the braced code.
This is very similar in both the visual and the operation to the C code of:
if (int x = y) { /* ... */ }
1. declares x in the scope of the braced code
2. sets x to the value of y
3. if x is not zero, then executes the braced code
which is considered *exceptionally* poor style.
Neither the C nor the Swift construct result in a legitimate boolean value of "true" or "false", although C comes closer than Swift.
In the Swift case the *imaginary* "nil" value has to be interpreted as "false" and thus there must be extra code is for the conditional to check on whatever constitutes the **actual** value of nil in Swift and then set the condition to "false".
(remember boys and girls, "optionals" are not real, they are an imaginary language construct of Swift and have no legitimate counterpart in the CPU operations with memory and registers)
At least in the case of C, if the value of x is zero or NULL (which is 0) then it is technically a "false" which in C is 0. Regardless, it is really poor programming and anyone doing that on my team gets an ear full.
But in Swift this obfuscation of code is common and condoned! Well, why not put more of the program in the condition of the if? In fact, stuff the whole thing in there.. why not? 🙄
This just reenforces my opinion that Swift is not a bird but the stuff that comes out of the underside of the bird. 🐦💩7 -
when you end up in the ER with excruciating pain early on a Saturday morning from persistent inflammation from chronic job stress and getting sick more than normally, you gotta change jobs.
no amount of money is worth your health.
(the drugs they gave me were pretty fun though, but not something I ever want to go through again)1 -
There was this one time when I was asked to create screenshots of our game for marketing purposes.
The game supported solely the 480i mode.
Once I delivered the screenshots, PM bitched about them being !good, because of the visible interlace.
...the fun times of the Wii era.3 -
lmao remember that time I worked for a very respectable payment company for 2 months and made banks before they told me i couldn't use linux (like fuck off lmao) so I quit.
Turns out they were willfully moving drug and whore money lmao
motherfuckerz2 -
How is it possible to be busy all day yet feel like time evaporated into a vacuum as if someone called delete(hours) but left not trace?1
-
vibes ain't flyin' can't deadass sigma no cap lit ohio level 7900 fam, you're ngmi on god rizzling gyatt.3
-
Ugh, eyes irritated as fuck, can't find my sun glasses on strength. Can't find regular glasses either. I'm sure they are not here. I have to remove lenses, my day is basically ruined.4
-
guys dancing salsa is like a shamanic magical trip that changes your life forever and gives you Buddhist-level enlightenment
just saying8 -
Typescript being built around js forced the creators to build a really powerful and flexible type system so much that no other language type system can compare to.6
-
Codeium completely changed to windsurf whatever a fucking windsurf is. But the worst thing, it removed the statistics page that I dominated. Fuckers. It was cool having a 3rd party having some positive stats about you. The new profile page is private, only for yourself and is pure focussed on code generation converting my account from big numbers to no data available. Sad, was so proud.
Also, I had some personal communication with them before, but that's not available anymore either. Again, a nice company turned to some heartless corporate shell by investors.
Sad sad sad, was long ago I was so enthusiastic about a company. Traitors!5 -
What would I do if I traveled back in time? No, not buying bitcoin. It's probably eating datura seeds or other poison. or burning myself with acid. or drinking bleach. or blinding myself with that powerful laser pointer I had. maybe then my emotionless, cold stone wall of a mother could show me some affection and empathy. she for sure didn't when I broke my finger, so maybe the severity of the injure is where it's at?
the axe forgets, the tree remembers.4 -
Week: 94 (Year 1 )
How is the weekend going?
Question: What’s a dead giveaway of how old you are without giving the actual number?
last Weekend : https://devrant.com/rants/178417487 -
I now have 6 storage drives, ranging from 512GB SSds, to 2GB NVMEs. Out of almost exactly 6TB of storage space, I'm using about 60% of it.
Having so much data seems a bit obscene.9 -
alright so I opened a big ass curtain in my office, and it seems the sun glaring the fuck out of the screen of the person sitting in front of that window. But it's been weeks now.
Today I found out who is sitting in front of that window. It's the guy who is working with me and whom we had dinner last week.
omg I'm so sorry for opening that curtain.1 -
> By designing nudges that align with students' goals and cognitive processes, educators can effectively support students in reaching their full potential and improving their academic performance
remember kids. your full potential is dictated by others, not by you
I am creeped out and I hate society -
i suspect big spam attack soon from the wheelchair elite. https://dr.molodetz.nl will be soon the non-spam version of dr when that happens. It can just filter the spam directly when the bots can't handle it anymore. It also optimizes usernames for clarity: https://devrant.molodetz.nl/Screens....4
-