To write good APIs, follow Postel's Law

preview_player
Показать описание

Build Your Own Interpreter / Redis / DNS / BitTorrent / SQLite - with CodeCrafters.

# Recommended videos and playlists

If you liked this video, you will find the following videos and playlists helpful

# Things you will find amusing

# Other socials

I keep writing and sharing my practical experience and learnings every day, so if you resonate then follow along. I keep it no fluff.

Thank you for watching and supporting! it means a ton.

I am on a mission to bring out the best engineering stories from around the world and make you all fall in
love with engineering. If you resonate with this then follow along, I always keep it no-fluff.
Рекомендации по теме
Комментарии
Автор

I wasn’t sure about the username example but it does work and make sense if all auth and similar operations know to apply the same transformation to the user input.
Thanks Arpit

enochnyako
Автор

Although correct remember exceptions do exist

awesomeworld
Автор

are you sure about the bio example? if there's a character limit, shouldn't we be failing the operation and sending an error back to the user instead of trimming and saving it which isn't exactly the expected behaviour in most cases.

with that being said, nice video 👍

rigveddesai
Автор

Then what is the use of validation in the front end ?

balakumar
Автор

Then the business people come back shouting why they don't see all the data they entered and why some part of it is missing??? It might be rude in social life to correct people upfront but in API world it is must to enjoy your personal life instead of explaining how liberal your were while trimming their data and changing it to lower/upper case.

RanjeetMD
Автор

If someone put their username in camlecase if back and stored in small then while retrieving again how this will be converted into camlecase again

funwithone_official
Автор

Want more depth knowledge about good APIs

ArjunSingh-srjf
Автор

But the ui should not allow user to send wrong data else it will be a bad ux

build-your-own-x
Автор

if I accept some username that is 12 length and my db allows only 10 meaning the user will see the name cut not a good experience to have as a user.
every app has a limit that they display on the frontend.
the client should adhere to that I think and backend should have checks what they are accepting.If you accept an extra key a malicious request could come with a larger file that you did not expect.

namitpiriya
Автор

One site was liberal with the password field upon registering so they decided to trim it to 12 characters...
When I tried to login, I could not.

rabindrajoshi
Автор

But hey my username was rauNIT how it became raunit

verma_raunit
Автор

Finaly whats the catch. Just be a business man like Ambani and aadhani Take all and.fice little to public. Thats it.. dont be Tata thats it na...

SuperHuman
Автор

bullshit over-engineering. just write the code and fix the bugs. You’re not doing some magical CRUD. You keep applying SOLID principles and clean code and 100 other craps in your coolie outsourced IT job 😊

shogunkodogun
Автор

this is why your channel is not growing 😂😂

incredible