Details
Joined devRant on 10/2/2021
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
-
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. 🐦💩13 -
I don't care, skeuomorphism like iOS 6 or window 7 aero was the peak of design and you can't convince me otherwise1
-
In modern C#, everything's an interface.
Zig is actually sort of similar. I guess I owe it to C# for teaching me the magic.
Sorry, I mean:
IZig is IActually ISort of ISimilar. (IContinued...)4 -
I'm trying really hard to like Swift but every time I open the hood on this bird, it takes a shit on my windshield.
For example:
struct ContentView: View {
var body: some View {
let kFontPointSize = 25.0
var theFont: Font = .system( size: kFontPointSize )
theFont = .custom("Helvetica", size: kFontPointSize )
Text("Hello, World!")
.padding(.horizontal, 20.0)
.font( theFont )
}
}
... in spite of how wonderfully self documenting (🐂💩) Swift is, that dirty bird converts the 'var' to a 'let' and "theFont" cannot be reassigned after declaration.
3 things:
1. invisibly converting the 'var' to a 'let' and not indicating 'var' can't be used... really?! Suppose to just "know" these obscure inconsistencies? (sloppy design)
2. then the error Xcode presents on "theFont = ..." line is : "Type '()' cannot conform to 'View'"!? How about "can't use a 'var' here"? God forbid it should make sense. (sloppy design)
3. "var" means variable and "let" means letstant? If you are going to use "var", better use "const", or be consistent and use "set" and "let" instead of "var" and "let" (sloppy inconsistency)
4. and ".horizontal", who owns that? Self documenting?. It is owned Edge Set aka Edge.Set.horizontal and effectively a "global".
5. And reading the Swift coder's mind... No, you should NEVER NEVER NEVER use "25" as a constant literal passed like .system( size: 25 ). (magic numbers not aloud)
Have all best engineering practices been simply tossed out the window? Rule #1 in software "engineering": Globals are BAD. Corollary: magic numbers earn you a one-legged A on your project.
I am so incredibly disappointed in the Swift community right now. Swift designers are honestly earning a "script kiddy" badge of dishonor.6 -
Doing some JavaScript right now and holy moly is this one spaghetti ass language
Promises referencing closures referencing local variables referencing message handlers referencing resolve callbacks referencing ... 😵💫20 -
really hate how they keep using the word equity everywhere
an AI just used it to describe some process prioritization code I handed it to summarize
that is not at all relevant here...10 -
I fucking hate Figma.
It's primary use case is designing web applications, yet all of its naming conventions are based on SVG.
So you have to fight with designers trying to shoehorn SVG naming conventions into design tokens.
"Stroke" is border. Every time I see this I feel like I'm having a stroke.
"Drop-shadow" is box-shadow. This one really pisses me off because the properties you set for drop shadows are not valid drop shadow filters unless by some miracle the designer didn't discover the spread property. I suppose this doesn't matter because 99% of the time the code will apply a box-shadow anyway.
"Effects". FFS.
/rant1 -
If you put Web3 on your resume, I'm rejecting you without even looking at the rest of your resume.4
-
an AI programmer telling you coding with AI makes you a x10 engineer is like someone telling you autocomplete makes them a x10 novelist6
-
I fucking hate entity framework.
It turns 10 mins of work into fucking hours of stress and bloat and shit.
It’s the one thing in dotnet that I cannot fucking stand.
Literally did a bit of work in 10 mins (using ef I might add), but because it’s not the”ef way” I need to create an extra table/class and then fuck about mapping the relationship in a complicated way to do what I had just done in only a few lines of code with one table.
Spend over an hour trying to get it to understand the relationship before I gave up for the day. Fuck it6 -
Dependency hell is the largest problem in Linux.
On Windows, I just download an executeable (.exe) file, and it just works like a charm! But Linux sometimes needs me to install dependencies.
At one point, I nearly broke my operating system while trying to solve dependencies. I noticed that some existing applications refused to start due to some GLIBC error gore. I thought to myself "that thing ain't gonna boot the next time", so I had to restore the /usr/lib/x86_64-linux-gnu/ folder from a backup.
And then there is a new level of lunacy called "conflicting dependencies". I never had such an error on Windows. But when I wanted to try out both vsftpd and proFTPd on Linux, I get this error, whereas on Windows, I simply download an .exe file and it WORKS! Even on Android OS, I simply install an APK file of Amaze File Manager or Primitive FTPd or both and it WORKS! Both in under a minute. But on Linux, I get this crap. Sure, Linux has many benefits, but if one can't simply install a program without encountering cryptic errors that take half a day to troubleshoot and could cause new whack-a-mole-style errors, Linux's poor market share is no surprise.
Someone asked "Why not create portable applications" on Unix/Linux StackExchange. Portable applications can not just be copied on flash drives and to other computers, but allow easily installing multiple versions on a system. A web developer might do so to test compatibility with older browsers. Here is an answer to that question:
> The major argument [for shared libraries] is security, that if there is a vulnerability in a commonly-used library, then only that library has to be updated […] you don't have to have 4 different versions of a library installed
I just want my software to work! Period. I don't mind having multiple versions of libraries, I simply want it to WORK! To hell with "good reasons" for why it doesn't, and then being surprised why Linux has a poor market share. Want to boost Linux market share? SOLVE THIS DAMN ISSUE!.
Understand that the average computer user wants stuff to work out of the box, like it does in Windows.52 -
Web products that disable text selection. I hate them, there are 0 reasons to do that, and still it's done.15
-
#Personal_Opinion
I'm still a little annoyed at the fact that GitHub started pushing us to name the first branch "main" instead of "master".16 -
Besides firefox and emacs there is also Linux, the library emacs uses to interact with the computer hardware
-
Coworker: "can you help me with this thing?"
Me: "sure, what have you tried so far"
Them: "nothing yet"
Hdhajsgrbeiry JUST TRY _SOMETHING_ AT LEAST BEFORE ASKING FOR HELP.
It's literally your job to solve problems, not get other people to solve them for you.
Asking for help if you don't understand something is one thing, but constantly trying to get people to show you exact examples is not doing your job.
This has been a chronic problem with one of our devs and despite advising them multiple times on it, it continues to happen.12 -
God damnit Quora!
I stumbled upon some article or post or whatever they are called on quora.
And I really wanted to read the comments on it. It wouldn’t let me unless I log in.
I normally don’t do that but I thought I’ll make an exception because I really wanted to read the comments.
So I clicked on that comments button and logged in (via google). First it presented me some modal dialog to pick 5 things that interest me. And it was mandatory. Fine… I picked those 5 things.
Finally it presents me the list of articles or whatever. But not the same list that I have seen before I was logged in. Scrolling, the article of my interest is not there. God damnit! Just show me my comments for fucks sake.
I go back to that tab where I was not logged in to somehow copy the link of that article or the link to the comments section. But it doesn’t let me. Some bullshit pseudo smart layer of crap is preventing me from doing anything.
Then I abuse the fucking share link to visit it in my logged in tab to finally see the comments that I came for.
And the comments weren’t even worth it. God! What a waste of time! And how can one fuck up a fucking forum so much?
It will be a lesson for me not to visit Quora ever again.4 -
Is there anything possibly more worthless than Gimp for doing basic image edits. Damn, all I wanted to do was make the white background of an image transparent. I usually use Paint.NET (only available on a PC) for quick crops and background removals. Gimp is just...painful. Now I gotta fire up my PC and send myself the image so I can edit it there.9
-
Java: String foo =“bar”;
C#: var foo = “bar”;
Go: var foo string = “bar”
I just started learning Go and I’ve been cringing since.19 -
I just cannot hold myself laughing at the most serious moments in meetings. People say the funnies/stupidest shit and they go unnoticed!
-
Read The Docs!!!
Read The Docs!!!
But none of y’all have read the ECMAScript Specification.
Don’t even get me started with W3C… Just stick with your W3Schools5 -
Everyone that says you can't get viruses in Linux because only .exe compiled programs can contain malicious code or some bullshit like this is a fucking retarded
Sorry I had to say it9