I wrote my first VSCode extension, and it was an epic fail

Skatepark Coder
4 min readJun 2, 2023

--

Photo by Ferenc Almasi on Unsplash

Generative AI has been a game-changer for me. It’s like having a personal assistant that can tackle any challenge without breaking a sweat. Just toss it a simple question like “Where do I start?” and bam! You get a straightforward guide to follow. No fuss, no muss.

But then, amidst the ChatGPT coding integration frenzy, I took a leap of faith and tried one of those fancy extensions. And boy, did my luck run out faster than a cheetah on roller skates. I’m that cursed VSCode user with vim keybindings, breaking out in hives at the mere thought of clicking around. All those chat panels hogging my precious screen space? No thanks.

Then, like a beacon of hope, I stumbled upon this Neovim extension called ai.vim. It just runs your prompt on the selected text. That’s it! But should I go crawling back to Neovim? Nah. I have a good reason not to go back to Neovim, which I will talk about later. Despite my hesitations, I noticed that GPT4 does a pretty decent job with small bits of code — maybe even better than me. So, I figured, why not create my own little Frankenstein?

…it was probably one of those 5,000 ChatGPT extensions out there, destined to be forgotten.

The whole process was ridiculously simple.

  1. Ask the AI overlord how to create a VSCode extension.
  2. Figure out how to make things work and ask:
    - How to add a command
    - How to grab a text selection
    - How to send an HTTP request
    - How to replace the selected text with response
  3. ???
  4. Profit!

So there I was, stuck in an infinite loop of questions and good ol’ copy & paste. It wasn’t exactly a masterpiece, but hey, I managed to whip up a basic extension in a day, and it didn’t totally suck.

This nifty tool swaps out bits of code with commands, handling everything from simple text tasks to some code revamps. Plus, you can write a note in the comments, and it’ll just create the whole code for you. Talk about making life easier!

But where did it all go wrong?

As you see, the world is practically drowning in AI-powered tools. So when I proudly posted my extension on Reddit, it got lost in the sea of shiny new toys. A couple thousand views later, I had a grand total of zero comments and maybe, like, three downloads. I know it was my sad little first attempt, but come on, a 0.15% conversion rate? That’s just brutal. Well, I guess I should appeal it better than just sitting and waiting!

//TODO: Add a clickbait title

And competition. There’s this fancy Github Copilot Chat extension that’s pretty much doing a jig on everything my extension does. It’s not just a chat, it can slap a question panel right in the middle of your code and toss you code suggestions with a diff view. If you don’t have one yet, I’d say hop on that waitlist.

Here’s a quick screen grab of its functions.

Inline prompting
Quick chat panel

It’s not perfect, as you can tell from the “experimental” tag. It’s running on GPT-3.5 and a fine-tuned version of the old Codex model, which aren’t exactly the cream of the crop right now. They’ll spit out a bunch of wrong answers, get all confused, and even try to replace your whole damn file. But it’ll probably save you a ton of time searching for stuff with its nifty quick chat function, and you can also have a gigantic chat panel on the side if your screen is big enough.

So what have I learned from this tragic tale of extension failure? Well, besides the fact that I may not be the most creative genius out there (duh), I’ve learned two important things:

Challenge new things, now they’re easier than ever.

Generative AI boosts your creativity, lowers the barriers for new learnings, and saves time that you’d otherwise spend tumbling down endless Google rabbit holes. It’s time to use it for your own good instead of trying to make it say or draw boobs.

LLMs fail at performing tasks, just like us mere mortals.

It’s been fascinating to learn how LLMs perform tasks, why they fail, and how to deal with their shortcomings. This topic probably deserves more attention, so I’ll dive deeper into it in my next article.

I’ll likely cling to my own sad little extension for a bit, until Copilot Chat inevitably gets its fancy GPT-4 upgrade like Bing chat and kicks mine to the curb. But hey, it wasn’t all that bad. At least I learned something, right?

--

--

Skatepark Coder
Skatepark Coder

Written by Skatepark Coder

0 Followers

All about discreetly niche code & creations @ Tokyo