In my last post, I wondered about when we would be able to have a conversation with AI that we could trust. While that’s an interesting question, I skipped over the more immediately arresting questions of what we can do today and in the near future with generative AI (which is the genre of AI of which ChatGPT is a part).
In this vein, I found How Might Generative AI Change Programming? a fascinating read. It discusses what aspects of programming feel amenable to this type of AI and how we might come to view it as a just another tool over the next decade or so. I found many insights.
I noted in my post that generative AIs appear not to be trustworthy. In the programing context, this means that if you ask them to write code, you have the problem of figuring out whether the code is correct. Worse, it’ll often look plausible but still contain major bugs. The article goes beyond this to present a convincing case for why generating more than trivial production code is currently fanciful. It then looks further into where we might find real utility. The thought that if we look beyond the obvious idea of the AI writing production code we can find deep utility engaged me, and I agree that generative AI feels well suited to fuzz and property testing.
Navel gazing a moment here, it is the piece I wish I’d written: taking a subject I know well and applying a novel, interesting and timely angle to it. But then I realised that the author has been involved deeply in programming languages for many years, and perhaps it’s not so awful that I wasn’t able to write anything in the same ballpark. I just have to keep writing, and thinking, and this practice may enable more original thoughts in the long term.
ChatGPT offers a glimpse of the future, where a program can hold up its side of a conversation with competence. Before thinking about how we might feel about this, let’s look at an example:
Mike: What was the cause of the global financial crisis in 2008?
ChatGPT: The global financial crisis in 2008 was caused by a combination of factors, including the buildup of excessive levels of debt, risky financial practices by banks and other financial institutions, and a lack of adequate regulation. The crisis was triggered by a sharp increase in subprime mortgage defaults in the United States, which led to the collapse of several major financial institutions and the onset of a severe global recession.
Mike: What major financial institutions collapsed?
ChatGPT: During the global financial crisis in 2008, several major financial institutions collapsed, including Lehman Brothers, Bear Stearns, and Merrill Lynch. These failures, along with the problems faced by other large financial institutions, contributed to the severity of the crisis and the onset of the global recession that followed.
What can we see from this snippet?
I recently spent too much time learning about the technologies that undergird my home network.
It came about because we recently built a study in the back garden for me to use when I’m working from home. One question that remained open throughout the build was what the network setup would be. I had four critical devices: my laptop, my phone and a pair of Sonos speakers.
The basic connection to the outdoor study is an ethernet cable running from the house. Due to the location of my router, however, that cable is hooked into my home network via the LAN port on a Google Wifi mesh access point. I wanted to have a further wifi access point in the study, connected to the ethernet cable, for my laptop, phone and speakers. I didn’t really have much confidence, however, in using a two wifi network hop between my router (and, hence, ISP) and my laptop. It just felt weird. Too many network gizmos to work.
Buuuuut, I really, really, really wanted it to work. What better excuse to deep dive on layer two networks to figure out how wild this network really is?! So I put on my sleuthing hat and decided to figure out whether this unholy pile of network was going to work, from the network frames upwards 🕵️
What follows is the picture I put together for myself. While I’ve tried to make it accurate, there’s a bunch of (somewhat educated!) guesswork going on where I tried to apply theory to my actual devices and network.
Much of Go’s standard library is basic at first sight, but can take you a long way. http
is like that. flag
is also like that. I think the flag
package is unfairly maligned as underpowered.
Initially, it does seem that you are limited to simple constructions: the binary, then some named flags:
> greet --name Mike
Hi Mike!
But flag
supports so much more than this. Let’s dig in to what you can do.
On and off for the last couple of months, I’ve been working on a theme for VS Code. It’s a light version of my favourite dark theme, Monokai Pro. Sadly I can’t share it as it amalgamates two different VS Code themes, one person’s theme suggestions in a GitHub comment and my own tweaks. I’ve no idea how that works for licensing, so I’m playing it safe.
Instead, I’ll share how I got there, because sometimes it’s good to read about a journey. If it inspires you, all the better.