mglaman.dev – November 3rd, 2023
Hey there!
Here's your weekly newsletter from me, Matt Glaman!
Was this forwarded to you? You can subscribe here!
My latest blog post
Bogged down with a cold and snuggled up on the couch with social media, I caught the latest hot-take on social media: HTML forms only get GET and POST, so why does your API need to use PUT, PATCH, or DELETE? I wrote a blog post about why leveraging HTTP methods helps build API design.
To POST, or PUT, PATCH, and DELETE? URLs are cheap, but API design matters
Last week, there was a trending hot take on social media: why bother with HTTP methods beyond GET and POST in your API? The argument was that URLs are cheap, so why not create more API URLs rather than using the same URL with different HTTP methods? It was a very interesting thought process around API design because it is the opposite of my thinking. I am a fan of RESTful semantic APIs and using HTTP methods to adequately describe the action an endpoint is performing on a resource. I am also an API design nerd, hence this blog post.
Tips & tricks
Gabe Sullice shared a great note about debugging:
Excellent programmers debug scientifically. They:
- Identify a problem (it's broken, why?)
- Create a hypothesis (this error might happen when…)
- Make a prediction (if so, this change will cause…)
- Test that prediction (did it?)
- Repeat 2-4 as needed
- Apply a fix
Interesting links
- Aging Code
- A great article about "old code" and considerations around "new code." One of my favorite lines: "...the longer your code has been around, survived different cataclysms (read: business pivots), and evolved, the more robust it is."
- 1Password discloses security incident linked to Okta breach
- Bleeping Computer's article about the Okta breach dives into how breaching Okta's support system allowed them to download HAR files to find authentication information for Okta customers.
- Unit testing anti-patterns
- A great article that discusses unit testing and handling of private or protected methods or modifying code to make it testable.
If you enjoyed this, consider forwarding it to a friend.
Have suggestions or ideas for future blog posts and newsletters? Let me know!
Don't miss what's next. Subscribe to mglaman.dev: