01 logo

The Night I Sent One Screenshot Too Many

AI made debugging painless. Then I noticed I could no longer explain my own code.

By JinPublished 8 days ago • 9 min read

At 11:20 p.m., another red error line popped up in the terminal.

I selected the stack trace, took a screenshot, dragged it into the chat box, and typed, “How do I fix this?” Then I waited.

For the ten-odd seconds of waiting, I stared at the blinking cursor in the bottom right corner of the screen. A few years ago, at this hour, I would have scrolled the stack trace up two screens, found the first file name and line number after at, clicked into it, set a breakpoint on that line, and run it again. The variables panel would fill with a few values. I would expand them one by one, see which one was undefined, and trace the call chain backward to find where it had been lost. Sometimes I read docs. Sometimes I read source code. Sometimes I just stared at a line for a long time until something clicked.

Now, for those ten-odd seconds, I did nothing. AI replied with three paragraphs and a patch. I copied it, pasted it, saved, and ran it again. The error was gone.

I closed the terminal and shut the laptop. The tips of the leaves on the pothos on my desk had turned a little yellow. I had forgotten the last time I watered it.

The next day was integration testing for the internationalization rewrite.

The project needed three more languages. Copy would come from a backend API, and the frontend would render by key. On the third page I touched, the layout broke. German was longer than English. The text inside a button wrapped, and the whole card tilted out of shape. I took a screenshot, circled the button, and sent it to AI. It gave me three lines of CSS: white-space: nowrap, overflow: hidden, text-overflow: ellipsis. I pasted them in. The button stopped stretching, but the German was cut down to “Speicher...”. I took another screenshot. It gave me two more lines and said I could adjust min-width, or use clamp().

Four rounds later, the button was fine. I committed the change and moved to the next page.

That afternoon I committed more than twenty files. When I reviewed my own diff that evening, I saw a watch in one component, listening for locale changes and calling fetchOptions again inside. I thought about it. I could not remember why I had added it. I checked the commit history. I had committed it, at 3:40 p.m. I opened the watch and looked at it for half a minute. I could not see a problem. I could not see the point either. It just sat there, like something someone else had put there.

During the Vue upgrade week, there was more of the same. beforeDestroy had to become beforeUnmount. $listeners had to be merged into $attrs. filters had to become methods or computed properties. AI scanned in bulk and changed in bulk. I received in bulk. One page went blank after the upgrade. The console said Cannot read properties of undefined (reading 'emit'). I sent a screenshot. AI said that this.$emit inside a certain mixin could not be used in setup, and had to become context.emit. I changed it. The page came back.

I barely opened the debugger during the whole process. I did not set a red dot on a line in Sources. I did not drag a variable into Watch and stare at it. I did not click back through the call stack layer by layer. The problem was solved, but the path to solving it was a blank page. If I run into the same thing next time, I will probably still send a screenshot.

The unease started with something very small.

Last week, a production endpoint started returning 500s occasionally. Not often. A few times a day. Ops posted a log link in the group chat. I opened it, saw a stack trace, and my first instinct was to take a screenshot. Before I did, I stopped.

I wanted to look at it myself first. I stared at the stack trace and found the first at. It was a method in some service. Below that, a repository. Below that, the framework layer. In the middle there was a line: Caused by: java.lang.NullPointerException. But I could not tell which field. I wanted to open the code locally and follow the call chain for this endpoint, but the project runs three services and I only had two running locally. The third was in the test environment, and the logs required a jump server login. I hesitated for a few seconds, then sent the screenshot to AI.

AI said it was probably an unguarded parameter and gave me an Optional.ofNullable pattern. I pasted it in and watched for two days. No more errors.

The problem may have been solved. But I remember those few seconds of hesitation clearly: I knew how to investigate. It was just a pain to do it. AI smoothed away the pain, and took the investigation with it.

Even earlier, I used to read source code on weekends. How Vue’s nextTick was implemented. How keep-alive stored its LRU cache. How the diff algorithm handled out-of-order nodes after the head-tail comparison. I took notes, drew call graphs, and sometimes wrote a blog post. Someone commented under my post about nextTick: “I finally get it.” I replied three times, and we argued about the order of microtasks and macrotasks. That kind of happiness was very concrete.

Now, when I run into something similar, my first reaction is to ask AI. It explains better than I do, gives more examples, and I do not have to wait for the weekend. I open a doc to write something, write two lines, and delete them. It already knows what I wanted to say. It fills in what I did not think of. Writing suddenly has no place to land.

What really made me stop was the intern.

A new grad joined the team. Good fundamentals, quick to pick things up. One day I asked him to fix a form validation. He opened a merge request in half an hour. I clicked through it. The logic was right, the edge cases were handled, and the code style matched the project. I asked him how he did it. He said he described the requirement to AI, AI gave him two versions, he picked one, ran the tests, and renamed a few variables.

I praised him. Back at my desk, I opened a fix I had submitted that morning and looked at it for a long time. That fix was also an AI-generated patch. I copied it, pasted it, ran it, and committed it. What was the difference between what he did and what I did?

I did not know if I knew why the patch worked. I could not say whether I could judge its effects on anything else. And I had no idea whether I could catch it when something broke.

I did not get much done that afternoon. I opened an old troubleshooting post I had written three years ago, about a cache key with an extra space that made reads fail. The post had the Redis monitor output, the line in the code where the string was concatenated, and how I put two identical-looking keys into a hex editor and compared them. The post had no literary flair, but every word came from sitting there and digging.

AI would not know about that space. It does not know how our project builds keys. It does not know that a certain version of our cache middleware trims spaces. It does not know why I suspected serialization before I suspected the network. It will give you a generic checklist, but that space is not on the checklist.

I scrolled to the end of the post. I had written: “Look at the key before you concatenate it next time.” Very uncool. But it was mine.

I tried to change a few things.

The next day I hit another error. I did not take a screenshot first. I scrolled the terminal up, found the first at, clicked into the file, and set a breakpoint on that line. I ran it again. The variables panel popped up. I expanded it and looked for two minutes. One field was null. I traced the call chain back two levels and could not find where it had been assigned. The project is too large. A few jumps and I was lost. I took a screenshot and sent it to AI.

But this time I asked one more question: “Which layer of the call chain does this error trigger at?” AI answered and marked three locations. I looked at the stack trace again alongside its answer. One of the locations was one I had passed by a moment ago without stopping. This time I stopped. I understood what that layer was doing.

Then I closed the chat box and found where the field was assigned.

This is a very small thing. Too small to write about. But it reminded me of how debugging used to feel: not waiting for an answer, but following a lead. If you cannot follow it, you can ask. But before you ask, you have to follow it for a while.

I started giving myself a dumb rule: before taking a screenshot, look for five minutes. If you cannot figure it out in five minutes, send it. In those five minutes, you can read code, check logs, guess a hypothesis, and test it. Most of the time five minutes is not enough, and I still send the screenshot. But a few times, in those five minutes, I found a direction, and the screenshot was only for confirmation.

Another rule: write a change note before committing. Not long. Three sentences: what changed, why, and what it might affect. If I cannot write it, I do not commit. Once I got stuck on a piece of compatibility code AI had given me and could not explain why it was written that way. I went back and asked AI. It explained. I looked at the code again, and only then finished the note. I still remember that piece of code.

I also picked up the source-reading habit again. Not much. One hour a week, one small piece. Last week I read a utility function in the project, deepMerge, which I had always treated as a black box. After reading it, I found that its handling of arrays was different from what I had assumed. It overwrites arrays instead of merging them. I mentioned it in the team group. Someone replied, “I always thought it merged them.” AI could have told me that too. But reading it myself felt different.

I still have not fully figured out the writing thing.

But I opened a new document and wrote half a title: “Three Things AI Did Not Tell Me During an Internationalization Rewrite.” The first: when the German button was truncated, the product team actually wanted it to wrap, not to show an ellipsis. AI did not know that constraint. I found it out by asking product. The second: one old page had a typo in its copy key. AI searched by the correct spelling and could not find it. I spent two hours digging through code before I found the wrong key. The third is not written yet.

These things are small. They are not universal. AI will not bring them up on its own. But they are real things in this project. If I write them down, at least the next person on the team who does an internationalization rewrite can save two hours of digging.

As for whether sharing still matters, my current answer is: general answers matter less. Specific experience still matters. AI can write “how to troubleshoot a null pointer,” but it cannot write “the null pointer in our project happened because the config center failed to push one field.” Anyone can search for the former. Only someone who has been in this project knows the latter.

Last night there was another error.

I opened the terminal, looked at the stack trace for five minutes, and could not figure it out. I took a screenshot and sent it to AI. It gave me a patch. I changed it. It ran.

Before I shut down the computer, I pulled the stack trace up again and read it once more. This time I understood: the error came from an async callback I had not noticed, and it returned after the component had unmounted. AI’s patch was to add an isUnmounted flag. I had written something like that before, but I had never thought about why.

I closed the terminal and watered the pothos. The leaves were still a little yellow, but a small new one had unfurled.

tech newsthought leaders

About the Creator

Jin

Writer of reamstories

https://reamstories.com/jin

Enjoyed the story? Support the Creator.

Subscribe for free to receive all their stories in your feed. You could also become a paid subscriber, letting them know you appreciate their work.

Subscribe For Free

Reader insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

Sign in to comment
    Written by Jin