geoffwilliams@home:~$

AI Coding - Twitter 3D printing

Can AI do your coding for you in 2025? Best way to answer this is to just try it out:

Ready for a fun programming task? Please can you write some python to:

  1. Accept a twitter URL
  2. Download the tweet
  3. Create a 3D model plaque with:
  4. rounded corners suitable for 3d printing
  5. raised tweet text
  6. twitter styling
  7. raised QR code with original requested link in bottom right corner of plaque
  8. export model as STL or OBJ so it can be 3d printed

Incredibly, this spits out a bunch of code in a little editor ChatGPT coding in 2025

Clicking the run button gives us… an error.

At this point you can either keep talking to ChatGPT and working on code in your browser or you can copy-out the codes and work on it yourself - up to you really.

I decided I was happy enough to fixup the rest of the codes myself, its pretty amazing watching GPT do a couple of days work in seconds.

Running the code locally, turns out the twitter library GPT picked isn’t compatible with Python 3.12, and with older versions of Python isn’t compatible with Twitter’s CA. I just asked GPT what I should use instead and picked one of the suggestions.

After a bit more work I was able to see the 3D render:

initial 3d render

Not exactly what I wanted but pretty close. Since I was vested at this point, I fixed up the rest of the codes myself:

  1. Wrap long tweet lines (asked GPT again)
  2. Position text and QR code
  3. Choose easier to print font
  4. Split downloading tweets from rendering tweets into 2x files - to avoid spamming the twitter API

A few hours later, my 3D tweet was ready for coloring in with sharpies.

So what worked and what didn’t?

  • Was not an instant, ready to use solution:
    • snscrape (twitter scraping) library selected not compatible with latest Python
    • 3D object was not quite what I wanted
    • Some paper cuts not calling libraries correctly, unused imports, etc
  • Technically impressive
    • Found a bunch of really useful Python libraries to use
    • Found a novel solution to creating the 3D STL file using SolidPython2 to write OpenSCAD files and then having OpenSCAD render them to STL files for 3D printing
    • The in-browser code editor. It’s really quite magical.
  • An iterative assistant for coding:
    • Great for well defined problems like “how to wrap the text in solid python?”
    • Good for finding new libraries to use, we found twikit in minutes and were soon hooked up to twitter
    • Largely becoming first place to ask “how do I…” vs google
  • Not production ready, well thought out code - but then I never asked for that(!)
  • It took about a day to go from idea to 3D printed object - Astounding really.

In conclusion, Coding with ChatGPT is a great experience. Most of the problems I had were due to moving target APIs and old libraries causing problems. While not quite a one-click replacement programmer, its already getting very close and massively increases productivity if you’ve got firm ideas on what you want to do and how it should be done.

The result: Better then an Oscar! finished result

Interestingly, my Twitter/X account was banned the day after getting this working despite not posting anything. Lots of people report the same thing. Fortunately I already printed out my important tweets.

Source codes

Post comment

Markdown is allowed, HTML is not. All comments are moderated.