- Podcasts
- Two's Complement
- Pair Programming with HAL?
Pair Programming with HAL?
Two's Complement
- March 16, 2025
- 47 min
About this episodeMatt and Ben explore the new world of AI-assisted coding: is it like pairing with junior developer? Matt gets the recording working the…
Transcript
From the publisherThis transcript comes from the podcast’s own feed, shown as the publisher wrote it.
Pair Programming with HAL?
Oh, boy. Everyone gets a very much a warts-and-all view of our our podcast, for you know, we've, you and I have always said this is low effort for us because otherwise we'd stop doing it. It's just, we don't want to like spend too much time on it, but we care enough to do it like somewhat properly.
but um And the TLDR, where the R of TLDR is record, too long, didn't record, um is I have moved on from the company that we both worked together at. And I am currently on a short break between jobs, and enjoying the good life. and working on Compiler Explorer. And it's of no fault of my previous employer. I still still think they're fantastic. And I know that you're happy there. And there's a lot of cool things going on there. But it was an opportunity for me to do something new and different. And I took it. And here we are. But we're still hanging out.
Right, right, right. Yeah, actually. Yeah, a few people actually who who knew that you had moved to a new firm had asked me, like, are you guys going to keep doing the podcast? And I was like, absolutely. Like, this is my chance to talk to Matt every week because now I don't have the built-in one of you know riding the train home or whatever it might be.
But yeah, I've moved on. I am i'm excited to do something new and different. And if you care about such things, you can follow me on bluesky or hackyderm or one of those things. And you can see what I'm up to there, but I'm not going to go into it here because this is not what this podcast is about.
And that's how I found it. But yeah, we we were saying that like, you know, Um, if, if you've got like a knowledge deficit, like I have, so the things that I've used it for on Compiler Explorer is, so I've got CoPilot integrated into one of my IDs and I'll say, Oh, I don't know how to phrase this in TypeScript because frankly, I don't know TypeScript very well. And it's very good at saying, "Oh yeah, this is how you..." "explain this type to the system", and then and then you try it and it doesn't work and you say well that didn't work because of this and it goes oh oh yeah silly me and that's been very and it eventually gets there that has been very useful for me. What have your experiences been with using ai how do you use it if you use it?
The most basic form is um chat. So you just open a separate chat window from whatever tool that you know IDE or editor you're using and you just ask a question and it gives you answers, right? And there's a lot of, you know, maybe copying and pasting code depending on exactly how you do that, right?
And it's like, oh yeah, yeah, yeah. You probably want to paste that stuff in. I'm like, oh, that's, that's creepy. So. that's I didn't realize that, but it's obviously valuable to the system. you know Here are the last three files I've been looking at. Here's the thing my mouse pointer is hovering over, a little bit of extra context, and then it it gives it a little bit more mind-reading ability than I perhaps was expecting when I'm just sort of chatting with it.
That's true. yeah I would add to that, there's a fourth one that I've seen recently, which I suppose is like 2+, right? With with the two, that is an IDE based editor, um you're generally driving the show and you know it says, hey, you know, you you highlight things that I would do is highlight a function and say, can you simplify this please? Or can you make it more, you know, TypeScripty?
But then there are more like, this is a new word I learned the other day, agentic, but it is to say agent-like, where the the" AI has agency of its own" plugins. And I was observing somebody, um a friend of mine, like driving the IDE by using a plugin that actually can itself drive the IDE. So he'd asked it to say, can you add new files? Can you refactor this? And it would do all of the things in one go and it would run the test and they would fail and it would feed back the failure of the test and it would actually iterate itself until it had got to a stage where it said, "Hey, I did the things you asked me." "Are you happy?" And then you click yes, or you'd go, no, roll it back and we'll try again. And that was, you know, that seems to be very much more like to, uh, the second case, but with its own agency.
And in sort of traditional you know XP style pairing, the whole idea of that was that the driver doesn't make any technology decisions. The purpose of the navigator was to say like to communicate their ideas to the driver and the driver would type what they think they heard. And that was supposed to be a feedback loop to make sure that you really had expressed an idea that was like cohesive, right?
But ah he's a lapsed programmer. He used to be a programmer, but isn't anymore. He's more of a managing type person. And he has been working on some code by driving the IDE. And it's amazing to see how much he's been able to do without literally writing a line of code. Now he can code, but he hasn't done it for a while. And it's, yeah, you know, he's got this sort of web application with ah like a game and these pieces moving around. And he's like, yeah, I should like for the mouse middle mouse wheel to zoom in and out of the map.
Uh, and then the middle mouse button to pan and it goes, got, I gotcha. And it just makes all these changes. He looks at it and he goes, yeah, it seems to work and commits it. And then just goes, and I'm like, wow. I mean, it is fairly unambiguous when you say that, but it's like, it's the AI has understand, ah understood the flow of his current program well enough to be able to then say, I can see how you would add. panning and zooming into this application, which is one of those things that is a pain in the bum to get right if you try and do it yourself.
I mean, the that's that's cool, but, you know, there is obviously... potential for a darker side and without going into like some of the, you know, obviously that there are IP concerns, but there's also the, "are computers taking away our jobs?" sides to this too. And so far, I'm like, not in a meaningful way, because ah That was toil that, that, uh, that my friend needed to do and could possibly have done or worked it out himself, but he could just ask it to do, it but he's still making executive decisions about like, yeah, I don't like the way it did this or this class is more complicated and iterated with it. So there's still some programming knowledge that's required and needed, but I can, I, yeah, I can see the beginnings of something that maybe say there is a category of.
I have told them that, well, I've told them a bunch of things, which I'm probably about to recount on this podcast, but, um, I told them that like the, the, if I were to summarize this in one sort of paragraph, it's like, what kind of effect do you think that AI will have on human society over the next, let's say 50 years? Do you think it will make computers more important to us or less important to us? And I think the answer is pretty obvious when you phrase it like that.
I think what's happening right now, and what may happen for a little bit, is there is a little bit of ah what I would maybe call an economic dislocation in that there's probably not an infinite amount of demand for software engineers, right? There is certainly an amount of demand that up until now has gone unfulfilled because the cost is just too high, right? Like this gets back to a little bit of like, you know, an economics 101 class about minimum wage, right? Like you raise minimum wage, you raise the standard of living, but you also create inflation and you also drive businesses out of business. So like, you know, a practical example for us living in Chicago is that Chicago raised its minimum wage to $15 an hour. I don't know if that has fully taken effect yet. I think they've been rolling it out in stages. It might have actually fully taken effect. And there are when you go down to Ogilvie Station, which is the train station that you know we would ride into every day, you see a lot of storefronts. And those storefronts are empty. And they have been empty since COVID, right? And I wonder to myself when I walk past those storefronts, if Chicago had not raised the minimum wage, how many of these stores would now be open?
Because now if I'm an estate agent, sorry realtor, I translate for you, and I need to change my website, I don't have to call up the website company anymore because I can load up my website and tell an AI, can you just change some things about this for me, please? Or can you make it so this happens?
I don't know I'm code switching between English and and and American here, "freedom speech". Oh boy. so much wrong with that at the moment right now anyway it but you know like there's there's a number of things that you can't uh i can't uh i was just literally replacing this battery of my sump pump downstairs and i'm like i can't get the the the wing nuts off of the terminals but
Yeah, no, so I mean, it is and it's like putting, as I was getting to before, I don't think there's an infinite amount of demand for programmers. there is a lot of demand for programmers. And it is also possible that having AI will actually increase the total net demand for programming, because as my previous statement kind of alluded to, computers are going to get more important to humanity over the next 50 years, not less important. right And so the question is, at what rate will that increase?
And it might increase very quickly because of this. right But certainly in the short term, what this is doing is reducing the unfulfilled demand for programmers by dramatically increasing the sort of total supply of program-ish, right? like You can either be an expert programmer who is even now more productive, and I certainly think you and I can speak to that of like the way that we've used those tools to get things done way faster than we would have before, and and you know we should talk about some specific examples of that.
But also everyone else who is attempting to write code, whether they be a realtor who's just trying to update their website or somebody who used to be in programming and hasn't done it for 20 years or somebody who is just learning or somebody who is just treating it like their day job and just like, I just need to get more stuff done.
And you know unfortunately for us, perhaps, reducing the total amount of compensation that we can expect to get because our skills are so limited and therefore not in so much demand. I would argue that from a purely economic perspective, that is nothing but good. From a sort of selfish perspective, it's like maybe not the best, but I'm willing to take the trade because it makes me as an individual more productive.
And for somebody who kind of getting back to you know this this hypothetical person who might be going into a computer science degree and considering this as a vocation, I would say: if you're in it because you want to make a lot of money, you can probably do better. But if you're in it because you love programming, that's not going away.
the ability to learn but that's a whole other conversation about like why and we're way in the weeds with with that now but um yeah it's interesting that you might say there are more... I suppose again that we we're coming at this because you know we are considerably closer to retirement than we are from starting our careers which is sad to say out loud and so we're...
um And so it's it's very, ah and like, literally, while we're talking Discord notifications popped up, where friends of mine are working on like Amiga demos and still, you know, for a computer that has been ah obsolete for 30 years, you know, that's, but because people love this, it's we're very lucky that at the moment, we still get paid reasonably well to ah to do what we we enjoy.
um that that like The economics of that may shift as AI changes things, but you know who makes the AI? well I suppose there becomes a point, there's maybe an inflection point where ah the point at which AI becomes determining of its own future, designs itself, updates itself. under maybe some human direction. But at that point, I guess that's the singularity type feel or whatever. i Maybe that's a different thing. But like I can see a world in which it it takes off and then we're all in in trouble.
I mean, this is like the bad old days of Microsoft and like the, you know, 90s where it's like, yeah, you know, you need to pay the Windows tax whenever you buy a new computer. And like, you know, everything was just sort of locked up by them. And that's just like terrible for so many reasons. And I think that a lot of what, at least in my career, um I sort of gravitated to um was open source, not only because you had access to the source code, but also because of the sort of free is in speech aspects of it that allowed you to to do what you needed to do and never get boxed into a situation. And like, you know, the scenario I was painting to a a friend of mine the other day about this was, so imagine that you are one of these people who's not really a programmer, but you sort of figure out how to do things using AI. And you build a little tool or something that is useful to you. And then you ah you know you change it a little bit, and it works really well. And you're like, you know maybe I could sell this. right And so you continue to use AI to build like a a website or something. Or you know you you get on some payment portal, and you set us something up, and you start selling this thing. that does pretty well, right? And you sort of like your side gig and you do this for a while and then it starts to become like your main source of income. And you're like, you know what, I could just quit my day job and I could just do this, right? And you keep making some improvements to it. And you sort of do this sort of pair programming style thing with the AI where it's like you say, and make changes to do this and changes to do that and changes to this.
Right. And then you, you know, have done this for a couple of years now and you fully quit your job and you, this is how you pay your rent. And then one day you go to make some change to your thing. Cause you know, there's like some update somewhere or something's broken or there's new stuff. Oh, I gotta go fix this. And you ask the AI to do it and then it doesn't.
Yeah. That is, that's a really interesting, because what I was good at most of the thing that was coming to mind was, you know, folks who make a living from being YouTube people on Patreon or whatever. It's like, yeah, but you know, YouTube could say, no, you can't do this anymore. Or it could stop working or whatever.
Or Patreon could say like, yeah, we're shutting down or whatever. and you got like But they, um they still understand what they've got. Maybe they don't own their uploads, but maybe they do still have it somewhat. You know, you could imagine them setting up shop. The foundations are still there, right? If you are a social media influencer and you do interesting stuff, then that stuff is still interesting to somebody somewhere, and presumably, and some new site will come up and you can be like, okay, I've got my things.
you know ah If today, you know already there's randomness inside the way that they work, and I kind of get that, but like you could imagine them not making it... I mean, you you didn't even suggest that it was going away. Actually, you just said it didn't, right? So this is perhaps the same thing. I'm just having the same realization that, yeah, you go to say, can you make a thing change in this way? And it does it in a way that doesn't make any sense anymore. And you you can't change it or you can't... you know it Yeah. It doesn't have to just go away. Yeah. This is your point. It's like, it can just change.
ah So this already exists in different ways, but I'm stuffed in the same way. Yeah, yeah yeah i'm I'm going round in circles in my head here, but I do think there is a material difference between, you know I know what I'm doing and I'm relying on things that do those that for me. um ah In aws you know it's a load balancer and whatever and a storage system or whatever and it would be a pain in the bum to change it but i can versus i've built an empire on something i don't understand.
No, no, and that's sure, sure, sure. And it's like I'm not saying this is fatal. I'm not saying like and this is why I won't work. It's like it's just introducing a risk. And I think it is a pretty significant risk. that you don't have when you have people who actually understand the code that is being written and how it works.
And so there's an interesting aspect to it there as well, but it seems more... It's more, more in your control. You can, as a, as ah an employer, as a somebody who's managing, you take into account, we've talked about, uh, crypto risk, I think, as we've called it, which is bus risk to everybody else on this, on this, this podcast before you manage it.
right And that has a much greater risk of just one day not working and you don't understand why. right um So there's there are two different modes there. But I think it's kind of the same thing of like you're exposing yourself to this vendor lock-in, this thing that, like you know back in the 90s, we were very acutely aware of that existed. And it's like ah it's like a slightly different dimension on it, and of course, and there's two different things there.
Um, I couldn't, you know, if, for example, they suddenly changed the licensing rules or I actually, I can't imagine what sequence of events could make an open sourcing go away. But, um, if they stop maintaining it and I can't maintain it or I can't afford to maintain or I don't understand it, I have a similar problem. um And then this the the ah the DeepSeek has another lish issue which is like they can give you an open source model but can you train it yourself and so far they're like no no no that's magical stuff that happens behind the scenes and requires more money than you have access to even though it's considerably less than perhaps some of the other models and that seems to be.
No, I mean, it I think you're absolutely right. like If you want to train your own model, it's it's going to be like millions of dollars. right Isn't that how that works? So it's like that's a pretty significant barrier. um But like the I think the analogy in that particular case, like let's say that you built a system. It's not that you built a system with DeepSeek. You wrote the code and it uses DeepSeek to do something.
is reliant on a tool that you fundamentally don't understand how it works and you don't even really understand what it produces, then you can easily get into a state where you just can't make changes at all. And like the one thing that I have seen in my career is software that can't change dies. It has to be able to change because the world changes around you and if you don't change with it,
Um, without getting um a bit of a change, then we talked about some of the ways, and it's a bit of "errr" gramophone needle scratch kind of moment here, but I feel like, you know, as we're coming up on time and I'm thinking it, it's at least worth talking a little bit about some of the productivity boost that, you know, we we alluded to earlier, you mentioned that we, you know, and so like I don't want to be like all sort of semi doom and gloom about this kind of stuff, because I think, you know, there are a lot of positive things.
Um, and so some of the success stories, I think I've already said for me, we're like, you know, getting it to do. Uh, I don't understand TypeScript. Can you please do this thing or, you know, can you refactor this code or can you make suggestions even like, and those are very like pair programmy thing. And sometimes it's really, really good at that.
Uh, I've had, so there's the thing that I've been doing recently, and which would be a surprise to nobody who's listened to this for any length of time is I'm actually working on, uh, yet another emulator and I'm working on the Z80 emulator for, for a conference talk. And I'm experimenting with different ways of writing a ah CPU emulator to see how they come out. And I'm also experimenting with different types of C++ functionality. But anyway, the Z80 obviously is an incredibly well-known, well-understood CPU. And there's obviously a lot of information about it on the internet. But I've been remarkably impressed with how my particular take of it currently, at least the current incarnation, is more like a traditional decode. So I'm switching on the opcode. And then I'm returning a structure that describes what that opcode does. And one of the things in that structure is like the actual string that is the opcode. And then there's a bunch of other flags, like how many more bytes am I expecting after this byte? What ah is the source? What is the destination? And these are all "enums". So you know each thing is like case 0x22: return "LD HL, BC", "size of opcode: 1", Register::HL, Register::BC, then some other nonsense that's just that and right okay so it's fairly straightforward for some definition of straightforward um but I was absolutely shocked that I would write the next case statement and the AI would correctly fill in the completion for that. That is, I'm just literally in a big switch statement, the top of it is it's like huge switch opcode, and I do case 0x33:, and it says return, and then it's filled it in. So it's like worked out that this is a Z80, and then therefore, 0x33 is this opcode, and it can actually determine what my program means or needs from the op code that that that was just blew me away. That was like, again, and now I want to do is just also complete the whole lot of them because there are hundreds of those stupid things.
Yeah, right, right. All of those APIs that have been around for a reasonable period of time and are very well-worn, it is so good at that. And it has gotten to the point where it's like, you know rarely will I do things like look up the documentation first. Usually, I'm looking up the documentation only to double-check what it is that the LLM in question has done, um or to just make sure that I understand it.
I think this is actually kind of a good thing. But one of my concerns with these tools has been, like are we just going to turn into like human QA? Are we going to like, OK, the AI is going to you know dump out all the terrible code and then our jobs are gonna be to fix it, right? And I actually think a probably more realistic version of that is it's gonna be our jobs to learn the new stuff and leave the old stuff to the computers. Because the computers will know, will have the sort of encyclopedic knowledge of like all of the APIs that have been out there for years and years and years and the best way to to use them. um And what our job is gonna be is the like, you know, Hey, I built my tool in this in this LLM and I based my whole business around it and it stopped working and I don't understand why. It's like, oh yeah, because they released a new version of the API that you use and the LLM hasn't picked it up yet. And so my job as a programmer is to be like, hey, somebody built a new thing. I need to learn how to use the new thing because the AIs haven't figured it out yet.
um and I think there's going to be a lot of that where it's like, yes. In some ways, it it makes me a little sad because sort of like the old gray-beard thing of like, yeah I know every corner of this API and I know exactly how it works and I know where all the bodies are buried. like Maybe it's not as useful as it used to be anymore. But what it does mean is that maybe what that means is we're going to be working on new stuff. and and know I like working on new stuff. It's fun, it's interesting, it's cool.
um But yeah, I bring it back to the the original topic here is of like, yeah, all of those sort of like public well worn APIs. ah Tools that have been around for a while. It is so good at knowing those things. It writes a lot of the same code that I would write. Obviously like I have very particular things around testability that I do and I have tried to kind of.
This is the kind of stuff that I don't like. This works for this. And this works for this. And I think it's maybe getting better at it. I'm not really sure. um So I wind up refactoring that code a lot, or not even refactoring it, because the code that it spits out isn't really tested or testable. But I like wind up you know turning it into something that I can then write tests around and then sort of doing the reverse driving of those tests where I like break the code and make sure that the tests fail.
Right, that is actually one that a nice, yeah, I mean, so yeah but a landmark moment in my understanding of AI was was realizing that I could be much more discursive about saying what I liked and what I didn't like as kind of part of and of a founding document, which ah ah was was was a huge like, oh gosh, yeah, that makes sense, you know, tell it, don't do this, I don't like it.
Um, and then the other thing would be, yeah, like writing tests is very good. I got, I, so I, this was back and when I was working with, uh, with you, although at the same company, um, I had a very warty, complicated. piece of code that was very thread-y. I think we probably talked about these things. And I asked the AI to try and poke holes in it, and it did. And I had to argue with it to prove to it that, like, there wasn't a window of opportunity when it, was ah you know, a threading bug would happen. And that was valuable too, because I, you know, it it was like having a very smart person to argue with. And I didn't have to expose myself as being not sure about it to anybody else.
You go, oh, have you thought about these? These are the edge cases here. And then very often, it would auto-complete in the test. You could just write the test, the description, "should return 0 for negative values". And it's like, boom, there you go. You just hit Tab, and the whole thing auto-completes.
It's making this all more productive, and which is net a good thing and may create some sort of weird ripples in the short term. But I think in general, it's good. The whole thing kind of reminds me. I don't know if you were of this this era. I think you probably were. Did you ever have a boss that was like skeptical of Googling things?
You got to get the docs on your computer, and you got to read through them, and you got to figure out what the software can do from that. I'm like, or I could just Google it. And he's like, no, you got to read the docs. And this sort of seems like the same sort of thing to me, where it's sort of like, you know like i could I could see someone making the argument. It's like, oh, yeah, you know if you just have the AI write all the code for you, you don't understand it. It's like, well, I mean, that's not strictly true. you can You can understand code that other things have written. That's a thing programmers can do.
Right, right. so like you know if you want to if you want it's The way you choose to work is to have a tool generate some code, and then you read that code, and you understand what it does, and you fix it if it has any problems, and you write tests for it if the tests are incomplete or whatever. like That's a perfectly valid way to work. It's not you know Google the thing, look at Stack Overflow, copy and paste into your code, and then repeat.
Uh, maybe we should, we should put a pin in it for now and we should maybe come back with, uh, if anyone has thoughts on this episode, cause I imagine this is one that people might have strong opinions one way or the other. You know, I certainly in conversation with friends, uh, they've been like, "Oh my God, you use AI: ugh" h kind of fear, which I was like surprised that people could have such a visceral reaction to something which I perceive as just a tool.
I don't know, maybe. Well, yeah, we'll see. So it might be two weeks or something, or we'll do it in a week, but we'll get this episode out probably in, oh, I'm going to say this is cursing it... I was going to say probably in March. We never reveal when the times of these things are recorded are. But never mind. This time, special what special dispensation. Anyway, it's been fun.
