Quantcast
Channel: David Eastman, Author at The New Stack
Viewing all articles
Browse latest Browse all 80

Augment Code: An AI Coding Tool for ‘Real’ Development Work

$
0
0
hands on keyboard

I’ve been working in Visual Studio Code with Copilot running, just for the completions. But I’ve found them to be fairly solid — a bit like a junior dev who has an idea what you might want to write next. We know LLMs are able to intuit based on a large sample of examples (we are never quite as unique as we think), but beyond that I have seen plenty of evidence that my digital junior has understood the context of the problem beyond simple pattern matching. While the standard of the code is basic, that actually doesn’t matter. From an agile perspective, it allows me to move on quickly.

Augment Code describes itself as “the first AI coding assistant built for professional software engineers and large codebases.” In my last post I looked at Bolt, which is aimed squarely at boosting non-professionals. So this post is weighted more appropriately towards working developers, doing what Augment Code calls “real work.”

Unusually, Augment was quick to point to their Visual Studio Code extension, and made it clear what the process was. This is too often left to discovery.

My only concern would be whether I should turn off Copilot or whether the two extensions would co-inhabit. Starting with an open project, I followed the above instructions. As I imagined, I soon ran into this:

It is probably the right time to wonder at how this will work going forward. It isn’t quite possible for every assistant to fit into a switchable component, because we have yet to settle on one set of styles that work. I want Augment to do “its thing” — whatever that is. We are still at the innovation stage of the assistant journey. But enabling and disabling extensions works for now, I guess.

Also, Augment stated that it “synced codebases.” For now, I won’t wonder at exactly what this means, but I’ll assume it is part of the indexing process whereby Augment learns more about the purpose and style of your project.

Augment starts by showing you a summary of your project. It worked out that mine was a game based on Unity, with a separate map and narrative system (by looking at the assemblies). It then recognized the different packages — although it assumed the independent packages were all from Unity — and recognized Plastic SCM as the source control. It managed a hand-waving but coherent attempt at working out what the game was about. What was more impressive is that it went on to pose a few questions that I could later ask Augment:

Disregarding the ownership issues around Unity, these are all fairly good questions. The last one, which seems to be pushing JetBrains Rider, might be a cheeky bit of in-app advertising but might also be based on the genuine belief that Rider is the best Unity IDE for C#.

Augment thankfully has a straightforward LLM-based service offering, including code completions:

The first case (“chat”) is covered well by the most recent LLM models and helped Augment make the summary and questions we saw above. Note that Augment appends its robot head icon to the left sidebar.

We’ll start with the third case, instructions. I know that I left in an awkward set of conditionals when checking on a range, and was happy to see what Augment would do to improve it.

The if block just sees where a distance fits into a range bounded by enums and sends the enum back with the location. The code (written by Copilot) was perfectly functional, and a lot of people might prefer it for production. I needed to press Cmd/Ctrl I to ask.

I asked Augment to improve on this. It created a new tab (good idea) with the file and placed the change in the context of a diff:

It correctly made sure there was only one return statement, which was the biggest original flaw. It used a switch with a modern functional style that is indeed neater. No, I wouldn’t necessarily write this code (it is only valid since recent C# 8), but it ticks the box. I push to accept, and it joins the codebase. Now, technically, Augment states it will only use code that is in your style, but I did specifically ask to improve the code. I am not sure Augment has a log of instruction requests — this was given upfront for Bolt, and I think it would be useful for Augment, too.

DistanceToTargetType distanceType = res switch 
{ 
  < (float)DistanceToTargetType.Close => DistanceToTargetType.Close, 
  < (float)DistanceToTargetType.Medium => DistanceToTargetType.Medium, 
  < (float)DistanceToTargetType.Far => DistanceToTargetType.Far,
  _ => DistanceToTargetType.Beyond 
};


Let’s move on to code completions. These are the Billy The Kid fast draw style of suggestions that have to be delivered quickly in the edit area so as not to interfere with developer flow, but are therefore the easiest to integrate into day-to-day development.

What we are looking for is the ability to make valid tactical suggestions. The original term “completion” just implied the ability to recognise that the dev was starting to type a method call from an API, or a local variable. Now LLMs can spot language conventions, likely clauses, logical pairings and more.

Another thing to remember is if the suggestion comes slightly too late, it will actually hinder you — even if it is correct. So, while Augment currently uses a tuned GPT-3, future reasoning models can only be used once set to instantaneous response (assuming an adjustable intelligence level). It is down to the tuning, not so much the model. Certainly on my MacBook M4, it was quick enough.

For example, I started typing:

This is just debugging the contents of a Recommendation instance ‘rec’. Augment suggested:

So, it did a number of good things in this example.

  • It realized that the TagDebug class was my internal logging class and that I would want to express its contents using an interpolated string.
  • It understood that “rec” was a subclass of the Recommendation class and that the object it was recommending (a location) was stored within the instance. It also noted that the name of the subclass would be useful.
  • It understood that I would want to see the negative case too, hence “No recommendation.”
  • By using an English word, the LLM can reasonably gather that the class is indeed some form of recommendation.

This understanding mixes coding expertise with real-world cognition to quickly forge a strong suggestion. Actual development is built line by line, hence this is definitely useful. What percentage of this was garnered by looking at my project, or from general patterns, is Augment’s secret sauce.

Conclusion

AI-assisted coding is already a busy field, but by aligning to working developers rather than a wider user base, Augment may be able to out-muscle the competition with higher quality suggestions delivered at pace. Obviously, Microsoft might try and lock them out with Visual Code and Copilot — and also, the environment may look different when token prices go up and pricing becomes relevant again. But for now, enjoy modern development with an AI partner.

The post Augment Code: An AI Coding Tool for ‘Real’ Development Work appeared first on The New Stack.

While Bolt is aimed at a broad user base, Augment Code is an AI coding tool specifically for working developers. We check it out.

Viewing all articles
Browse latest Browse all 80

Trending Articles