Cam PedersenEngineer, Runner, Baker, Photographer

What is Grok?

March 06, 2023
Grok me!

 

In January, I tweeted that I was going to ship something new every month this year. Usually I would delete such a stupid tweet a few minutes later... but I decided to roll with it. I have a full time job, so side projects eat into nights and weekends. My wife was encouraging as always, as long as I promised to still get ice cream with her.

With the last couple weeks of January, I shipped an A/B testing Shopify app. It was ok I guess - fun to sprint toward shipping something and learn some new stuff along the way. But I don't really use Shopify, so the app didn't solve a problem for me, and so it was a slog. I built it because I really think Rob Walling's Stair Step Method has a lot of merit, and I wanted to try it out.

In early February, I was thinking about what I could build next. I had a Rust book staring at me from my bookshelf, and I had been meaning to learn the language for awhile. The thought of reading the whole book seemed like a lot of work though. I remembered learning French before going to Paris with my girlfriend, and the small, gamified lessons in Duolingo were really helpful. I thought it would be cool to build something similar for learning code.

I had a little fun and made a YouTube video about my thought process!

So I got to work getting the idea out of my head and into Figma. I wanted to make something that was fun to use, and that would be useful for learning how to code. I also wanted to make something that I would actually use myself. I had been meaning to learn Rust for awhile, and I thought this would be a good way to do it.

figma mock for grok

After implementing authentication for the 100th time, I got to work on prototyping the core lesson experience.

I even added some sound effects to make it more fun!

And after a few weeks of work, I kept my promise for February and shipped it!

Copilot

Somewhere along the way, I installed GitHub Copilot. I was curmudgeonly and thought Copilot was a gimmick for a long time. I was almost right, which means I was wrong. Copilot is a gimmick, but it's a really good gimmick. It's a gimmick that makes me write code faster.

There's this effect I realized I run into when I write code (really any writing). My train of thought will finish, and I have to reach for the next connection. Sometimes the connection can be a few steps away - syntax, structure, types, libraries - and those few seconds of pause can take me out of "the zone". 80% of the time, Copilot helps me make the right jump, and lets me stay in the zone, so I can pop back up my thought stack and keep working on the outer problem.

ChatGPT

I glossed over a huge part of the story here. I had added ActiveAdmin to the project so I could manually create lessons (without doing everything in the Rails console). I got about 2 lessons in and gave up - this was a ton of work for one course, how could I build the whole tech tree if it was going to take me weeks per course?

I decided to try out ChatGPT. I had been meaning to try it out for awhile, and this seemed like a good opportunity. I asked it to create a lesson plan for a course on computers. I was surprised at how well it worked! I copied the output into Notion to track everything, did some light editing, was able to copy and paste the output into ActiveAdmin. I was able to get a full course done in a few hours!

This still wasn't enough for me though. Why do any of this work manually? I wrote a quick Ruby script to send my ChatGPT prompts into GPT3, parse the output, and save the data to the appropriate table. I was able to get a full course done in a few minutes!

There were 2 problems though - it was expensive, and sometimes GPT3 would return gibberish. If you've ever used the GPT API, you knew it could start adding up - and I didn't want to spend $100 on gibberish.

On March 1 though, OpenAI released ChatGPT as an API. Not only did the responses match the quality of the ChatGPT model, but the API was 10x cheaper. I refactored my script to use the new API, and it RIPPED. The output was literally incredible - I couldn't believe it. Not only could I instruct the API to return JSON for easier parsing, the content was nearly perfect, and didn't require all the manual updates the previous model did. I was able to get a full course done in a few seconds!

What's next?

I'm stoked to keep working on Grok. The initial Computer Science course is a proof of concept for the platform. I'm going to ask some friends to test it out, give me feedback, and clean up any bugs. This isn't the end of the story though.

For March, I'd like to teach myself Rust using Grok. Obviously I could do it in a few seconds with my ChatGPT script - but while the quiz UI works great for communicating theory, I think it's a little too simple for teaching practical skills. I want to build a more interactive environment for learning coding languages. I'm thinking something like a Jupyter notebook, but more of an interactive guided tutorial after each quiz-type lesson.

Who knows - maybe I'll just keep hitting tab and see where the AI takes me.

Want to know when I post?
🙂