Smart Code: How AI Will Evolve Beyond Code Generation

The future for development looks even more fun

Quick note: If you’re not a developer, feel free to jump to the end where I have a fun fact on a new domain I just purchased AND an easter egg with a code you can redeem on for +25 extra credits.

The advancement in code generation models has been amazing to see. Starting with tools like GitHub’s Copilot (which I use every day) to newer models like Gemini with larger context windows that can fit medium-sized codebases in their entirety, code generation is getting better and better.

But that’s not what I want to talk about.

Code generation is great, but Smart Code is where we’re headed.

Imagine a day when LLMs are 100x faster/cheaper than they are right now. Note, I said “when”, not “if”. It’s inevitable.

When that happens, developers will be able to call an LLM for things that we would historically write code for.

It’ll be as simple as making a function call. Except the function can do a lot of things. It’s SMART!

Developers today spend a fair amount of time doing relatively simple things: get some data from somewhere, loop over a list, do some parsing, etc. It’s how they combine these things to create beautiful abstractions that solve higher-order problems that makes programming so fun. These daily tasks are all made easier by code generation, but instead of generating all/parts of the code, imagine if we could just pretend the function we need to call already exists.

Let’s illustrate with an example.

Let’s say I want a list of the most recent contacts in HubSpot CRM that are from a state in the U.S. that has a population greater than 10 million.

Traditionally, I’d start doing something like this to just get things working for a single state. Then, I’d write other code to figure out the full list of states. Then, figure out how to send that list to HubSpot correctly, etc.

def get_hubspot_contacts (state = 'MA', count=10):
    # ...some code call the API
    # loop over contacts, filter out the ones we 
    # want, etc.

Now with code generation (which works pretty well), a lot of the boilerplate code you need could be generated — saving you time and making this easier. The LLMs will know about the HubSpot API, and they can even start with a list of states that have a population greater than 10M.

But, if we have blazingly fast inference, we can imagine just writing this:

call_llm ('get a list of hubspot contacts from states with more than a population of 10M')

The difference may be subtle, but in the first example, we generated code , in the second, the code itself is “smart” and just does the thing we want.

So, why does this matter. Why would we want this?

There are a couple of reasons.

1) It’s just faster and has less cognitive load to just be able to program assuming that this Smart Code library exists in whatever language you’re working in. It’s almost like you’re coding in a different language (because you are).

2) Once code is generated, it’s kind of static. In our first example, let’s say we had the LLM help us generate the code and determined which states had a population > 10M. Easy enough. The LLM knows that. But now that knowledge is no longer in the LLM, it’s captured in the generated code. That means, if those “facts” ever change (the list of states is different, because populations change), then we’d have to go back and do some sort of regeneration. Or edit it. Or just live with the bug.

Contrast this to the Smart Code model. All we did is tell the system what we want and at runtime, it figures it out. So, if the data changes, the system still works (assuming, in this hypothetical world, that LLMs themselves are smarter and have access to the Internet).

OK, so what does this mean?

It means that developers will be more productive and we’ll build systems that are more resilient to change because we’re working at higher levels of abstraction.

Now, here’s the kicker (and what I’m excited about):

In the future, we’re going to have a network of A.I. agents which are basically just modules of “Smart Code”. We can ask them to do things. But other agents can ask them to do things too. That means we’re all working at a higher level of abstraction and have an interconnected system of agents — offered by different people/companies, that can come together and complete a task or achieve a goal.

That’s what is all about. But, that’s just one take on it. Similar work is happening all over the web.

Interoperable agents that anyone can offer, and the ability to build new agents by composing existing agents. How exciting!


p.s. I happen to own the domain name (old habits die hard). No plans for it yet. By the way, the price I paid for the domain is almost exactly the mid-point of the range that the Domain Valuation Agent assessed it for.

p.p.s. Have a new feature in whereby I can drop easter eggs (simple codes) that you can enter to get +25 free credits. The code to use is smartcode (Expires in 48 hours).