4 ms·
Yes but cognitive load is a real thing. Being free to not think about the proper format to log some generic info about the state of the program might seem like
by phendrenad2 1y ago
Yes but cognitive load is a real thing. Being free to not think about the proper format to log some generic info about the state of the program might seem like a small thing, but remember, that frees up your mind to hold other concerns. See well-trodden research that the human mind can hold roughly three to five meaningful items in working memory at once. When in the flow of programming, you probably have a complicated unconscious process of kicking things out of working memory and re-acquiring them by looking at the code in front of you. I think the author is correctly observing that they are getting the benefit of not having to evict something from their mental cache to remember how logging works for this particular project (especially egregious if you work on 10 codebases and they each use a different logger).
- fleebee 1y agoHow often do we print debug something that isn't just a single variable? I have defined a macro in my editor that expands into a nicely formatted logger call when I type "dbg" and the variable name. I can do it without thinking or losing focus. On the other hand, if I used an LLM to guess what I wanted to get logged (as the author did), I'd have to read and verify the LLMs output. That's cognitive overhead I normally wouldn't have. Maybe I'm missing something, but I just don't find myself in situations where I only vaguely know what I want to debug and would benefit from an LLM guessing what that could be.
- phendrenad2 1y agoEveryone's process if different, and by the way that applies to much simpler things, like peeling an apple. Ask 10 people to do something and they'll do it 10 different ways. And through the magic of availability heuristic, your comment was almost inevitable.