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•10mo 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•10mo 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•10mo 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.

Simple self-distillation improves code generation

https://arxiv.org/abs/2604.01193
278•Anon84•5h ago•78 comments

Author of "Careless People" banned from saying anything negative about Meta

https://www.thetimes.com/uk/technology-uk/article/sarah-wynn-williams-careless-people-meta-nrffdfpmf
95•macleginn•51m ago•19 comments

Tell HN: Anthropic no longer allowing Claude Code subscriptions to use OpenClaw

879•firloop•16h ago•687 comments

Some Unusual Trees

https://thoughts.wyounas.com/p/some-unusual-trees
127•simplegeek•6h ago•36 comments

Artemis II crew take “spectacular” image of Earth

https://www.bbc.com/news/articles/ce8jzr423p9o
901•andsoitis•20h ago•311 comments

Components of a Coding Agent

https://magazine.sebastianraschka.com/p/components-of-a-coding-agent
13•MindGods•2h ago•0 comments

The Cathedral, the Bazaar, and the Winchester Mystery House

https://www.dbreunig.com/2026/03/26/winchester-mystery-house.html
79•dbreunig•3d ago•29 comments

Show HN: TurboQuant-WASM – Google's vector quantization in the browser

https://github.com/teamchong/turboquant-wasm
5•teamchong•47m ago•0 comments

The most-disliked people in the publishing industry

https://www.woman-of-letters.com/p/the-most-disliked-people-in-the-publishing
53•Caiero•3d ago•13 comments

Claude Code Found a Linux Vulnerability Hidden for 23 Years

https://mtlynch.io/claude-code-found-linux-vulnerability/
181•eichin•15h ago•107 comments

Training mRNA Language Models Across 25 Species for $165

17•maziyar•2d ago•5 comments

Mbodi AI (YC P25) Is Hiring

https://www.ycombinator.com/companies/mbodi-ai/jobs/mf9L3sy-senior-robotics-engineer-systems-cont...
1•chitianhao•3h ago

Why Inventing Color TV Was So Difficult [video]

https://www.youtube.com/watch?v=hyjCmIbRRvs
29•DamnInteresting•3d ago•8 comments

iNaturalist

https://www.inaturalist.org/
486•bookofjoe•22h ago•115 comments

OpenClaw privilege escalation vulnerability

https://nvd.nist.gov/vuln/detail/CVE-2026-33579
466•kykeonaut•23h ago•216 comments

Herbie: Automatically improve imprecise floating point formulas

https://herbie.uwplse.org/doc/latest/tutorial.html
168•summarity•4d ago•32 comments

Run Linux containers on Android, no root required

https://github.com/ExTV/Podroid
181•politelemon•17h ago•61 comments

Improving my focus by giving up my big monitor

https://ounapuu.ee/posts/2026/04/01/focus/
146•Fudgel•3d ago•151 comments

We replaced RAG with a virtual filesystem for our AI documentation assistant

https://www.mintlify.com/blog/how-we-built-a-virtual-filesystem-for-our-assistant
359•denssumesh•1d ago•137 comments

The smallest ELF executable (2021)

https://nathanotterness.com/2021/10/tiny_elf_modernized.html
15•michelangelo•3d ago•0 comments

The Technocracy Movement of the 1930s

https://donotresearch.substack.com/p/welcome-to-the-technocracy
145•lazydogbrownfox•1d ago•111 comments

What changes when you turn a Linux box into a router

https://patrickmccanna.net/7-configuration-changes-that-turn-a-multi-homed-host-into-a-switch-rou...
199•0o_MrPatrick_o0•4d ago•49 comments

The CMS is dead. Long live the CMS

https://next.jazzsequence.com/posts/the-cms-is-dead-long-live-the-cms
65•taubek•4h ago•44 comments

Go on Embedded Systems and WebAssembly

https://tinygo.org/
182•uticus•22h ago•25 comments

F-15E jet shot down over Iran

https://www.theguardian.com/world/2026/apr/03/us-fighter-jet-confirmed-shot-down-over-iran
553•tjwds•23h ago•1239 comments

Big-Endian Testing with QEMU

https://www.hanshq.net/big-endian-qemu.html
103•jandeboevrie•1d ago•114 comments

Build your own Dial-up ISP with a Raspberry Pi

https://www.jeffgeerling.com/blog/2026/build-your-own-dial-up-isp-with-a-raspberry-pi/
185•arjunbajaj•1d ago•32 comments

Delve removed from Y Combinator

https://www.ycombinator.com/companies/delve
425•carabiner•14h ago•254 comments

How to make a sliding, self-locking, and predator-proof chicken coop door (2020)

https://www.backyardchickens.com/articles/how-to-make-a-sliding-self-locking-and-predator-proof-c...
123•uticus•20h ago•56 comments

Why are we still using Markdown?

https://bgslabs.org/blog/why-are-we-using-markdown/
178•veqq•21h ago•244 comments