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

Comments

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

Nobody Gets Promoted for Simplicity

https://terriblesoftware.org/2026/03/03/nobody-gets-promoted-for-simplicity/
452•aamederen•4h ago•250 comments

"It Turns Out"

https://jsomers.net/blog/it-turns-out
95•Munksgaard•1h ago•36 comments

The one science reform we can all agree on, but we're too cowardly to do

https://www.experimental-history.com/p/the-one-science-reform-we-can-all
75•sito42•1h ago•43 comments

Something is afoot in the land of Qwen

https://simonwillison.net/2026/Mar/4/qwen/
37•simonw•34m ago•10 comments

Glaze by Raycast

https://www.glazeapp.com/
111•romac•3h ago•64 comments

Motorola GrapheneOS devices will be bootloader unlockable/relockable

https://grapheneos.social/@GrapheneOS/116160393783585567
1049•pabs3•15h ago•422 comments

Qwen3.5 Fine-Tuning Guide – Unsloth Documentation

https://unsloth.ai/docs/models/qwen3.5/fine-tune
100•bilsbie•4h ago•28 comments

Apple Introduces MacBook Neo

https://www.apple.com/newsroom/2026/03/say-hello-to-macbook-neo/
455•dm•2h ago•454 comments

Libre Solar – Open Hardware for Renewable Energy

https://libre.solar
58•evolve2k•3d ago•12 comments

Chimpanzees Are into Crystals

https://www.nytimes.com/2026/03/04/science/chimpanzees-crystals.html
58•jimnotgym•8h ago•28 comments

RFC 9849. TLS Encrypted Client Hello

https://www.rfc-editor.org/rfc/rfc9849.html
200•P_qRs•9h ago•94 comments

Medical journal says the case reports it has published for 25 years are fiction

https://retractionwatch.com/2026/03/03/canadian-pediatric-society-journal-correction-case-reports...
60•Tomte•1h ago•11 comments

Greg Knauss Is Losing Himself

https://shapeof.com/archives/2026/2/greg_knauss_is_losing_himself.html
36•wallflower•2d ago•16 comments

MyFirst Kids Watch Hacked. Access to Camera and Microphone

https://www.kth.se/en/om/nyheter/centrala-nyheter/kth-studenten-hackade-klocka-for-barn-1.1461249
23•jidoka•3h ago•2 comments

Jiga (YC W21) Is Hiring

https://jiga.io/about-us
1•grmmph•4h ago

RE#: how we built the fastest regex engine in F#

https://iev.ee/blog/resharp-how-we-built-the-fastest-regex-in-fsharp/
127•exceptione•3d ago•48 comments

A Visual Guide to DNA Sequencing

https://www.asimov.press/p/dna-sequencing
17•surprisetalk•2h ago•2 comments

Toxic combinations: when small signals add up to a security incident

https://blog.cloudflare.com/toxic-combinations-security/
9•unknownhad•5d ago•0 comments

Bet on German Train Delays

https://bahn.bet
233•indiantinker•6h ago•151 comments

A CPU that runs entirely on GPU

https://github.com/robertcprice/nCPU
184•cypres•11h ago•90 comments

Elevator Saga: The elevator programming game (2015)

https://play.elevatorsaga.com/index.html
64•xmprt•3d ago•11 comments

Agentic Engineering Patterns

https://simonwillison.net/guides/agentic-engineering-patterns/
345•r4um•11h ago•193 comments

Modern Illustration: Archive of illustration from c.1950-1975

https://www.modernillustration.org
42•eustoria•3d ago•4 comments

Charging a three-cell nickel-based battery pack with a Li-Ion charger [pdf]

https://www.ti.com/lit/an/slyt468/slyt468.pdf
21•theblazehen•1d ago•1 comments

Show HN: Stacked Game of Life

https://stacked-game-of-life.koenvangilst.nl/
115•vnglst•4d ago•23 comments

Better JIT for Postgres

https://github.com/vladich/pg_jitter
119•vladich•10h ago•49 comments

Claude's Cycles [pdf]

https://www-cs-faculty.stanford.edu/~knuth/papers/claude-cycles.pdf
719•fs123•1d ago•304 comments

Graphics Programming Resources

https://develop--gpvm-website.netlify.app/resources/
159•abetusk•14h ago•14 comments

Did Alibaba just kneecap its powerful Qwen AI team?

https://venturebeat.com/technology/did-alibaba-just-kneecap-its-powerful-qwen-ai-team-key-figures...
79•GTP•3h ago•23 comments

Show HN: I made a zero-copy coroutine tracer to find my scheduler's lost wakeups

https://github.com/lixiasky-back/coroTracer
39•lixiasky•1d ago•1 comments