7 ms·
Code like a surgeon
- _wire_ 1y agoMy god, don't code like a surgeon! Code like a programmer. This article further emphasizes the obvious point that as programmers are well on the way to destroying their own profession and their work is poised to wreck the entire world, that it's time raise awareness that programmers work with much less discipline and responsibility than other professional, accredited, licensed trades, like say... doctors. But for now, sure, why not just compare yourself to surgeons, as you already anoint yourselves as "engineers".
- GMoromisato 1y agoIf we're going down this road, then I claim programmers are more skilled than engineers or doctors. 90% of engineers are not inventing new things--they are merely applying codified knowledge (which they didn't create) to a new location or instantiation. In contrast, every new program is unique in the world (if it were not then it wouldn't need to be written--you'd just copy/fork/download the program). And don't get me started on doctors. More than 40,000 Americans die each year from medical errors[1]. You really think the casualty rate from programmers--with all our mistakes--can beat that? I don't think so. So, yeah, maybe surgeons are not the right model. Maybe surgeons could learn a thing or two from programmers. ------------- [1] https://journalofethics.ama-assn.org/article/medical-errors/2002-06 https://journalofethics.ama-assn.org/article/medical-errors/...
- macintux 1y ago> You really think the casualty rate from programmers--with all our mistakes--can beat that? I think that if my infrastructure + code had any direct connection to patient outcome, there would be a lot of harm done. Not that I'm particular bad at either, but I know the effective cost of errors is minimal, and certainly does not have a direct impact on people's health. If I had the same responsibilities as a surgeon, I'd have a much slower rate of change in my systems. I do not in any way believe that the fact that we in IT kill fewer people than surgeons has any meaning for whether we're more skilled than doctors.
- GMoromisato 1y agoThis is a good point. My comment is really an emotional reaction to the (very common) denigration of software engineers, so don't take it too seriously. But I also think that good software engineers can scale the reliability of their software to fit the purpose. There is a ton of software in medical devices, and despite the well-publicized fatal bugs, 99.9% of medical software works without error. In fact, the automation of things like drug dispensing at pharmacies has decreased mistakes. I think if you deleted all the medical software in the world, deaths would increase.
- throwaway101157 1y ago> 90% of engineers are not inventing new things ... That raises the question of just how much of a difference you need for something to be an invention. Merely copying another program is not invention, while coming up with and implementing TCP definitely is. But is implementing another instance of a CRUD app invention? Is configuring a server invention? What about if the configuration is written by a script? The dividing line seems harder to pin down than one might at first think.
- GMoromisato 1y agoIs another CRUD app any different than another static-force analysis on a house beam? How many engineering decisions are made by software running the math and spitting out numbers? I agree that there are degrees of invention in both, but my argument (which is, admittedly, emotional in nature) is that there are more unique decisions in software, mostly because if you don't need to decide--if there is already an algorithm for it--then you can just plug in an existing library/app. You only need a programmer when you can't just run an existing app. Therefore, all programmers create things that don't already exist. That's the definition of invention. I know I'm exaggerating here, but it's less of an exaggeration than saying that programmers are "poised to wreck the entire world".
- yapyap 1y agoWritten like a true programmer.. who inflated his ego so much his belly might pop
- GMoromisato 1y agoThere is no shame in being a "true programmer". Thank you for the compliment!
- hatthew 1y agoSometimes I wonder how many people die indirectly from specific decisions. Like, large A-pillars in cars definitely sometimes save people when the car rolls over, but how many people die each year because a large A-pillar makes a blind spot and the driver hits a pedestrian? How many people die each year due to traffic slowing down ambulances? People dying directly due to software bugs (e.g. Therac-25) is pretty rare, but what about an inefficient network that caused congestion and made a heimlich maneuver youtube video load slightly too slowly to save someone from choking to death? I don't think there's any way to measure it, and it's almost certainly important to train surgeons more than software engineers, but I still do wonder.
- GMoromisato 1y agoI agree with you: indirect causality is what kills people. Directly attributable causes are rare because they are easy to fix. I also suspect these indirect causes are not easy to fix. It's not like 1 or 2 bugs cause 10,000 indirect deaths. It's more like 10,000 different bugs/design flaws cause 1 or 2 indirect deaths each.
- halfcat 1y agoThis is a good perspective. In most disciplines where they need some level of repeatable quality, like medicine or construction, they have constrained the environment to such a degree that they can engage in somewhat repeatable work. Consider how well cars would work if they had to traverse arbitrary terrain. Instead, we have paved the earth to make their usage somewhat consistent. Construction projects repeat the same tasks over and over for decades. Surgeons perform the same surgeries for decades. But in software if something is repeatable and useful, it becomes an app or a library or a framework. Some things in software have been heavily constrained to make the terrain navigable. Cloud computing in containers is one example. But in general, there’s a much higher degree of navigating uncharted territory in software than these other fields. Even building a CRUD app is often wildly complex, not the CRUD part, but the mapping of a specific business’s processes to that CRUD app, and getting those specific employees who currently work there to use it, is itself quite a novel undertaking.
- jibal 1y agoAnalogies aren't comparisons.
- simonw 1y agoI really like Geoffrey Litt's new analogy for working with AI coding tools: > Personally, I'm trying to code like a surgeon. > A surgeon isn't a manager, they do the actual work! But their skills and time are highly leveraged with a support team that handles prep, secondary tasks, admin. The surgeon focuses on the important stuff they are uniquely good at. It's also a neat callback to the Mythical Man Month, the most influential early textbook on large scale software engineering.
- sublinear 1y agoI sometimes use AI summaries to get the answers I need out of badly written documentation. That's about as far as I find any value or productivity boost. Consider that this "surgeon" analogy has always been applicable when docs or books are better written and full of useful examples. Also consider that a lot of the annoying "plumbing code" you probably want AI for is fairly closed-ended as there are only so many combinations of API use possible. I'm really not understanding the continued hype in 2025.
- simonw 1y agoHow much time have you spent running a coding agent like Claude Code, and have you tried running one in auto-approve (aka YOLO) mode yet? I've written a bunch about those recently: https://simonwillison.net/tags/coding-agents/ https://simonwillison.net/tags/coding-agents/ - including a couple of video demos https://www.youtube.com/watch?v=VC6dmPcin2E https://www.youtube.com/watch?v=VC6dmPcin2E and https://www.youtube.com/watch?v=GQvMLLrFPVI https://www.youtube.com/watch?v=GQvMLLrFPVI
- meindnoch 1y agoSimon, we don't care.
- simonw 1y agoYou don't care. And OK, I get that my persistence in trying to help people understand this stuff can be annoying to people who have already decided that there's nothing here. But in this case we have someone who looks like they are still operating on a 2024 model of how this stuff can be useful. The "coding agents" category really does change things in very material ways. It only kicked off in February this year (when Claude Code released) and if you haven't yet had the "aha" moment it's easy to miss why it makes such a difference. I'm not going to apologize for trying to help people understand why this matters. Give how much of a boost I'm getting from this stuff in my own work I honestly think it would be unethical for me not to share what I'm learning.
- yapyap 1y ago
- saulpw 1y agoYes, code like someone might die if you make a mistake! Can you imagine a surgeon using Claude Scalpel as an agent to just go ahead and fix that one artery?
- BrokenCogs 1y agoYes, I know several careless surgeons who don't check their own work
- ThrowawayR2 1y agoA surgeon has 4 years of undergraduate education, 4 years of medical school, and a 5 year residency, learning to operate (pun intended) with other equally highly trained specialists, many of whom are peers, like anesthesiologists, not merely support. The comparison was already dubious when Brooks made it for operating systems programming. Setting up a comparison with the average "I don't use anything I learned in my CS degree, lol" coder wrangling a chorus of hallucinating stochastic parrots is a bonkers level of hubris from techbros.
- BrokenCogs 1y agoMost surgeons don't use anything they learn in medical school or residency either. It's usually their last 2 - 4 years (depending on whether they did a fellowship) that is useful in their day to day job. E.g. an eye surgeon doesn't need to know how to read an ECG
- jibal 1y agoAnalogies aren't comparisons.
- asimovDev 1y agoit's the second time this week I see this link being posted and it's the second time this week I read it as a 'sturgeon'
- jibal 1y agoTheodore?
- BrokenCogs 1y agoI'm somewhat of a prompt surgeon myself. I find prompts online and then hash them together to fit my needs.
- handfuloflight 1y agofrankensteinian
- neilwilson 1y agoSo the Chief Programmer Team structure [0] is back in fashion is it. But this time with agents. Fred Brooks has never been more relevant. [0]: https://en.wikipedia.org/wiki/Chief_programmer_team https://en.wikipedia.org/wiki/Chief_programmer_team
- gklitt 1y agoYes, I cite Brooks (and Harlan Mills, seemingly the original source of the idea) in the post!
- neilwilson 1y agoI’m just glad I’m not the only one revisiting past structures that fell apart at the time because they involved humans. Now we have human like automation, everything needs revisiting.
- kulahan 1y agoI'm kinda surprised this isn't more popular. I figured we'd go this way eventually as we single out 10x-ers, give them a highly competent crew, and save a lot of money over your most expensive code monkey wasting time attending meetings, filling out Jira tickets, and giving presentations to the customer. You pay them a shitload of money - shouldn't you get every dollar's worth? Honestly, at every job I spend an unreasonable amount of time getting up to speed on things that are only tangentially related to my job (No, here we need you to check all the boxes in the Jira ticket, ensure it's linked to a zephyr ticket, and ensure it's linked to a git PR - we don't care about you adding attachments or comments!)
- glenjamin 1y agoThis reminded me of a slide from a Dan North talk - perhaps this one https://dannorth.net/talks/#software-faster https://dannorth.net/talks/#software-faster? One of those anyway. The key quote was something like "You want your software to be like surgery - as little of it as possible to fix your problem". Anyway, it doesn't seem like this blog post is following that vibe.
- martin-t 1y agoI like this quote. Unfortunately, my predecessor at work followed a different principle - "copy paste a whole file if it saves you 5 minutes today". Well, I am still a surgeon, I just do a lot of amputations.
- Blackarea 1y ago> Code like a surgeon ... As a UI prototyper XD yes sure. I'd most definitely put those on the same level. Maybe even favor an UI prototyper if it comes down to the real deal. Who needs an open heart surgery when you can have a magnificent css-hover animation that really seals the deal on some 90%-AI-generated slob that only caters to delusional top-management completely out-of-touch with reality. Irony off: Let's try it with a bit of humbleness next time, ey?
- jumploops 1y agoI’ve long advocated that software engineers should read The Mythical Man-Month[0], but I believe it’s more important now than ever. The last ~25 years or so have seen a drastic shift in how we build software, best trivialized by the shift from waterfall to agile. With LLM-aided dev (Codex and Claude Code), I find myself going back to patterns that are closer to how we built software in the 70s/80s, than anything in my professional career (last ~15 years). Some people are calling it “spec-driven development” but I find that title misleading. Thinking about it as surgery is also misleading, though Fred Brooks’ analogy is still good. For me, it feels like I’m finally able to spend time architecting the bridge/skyscraper/cathedral, without getting bogged down in terms of what bolts we’re using, where the steel come from, or which door hinges to use. Those details matter, yes, but they’re the type of detail that I can delegate now; something that was far too expensive (and/or brittle) before. [0]https://en.wikipedia.org/wiki/The_Mythical_Man-Month https://en.wikipedia.org/wiki/The_Mythical_Man-Month
- makeitdouble 1y ago> bridge/skyscraper/cathedral > Those details matter, yes, but they’re the type of detail that I can delegate now No... If you're building a skyscraper, there's no world where you can delegate where the steel or bolts come from. Or you'll at least need to care about what properties that exact steel has and guarantee every bit used on your project matches these constraints. If you don't want to care about those, build residential houses with 1000x less constraints and can be rebuilt on a dime comparatively. You might be thinking about interior decoration or floor arrangement ? Those were always a different matter left to the building owner to deal with.
- yellowapple 1y agoI think you're taking a metaphor a bit too literally.
- anonymous908213 1y agoNo, it's perfectly apt. One comment is stating that using LLMs allows them to gloss over the details. The responding comment is saying that glossing over details is not a great idea, actually. I think that statement holds up very well on both sides of the analogy. You can get away with glossing over certain details when building a little shed or a throwaway python script. If you're building a skyscraper or a full-fledged application being used in the real world by thousands or millions of people, those details being glossed over are the foundation of your entire architecture, will influence every other part of the decision-making process, and will cause everything to crumble if handled carelessly.
- notnmeyer 1y ago> My current goal with AI coding tools is to spend 100% of my time doing stuff that matters. (As a UI prototyper, that mostly means tinkering with design concepts.) this struck me as weird. both in terms of “tinkering” being the most important thing to be doing, and then also describing “working like a surgeon” to be tinkering.
- jibal 1y agoThat isn't how analogies work--they are about partial similarities, not equivalence. The OP never says or implies that working like a surgeon is tinkering--allowing focus on the most important thing to be doing doesn't mean that the most important thing is the same for everyone.
- simonw 1y agoYeah, if an analogy is an exact match it's not an analogy any more.
- alganet 1y agoThe Mythical Man-Month focuses on a simple idea. It can be summarized as "adding more workers to a project does not speed things up, that's a myth". It's in the title of the book. It's a good book. The entire IT field is about to test that idea in a massive scale. Can lots of new automated workers speed things up? We'll see.
- adamzwasserman 1y agoAnother way of saying this is: If your development team consists of autistic junior programmers with eidetic memory, then you damn well better make sure that your documentation is exceedingly thorough, absolutely unambiguous, and as restrictive as you can make it.
- moffkalast 1y agoNot to be confused with coding like a sturgeon which is blub blub blub blub
- libraryofbabel 1y agoIt's a nice analogy, and I think I'll use it in future. If you want another one, think of painting. An "Old Master" painter like Rembrandt or Rubens or Botticelli would have had a large workshop with a team of assistants, who would not only do a lot of the work like stretching canvases or mixing the paints, but would also - under the master's direction - actually do a lot of the painting too. You might have the master sketch out the composition, and then paint the key faces (and, most of all, the eyes) and then the assistants would fill in areas like drapery, landscape, etc. This changed in the Romantic period towards the end of the 1700s, with the idea of the individual artist, working alone in a moment of creative inspiration and producing a single work of genius from start to finish. Caspar David Friedrich or JMW Turner come to mind here. Some programmers want to be Turner and control the whole work and feel their creativity is threatened if a machine can now do parts of it as well as they could. I'd rather be Rembrandt and sketch out the outline, paint the eyes, and leave the rest to junior engineers... or an AI Agent. It's a matter of preference.
- deleted 1y ago[deleted]
- skydhash 1y ago> I'd rather be Rembrandt and sketch out the outline, paint the eyes, and leave the rest to junior engineers What you’re not mentioning is that code isn’t and end product. It’s the blueprint for one. The end product is the process running and solving sone needs. What makes software great is how easy it is to refine. The whole point of software engineering is to ensure confidence that the blueprint is good, and that the cost of changes is not enormous. It’s not about coding quickly, throw it over the wall and be done. The process you outline would be like noting down a few riffs, fully composing a few minutes (measures?) and then have a few random people complete the full symphony. It’s not a matter of having a lot of music sheet, it’s a matter of having good music. The music sheet is important because it helps transmit the ideas to the conductor, who then trains the orchestra. But the audience doesn’t care about it. So same, users don’t care about the code, but they do care about bugs and not having features. Acting on those feedbacks requires good code. If you can get good code with your process, it’s all good. Bit I’m still waiting for the proof.
- kragen 1y agoLike a surgeon Coding for the very first time Like a suuuuurgeon Let your script run Close to mine
- hackingonempty 1y agoPlease no, it was bad enough getting Zappa stuck in my head whenever I had to wrangle DynamoDB.
- kragen 1y agoSorry!
- qzw 1y agoWait, are you parodying Madonna or meta-parodying Weird Al?
- ivape 1y ago“First, do no harm”. “Surgically” is how one enters a foreign codebase, especially legacy ones.
- phren0logy 1y agoThe analogy I have used is “AI as sous chef.”
- thelastgallon 1y agoModern surgeons evolved from barbers and butchers. Code surgeons, where are they now on the evolution path? Barbers? Butchers?
- yapyap 1y agoI wonder if OP reads all the code the AI gives him. I doubt it, quite dangerous.
- alex1138 1y agoOh- oh god! Blood everywhere!
- indigodaddy 1y agoBeautifully designed site. Looks sumptuous on mobile..
- indigodaddy 1y agoYeah, downvote his ass!
- ontouchstart 1y agoThis is what I am doing these days. Spent most of my time in thinking and asking Claude the right questions at the right moment instead of typing code. Review the code agent generated, let it run tests, deploy to PR branch for live debugging. Review console log and network traffic, paste the information to Cursor and ask Claude for the root cause, code paths and data flow. Solve issues one at a time. It does feel like a surgeon working with a team of assistants. A lot of information, a lot of decisions, a lot of patience and focus.
- Lucian6 1y ago[dead]
- AlexeyBelov 1y agoWhy are all your comments read like AI generated them? They are very formulaic, every one of them.
- nullpoint420 1y agoHaha I was thinking the same thing. It’s super interesting how they follow the same format in every post. It’s like 3-4 paragraphs each, and each time they claim to have done something similar to the OP.
- ares623 1y agoIt looks like the future is already here. I'd like to officially coin the term "Trad Engineering" and/or "Trad Coding".
- watercj 1y agoThis post is no longer relevant with Codex and Claude 4.5. You don’t need to be the savior that does the highly specialized important work. You just need to come up with the design and specs you need, then you need to ensure it implements them. So, you act as architect and manager, not a surgeon.
- humamf 1y agoIsnt surgeon plan the surgery before hand with their peers? I think thats similiar with the design and specs in softeng. I also still need to monitor what Claude do in changes, not completely delegates all code.
- AdieuToLogic 1y agoThis analogy is fundamentally flawed, both literally and metaphorically: A surgeon isn’t a manager, they do the actual work! But their skills and time are highly leveraged with a support team that handles prep, secondary tasks, admin. The surgeon focuses on the important stuff they are uniquely good at. First, the literal. Surgeons are managers of the operations they perform and heavily rely on the surgical team with which they work. If the author had any clue about surgeries, they would understand that the most important person in a major surgery is the anaesthesiologist, not the surgeon(s). Second, the metaphorical. The author goes to great lengths to identify "grunt work" as being "not the most intellectually fulfilling or creative part of the work." What they do not do is understand that there is no such thing as "grunt work" if, for any definition of work, it is valued without judgement. But if a person identifies with being "the surgeon", with everyone else being "a support team that handles prep, secondary tasks, admin", then the post makes sense from an egocentric perspective.
- simonw 1y agoWhat makes the anaesthesiologist more important? > But if a person identifies with being "the surgeon", with everyone else being "a support team that handles prep, secondary tasks, admin", then the post makes sense from an egocentric perspective. They're not talking about other people being the support team. They're calling the AI tooling the support team.
- seanhunter 1y agoThe anesthetist is the person who is primarily responsible for the patient remaining alive. You can decide for yourself whether that's more or less important than what the surgeon's doing. As someone who has had to have 3 surgeries in the last few years I'm very grateful that both the surgeon and anesthetist in each case did a fantastic job and didn't do anything like the author of TFA is suggesting. FWIW I don't think the analogy in the article survives knowledge of what surgeons actually do.
- croes 1y agoThe analogy should give you a hint of your kind of responsibility and work. It may be flawed but most people get the point especially compared to vibe coders who just wait outside the operating room
- noduerme 1y agoI like this approach. After some months of gamely trying to involve Claude in my coding process, I find it's much more enjoyable and efficient for me to just write the code myself, rather than babysitting it and going over and over something it wrote finding errors and logical flaws. I was about to cancel my subscription. This month, however, I had to start upgrading a very large db from MySQL 8 to 9, on a codebase that involves a few hundred long and complex queries. I wrote this code, so I know what they do and I understand the schema, but I'm also aware that some of them may violate ONLY_FULL_GROUP_BY, and a few (but can't remember which) had historical oddities unless DERIVED_MERGE was turned off. I was girding myself to run tests on dozens of suspects, but as a lark I handed Claude the whole codebase and the schema and asked it to identify any queries that might break if those two default options were enabled. Astonishingly, it did. It identified 15 queries and explained what they violated. It was wrong about 7 of them... those seven were actually fine, and it acknowledged that it had farmed this out in some way and that whatever it used for evaluation had been overly conservative and had returned false positives. But the other 8 queries were fixable. It was also a bit off about how to rewrite them - it created a lot of slow and inefficient workarounds. It neglected the idea of lateral joins, it didn't write SQL optimized for the indexes, etc. But it saved me hours and hours of locating these queries myself. To me, this idea of letting the LLM render down a lot of code into potential pain points seems like a much more valuable use of it than asking it to write code itself. I kept my subscription for that reason.
- fibonachos 1y agoThis has been saving me a lot of time as well in a decade old code base. I can paste a stack trace and provide additional relevant context, then ask the LLM to do a first pass debug. From that I usually get a list of file+lines to manually review, along with some initial leads to chase. Another use case is when fixing performance issues. I can feature flag my fix and ask the model to confirm the new code path will produce the same result for a given set of inputs. We also have test coverage for this kind of thing, but the LLM can do a once-over and point out some flaws before I ever run those tests. I haven’t gotten to the point where it writes much code for me beyond the auto-complete, which has been a modest boost in efficiency.
- okonomiyaki3000 1y agoI'm always finding sponges and gloves that were left inside our patient after previous operations.
- rkomorn 1y agoMaybe it saves time if you know you're gonna have to reopen the patient later? "Oh good, my tools are here."
- Waterluvian 1y ago> The surgeon focuses on the important stuff Yikes. Don’t code the way this author thinks surgeons operate. All those “support” tasks are critically important and you likely couldn’t do them as well. Be humble and appreciate that all the stuff being done around you is also the important stuff. Support them just as much!
- jl6 1y agoThe role of the engineer in large enterprises with deep legacy systems is indeed quite like a surgeon, but not for the reason suggested. Rather, it involves delicate operations on a complex and confusing object that you didn’t design or build, that maybe nobody really understands in full, where simply locating the problem is more than half the job, where parts depend on other parts in unexpected ways, where one tiny mistake can have catastrophic consequences, and where a litany of credentials and clearances are required before they’ll even let you near the operating table.
- popthetopnow 1y agoAs a coder and a neurosurgeon, lol.
- thelastgallon 1y agoIf you code like a surgeon, feature/bug has to be completed during code surgery, the story points completed immediately (during surgery). In one sprint 3 years worth of features/bugs will be fixed. What will they do the remaining 3 years?
- procaryote 1y ago> Yes, junior members will often have more grunt work, but they should also be given many interesting tasks to help them grow. This and all the talk of status is a bit worrying Junior devs are challenged by and have room to grow from tasks that would be routine and boring for a much more senior dev. The junior member might be completely out of their depth taking on a task that the senior dev would be challenged and grow from. This may influence who should do what tasks, although collaborating on a task is often an option
- josefrichter 1y agoInterestingly, I used the exact same metaphor the other day. Suggesting that tools like GitHub Speckit should have /wrap-up command: > And then maybe "/wrap-up" to tie all the untied knots once you're sufficiently happy. Kinda like surgeon stepping aside after the core part of the operation.
- beepbooptheory 1y agoOne can be a "UI Prototyper" as a full time job... Sounds so nice.
- tpoacher 1y agoThat's actually a good analogy. A novice surgeon operating under the impression the nursing and anesthetics staff will help them if they make a mistake, will kill a patient very quickly. Just because you can't necessarily do surgery effectively without these teams doesn't mean you don't need the senior surgeon to train you first (or senior surgeons to begin with). And a bad anaesthetist or a nurse that obstructs the surgeon's view will kill a patient despite the quality of the surgeon, though the adept surgeon may manage to spot impending doom early and work around it. The big problem comes when aspiring surgeons without the necessary experience think it's all small potatoes because they don't have to know much about which scalpel to use because the nurse will hand it to them anyway. So yes, if the cost of killing unnecessary amounts of patients so that eventually you will learn to do surgery this way is fine, then by all means code like a surgeon from day one. Otherwise go to medschool first like the rest of us.
- rhet0rica 1y agoThe author kindly informs us that he is a "UI prototyper [...] tinkering with design concepts" and also that he works for a company making AI coding software. This double-whammy may somewhat explain the strong Dunning-Kruger gravitational lensing observed when viewing the article from a distance.
- simonw 1y agoIs Notion a company making "AI coding software" these days? If you want to learn more about Geoffrey I suggest browsing through https://www.geoffreylitt.com/#projects https://www.geoffreylitt.com/#projects - I've been following his work for a few years, "UI prototyper" is him under-selling himself.
- torstenvl 1y agoI keep reading this as "code like a sturgeon" (They're freshwater fish, so I don't think they like to work in C very much.)
- alostpuppy 1y ago“and a codebase that’s well setup for it,” I’d love to see some thought from folks on how to setup a code base to be more productive with AI coding tools.
- simonw 1y ago- Good automated tests which the coding agent can run. I love pytest for this - one of my projects has 1500 tests and Claude Code is really good at selectively executing just tests relevant to the change it is making, and then running the whole suite at the end - Give them the ability to interactively test the code they are writing too. Notes on how to start a development server (for web projects) are useful, then you can have them use Playwright or curl to try things out - I'm having great results from maintaining a GitHub issues collection for projects and pasting URLs to issues directly into Claude Code - I actually don't think documentation is too important: LLMs can read the code a lot faster than you to figure out how to use it. I have comprehensive documentation across all of my projects but I don't think it's the helpful for the coding agents, though they are good at helping me spot if it needs updating. - Linters, type checkers, auto-formatters - give coding agents helpful tools to run and they'll use them. For the most part anything that makes a codebase easier for humans to maintain turns out to help agents as well.
- rubslopes 1y ago> I actually don't think documentation is too important Trying to maintain a documentation was actually problematic in a recent project. I made some big changes that were not immediately updated in the documentation; then, in a new session, Claude Code was always referring to the stale markdown documentation file and getting confused about the codebase.
- simonkagedal 1y agoRegarding documentation, I’d love to hear you take on creating the CLAUDE.md/AGENTS.md type of files using the tools themselves, typically via some /init command. I think Claude Code, Codex and Copilot CLI all have a similar thing. Those often seem to generate a snapshot of the current state of the codebase that to me seem to be just begging to get out of date, often with references to specific files. I sometimes start out with them and remove a bunch of stuff, or I just start empty and add things as they appear to be needed. What’s your strategy on these?
- dangoodmanUT 1y agoAwareness of the autonomy spectrum, or as I say, delegation spectrum, seems to be the hardest thing for adopting ai coding assistants effectively I think maybe it’s because engineers aren’t used to delegating, because it seems like founders tend to pick it up faster than career engineers
- timka 1y agoSurgery is when you're making a change live on a running system. Before that the source is more like a blueprint.