frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Throwaway Code: Don't recycle, throw it away (2017)

https://www.sung.codes/blog/2017/throwaway-code-dont-recycle-throw-away
26•sails•11mo ago

Comments

RedShift1•11mo ago
It'll be a cold day in hell before I start throwing away my 80+ "New" notepad++ tabs.
notTooFarGone•11mo ago
i feel called out.

I had to manage my 350 notepad++ new tabs as I migrated to a new PC - it was not pretty.

mehulashah•11mo ago
There’s something beautiful about not being riddled with previous artifacts and starting clean with how you imagine you want to build your system. If the system is large enough, you can’t do it that often.
gherkinnn•11mo ago
It is a mistake to believe that the code written is the only valuable artefact.

What you've learned along the way is so much more important.

eternityforest•11mo ago
I usually find most of the learning happens a year later when I see if my approach is maintainable and handles new requirements.

When I'm actually coding, I'm usually not learning as much, because I'm generally intentionally choosing boring tech everyone already knows.

Most of the learning is less about deeply internalizing concepts and more about things like new features in the Python stdlib.

gitroom•11mo ago
Ive got a million messy files saved up, honestly, even when I know just letting go could help me think clearer. Ever wonder if holding onto old stuff slows you down or actually helps you get smarter over time?
1dom•11mo ago
I don't think the author is necessarily advocating the throwing away of code here, they're advocating the value of being able to rapidly prototype and move on from seemingly incomplete things.

The whole value proposition of the digital world is that we can store and manipulate it for virtually nothing: there isn't the same cost to having digital stuff, and so there isn't the same gains from throwing it away IMO.

athrowaway3z•11mo ago
Create a ~/Archive and throw it in there.

A quick grep every blue moon can be faster than wrangling a LLM into place, and as an added bonus you can look back and laugh at how big of an idiot you were.

klabb3•11mo ago
In my experience, if you have a medium sized task with multiple unknowns, it is best to prototype aggressively without a thought about quality, and then start a second iteration with quality in mind. The purpose of the prototyping is learning.

It’s faster (yes) than prototype-then-fixup. Why? Because the ”live refactor” is harder than the greenfield writing phase. The new knowledge often makes the impl straightforward.

It’s also better quality than design-then-build. The optimal architecture and modularization change with knowledge increase, which is best to get via experience. You can design fully upfront but it’s riddled with analysis paralysis - it’s notoriously hard (and slow) to predict unknowns.

Sounds like good advice? Well, the hardest part isn’t to follow it – it’s to know upfront what size of task it is. If it turns out to be easier, you waste a bit of work (prototype-fixup is faster). However, if it’s bigger than you thought – you’re in the best possible position to break down the new problem into subtasks, with no wasted work.

perrygeo•11mo ago
If you could package this up in a motivational poster, it belongs in every company meeting room. Speed and quality are not two opposing forces to tradeoff. We can have both.

But we need to get rid of this silly, infantile, unwavering attachment to our source code files. Throw code away. All. the. time. The first version of code is, by definition, being built in the absence of critical information. Why on earth would we get so attached to that which was built in ignorance? In this case we're not "reusing code", we're throwing away knowledge!

Why would you discard everything valuable you learned in favor of a code artifact written before you learned it? Throw away the code instead! Surely the code written AFTER gaining the knoweldge will be both faster and better quality. (and more clear, less tech debt, etc)

dsabanin•11mo ago
Very well said. This is such an important point.

I believe that if you truly accept what Hemingway said, that writing is rewriting, you get less attached to the idea of reaching the best design on the first try, and feel better when starting with a suboptimal solution.

Of course this sometimes conflicts with organizational pressures, where that quick and dirty solution may be deemed as enough by some and you won't get to finish with the proper design. For me the trick is to consider first version just an internal stage of work on a feature, not even communicated outwards most of the times, until the appropriate design is reached.

cadamsdotcom•11mo ago
We need better words for the different code written for different purposes.

Code written to learn and explore a problem space? Sure.

Code written in response to a prompt, which could easily be rewritten - things like a throwaway “please tell me a story about the contents of this CSV for me and also write code to graph it”. Yep throw it away.

Or keep it as an example for a later model.

That’s very different to code written to high standards intended for others’ use.

We need different words for all of those 3 varieties of code.

I Cancelled Claude: Token Issues, Declining Quality, and Poor Support

https://nickyreinert.de/en/2026/2026-04-24-claude-critics/
85•y42•43m ago•21 comments

Sabotaging projects by overthinking, scope creep, and structural diffing

https://kevinlynagh.com/newsletter/2026_04_overthinking/
145•alcazar•2h ago•33 comments

Norway Set to Become Latest Country to Ban Social Media for Under 16s

https://www.bloomberg.com/news/articles/2026-04-24/norway-wants-kids-to-be-kids-with-social-media...
161•1vuio0pswjnm7•1h ago•114 comments

Different Language Models Learn Similar Number Representations

https://arxiv.org/abs/2604.20817
41•Anon84•2h ago•11 comments

Spinel: Ruby AOT Native Compiler

https://github.com/matz/spinel
229•dluan•8h ago•60 comments

Why I'm Done Making Desktop Applications (2009)

https://www.kalzumeus.com/2009/09/05/desktop-aps-versus-web-apps/
46•claxo•58m ago•24 comments

US special forces soldier arrested after allegedly winning $400k on Maduro raid

https://www.cnn.com/2026/04/23/politics/us-special-forces-soldier-arrested-maduro-raid-trade
522•nkrisc•18h ago•558 comments

Mounting tar archives as a filesystem in WebAssembly

https://jeroen.github.io/notes/webassembly-tar/
76•datajeroen•6h ago•24 comments

DeepSeek v4

https://api-docs.deepseek.com/
1526•impact_sy•13h ago•1161 comments

Show HN: How LLMs Work – Interactive visual guide based on Karpathy's lecture

https://ynarwal.github.io/how-llms-work/
221•ynarwal__•9h ago•53 comments

Hear your agent suffer through your code

https://github.com/AndrewVos/endless-toil
118•AndrewVos•5h ago•53 comments

Machine Learning Reveals Unknown Transient Phenomena in Historic Images

https://arxiv.org/abs/2604.18799
14•solarist•2h ago•9 comments

An update on recent Claude Code quality reports

https://www.anthropic.com/engineering/april-23-postmortem
851•mfiguiere•22h ago•647 comments

Physicists revive 1990s laser concept to propose a next-generation atomic clock

https://phys.org/news/2026-04-physicists-revive-1990s-laser-concept.html
5•wglb•15h ago•2 comments

Bitwarden CLI compromised in ongoing Checkmarx supply chain campaign

https://socket.dev/blog/bitwarden-cli-compromised
827•tosh•1d ago•404 comments

Why I Write (1946)

https://www.orwellfoundation.com/the-orwell-foundation/orwell/essays-and-other-works/why-i-write/
239•RyanShook•14h ago•60 comments

GPT-5.5

https://openai.com/index/introducing-gpt-5-5/
1481•rd•22h ago•988 comments

Show HN: Gova – The declarative GUI framework for Go

https://github.com/NV404/gova
93•aliezsid•10h ago•17 comments

8087 Emulation on 8086 Systems

https://www.os2museum.com/wp/learn-something-old-every-day-part-xx-8087-emulation-on-8086-systems/
37•ingve•5h ago•13 comments

Show HN: Atomic – Local-first, AI-augmented personal knowledge base

https://atomicapp.ai/
27•kenforthewin•4h ago•6 comments

MeshCore development team splits over trademark dispute and AI-generated code

https://blog.meshcore.io/2026/04/23/the-split
257•wielebny•23h ago•138 comments

Meta tells staff it will cut 10% of jobs

https://www.bloomberg.com/news/articles/2026-04-23/meta-tells-staff-it-will-cut-10-of-jobs-in-pus...
744•Vaslo•21h ago•759 comments

South Korea police arrest man for posting AI photo of runaway wolf

https://www.bbc.com/news/articles/c4gx1n0dl9no
201•giuliomagnifico•7h ago•124 comments

Researchers Simulated a Delusional User to Test Chatbot Safety

https://www.404media.co/delusion-using-chatgpt-gemini-claude-grok-safety-ai-psychosis-study/
12•Brajeshwar•1h ago•2 comments

Using the internet like it's 1999

https://joshblais.com/blog/using-the-internet-like-its-1999/
211•joshuablais•20h ago•150 comments

How to be anti-social – a guide to incoherent and isolating social experiences

https://nate.leaflet.pub/3mk4xkaxobc2p
157•calcifer•5h ago•169 comments

TorchTPU: Running PyTorch Natively on TPUs at Google Scale

https://developers.googleblog.com/torchtpu-running-pytorch-natively-on-tpus-at-google-scale/
180•mji•19h ago•16 comments

Affirm Retooled for Agentic Software Development in One Week

https://medium.com/@affirmtechnology/how-affirm-retooled-its-engineering-organization-for-agentic...
23•brd529•2h ago•11 comments

UK Biobank health data keeps ending up on GitHub

https://biobank.rocher.lc
179•Cynddl•1d ago•50 comments

Show HN: leaf – a terminal Markdown previewer with a GUI-like experience

https://github.com/RivoLink/leaf
13•RivoLink•5h ago•3 comments