Details
-
AboutAndroid app developer, Web developer
-
SkillsJava, C++, JavaScript, PHP
-
LocationLahore
Joined devRant on 5/28/2017
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
-
It's maddening how few people working with the internet don't know anything about the protocols that make it work. Web work, especially, I spend far too much time explaining how status codes, methods, content-types etc work, how they're used and basic fundamental shit about how to do the job of someone building internet applications and consumable services.
The following has played out at more than one company:
App: "Hey api, I need some data"
API: "200 (plain text response message, content-type application/json, 'internal server error')"
App: *blows the fuck up
*msg service team*
Me: "Getting a 200 with a plaintext response containing an internal server exception"
Team: "Yeah, what's the problem?"
Me: "...200 means success, the message suggests 500. Either way, it should be one of the error codes. We use the status code to determine how the application processes the request. What do the logs say?"
Team: "Log says that the user wasn't signed in. Can you not read the response message and make a decision?"
Me: "That status for that is 401. And no, that would require us to know every message you have verbatim, in this case, it doesn't even deserialize and causes an exception because it's not actually json."
Team: "Why 401?"
Me: "It's the code for unauthorized. It tells us to redirect the user to the sign in experience"
Team: "We can't authorize until the user signs in"
Me: *angermatopoeia* "Just, trust me. If a user isn't logged in, return 401, if they don't have permissions you send 403"
Team: *googles SO* "Internet says we can use 500"
Me: "That's server error, it says something blew up with an unhandled exception on your end. You've already established it was an auth issue in the logs."
Team: "But there's an error, why doesn't that work?"
Me: "It's generic. It's like me messaging you and saying, "your service is broken". It doesn't give us any insight into what went wrong or *how* we should attempt to troubleshoot the error or where it occurred. You already know what's wrong, so just tell me with the status code."
Team: "But it's ok, right, 500? It's an error?"
Me: "It puts all the troubleshooting responsibility on your consumer to investigate the error at every level. A precise error code could potentially prevent us from bothering you at all."
Team: "How so?"
Me: "Send 401, we know that it's a login issue, 403, something is wrong with the request, 404 we're hitting an endpoint that doesn't exist, 503 we know that the service can't be reached for some reason, 504 means the service exists, but timed out at the gateway or service. In the worst case we're able to triage who needs to be involved to solve the issue, make sense?"
Team: "Oh, sounds cool, so how do we do that?"
Me: "That's down to your technology, your team will need to implement it. Most frameworks handle it out of the box for many cases."
Team: "Ah, ok. We'll send a 500, that sound easiest"
Me: *..l.. -__- ..l..* "Ok, let's get into the other 5 problems with this situation..."
Moral of the story: If this is you: learn the protocol you're utilizing, provide metadata, and stop treating your customers like shit.22 -
"If flowers could grow on the moon. I'd plant you a garden of stars. So you could see in the dark,
that you're not alone."
I have a poetry book coming out (eventually) called "Steal this poem."
To date, my poetry has gotten one guy laid. Thats good enough for me.
And if you ever wanted to know what it feels like to be a poet, now you too can be one.
Steal this poem.8 -
replaced my coffee with this for the hot days 🥵
- lemon juice
- ice
- water
- sugar
- mint
cheap and tasty 😋8 -
Fat heavy D&B beats, basement bunker, dark ambiente, stroboscope, sweaty bodies dancing. It happens:
I'm scrollin devRant drunk, again.12 -
HOLY FUCK I DID IT
I wrote an Arduino code for my friend. I didn't have any board at the moment to test it, but he flashed it the next day, and EVERYTHING FUCKING WORKED!!! AT THE FIRST TIME!!!10 -
Friend: Hello dude, I have an idea that..
Me: (cuts in) no.
Friend: you didn't even hear me out!
Me: let me guess. You have a super idea you want us to work on. I will be the tech guy and you the business guy and we would get funding and that will make us super rich and make all those girls that looked down on us start chasing after us?
Friend: something of that nature.
(Silence).
Friend: well?
Me: I already said no.
Friend: just no?
Me: Oh I am sorry. No fucking way in hell.12 -
Have you ever wondered we programmers have so many strong communities.... Stackoverflow, devRant, Reditt, etc...
No other profession has such communities... Why? Why?
Because, we haven't built one for them.... 😂😁61 -
Enter site
"U must disable adblock to use this site"
Ok adblock disabled
Refresh page
"CLICK HERE TO FUCK THIS FUCKIN HOT HENTAI BITCH IN THE PUSSY WITH HER BIG FUCKIN JUICY TITS AND BIG ASS AND EXPERIENCE THE BEST SEX VIRTUAL GAME OF YOUR LIFE IN THIS AD"18 -
It's ok YouTube .. your stupid algorithm promotes family friendly content and demonetizes the rest anyways .. so get your head out of your ass first 🌝3
-
Friend: You make games right?
Me: Yea I try to atleast, why?
Friend: I have this cool idea for an MMORPG with fantasy elements and dragons and stuff!
Me: Well thats a lot of work, just setting up serv-
Friend: We can have a bunch of cool stuff like Sandbox stuff, Guild battles and 100v100 pvp
Me: As I was trying to say, it would requi-
Friend: OH We need space for atleast 10 thousand people on each server!
Me: ... Good luck buddy!6