Coding Fail of the Week (February 14-20, 2021)

I am a full-stack web developer that enjoys coding in Laravel and React.
Search for a command to run...

I am a full-stack web developer that enjoys coding in Laravel and React.
No comments yet. Be the first to comment.
Switching stacks

If you don't know what Twin Macro is, check it out! It's a great library that blends Tailwind CSS and Styled Component systems, like Emotion. I love using Twin because it lets me use Tailwind while separating my styling from my markup and methods. If...

Many developers know that full-stack apps with a Vue frontend can be quickly spun up with Laravel Jetstream. What many don’t know is that recently, the Laravel team made it easy to make an Inertia app with Laravel Breeze. In this article, we'll make ...

Extending the Rule Object with a DateTime Trait

Using Custom Console Commands

This is my first of many Coding Fails of the Week. In this edition, I won't even have to discuss the code because even a 5-year-old kid could spot the error.
How it happened: In constructing my Laravel API, I needed to test out the ability to add a post by a certain time. So I whipped out Postman, put in my date, and hit Enter. I swore it was error-proof; my API was working well earlier and the minor changes I made shouldn't have broken it. But alas, I got an error saying the date was in the wrong format. :/

What really happened: Biggest duh moment of my life. If you haven't seen the error yet, look carefully. Ignore the error message because it will throw you off. If you haven't seen it yet, I'll give you a clue: 2021 isn't a leap year. I spent about 90 minutes trying to find what was causing this issue when the answer was literally right there.
What I learned: Don't just look at the obvious. The real solution to our problems is often hidden in plain sight.