6 ms·
AI writes code like that, but people get pretty upset hearing it. The program that I use to manage my small business, basically a GUI wrapper on an sql DB is a
by WarmWash 2mo ago
AI writes code like that, but people get pretty upset hearing it.
The program that I use to manage my small business, basically a GUI wrapper on an sql DB is a total delight to use, because everything happens instantly. Even opening it is instantaneous.
Modern software is such a bloated mess that you kind of get used to a 20 second start-up and a .25-1 second delay on every action. Then you use something that isn't bloated junk and it feels like actual magic.
- SirMaster 2mo agoWhat happens if you keep asking AI to rewrite it to use less and less resources?
- LPisGood 2mo agoIt’s actually pretty good at this if you have some very specific constraints and objective.
- josephg 2mo agoI find I get great results from explicitly asking an LLM to write tests which profile memory and cpu usage. Then ask it to optimise to improve those metrics.
- Cthulhu_ 2mo agoAnd a way for it to get actual measurable results / feedback loop, which is apparently quite tricky even for humans to get.
- Scoundreller 2mo agotbh, it probably works. I'm vibe-coding a thing and just told it to figure out why it runs so slow: put in some optimizations. It ran some tests and stopped loading an entire-something at opening because there's no value to doing that.
- api 2mo agoIt does a pretty good job being put into a loop of "try to optimize for X" then "test and audit your code" then repeat.
- userbinator 2mo agoThis: https://news.ycombinator.com/item?id=49226923 https://news.ycombinator.com/item?id=49226923
- prplxd_nihilist 2mo agoFans went crazy when loading the browser demo
- azatom 2mo agojust be aware of the exact prompt: "memory usage is important": creates a 1TB binary "take multiple steps": uses so much power, extreme global warming, it will just print "hot" "think outside of the box": it will enslave you so you will not care about weather
- izacus 2mo ago> AI writes code like that, but people get pretty upset hearing it. Yeah, people get upset when you spew out total bullshit. I work as a performance specialist and "AI writes code like that" is utter nonsense. AI writes the same terrible performing code that was the mediocre developer standard on Stackexchange and other codebases it ate. You still need a lot of vigilance and time to make well performing software and most software engineers just don't give a damn if we don't outright block their PRs/feature launches before passing performance tests.
- rcxdude 2mo agoLLM coding assistants have a bias towards writing standalone implementations instead of pulling in libraries to do a job, which does tend to sidestep probably the most common cause of bloated software: pulling in too many layers of abstraction. Most software can be pretty damn fast (at least as far as users are going to notice) without needing too much of a focus on optimization, but just by not accidentally screwing it up.
- fl0id 2mo agoJust writing your own bloat is not the way to go though, especially when it makes the codebase quickly balloon...
- capr 2mo agoperformance specialist, really?
- izacus 2mo agoYes.
- lesostep 2mo ago>> AI writes code like that, but people get pretty upset hearing it. To this day I never saw an AI write anything less than a 3Mb binary. Do you have specific examples in mind, and if so, can you share them?
- josu 2mo agoHere, I'm building a Torrent application from specs, and keeping the ARM only binary under 1Mb: https://github.com/josusanmartin/rustorrent https://github.com/josusanmartin/rustorrent It's fully vibecoded, and quite functional, although I'm still working out some bugs.
- ethbr1 2mo agoAI currently writes median-good code which is by definition better than the worst developers' code. In order to push beyond that (e.g. architecture, size, performance), the human has to bring the constraints. There's only so much AI can/should default assume from "write code for me" (which I expect a lot of bad / non-HN developers are doing). It is exciting that there's an opportunity for global improvement though! After the general model improvement pace slows, expect there will be a lot of room for code gen AI optimization, and if "write code for me" can be made to generate more efficient code... suddenly all AI-generated code (read: most code) will improve. Shit code is out in the wild because the company decided to optimize for programmer labor cost instead of code efficiency. If instead apples:apples because AI code gen is being used both ways, everyone wins. Feels like what I imagine were the early days of optimizing compilers, when I'm sure there were a large number of really bad assembly programmers out there.
- rescbr 2mo agoAI doesn't get tired. I can tell it to profile the application and find quick wins and it usually does a decent enough job.
- renegade-otter 2mo agoI am sure that's true if AI writes it, but what if YOU use AI to type it?
- fl0id 2mo agoAI does this when it's not warranted, and even happily writes two functions with the same purpose.
- moffkalast 2mo agoForty functions with the same purpose are still better than importing react.
- Y-bar 2mo agoWhat do you mean my hook to dynamically build <span contenteditable="true" style="border: 1px dashed #ccc; padding: 4px 8px; border-radius: 4px;">input your username here</span> with inline CSS is worse than using <input>? All I need to do next is to listen to form submit to build a new formdata object to POST to the server. Easy!