So one of the biggest issues I see with programmers today is that they don't know how to debug programs without LLMs. Back in the day, before LLMs, you would expect the programmer to either read the docs, Google the issue, search for Stack Overflow, etc., etc., right? And you would expect them to find out more about what went wrong and have, or at least develop, a really good understanding of the problem, right?
We don't do that anymore. Now we just paste the entire message in Claude and expect it to give us a perfect solution, which, you know, that comes with its own set of problems, and I'm not going to get into that in this video.
But before we had Claude, we had something I would say even more useful, and that is the application logs. And logs are just that. They're just logs, right? They're just a bunch of statements, right? You log everything that your application is doing, every single action it takes, every single thing that's happening inside your application.
And this way, if something goes wrong, which it inevitably will sooner or later, then you can just review the logs, see what went wrong, see what kind of input your application received, what it did with it, etc., etc., and just fix the issue from that, right? And this makes debugging an application a thousand times easier.
And especially when you're building AI automations and agentic workflows and all that, especially when you're involved LLMs and their hallucinatory nature in your automations, you need logs, right? Because here's the reason, right? When you're automating a task, you're expecting that a human will no longer be doing it, right? Because you're automating it, no actual human being is going to do it, right? A machine is going to do it for you.
That means that the automation has to record its steps very accurately so that when it inevitably fails, a human can retrace its steps and, you know, just see what went wrong, right? And something can always go wrong.
If you're using LLMs, if you're building AI agents, you could have the agent hallucinate bad output, right? You could have some invalid output produced that completely breaks your program because it didn't expect this output, right?
If you're doing, I don't know, web scraping like I do a lot of web scraping, right? Or just simple browser automation tasks, right? There's numerous issues in this as well. Your IP address could get blocked because you're scraping websites or, you know, building bots for websites, or their HTML structure would change and your entire automation would just break because of that.
Like, there's issues in every single kind of automation you build, even if it's GUI automation, especially if it's GUI automation, because screen sizes can change. It's a whole, like, different mess of an automation style. It's very finicky, very fragile, and very easy to break.
But the point is, automations do break, right? They work most of the time, but they do break eventually. And when they do, you want to make it as easy as possible for you to actually fix the issue, right?
So when failures like these inevitably happen, you need to make sure you're logging every step and alerting the decision makers in your company, or if you're building this for yourself, then you're the decision maker, I guess. But you need to have logs, you need to have alerts so that you actually figure out what went wrong, right?
Because believe it or not, I've seen companies where automations such as these were broken, the program crashed and stopped working, and nobody noticed for weeks, as in literally weeks. And, you know, I can't even blame them because, like, you've got your own work to do, right? You've got your own shit to deal with. You're not going to notice these things going down unless something truly catastrophic happens, right?
And that is exactly why you need alerts and you need logs. So that's the big tip for today, right? Set up alerts so that you can always notify the decision makers, probably yourself, that something went wrong and you should go fix it, and set up logs, proper detailed application logs, so that you can retrace the automation's steps anytime some issue pops up.