frontpage.
newsnewestaskshowjobs

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•1y ago

Comments

RedShift1•1y ago
It'll be a cold day in hell before I start throwing away my 80+ "New" notepad++ tabs.
notTooFarGone•1y 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•1y 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•1y 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•1y 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•1y 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•1y 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•1y 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•1y 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•1y 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•1y 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•1y 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.

Pion, an agent designed to run any company autonomously

https://andonlabs.com/blog/why-we-built-pion
156•lukaspetersson•2h ago•146 comments

Distributed Systems Classics (2017)

https://nvartolomei.com/dist-sys-classics/
139•grep_it•3h ago•30 comments

Why don't machine learning research agents overfit?

https://www.amazon.science/blog/why-dont-machine-learning-research-agents-overfit
68•Betelbuddy•3h ago•33 comments

Steam Frame starts at $1059

https://store.steampowered.com/hardware/steamframe
243•bsimpson•2h ago•131 comments

Principles for Fast Tokio Applications

https://dial9-rs.github.io/blog/principles-for-fast-tokio-applications/
100•carllerche•4h ago•15 comments

A Beginning for Mathematics

https://www.daniellitt.com/blog/2026/9/13/a-beginning-for-mathematics/
75•robinhouston•4h ago•15 comments

OpenAI bots knew about the RubyGems caching vulnerability

https://tenderlovemaking.com/2026/09/11/what-a-time-to-be-alive/
245•gregnavis•7h ago•219 comments

How my e-reader lost its stripes

https://www.serpentine.com/posts/2026/x3-stripes/
55•simonmic•3h ago•3 comments

Cloudflare AKE cuts origin HelloRetryRequests from 52% to 3.7%

https://blog.cloudflare.com/automatic-key-exchange-for-origins/
35•iamsyr•2h ago•9 comments

XCancel service is suspended until further notice

https://xcancel.com/#
245•gaganyaan•9h ago•519 comments

Cua (YC P25) Is Hiring a Founding Technical GTM Lead

https://www.ycombinator.com/companies/cua/jobs/1IWEKVH-founding-technical-gtm-lead
1•frabonacci•2h ago

Notes on gotchas while migrating 35kb preprompts from Opus to self-hosted Ollama

https://patrickmccanna.net/notes-on-migrating-large-prompts-away-from-anthropic-openai-to-self-ho...
92•0o_MrPatrick_o0•5h ago•44 comments

Show HN: Nari Qwen3-TTS and Qwen3-ASR – High accuracy, low latency and cost

https://narilabs.com/blog/nari-labs-leads-coval-voice-ai-benchmarks/
22•toebee•3h ago•7 comments

iOS 27, iPadOS 27, and macOS 27

https://www.apple.com/newsroom/2026/09/major-updates-for-apples-software-platforms-are-now-availa...
200•throw0101d•1h ago•197 comments

When LLM judges agree, should we believe them?

https://www.amazon.science/blog/when-llm-judges-agree-should-we-believe-them
37•Betelbuddy•3h ago•18 comments

An atlas of periodic solutions to the three-body problem

https://www.threebodyorbits.com/
281•danielmorozoff•2d ago•66 comments

Truncated SVD (2023)

https://brashandplucky.com/2023/09/09/truncated-svd.html
26•ibobev•3h ago•3 comments

Show HN: Apollo Lunar Module landing simulation

https://gosandeep.com/eagles-descent/
12•gosandeep•5d ago•1 comments

The Tudor Kings

https://analog-antiquarian.net/2026/09/11/the-tudor-kings/
20•ibobev•3h ago•1 comments

Ask HN: What are you working on? (September 2026)

265•david927•1d ago•810 comments

Adversarial Fashion Makes a Statement on AI Panopticon

https://spectrum.ieee.org/adversarial-fashion
70•rbanffy•5h ago•29 comments

EuroBirdPortal – Live bird movements across Europe

https://www.eurobirdportal.org/ebp/en/
201•NKosmatos•11h ago•60 comments

Trying to Make a Loop Auto-Vectorize

https://jsgroth.dev/blog/posts/trying-to-make-a-loop-auto-vectorize/
40•zdw•4d ago•13 comments

A 386 PC for Your RP2350

https://github.com/rh1tech/frank-386
187•SamuraiLion•11h ago•61 comments

Show HN: Pelican-bicycle alternatives

https://gally.net/temp/20260914pelican-alternatives/index.html
75•tkgally•6h ago•29 comments

Show HN: Neobrutalism.dev – Just added Base UI support and added new color theme

https://www.neobrutalism.dev/
76•samke-•3h ago•43 comments

NüshuRescue: Reviving the Endangered Nüshu Language with AI

https://aclanthology.org/2025.coling-main.468/
5•Anon84•2d ago•3 comments

Claude is a Contrarian

https://medium.com/@rdsubhas/claude-is-a-contrarian-dbce4de5cada
88•rdsubhas•3h ago•119 comments

Devil's Arrows: Ancient builders hauled 55k-lb stones 11 miles for UK stone row

https://www.sciencedaily.com/releases/2026/09/260909005152.htm
45•bookofjoe•3d ago•36 comments

Microsoft patches Windows and Excel – breaks audio, remote access, and paste

https://www.theregister.com/os-platforms/2026/09/14/microsoft-patches-windows-and-excel-breaks-au...
100•Alephinitesimal•3h ago•36 comments