Sam Feldstein's Notebook

Writing vs Programming

A possible answer, as illuminated by AI

You can't prompt an LLM to draw something and come up with the same thing you would have drawn yourself. Same with stories. But you can prompt an LLM to write a function and come up with the same function you would've written. Is that because code is just strings of characters, and those can be replicated flawlessly? But you could say the same of words, but as we've said, you can't prompt an LLM to write a story and come up with the same story you would've written.

This must point to a fundamental difference between drawing (or painting, whathaveyou), writing, and coding. That difference might be that relationship between input and output. In programming, they're separate. You have the code, and you have the GUI. But in art and writing, the input and output are one and the same. When you write a story, there's no build step. You don't compile it and transform the words into other words. There's just the words.

Another difference. In programming, you can change the input without affecting the output. You can change the code of your app and come up with the same result. For example, you can refactor a block of code into a function, then call the function. The result is the same, but the code is different. You cant do that with writing. if you change some the words in an essay, its a different essay, because the input and output are the same.

An LLM can imitate art. But when an LLM writes code, its not imitating code. it really is writing code.

so what does this mean? does it mean that programmers are replaceable?