Details
-
AboutTech. lover
-
Skillsnode-js,js,css,html,c++,c
-
LocationAllahabad
Joined devRant on 3/6/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 -
I am so in LOVE with IntelliJ. I used to use Eclipse before, just switched to intelliJ last week and I am falling in love with this IDE a little more every day!!!!!16
-
The first time I realized I wasn't as good as I thought I was when I met the smartest dev I've ever known (to this day).
I was hired to manage his team but was just immediately floored by the sheer knowledge and skills this guy displayed.
I started to wonder why they hired outside of the team instead of promoting him when I found that he just didn't mesh well with others.
He was very blunt about everything he says. Especially when it comes to code reviews. Man, he did /not/ mince words. And, of course, everyone took this as him just being an asshole.
But being an expert asshole myself, I could tell he wasn't really trying to be one and he was just quirky. He was really good and I really liked hanging out with him. I learned A LOT of things.
Can you imagine coming into a lead position, with years of experience in the role backing your confidence and then be told that your code is bad and then, systematically, very precisely, and very clearly be told why? That shit is humbling.
But it was the good kind of humbling, you know? I really liked that I had someone who could actually teach me new things.
So we hung out a lot and later on I got to meet his daughter and wife who told me that he had slight autism which is why he talked the way he did. He simply doesn't know how to talk any other way.
I explained it to the rest of the team (after getting permission) and once they understood that they started to take his criticism more seriously. He also started to learn to be less harsh with his words.
We developed some really nice friendships and our team was becoming a little family.
Year and a half later I had to leave the company for personal reasons. But before I did I convinced our boss to get him to replace me. The team was behind him now and he easily handled it like a pro.
That was 5 years ago. I moved out of the city, moved back, and got a job at another company.
Four months ago, he called me up and said he had three reasons for us to meet up.
1. He was making me god father of his new baby boy
2. That they created a new position for him at the company; VP of Engineering
and
3. He wanted to hang out
So we did and turns out he had a 4th reason; He had a nice job offer for me.
I'm telling this story now because I wanted to remind everyone of the lesson that every mainstream anime tells us:
Never underestimate the power of friendship.21 -
Nobody:
Senior frontend Dev at my company: "microservices best thing ever"
Also him: "Relational databases gonna die"
Also him (talking to the DB team): "You're gonna dissapear, Mongo is the future"
Me: "Eh... Dude, Mongo is still a database.."
Him: "Microservices"
Send help...27 -
Shared screen with a client over Skype. Showed them in Postman that their API wasn't working as expected. It was expecting a json. Instead it was giving error code 400 instead of 200.
Message :
"Error: No error. All OK"
I'll never forget the words of the client:
"Don't use all this fancy software, you don't know how to call APIs, open Internet Explorer or chrome and paste it in the bar. You'll see All OK, means all is okay."
*insert you dense mf meme here*20 -
The mother of my partner sent to us an email complaining that our home is too dirty...
We solved the problem adding a new spam filter.3 -
Project isn’t motivating me but I want to finish it but I can’t finish it because I’m not motivated to do it.
Should I keep going and come back when I feel motivated, or just keep going even though it’s a tough one.6 -
My girlfriend is amazing:
After a long uphill battle trying to finish a huge open source project I started months ago. She noticed I was getting a little deflated.
So she donated a small amount to the donation page to lift my spirits.
She wanted to do it secretly but didn't know that it wasnt anonymous.
The little things spur us on.40 -
*In a team meeting*
Me: *happily jotting down notes in markdown*
Other guy: "Dude what are you doing? Pay attention."
Me: "Umm... I'm taking notes?"
Other guy: "But why does your MS Word have black background?"
Me (a bit lost): "Umm... That's not Word. That's my text editor."
Other guy: "Alright... But how do you convert your notes into Word then?"
Me: "... I don't."
Other guy: *stares at me*
Me: * stare back*
It was a nice conversation.12 -
Ran into a girl who I had a crush on in high school at a bar last week. Hanged out for a bit, but then I had to run catch the last train home.
Today I get a message from her that reads: "Hey, it was nice to meet you last week. Can I call you some time, there's something I want to tell you. 😉"
I think to myself -- sweet and say that I have no meetings today, call me whenever you can.
A couple of minutes later she calls me, and the first thing she says: "I have this app idea..."
fuck, shouldn't have hyped myself up.29 -
You went through .dll hell and survived the .jar hell.
Now you're developing in AngularJS... welcome to scope hell6 -
Today I learned:
`/usr` stands for “universal system resources” not “user”
`/dev` stands for “device” not “development”
Had no idea.30 -
So many years of programming and it's still complicated to explain to my parents why lecturers at university won't spend time to help me debug my code on big projects
And that doesn't mean that I'm -not learning to code- if I don't receive help on finding bugs2 -
I'm still trying to understand the logic behind WhatsApp notifying you the user has deleted the message 🤦♀️7