Let’s begin with the tl;dr: At this year’s re:Invent, I’m hosting a photo scavenger hunt with significant prizes for “most items found” and “most creative entry.” Sign up through my webapp at findme.lastweekinaws.com. The rest of this post details how I built this app.
I am bad at programming
All of this is to say that I am absolutely not a frontend developer, and I’m bad at it when I foolishly pretend otherwise. And yet this app exists due to a confluence of three factors: AWS Amplify, Generative AI, and Danny Banks. I will get to each of those three in turn.
This is, in my case, more helpful than that description sounds. Without Amplify I would have undoubtedly been pushed into a place of rolling my own API calls, done so insecurely, and been left in a place of embarrassing myself more than I usually do, which is via the words coming out of my mouth where other people can hear them.
I hit my fair share of snags along the way; I’ve given roughly two dozen distinct pieces of feedback about the travails I encountered along the way to the Amplify product team along the way. I’m not going to rehash them here, for the simple reason that it doesn’t seem quite fair. As I write this, they’re in the midst of a week of Amplify launches; it’s probable that some of the painful parts I slammed into will no longer be an issue before you read these words. Further, a lot of the issues I smacked into are doubtless caused by my frontend naivety, and are the digital equivalent of me mouthing off about the laptop you’ve sold me because it makes for a crappy hammer.
Once I grasped the basics, Amplify was a significant simplifying factor to building this thing. It’s worth watching in the months ahead.
I didn’t start in a vacuum; that’s a terrible idea. One of the tools in my toolbelt is increasingly ChatGPT (pronounced “Chat Gippety”). It’s a wellspring of creativity for me; I view it as something of a “writers’ room” contributor to some forms of content generation. You can think of it as a creative springboard.
That said, I think you’re doing yourself a disservice if you pass over creative control of things to generative AI. If you let it speak on your behalf without reviewing its output first you’re almost certainly acting a fool at this point, and you’re risking your reputation. But where it shines is in breaking a task into steps, building a methodical approach, and in its sheer breadth of coverage.
I also use GitHub’s Copilot and Copilot Chat. I strongly suspect that one of the reasons that engineers are raving about the future of generative AI more so than most folks is that, unlike human languages, programming languages are themselves syntactically rigid. There’s far less ambivalence, meaning that computers are far more effective at writing code than they are writing customer service responses.
With a combination of these two products, I was able to start with a general approach of questions (“How do I build a webapp?”), refine what I want to do further (“How do I build a webapp in React that uses AWS Amplify as the backend?”), and ultimately have it spit out a prototype (“Write the code for a webapp that authenticates users, offers a list of scavenger hunt items, and lets each user upload a picture for the item that they’ve found.”). It wasn’t nearly as smooth as that might make it sound; over the course of this experiment, I asked ChatGPT dozens of questions and spent more time last week talking to Copilot than I did my wife. But by the end of the process, I had something that worked–but also had a few flaws.
The most obvious of those is something that you might find yourself if you attempt to build a computer program entirely via copying and pasting code from Stack Overflow, which is basically an industry-wide best practice at this point. They don’t call them “Full Stack Overflow developers” for nothing. Each code segment you slap in with your meaty paste-paws is written by someone else; it uses different programming idioms, it’s stylistically different than what surrounds it, and you end up with a Frankenstein’s monster of a program by the time you’re done. So it “worked,” but it also looked like something that was put together by multiple developers who weren’t allowed to talk to each other. That only works when you’re attempting to build something out of several AWS services.
Clearly, something had to be done to fix this, lest I end up in a death spiral of unmaintainability.
And that’s where Danny Banks factors in.
I asked for a bit of best practice guidance along with assistance resolving a particularly odd error in the AWS Community Builders Slack team, and was directed to AWS Principal Design Technologist Danny Banks. Danny is, to put it quite simply, a mensch. He helped me work through the error I was encountering–but he didn’t stop there. Presumably, because he didn’t want ever again to have to see something as eye-searingly awful as the code I’d written, he set about refactoring my “technically, it does run without immediately erroring out” code into something that’s almost elegant. I want to be very clear here: he had no insight or input into the content of this ridiculous scavenger hunt, and I would be most displeased to learn that his instinct to help a customer was in any way held against him. I repeat: he is a mensch.
More than that, he’s a perfect example of what many have been saying around the generative AI space: senior engineers aren’t being replaced by computers. Rather, they’re being accelerated by robot helpers, but their judgment and experience still heavily factors into making systems usable. All jokes aside, you’re not likely to achieve the result you’re after by simply copying and pasting other people’s code into place–and when something doesn’t work the way you’d expect, it’s very hard to give an AI assistant the context of the entire scope of the project and problem that you’re working on. This is the programmer’s expression of the trouble with plagiarizing something for an assignment: you won’t be able to talk about it in any real depth.
Seek and ye shall find
Overall, I’m very pleased with how this played out. I learned a lot along the way, and this has gone a long way towards shoring up my enthusiasm for applying Generative AI to modern principles, my belief that there’s still a core of Customer Obsession running through Amazon, and that every AWS service is in fact for someone–even though I don’t fit the customer profile for an awful lot of them.
Now please: enjoy re:Invent, and happy hunting!