Post B81lzVrBkmWqaNiU40 by gfxstrand@social.treehouse.systems
 (DIR) More posts by gfxstrand@social.treehouse.systems
 (DIR) Post #B81lxdReZPB5XasS9o by gfxstrand@social.treehouse.systems
       0 likes, 1 repeats
       
       Yesterday, I was talking to a colleague about what I’m doing on the Panfrost compiler and I mentioned that I typed out texture support the other evening while watching TV. Their immediate response was, ”Why didn’t you use AI? If you can do it while watching TV, Claude can probably do it.”I’m so tired of this. Why do I need to justify how I’m writing code? Especially, why do I have to justify it to someone who demonstrably can’t write a compiler? I don’t.But also, I will. So here’s 3 better things I can do with an easy project than feed it to a chatbot:
       
 (DIR) Post #B81lxhn4Pigb1Avc5w by gfxstrand@social.treehouse.systems
       0 likes, 0 repeats
       
       Take a break. I like writing code. There are plenty of parts of my job that I find stressful but writing code isn’t one of them. I enjoy it. And sometimes I need an easy little project.Maybe it’s Friday afternoon and I’ve got a few more hours but don’t want to start something big. Or maybe I’m having an off day and I can’t do research grade compiler theory. Or maybe I just want to relax in the evening with a glass of wine and an easy coding project.
       
 (DIR) Post #B81lxjOKSg5Fz1MsoC by gfxstrand@social.treehouse.systems
       0 likes, 0 repeats
       
       Give it to a junior dev and let them learn. No one learns compilers by staring with register allocation. You have to start small. You start with “hook up the rest of the float ops.” Yes, Claude could probably do that. But Claude won’t learn and Claude won’t turn a junior developer into a senior.
       
 (DIR) Post #B81lzQzrp5V3VqjqOe by gfxstrand@social.treehouse.systems
       0 likes, 0 repeats
       
       Do it right. Even though I was distracted by the television, my texture code pretty much worked on the first try. I found out a couple days later that I missed a single line in a match statement. That’s it. All the code was correct. I just missed a line that hooked up the “emit a derivative” code.If I had Claude do it, it would have output something and it may have even gotten some tests passing. But I would have had to very carefully read every single line to make sure it’s correct. “Hack on it until it passes tests” is how you get a shitty compiler that falls over in weird corner cases.And no, that isn’t just AI hate. When a human takes that approach to compiler writing, you get the same result. And the answer is usually to do a full human audit and check every enum and every bit.Meanwhile, I can write code faster than I can read it so if I actually care about it being correct, I’m better off just writing it myself from the start.
       
 (DIR) Post #B81lzSgnWxR0lHpdx2 by gfxstrand@social.treehouse.systems
       0 likes, 0 repeats
       
       Oh, but isn’t that the same work you’d have to do if a junior dev did it? Yes and no.First, if they’re someone who’s actually trying, even if they don’t really know what they’re doing, I can assume a certain level of intent. They’re not just generating random streams of “probably close” tokens and revising until it compiles. That changes where I effort as the reader needs to go.Second, when I spend my time reviewing code from a junior, I’m investing in them as a person and in their skills and their career. When I’m reviewing AI slop, I’m not investing in anything but my own insanity.Third, yeah, sometimes I have to review or fix human slop and I usually get kinda pissed off when that happens. Because when that happens, their starting point might have given me a few pointers but I’m basically rewriting it from scratch at which point why bother with their code. They may have given me a few pointers but if I still have to do 90% of the effort, what are we doing?
       
 (DIR) Post #B81lzULxLPx3vE61k8 by gfxstrand@social.treehouse.systems
       0 likes, 0 repeats
       
       Going back to the top, can we take a moment to appreciate the absurdity of a man who knows nothing about compilers implying that I’m not doing it right because I’m not using his favorite toy?At the end of April, I told the Panfrost team that, when I got back, I would write them a new compiler over the summer. The optimistic goal is to have all the hard parts pretty much sorted by XDC.That deadline is absolutely insane.And I’m on track.But, sure, tell me how much better/faster it would be if I used AI. 🙄
       
 (DIR) Post #B81lzVrBkmWqaNiU40 by gfxstrand@social.treehouse.systems
       0 likes, 1 repeats
       
       This is a classic example of where people miss the forest for the trees. Yes, there are probably tasks here or there which a codebot could get mostly right. But those “speedups” don’t matter if I’m fighting bugs later because of it.A huge part of why I’m able to go so fast is because I’m taking my time and getting things right from the start. I can move fast because I know I can trust the code. I can move fast because I’m not constantly finding dumb bugs. There are bugs, to be sure. I’m not perfect. But the bugs are usually minor oversights which are easily caught and fixed. I can move fast because the architecture is sound and I’m not constantly finding deep bugs and rewriting things.If I offload even simple things to a codebot, I either have to fix it up myself until it’s at my standards (which would take just as much time as writing it) or accept slop because that’s the easy thing to do. If I accept the slop, then I end up with a sloppy, buggy code base that I’m constantly fighting.Fighting with the code is what takes time. Not writing it. Fighting with it.So yeah, I can cheap out now and pay through the nose for it later or I can invest human time now and get a piece of software that actually works for us, our customers, and our users.