5 ms·
Conversely I think you express the view of a non-ai-assisted programmer. LLMs don't just dash out hundreds of lines of code. They can take a concept and break
by tredre3 3y ago
Conversely I think you express the view of a non-ai-assisted programmer.
LLMs don't just dash out hundreds of lines of code. They can take a concept and break it down into concrete steps or even a fully planned architecture for you.
That's literally the hard work you describe. AI can do it beautifully, it just needs a human capable of critical thought to steer it (human understanding of the subject at hand is merely a bonus, not a requirement).
- t1mmen 3y agoHard agree. I’ve been at this for 22+ years now, and GPT4 by my side has made me AT MINIMUM 2x as productive; on a good day, 5x. The separation will very clearly be “legacy devs” vs “AI-powered devs”. I’ve spent a tremendous amount of time thinking about how the problems should be solved on my current project — big picture, and small. Once the system design became clear, about 80% remains as “just write the damn code” type work. I outsource about 70% of that to GPT, while keeping my focus on the important parts; the right abstractions, modular and self-contained functions, good naming and function signatures, making sure it all works and makes sense in harmony. I don’t care (too much) about the inner workings of every function, so long as the abstraction and usage of it is great (and well tested). Refactoring, if ever needed, is trivial then. My overall work has never been better. Anybody dismissing AI for any level of programming is doing themselves a huge disservice.
- physicles 3y agoI've also been in industry for ~17 years and coding for a decade or so before that, but I'd seriously sit down and watch an hour long video of someone just using AI to work on a large existing system. Virtually all the AI coding content out there is about building something new from scratch. Could elaborate more on your workflow? Do you use Copilot, or just GPT4? Are you copying and pasting large blocks of existing code to hint at how things should fit together, or do you describe how the existing code is structured in English? Do you find yourself decomposing your work differently so as to fit your new AI workflow?
- t1mmen 3y agoI use both Copilot and chat with GPT4. For now, it’s mostly copy/pasting large blocks of pre-existing code, types, etc. I have a pre-defined prompt set up to explain how to behave, languages I know, libraries in use, naming conventions, how to respond, etc. I talk GPT as if it’s a skilled colleague who’s got memory issues. When it forgets, I remind it with stuff like “this is our current code now, remember X, Y, Z” I’ve become an even bigger fan of small, compostable functions that do one thing very well. GTP excels at that, both writing and testing them. I don’t involve it much for architecture and high-level design atm (mostly because I got that part solved on my current project). I tend to have a design in mind, give GPT the overview of how it fits together with mock code, and ask it to review with me, propose other paths we could take, etc before proceeding to implement. One function at the time, with tests. When refactoring happens, it’s usually isolated to a few hundred lines at most. When tests fail, directly or indirectly, I give it the full output and ask it to debug and fix. I find this helps GPT remember the code’s responsibilities when it gets lost/forgets. It also helps me avoid regressions when GPT returns functions that miss use cases we had covered before. I keep long running chat threads — weeks at times, hundreds or even thousands of messages. The longer we go, the better it tends to perform (web app performance, even on an M2 Studio, does suffer after a while though) At worst, GPT is a fantastic rubber duck. At best, it’ll help me see superior approaches and solutions I wouldn’t have considered, AND give me perfect code in seconds. Once tooling gets really good, and AI can understand the whole code base/database/infra… we’ll probably be in real trouble.
- physicles 3y agoThanks a ton! Details around this use case are conspicuously missing from the public discourse. You've really changed your workflow to adapt to these new tools. The amount of mental effort seems comparable to learning a new IDE, maybe a bit less. Instead of the chat app, I wrote a python script that uses the GPT-4 completion API. I can just pop over to the terminal and type 'chat' and it's there. As far as I can tell, it's basically the same as the app. We are starting to see AI tooling that can fit an entire 100k line code base in its context window. I still see myself having a job five years out. Ten years out, not so much. Luckily I'll be close to retirement.
- weatherlite 3y ago> The separation will very clearly be “legacy devs” vs “AI-powered devs” I don't think there will be many people not using AI, if at all. Just like everyone learned to use Google and Stackoverflow, everyone will learn to prompt a chatbot. And since it's not really rocket science prompting a chatbot, we might see programming becoming a cheap commodity (and after that - pretty much most knowledge work)
- t1mmen 3y agoI agree, but purists can be their own worst enemy. Prompting is still a bit of an art, but I’m sure it’ll get better. Still, seems silly to not leverage one of the greatest tool upgrades we’ve seen in decades. There’s plenty of interesting problems to solve, why waste time on the boring parts anymore? Don’t get me wrong — I think this’ll be the end of MANY jobs within almost every field in the next decades, ours included. But I sure as shit can’t beat it, so may as well join it and get something out of it before I become just a commodity.
- weatherlite 3y agoOh yeah I agree, I'm a heavy user. Not just programming, I talk to this thing about almost anything to see what it has to say.
- meiraleal 3y agoEverybody here HN know how to write but not everybody submit quality posts/comments that get thousands of upvotes. The same dynamics will apply to a society where everybody can code. The prize for being in the % top coders will only increase.
- loandbehold 3y agoAgree. I've been using ChatGPT4 occasionally to write separate self contained pieces of code. It's amazing how good it is. The limitation right now is that you can't load your whole repo into it. So it's limited to small self contained pieces of code. You can give it functions it can call in the input, but still it's very limited right now. Once someone figures out how to load whole repo into it you will basically be able to assign tasks/bugs to it and it will create a PR for you. So you will only need to review PRs written by AI.
- weatherlite 3y ago> Once someone figures out how to load whole repo into it Yep that's the crux of the issue I agree. It's not just one repo, any well established org has millions of lines of code - can ChatGPT handle that kind of context size without any human directing it ? It's basically having an LLM trained specifically on your company data, and having it retrained constantly since the data keeps changing - what are the costs of that? We'll see.