What to Do When the Ghost in the Machine Is You

Limor Fried’s code is often a de facto standard, and now ChatGPT is using it

3 min read

A illustration of a woman with digital elements around her.

Limor Fried has noticed that ChatGPT writes code in her style.

Stuart Bradford

Limor Fried is the founder of Adafruit, a leading electronics manufacturer for makers. The open-source microcontroller driver libraries she writes to interface with devices such as sensors and displays often become de facto standards and are found in many code repositories. Recently, Fried began experimenting with ChatGPT to generate drivers and discovered that the AI was writing in her own particular style. IEEE Spectrumasked her five questions about working with a machine that’s trying to imitate her.

​Limor Fried

Limor Fried is the founder of Adafruit Industries, a New York City–based leading manufacturer of hardware for makers and electronics enthusiasts. Fried designs many of the products herself and is prominent in the open-source hardware community.

How did you discover that ChatGTP had a mini Limor Fried inside?

Limor Fried: We had seen videos of people using ChatGPT saying, “Okay, I want to write a microcontroller program that blinks LEDs,” and I’d be like, “Oh my God, that chunk of code is a me-ism.” There’s these little things that I do that I copy and paste between every example.

Why did you start working with ChatGPT to write code?

Fried: Ever since I had a kiddo, it’s been really hard for me to work on writing these Arduino libraries. You kind of have to ingest the entire data sheet into your head, and you have to have it all in your brain, and then you write all the code, and you have to keep everything. It’s a tightly coupled task that requires a lot of focus. So I started experimenting.

What’s your experience of using an AI to generate code from prompts?

Fried: Some people are like, “Oh, so I don’t have to learn how to code.” No. You actually have to learn to code even more, because I would catch errors as [the AI] was going. It would make PDF parsing errors or the PDF would be vague. But it also caught a lot of mistakes that I would not catch. So a recent driver I did has three channels. In some device registers, the bit order is one, two, three. But in this device, the bit order is three, two, one. ChatGPT-4 actually caught that and knew to swap the register bits around. I was like, “Wait, why are you doing that?” And I looked: “Oh, my God. It actually got it right.”

How does your coding style make working with ChatGPT easier?

Fried: I used to write drivers with pure bitwise logic in every step. You’ve got your register map, and you’re like, “Well, I want to just write the two bits with offset three,” and using AND or OR operators to do that. But it’s very, very error-prone. So we came up with this abstraction called BusIO. You tell it how many bits and the offset, and it does the math for you. Yes, it’s slower than just doing the bitwise math, but it makes it very readable to see all the shifting and movement and catch mistakes.

Are you concerned about whether using ChatGPT will lock you into your current style?

Fried: That’s a good question. I think that if we do more abstraction layers, I would probably think like, “There are humans who still write drivers, but how can I make sure that this is something that an AI can do as well?” I do tell people who do coding, “Never have ChatGPT write code that you couldn’t write.” I tell people to think of it as a very positive and enthusiastic 15-year-old Redditor. She’s got a lot of energy, and she can follow your instructions, but she doesn’t have a lot of world experience.

The Conversation (0)