React Round Up cover image

RRU 060: Linked lists in the Wild: React Hooks with Conlin Durbin

React Round Up

00:00

The Importance of Defensive Coding

You can never be 100% sure that someone's not going to change your abstraction. So this is another good argument against like creating a bunch of those abstracts as I like to think about. If you have a function that expects an admin user to be passed in and that function doesn't check that it's an admin in some way, someone A, someone could delete the if admin, like block. And now suddenly you're passing in users that shouldn't have admin access to a function that only allows users with admin access or something like that. Like write your code to be as straightforward as possible because otherwise you never know when someone's going to delete something in one of your abstractions.

Play episode from 39:53
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app