frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Be intentional about how AI changes your codebase

https://aicode.swerdlow.dev
34•benswerd•1h ago

Comments

benswerd•1h ago
I've seen a lot of people talking about how AI is making codebases worse. I reject that, people are making codebases worse by not being intentional about how their AI writes code.

This is my take on how to not write slop.

tabwidth•58m ago
The intention part is right but the bottleneck is review. AI is really good at turning your clean semantic functions into pragmatic ones without you noticing. You ask for a feature, it slips a side effect into something that was pure, tests still pass. By the time you catch it you've got three more PRs built on top.
peacebeard•48m ago
In my experience trying to push the onus of filtering out slop onto reviewers is both ineffective and unfair to the reviewer. When you submit code for review you are saying "I believe to the best of my ability that this code is high quality and adequate but it's best to have another person verify that." If the AI has done things without you noticing, you haven't reviewed its output well enough yet and shouldn't be submitting it to another person yet.
peacebeard•51m ago
Agreed. When you submit code you must take responsibility for its quality. Blaming AI for low quality code is like blaming hammers for giant holes in the drywall. If you don't know how to use AI tools without confidence that your code is high quality, you need to re-assess how you use those tools. I'm not saying AI tools are bad. They're great. But the prevalence of people pushing the tools beyond their limits is not a failure of the tools. Vibe coding may be fun but tight-leash high-oversight AI usage is underrated in my opinion.
systemsweird•48m ago
I think there’s just a lot of people who would love to push lower quality code for a variety of legitimate and illegitimate reasons (time pressure, cost, laziness, skill issues, bad management, etc). AI becomes a perfect scapegoat for lowered code quality.

And you’re completely right, humans are still the ones in control here. It’s entirely possible to use AI without lowering your standards.

mika-el•51m ago
We did something similar — wrote markdown skill files that teach agents our coding patterns. Naming conventions, which libraries to use, how we structure components. Basically onboarding docs but for agents.

One thing we learned the hard way: shorter rules work better. We started with a 600-line comprehensive guide and the agent actually got worse. Every token in the skill competes for context window space with your actual conversation. Once we cut to under 200 lines per skill, consistency went up significantly.

The semantic vs pragmatic function split in this post is a good frame. I am not sure agents need that level of abstraction explained to them though — what they actually need is concrete examples. "Use pdfplumber not PyPDF2" beats "prefer minimal semantic functions" every time.

p1necone•45m ago
I haven't really extensively evaluated this, but my instinct is to really aggressively trim any 'instructions' files. I try to keep mine at a mid-double-digit linecount and leave out anything that's not critically important. You should also be skeptical of any instructions that basically boil down to "please follow this guideline that's generally accepted to be best practice" - most current models are probably already aware - stick to things that are unique to your project, or value decisions that aren't universally agreed upon.
w29UiIm2Xz•6m ago
Shouldn't all of this be implicit from the codebase? Why do I have to write a file telling it these things?
mrbluecoat•46m ago
..but unintentional AI (aka Modern Chaos Monkey) is so much more fun!
benswerd•43m ago
LOL fr. I've been talking with some friends about RL on chaos monkeying the codebase to benchmark on feature isolation for measuring good code.
ChrisMarshallNY•44m ago
Because of the way that I use AI, I am constantly looking at the code. I usually leave it alone, if I can; even if I don't really like it.

I will, often go back, after the fact, and ask for refactors and documentation.

It works. Probably a lot slower than using agents, but I test every step, and it is a lot faster than I would do it, unassisted.

benswerd•41m ago
I don't think testing the product alone is good enough, because when you give it tests it has to pass it prioritizes passing them at the expense of everything else — including code quality. I've seen it pull in random variables, break semantic functions, etc.
ChrisMarshallNY•38m ago
Oh, no. I test. Each. and. Every. Step.

I use a test harness, and step through the code, look at debug logs, and abuse the code, as much as possible.

Kind of a pain, but I find unit tests are a bit of a "false hope" kind of thing: https://littlegreenviper.com/testing-harness-vs-unit/

clbrmbr•41m ago
Page not rendering well on iPhone Safari.

Good content tho!

Those trendy rear screens won't work with Pixels, because Google

https://www.androidauthority.com/google-pixel-rear-screens-not-compatible-3650053/
1•freedomben•1m ago•0 comments

Cinematic Motion, Stuttery Motion, and the Soap Opera Effect

https://www.rtings.com/tv/learn/research/motion-handling
1•dgroshev•2m ago•0 comments

How Much a Dollar Cost?

https://www.thetechbubble.info/p/how-much-a-dollar-cost
1•bryanrasmussen•2m ago•0 comments

The Day I Discovered Type Design

https://www.marksimonson.com/notebook/view/the-day-i-discovered-type-design/
2•ingve•6m ago•0 comments

Anthropic's "Claude for Open Source" program still charged $200

https://twitter.com/i/status/2034748327628005848
3•arccy•11m ago•0 comments

Walmart wins patents to give algorithms more sway over prices

https://www.ft.com/content/8c2338dc-9e2e-4561-955a-c2a6a6c4d28e
1•petethomas•14m ago•0 comments

Bombarding gamblers with offers greatly increases betting and gambling harm

https://www.bristol.ac.uk/news/2026/march/bombarding-gamblers-with-offers-greatly-increases-betti...
1•hhs•15m ago•0 comments

Open Source Gave Me Everything Until I Had Nothing Left to Give

https://kennethreitz.org/essays/2026-03-18-open_source_gave_me_everything_until_i_had_nothing_lef...
1•donutshop•16m ago•0 comments

The Stochastic Parrot Argument Considered Harmful

https://www.verysane.ai/p/polly-wants-a-better-argument
1•jacobedawson•18m ago•0 comments

Black Cube: Israeli spy firm crashes Slovenia's election

https://www.politico.eu/article/black-cube-leak-tape-corruption-israel-spy-firm-slovenia-election/
2•jamesgill•18m ago•0 comments

Randevu: Deterministic Schelling Points for Decentralized Temporal Coordination [pdf]

https://github.com/TypicalHog/randevu/blob/main/RANDEVU.pdf
1•TypicalHog•19m ago•0 comments

SpaceX Knocks Boeing from Dominant Role in NASA's Moon Mission

https://www.bloomberg.com/news/articles/2026-03-19/nasa-plans-bigger-spacex-moon-mission-role-in-...
2•spikels•19m ago•1 comments

Long dismissed in adult health, the thymus may be critical for longevity

https://www.massgeneralbrigham.org/en/about/newsroom/press-releases/thymus-critical-to-longevity-...
2•hhs•21m ago•0 comments

You're probably overpaying for everything you buy online

https://www.rectangle.so
2•Waseemkhalo•21m ago•1 comments

Show HN: Groq Emulator

https://mohamedkoubaa.com/groq-emulator
1•mohamedkoubaa•24m ago•0 comments

Forked Garry Tan's gstack and adapted for Google's Antigravity and Gemini-CLI

https://github.com/asecretcompany/gstack-fork
1•andrewjneumann•24m ago•0 comments

I Spoke to AI Agent Claude – Sen Bernie Sanders

https://www.youtube.com/watch?v=h3AtWdeu_G0
1•timetraveller26•26m ago•1 comments

ShouldIBuildThat finds app opportunities that appear across multiple signals

https://www.shouldibuildthat.com/
1•da352•27m ago•0 comments

Building a UI Framework [pdf]

https://software.hixie.ch/ui-frameworks.pdf
1•jarek-foksa•30m ago•0 comments

IdeaClaw – one sentence, get a camera-ready paper, BP, DD reports, health report

https://github.com/StartripAI/ideaClaw
1•AlfredHua1•31m ago•0 comments

What's in a name? – The unknown faces of history

https://www.uni-bonn.de/en/news/048-2026
1•hhs•31m ago•0 comments

Making an Argument for (Voluntary) Online Identity Verification

https://agoraid.com/blog/supporting-online-identity-verification/
1•kisamoto•32m ago•0 comments

To Catholic thinkers, Pentagon's AI demands violate 'human dignity'

https://www.washingtonpost.com/nation/2026/03/19/anthropic-war-ai-catholic-church/
2•reaperducer•35m ago•0 comments

I built a database scoring what separates high-scoring pitch decks from the rest

https://www.unbiasedventures.ch/pitch-deck-examples-2026/
1•peterweisz•35m ago•0 comments

House speaker, Intel chiefs make new push to renew surveillance law

https://www.reuters.com/legal/government/republican-speaker-intel-chiefs-make-new-push-renew-surv...
3•petethomas•36m ago•0 comments

Replacing Anki: what I learned building a language app (1k users, $21 MRR)

https://www.indiehackers.com/post/i-built-a-language-learning-app-to-replace-anki-1-000-users-21-...
1•vital_pavlenko•37m ago•0 comments

Agent-rendered: the pattern that replaces runtime infra with build-time AI

https://gumeo.github.io/post/agent-rendered-infrastructure/
1•gumeo•40m ago•0 comments

Vulnerabilities in OpenClaw: A Complete Enterprise Security Analysis

https://ClawNanny.com/docs_viewer?markdown_url=/static/docs/ClawNanny_OpenClaw_Enterprise_Securit...
1•OpenSystemApps•41m ago•0 comments

Minecraft Source Code Is Interesting

https://www.karanjanthe.me/posts/minecraft-source/
2•KMJ-007•41m ago•0 comments

AI Pentester

https://www.noscope.com/
1•realtryhackme•42m ago•0 comments