Details
-
Aboutelectron and react native evangelist
-
Skillsjs, kotlin, node, android
-
Website
-
Github
Joined devRant on 4/11/2020
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
-
Ever since i became programming-literate i cant just enjoy a game without thinking how everything how everything is working 🤦🏻12
-
Just did my first JobIntentService on Android. Hoo, boy.
The problem: I need to send a network request.
The issue: Android.
Of course, you can't do network on the main thread. That's silly in any application. Android really does try to punish you, though. The Android lifecycle can really fuck you over here. Imagine a long-running network operation, like 15 seconds. Plenty of time for the user to do something silly, like rotate the screen.
If you opened up a good old new Thread from Java, you'd get a crash because of a screen rotation. Same thing with Android's AsyncTask, which is the top answer on StackOverflow. AsyncTask is made for things that will take no longer than a few seconds (less than 5!). Network, especially cell network, can take longer.
So the solution? Create a JobIntentService class. It's a service, it will run in the background. You need to register it in your Android Manifest and ask for a new permission (wake lock). You need to implement another class for the receiver, and then you need to go to your activity and implement the receiver interface you just wrote.
Just. For. A. Network. Request!
And as far as I'm aware, this isn't even that bad considering the rest of Android's bullshit.
What a headache!8 -
Fucking love it when the windows copy/move dialog gets stuck at 100% with 0 items remaining and I can't get rid of the damn window for 20 seconds.
Windows is obviously the superior OS.10 -
Boss: Give me unrestricted access in the system.
Me: It's dangerous. You might break something.
Boss: I'll be careful.
Me: *gives access*
This happened 2 years ago. Now every week he deletes something he shouldn't and break a module for him or for the clients using our system.
Just woke up in a rant email saying that "oUr OnLiNe StOrE DoEs NoT wOrK". Well, that's because you have delete the Cart configuration for all the clients you dumbass. What the fuck were you thinking when you deleted that?16 -
So everyone is complaining about working from home. Fuck it, I love it. My productivity was never higher than now.
I didn't have an office space before at home, so I created one. I spent money on it but that's good because this whole corona thing made me realize how much I don't miss:
- company politics, who said what said
- commute
- people bothering you in the middle of you doing something
- catching-up breaks with people I hardly care about asking about holiday I took last year but they "ahhh thought it was just last week! so did you eat anything nice?"
- answering forced "any plans for the weekend" questions
- participating in conversations about nothing
The worst thing is that I'm actually a very sociable person 😂 so working from home means I can go meet my friends at 1630 sharp instead of 19.
I just don't need those fake relationships at work I guess.
Im already discussing with my manager possibility to work from home most of the time and I think I'll soon start to search for something 100% remote.9 -
4:30am after 6+ hours of coding and the only visible difference is a drop-down that can be opened and closed11
-
I swear if I quit my job as a developer and became a stripper I’d still get adverts from udemy, code academy and the rest about become a developer 😭😭😭 when will they fuck off11
-
Udemy strikes again with their amazing courses..
So many things wrong in this image that I don't even want to start..
Seriously, who teaches people to write code like that?25 -
CSS Grid Clock (Animated)
A Clock with the power CSS Grid and animations the result is a beautiful and futurist approach. The demo shows two variants one with the full power of the animation and the other with real clock logic.
Check it out guys and tell me what do you think.
link: https://codepen.io/flavio_amaral/...10 -
I know this is selfish, but this whole COVID-19 thing is driving me insane. The virus and quarantine I don't mind too much. What gets me is the number of people I see every single day having legit panic attacks because they can't buy "x" right now and it's the end of the world. I can't stand people who are literally in tears because they have to take an extra day off of work each week because of the state of the economy. I've been virtually unemployed for two years (not for lack of trying) and borderline homeless for six months. Grow up. You have a Lexus, a Range Rover, and a four bedroom house for you and your partner.9
-
Quick Tip:
There are jokes you tell to your best buddies that you should never tell your boss.
Just saying : |5 -
Petition for devrant to start using iso dates. Or at least pick up the format from the device's locale. But preferably iso. Seeing m/d/y does my head in.12
-
I am not a fan of programs that want to store their libraries in your home directory. It's alright if they store it in a hidden folder at least. I like my home directory to be nice and clean~~3
-
Seems like the poisoning of the internet is coming to a head. While searching earlier for a first principles reference to answer a question with, I came across an entirely obfuscated query.
"Codd's forms of normalization"
https://google.com/search/...
In the first four pages, there are 5 results that aren't ad farms, crappy pasta tutorial sites, brand building articles, poorly understood rote regurgitation of information, quora, or some combination of all of the above.
In 2005, the top 5 would likely have contained Bell Labs, UoI, Cambridge and Oracle. Mind you, I don't think the world is getting dumber, exactly, just that the signal to noise ratio in the information sphere is getting worse and the risk from that is the world becomes markedly "dumber". The only barrier to entry anymore is how well your SEO optimization competes.
I'm obviously getting old.
/rant6 -
So i tried getting some games i play on windows to work with wine and steam.
After swearing and installing all the shitty dependencies it doesnt feel any good. And worst of all i knew not all games are going to work though.
As i wanted a good and portable setup i thought alright maybe this is going to be a good use case for docker. But its a pure nightmare to get everything running fine. At the end i gave up that shit.
So dual boot is still the only way for me to be able to play games without hacks and an unreasonable amount of work.
Using gpu passthrough to kvm is a pure nightmare too. I mean what the hack, the best way to use it is to have two fcking video cards?! And yeah the integrated intel shit graphics are no option.
I mean why the fuck is it even necessary to perform dirty hacks because the most game publishers dont give a fuck about linux.
Seriously it isnt that fucking hard! And Proton is a good step for some games, but only as a temporarily solution, that only exists because of shitty game publishers.
It is horrible, its 2020 and i still cant get fully independent from windows, no matter how hard i try.
Is it that fucking hard to add builds for linux to their shitty games?!14 -
I'm having such a blast writing code in TypeScript. Once you learn it you cannot go back to regular JavaScript.6
-
So I have this code written in node:
Function connect(){
const client = net.blahblah
client.on('close', () => {
Connect()
}
}
As the connect is called from within the close call back, it wouldn't be recursive right? Like if it disconnected a million times, it shouldn't throw a recursion error or use up a bunch of memory right? Or am I thinking about it wrong?2 -
Just bought a laptop for my grandma. She is a very intelligent person, used to be an engineer and traveled across the globe, but she missed out on the computer revolution. Now she's stuck at home alone and terribly bored, so we will introduce her to the internet to socialize and join our zoom parties.
What advice do you have for someone who has plenty of life experience but is completely new to the internet?9 -
Manager: I'm so sorry to say but your collegue A has passed away yesterday afternoon. There will obviously be flowers etc and we'll try to support her family as much as we can..
Me: Oh, no. My deepest condolences. (I'm always bad at saying much in situations like this, but)
B: My gosh! So does this mean A's family also caught it??!? (Corona)
Manager: She died in a car accident.
...
Also how unfortunate. Due to the lockdown, a ton of the people use the roads as a racing track around here...7