Details
-
AboutNope nope nope
-
SkillsScala, Java, c#, ruby, Javascript
-
Github
Joined devRant on 7/30/2016
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
-
Swift, oh my god, why do you have to be like this?
I'm looking to write a simple for loop like this one in java
for(int i = 5; i > 0; i--) {
// do shit
}
Thats it, simple, go from 5 to 1 (inclusive), I saw that to iterate over a range in a for loop (increasing ordeR) I can do this
for i in 0...5 {
// do shit.
}
So I thought maybe I could do this to go in reverse (which seems logical when you think about it doesn't it?)
for i in 5..<0 {
// do shit
}
But no, this compiles FINE (THIS IS THE FUCKING KICKER IT COMPILES), alright, when you the code runs you get a fucking exception that crashes the mother fucking application, and you know what the problem is?? This dogshit, shitStain of a language doesn't like it when integer that the for loop starts with is larger than the integer that the for loop ends with MOTHERFUCKER ATLEAST TELL ME THAT AT COMPILE TIME AS A MOTHERFUCKING WARNING YOU PIECE OF SHIT!!
Alright *deep breathing*, now we can't just be stuck on this raging, we're developers need to move forward, so I google this, "Swift for loop in reverse" fair enough I get a straight forward answer that tells me to use the `stride` functionality. The relevant code for it
for i in stride(from:5 to:1 by:-1) {
// do shit
}
Wow looks fine and simple right?? (looks like god damn any other language if you ask me, no innovations here piece of shit apple!) WRONG BITCHES !!! In the latest version of Swift THE FUCKING DEVELOPERS DECIDED TO REMOVE STRIDE ALTOGETHER, WITHOUT ADDING IN A GOOD REPLACEMENT FOR THAT SHIT!
Alright NOW IM FUCKING MAD, I got rage on stackoverflow chat, a guy who's been working on ios for quite a while comes up n says and I quote
"I can sort of figure it out, but besides that, iterating in reverse is uncommon enough that it probably hasn't crossed anyone's mind."
Now hope you guys understand my frustration, and send me cookies to calm me down.
Thank you for listening to me !27 -
My team are so needy and incapable of figuring anything out independently that I've basically not got any of my sprint tasks done so far. So today I told them that I was working from home for a day to actually get done work done, but I'm on Slack if they really need me.
The only observable difference now is that instead of just bugging me, they start every conversation with, "sorry, I know you're busy, but..."3 -
Why does Windows think that my wireless keyboard is a toaster? That is the question :p
http://superuser.com/questions/...2 -
The front for a recruiting app with Primefaces (JSF)
Guys, please, don't use Java for client-side. It was a huge headache.4 -
so I was at primary school and our homework was: "what do you want to do when you grow up". my dad took me around town for inspirations. that's when I saw that famous ad that led me to do IT.1
-
Why do programmers always mix up Halloween and Christmas?
Because Oct 31 equals Dec 25.
*badum tsss* -
The feeling when you try to be creative on the first commit message but end up using 'Initial commit'...5
-
Great article published on DZone by our @dfox describing how he and Tim built devRant with Neo4j:
https://dzone.com/articles/...