Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.

— Brian W. Kernighan

#debugging

@programming_quotes @corpsmoderne mmmmm. Où est l'arnaque 🤔
@ciredutempsEsme @programming_quotes l'arnaque c'est qu'écrire un code simplicime demande souvent plus d'efforts que d'écrire du code qui se croit très malin.
@programming_quotes Hence, the ducks. They are there because they are smarter than us
@programming_quotes this is why i write really shitty stupid code so that i feel smart when i debug it
@programming_quotes I have thought a lot about this quote in the context of LLMs. Proponents say LLMs will write all the code and we, humans, will supervise them and debug it? Debugging code you haven't written is even more difficult than writing or debugging your own code. How is that better? Unless the code needs *very little* debugging (and it does not), we are in for big trouble in the industry.
@paurea @programming_quotes There is indeed a study saying AI code is more buggy: https://arxiv.org/abs/2211.03622
Do Users Write More Insecure Code with AI Assistants?

We conduct the first large-scale user study examining how users interact with an AI Code assistant to solve a variety of security related tasks across different programming languages. Overall, we find that participants who had access to an AI assistant based on OpenAI's codex-davinci-002 model wrote significantly less secure code than those without access. Additionally, participants with access to an AI assistant were more likely to believe they wrote secure code than those without access to the AI assistant. Furthermore, we find that participants who trusted the AI less and engaged more with the language and format of their prompts (e.g. re-phrasing, adjusting temperature) provided code with fewer security vulnerabilities. Finally, in order to better inform the design of future AI-based Code assistants, we provide an in-depth analysis of participants' language and interaction behavior, as well as release our user interface as an instrument to conduct similar studies in the future.

arXiv.org
@programming_quotes There was a quote in another book (Code Complete?) with similar advice that I always remember when over-cleverness threatens: code is written for humans to read, not computers.
@programming_quotes Same for nonfiction prose. Exactly the same. ("What was I thinking here?") #writing