Is it the driver? Is it the device? No, It's skill issue!

That's what this morning felt like, hitting brick wall after brick wall and getting nowhere. To be fair to myself, I did not get frustrated; I understand that I'm lacking key skills that are needed to solve or even understand the problem. I've been working with the ESP-01S recently as part of my embedded adventure. The last four or maybe five days were spent trying to simply get an "OK" back from the device. All hope is not lost, though. Just now, I had the idea that I still haven't tried to reset the device on startup. Mostly because it means I'd have to use the breadboard, which I have been too lazy to set up. I think after today, that's what I'm going to do. There is also another major problem: I have no idea what's actually going on in the device. I've seen some serial-to-USB converters or something like that, but there must be another way for me to know what the device is doing. More on this in a minute. But first, I need to tell you about how I:

Brought down production

Yes, yesterday I took down production for all paid users, specifically paid users. See, there is this complex middleware that checks if the user is a paid user, and there are a few checks to ensure we don't abruptly hinder usage for these users. Yesterday, I noticed something was slightly amiss. Maybe affecting about ten percent of the users in a very minor way. I decided to fix this anyway, as it was really small, but I grossly overlooked one important but vital detail in the middleware. The change was so trivial that I was totally confident nothing would break. A single misplaced ! ensured that all paid users had their claims updated to unpaid users. It could have easily been avoided if I had paid attention to the logs in my terminal.

Highlighting a weakness

In hindsight, I'm glad it happened; it's highlighted a key weakness in my programming that I've been overlooking for quite a bit now. It's the same reason why I've been stuck with the ESP-01S, too. There is no visibility into what's actually going on. I mean, there are logs, but there should be drastic failure checks in such scenarios before things reach all the way to the end user. This could be as simple as tests or not underestimating a change, no matter how trivial. We are humans, so the latter is hit-and-miss sometimes. But tests, at least for the expected behavior, should be trivial. Maybe there is something else, but either way, I'd like to focus on this aspect.

Also, I do need to slow down a bit. I've been having a weird obsession with speed, and it's leading to long delays and a lack of confidence in my work. This is my goal for the foreseeable future: to slow the fuck down. Even when I'm just working on one of my many side projects, and especially when I'm doing work that affects a few users.

One positive note

Although the above happened, I do have to say I somehow foresaw something like this happening and set up a mechanism to quickly fix such fuck ups. So, once I figured out what the problem was, it was quite easy to remedy. Lesson learned, I hope.