7 ms·
> I know full well that if you ask Claude Code to build a JSON API endpoint that runs a SQL query and outputs the results as JSON, it’s just going to do it righ
by jwpapi 5mo ago
> I know full well that if you ask Claude Code to build a JSON API endpoint that runs a SQL query and outputs the results as JSON, it’s just going to do it right. It’s not going to mess that up. You have it add automated tests, you have it add documentation, you know it’s going to be good.
I feel like this is just not true. An JSON API endpoint also needs several decisions made.
- How should the endpoint be named
- What options do I offer
- How are the properties named
- How do I verify the response
- How do I handle errors
- What parts are common in the codebase and should be re-used.
- How will it potentially be changed in the future.
- How is the query running, is the query optimized.
…
If I know the answer to all these questions, wiring it together takes me LESS time than passing it to Claude Code.
If I don’t know the answer the fastest way to find the answer is to start writing the code.
Additionally, whilst writing it I usually realize additional edge cases, optimizations, better logging, observability and what else.
The author clearly stated the context for this quote is production code.
I don’t see any benefits in passing it to Claude Code. It’s not that I need 1000s of JSON API endpoints.
- weird-eye-issue 5mo ago> If I know the answer to all these questions, wiring it together takes me LESS time than passing it to Claude Code How so?
- jwpapi 5mo agoLike writing code to me is not slower than writing text? When I write code every character I type in my computer has less ambiguity than when I write it in human language? I also have the help of LSPs, Linters and Auto-completes.
- spoiler 5mo agoIt's not much to go on by, but I kinda feel ya. I think one exception I'd perhaps make is doing a large mechanic refactor. I find them incredibly daunting. So, I'll just ask AI for that. I mean it probably takes me a similar time to do, but it feels less daunting. I've been trying to get into agentic coding and there are non-refactoring instances where I might reac for it (like any time I need to work on something using tailwind; I'm dyslexic and I'd get actual headaches, not exaggerating, trying to decipher Tailwind gibberish while juggling their docs before AIs came around)
- jwpapi 5mo agoI use Jetbrains features for that usually, it has great tools for that. Lets say on that JSON API I want to extract part of the logic in a repositiory file i CTRL + W the function then I have almost all of my shortcuts with left alt + two character shortcuts. So once marked i do LAlt + E + M for Extract Method then it puts me in a step in between to rename the function and then LAlt + M+V for MoVe and then it puts me in an interface to name the function. Once you used to it its like a gamer doing APMS and its deterministic and fast. I also have R+N (rename), G+V (generate vitest) Q+C(query console), Q+H(Query history) and many more. Really useful. Probably also doable with other editors.
- IanCal 5mo agoI highly recommend looking into codemods for larger mechanical refactorings. I did things like converting large test suites from one testing library to another by having codex write a codemod to convert it as a first pass.
- jameson 5mo agoI have a similar sentiment. Subject that makes the claim that AI writing code is fast is going to matter a lot because some programmers heavily use "LSPs, Linters and Auto-completes", key bindings, snippets, CLI commands, etc to speed up writing code
- dreambuffer 5mo agoThis assumes: - that you spend no amount of time looking things up, reorganising, or otherwise getting stuck - that you have a solution to the problem ready to go at all times - that your solution is better than the LLM's solution I highly, highly doubt that all 3 of these are true. I doubt even 1 of them is true, I think you just don't know how to use LLMs in a focused way.
- jwpapi 5mo agoI use AI to look things up and I try to learn. That part is speed up, but once I know how X works I’m faster doing it myself. My assumption is that most people seeing things differently, compare their performance of not knowing how X works with Claude, but not with someone who’s really good at X. Which makes a lot of sense given LLMS are prediction generators. My take is that the best use of AI is to get you to the point where you are really good with X and then naturally your AI usage will go down.
- jatora 5mo ago> but once I know how X works I’m faster doing it myself. Survey says: Legacy coder.
- r_lee 5mo agowhat my experience says is that, when you get "really good" with X, then you can easily write a prompt that says exactly how it needs to be done and you'll be able to do it much faster than writing it all yourself because you know the important parts and the rest is just glue.
- weird-eye-issue 5mo agoI use voice to text and for me coding is way faster now. You don't need to sit down and type up a perfect spec lol. I give it terrible prompts with poor grammar and typos from incorrect transcriptions and it does an amazing job. Definitely not perfect I iterate with it a ton but it's still faster than typing it out by hand
- fragmede 5mo agoYou're still typing? I don't know how fast you can type, but I can speak way faster than I can type. Somewhere in the neighborhood of 300 wpm. Speech-to-text is pretty good now, and prompting an AI means I'm not trying to speak curly brace semicolon new line.
- jwpapi 5mo agoAverage speaking speed for english speakers is 100-120 wpm for complex topic. I type 130wpm peak and I have the most common coding characters on my home row using neo layout.
- weird-eye-issue 5mo agoI hope you never get RSI. It absolutely blows and I can barely type for the last few years without getting pain. And this is with physical therapy...
- jwpapi 5mo agoI had Ulnar Nerve issue, but I’ve changed my setup and it really helped. I don’t have any problems anymore. It took quite some time to figure out what works and what triggers it. However I don’t know it’s the same for RSI. I’m grateful for the ability to use speaking as a second option, but utilizing both I can’t cope that speaking is even remotely close to typing :/
- yieldcrv 5mo agoI’ve seen the best REST APIs since Claude Code has taken the wheel Every verb implemented, and implemented correctly according to the obscure IETF and most compatible way when the IETF never made it clear Intuitively named routes, error, authentication all easily done and swappable for another if necessary I feel like our timeline split if you’re not seeing this
- jwpapi 5mo agoI don’t want every verb implemented, I also dont want an IETF standard. I want as little as possible, so I have to worry about as little as possible in the future. Use-cases differ, you described a complete REST API, which can be as much of a problem as a too little.
- hnuser123456 5mo agoI see you haven't encountered an API where a GET command can modify the database.
- adithyassekhar 5mo agoNow why would you make such a monstrosity? Audit logs? I was having good day till now.
- asa400 5mo agoSimilarly, I once worked somewhere that had an HTTP API that returned status code 200 {“error”: “ok”} to indicate an error occurred.
- Schiendelman 5mo agoA lot of GraphQL APIs are like this! They return a 200 just to mean the damn GraphQL is well formed, and the call can totally fail underneath.
- ditchfieldcaleb 5mo agoSay what now
- eric_cc 5mo agoYou can also just talk it out loud to Claude while you’re on a walk getting some sunshine. Done.
- jwpapi 5mo agoYeah I can and I’ve done it and for fun project it’s fun and cool. But its like using templates to build your website. You’ll be annoyed and at one point your project goes in the endless graveyary of abandoned projects
- jmilloy 5mo agoI think most people are finding the opposite. Claude Code is not only reducing how many projects get abandoned, it's also resurrecting projects from the graveyard.
- sumeno 5mo agoThe number of Show HNs recently that have a days worth of commits and are never touched again disagrees. It's creating a lot of projects that are immediately abandoned
- tyyyy3 5mo agoI think its a direct reflection of the fact that most people really prefer to go-go-go and not spend the time up-front thinking about what their project even is, why it matters and is it worth dedicated resources toward it. The abandonment usually reflects the answer - no it was not worth it. LLMs amplify this behaviour.
- jmilloy 5mo agoThere is a difference between a project that is eventually abandoned out of annoyance because you couldn't accomplish what you wanted and a project that gets a day or two of attention and then gets aborted because you figured out it wasn't worth it or got interested in something else. I think the parent comment is talking about the former and I'm responding to that, while you're talking about the latter.
- eddieroger 5mo ago> If I know the answer to all these questions, wiring it together takes me LESS time than passing it to Claude Code. That's just not true, and if it is in your case, then you're not great at writing prompts yet. > Take the todo_items table in Postgres and build a Micronaut API based around it. The base URL should be /v1/todo_items. You can connect to Postgres with pguser:pgpass@1.2.3.4 That's about all it takes these days. Less lines of code than your average controller.
- apsurd 5mo agoI've drank the AI koolaid so I'm not a hater, but to say "you're just not prompting right" is such a cop-out. Prompting right takes a metric fuck ton of effort. I'm actually kinda agreeing with you, if you make it to where you're dev environment is sufficiently harnessed, then you can give it one-liner magic prompts. But getting there, learning to get there, paying that cost, hot mother of god it's a lot of effort. Communicating, in words, is extremely hard. I don't think this should be as controversial as it's seems in the prompt era. VS: someone has mastered one of the myriad openAPI generators, and it's shipped.
- xmprt 5mo agoI'll go in the other direction and say that if you're spending a lot of your time learning to prompt better then you're wasting it because LLMs are only going to get better at understanding your intent regardless of "prompt engineering". The JSON API example to wire up a database can be one-shot pretty easily by the latest models without much context and without setting up any harness. The more time you spend perfecting your harness, the more time you would have wasted when the next model comes out to make it obsolete.
- derangedHorse 5mo agoI was thinking of this interpretation as I read that: "I'll go in the other direction and say that if you're spending a lot of your time learning to [program] better then you're wasting it because [computer]s are only going to get better at [computing] regardless of "[software] engineering". The JSON API example to wire up a database can be [run] pretty easily by the latest [computer]s without much [design] and without setting up any [optimizations]. The more time you spend perfecting your [program], the more time you would have wasted when the next [computer] comes out to make it obsolete."
- slashdave 5mo agoYou forgotten the important part: permissions
- cyral 5mo agoThis may have been a problem a year or two ago but any premium model will be exploring the codebase to check similar routes to answer all these questions, if you don't specify them.
- rufasterisco 5mo agoExactly. As long as the codebase is consistently following some given patterns, LLMs nowadays stick to it. Understanding that limiting number of “design patterns” in a codebase made it better (easier to code and understand) was a good proxy for seniority before LLMs. Now it’s even better: if all of a sudden “unusual code” is in a PR, either the person opening the PR or the one reviewing it has lost touch with the codebase. Very important signal, since you don’t want that to happen with code you care about.
- senordevnyc 5mo agoThis is just bizarre to me. Do people not use Plan mode? I start by telling the agent what I'm trying to accomplish, and then I throw in some questions like this, concerns I have, edge cases I've thought about, whatever. It goes out and does all the research, both in my code base and beyond, asks me questions where it needs clarification, and then writes me a plan. I review the plan, we go back and forth a bit with adjustments to the plan, and then the plan is ready for implementation. At that point, the implementation is mostly a formality, because all of the difficult parts are already done. On top of that, most of what you've described as decisions that need to be made are either trivially made by a frontier model without even needing to be told, or stuff I can bake into my skills so I don't need to specify it on every task. Given the above, I can't fathom an approach where I'd be faster without AI than with it, because the acceleration is the planning / decision-making, not the implementation. Whether the implementation takes the agent two minutes or six hours really doesn't matter, because I'm not involved at that point.
- jwpapi 5mo agoYou getting swindled into over-engineering.
- senordevnyc 5mo agoSure, if I don’t do the barest minimum of my job, and tell the agent what I want to do and what I don’t care about.