So, today I spent a bigger part of it writing a noise generator that will be used in pat.junkie.dev to produce some more interesting events and behaviors. But that's not the interesting part.
The interesting part is that tried to use Gemini Code Assist in VSCode as much as possible. I did not go as far as full vibe coding mode, but I tried to save myself as much typing as I could. For the context, I was writing in Go. Here are my impressions so far, in no particular order:
- good: it's great for "boring" stuff and boilerplate. It quickly bootstrapped me some unit tests, benchmarks and even fuzz tests. I definitely wouldn't bothered with the latter if I had to look it up myself.
- good: it's great for refactorings that are easy to describe, but hard to do with standard tools. For example, rearranging a few dozen printf format strings and appropriate arguments is very annoying to do by hand, but Gemini did it in a bit.
- bad: sometimes it sneaks in changes unrelated to what you've asked. Half the time they are fairly sensible (like removing a debug-print I totally forgot about), but I didn't ask for that and sometimes it's hard to convince it to only do what you need.
- okay?: it's not a fast thinker. I am definitely tempted to tab away to a different window while it's generating a response. But it's still faster than without it, so I can live with that.
- bad: sometimes it's being silly and creates a single-use variable that really don't need to be there. I guess it optimizes for self-explanatory code, but past a certain point it actually harms readability more than it helps.
- good: it's great for throwaway things I don't care about. For example, I needed a python script to visualize the generated noise and it generated it easily. It was ugly as fuck, but I was going to delete it anyway, so as long as it works...
- bad: explaining anything complicated or non-standard is so tedious that it isn't worth it. In my case, I wanted a variation of 1-d Perlin noise, but with for arbitrary points and with
time.Time
as the dimension unit. It really was easier to code it myself than watch out of all the type conversion bugs and bit-mashing mistakes it made. - meh: it's not great for things you have strong opinions about and want it in a particular way. Want a specific API? Gotta write out that interface, or you get something that doesn't match your broader intentions. Not very different from an intern, I guess :D
- good: Gemini's large context window allows it to just slurp up my whole project and analyze it as a whole. It made surprisingly good responses for silly questions like "tell me what this project is and how it works".
- bad: inline suggestions are nice, but they get messed up if
editor.autoClosingBrackets
is on. - good: With rare exceptions, the code it generates is correct. When it's not, it's a kind of mistakes I would have made myself. For example, who could have thought that
math.MaxUint64
is actually anint
(under very specific conditions)? - lolwhat: Sometimes it breaks style conventions really badly. Like, a variable
val1_at_t1
in Go, really? But it's very rare. This is the only noteworthy example I caught today.
Overall, it is quite handy and allowed me to focus a lot more on the interesting bits of the logic. I also clearly have a room to improve at my prompting, and I couldn't be bothered to try and feed it a design doc to see what happens. But if definitely made the time more pleasurable.
Man, look at those typos... Too bad microblog.pub doesn't support editing.
For the record, https://github.com/nevkontakte/pat/commit/39e22d352fe696d587f3981dd3cc8b264e96d8d1 is the result.