A.I. and Datasheets

I prefer to take a ground-up approach to my embedded development. I must be able to build and program with basic command line tools (gcc, make) that have no connection to my text editor. The build process as a result is easy, stable, and automatable. This rules out IDEs being the only way to create and compile projects. Which is fine, IDEs make the work become configuration hell instead of just coding.

I also don't use any kind of library or abstraction layers. These only serve as another layer that needs to be maintained, while making you code in the way they want and are at odds with being as simple as possible.

This means I don't have IDEs and their configuration dialogs to set things like microcontroller pins for input or output, or abstraction layers hiding the details. I instead go right the the sources of truth - datasheets.

The ground-up approach is great for the simplicity, and you know you have the source of truth with the datasheets. But I find if I don't already know how to go from the datasheet to the code for what I want, then it's hard to bridge that gap. So I will search online for code examples, as anyone else would. The problem with this is then you get results that are someone using someone else's code that never seems to be totally correct. This leads to a game of telephone code, since the first result is what comes up, everyone else uses it and now there's another results with the same wrong result.

Now search results have A.I. summaries. I try to ignore them when I'm looking for technical information, but I can't help seeing them so will sometimes just go with what they say. This is a mistake because because every single time I've used something from A.I. summaries, it has been wrong. Every single time.

This might be because of the type of projects I work on, and the limited number of times I just went with what the summary said. But everyone knows search results are now terrible. And if A.I. summaries are based on these terrible search results, then they'll be just as bad. Worse in fact, because I'll also see summaries try to extrapolate your answer from similar looking results but then it's just even more wrong.

I think these A.I. summaries do this because no one's written about the right way to do the kind of code I'm looking for, so the incorrect unrelated ways are all they have to crawl. Which raises the question, if I'm just going straight to datasheets for this information, why can't an extremely powerful search engine? The datasheets never come up as a source in A.I. summaries for me. I don't think search engine A.I. can read datasheets.

Think about the datasheets you'd read. They're usually PDFs, and if you ever tried copy and pasting just normal text from a PDF you know it gets mangled for no reason. So a search engine A.I. can't parse them, let alone understand things like tables that usually has information like definitions of what bits do in microcontrollers.

I've already had to fix vibe-coded embedded work from a lone developer that's the result of this poor A.I. generated code. The generated code had the wrong ways of doing things, and was not cohesive with repeated logic spaghettied all over that was obviously added ad-hoc. It's clear this developer needed to work with someone more senior. We should keep in mind our code will be better served by working with other developers rather than by using A.I.

Today's recent link is the blog 82MHz for posts like Linux on a floppy disk, or link dumps. Follow them on the fediverse.

A link from my collection of bookmarks is The Useless Web. Randomly visit a fun web page.

I'll be adding links to my links page which should also be a page you can use to import to your booksmarks, so download and import all the links if you want.