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

CasNum

https://github.com/0x0mer/CasNum
100•aebtebeten•2h ago•18 comments

A decade of Docker containers

https://cacm.acm.org/research/a-decade-of-docker-containers/
201•zacwest•5h ago•135 comments

Dumping Lego NXT firmware off of an existing brick (2025)

https://arcanenibble.github.io/dumping-lego-nxt-firmware-off-of-an-existing-brick.html
115•theblazehen•1d ago•5 comments

Effort to prevent government officials from engaging in prediction markets

https://www.merkley.senate.gov/merkley-klobuchar-launch-new-effort-to-ban-federal-elected-officia...
127•stopbulying•1h ago•43 comments

FLASH radiotherapy's bold approach to cancer treatment

https://spectrum.ieee.org/flash-radiotherapy
172•marc__1•7h ago•52 comments

Ki Editor - an editor that operates on the AST

https://ki-editor.org/
339•ravenical•12h ago•120 comments

In 1985 Maxell built a bunch of life-size robots for its bad floppy ad

https://buttondown.com/suchbadtechads/archive/maxell-life-size-robots/
36•rfarley04•3d ago•2 comments

The Day NY Publishing Lost Its Soul

https://www.honest-broker.com/p/the-day-ny-publishing-lost-its-soul
14•wallflower•1h ago•5 comments

macOS code injection for fun and no profit (2024)

https://mariozechner.at/posts/2024-07-20-macos-code-injection-fun/
48•jstrieb•3d ago•5 comments

Compiling Prolog to Forth [pdf]

https://vfxforth.com/flag/jfar/vol4/no4/article4.pdf
84•PaulHoule•4d ago•8 comments

Does Apple‘s M5 Max Really “Destroy” a 96-Core Threadripper?

https://slashdot.org/submission/17345398/does-apples-m5-max-really-destroy-a-96-core-threadripper
37•dkechag•45m ago•15 comments

$3T Blind Spot: US nonprofits

https://charitysense.com/insights/the-3-trillion-blind-spot
6•mtweak•58m ago•0 comments

Package Managers Need to Cool Down

https://nesbitt.io/2026/03/04/package-managers-need-to-cool-down.html
6•zdw•2d ago•1 comments

LLM Writing Tropes.md

https://tropes.fyi/tropes-md
10•walterbell•1h ago•1 comments

Autoresearch: Agents researching on single-GPU nanochat training automatically

https://github.com/karpathy/autoresearch
8•simonpure•2h ago•1 comments

Show HN: ANSI-Saver – A macOS Screensaver

https://github.com/lardissone/ansi-saver
82•lardissone•8h ago•26 comments

SigNoz (YC W21, open source Datadog) Is Hiring across roles

https://signoz.io/careers
1•pranay01•5h ago

Re-creating the complex cuisine of prehistoric Europeans

https://arstechnica.com/science/2026/03/recreating-the-complex-cuisine-of-prehistoric-europeans/
52•apollinaire•1d ago•21 comments

UUID package coming to Go standard library

https://github.com/golang/go/issues/62026
338•soypat•20h ago•217 comments

The yoghurt delivery women combatting loneliness in Japan

https://www.bbc.com/travel/article/20260302-the-yoghurt-delivery-women-combatting-loneliness-in-j...
171•ranit•9h ago•120 comments

Bourdieu's theory of taste: a grumbling abrégé (2023)

https://dynomight.net/bourdieu/
32•sebg•2d ago•10 comments

War prediction markets are a national-security threat

https://www.theatlantic.com/technology/2026/03/polymarket-insider-trading-going-get-people-killed...
145•fortran77•2h ago•96 comments

Self-Portrait by Ernst Mach (1886)

https://publicdomainreview.org/collection/self-portrait-by-ernst-mach-1886/
82•Hooke•1d ago•13 comments

PC processors entered the Gigahertz era today in the year 2000 with AMD's Athlon

https://www.tomshardware.com/pc-components/cpus/pc-processors-entered-the-gigahertz-era-today-in-...
148•LorenDB•8h ago•120 comments

Helix: A post-modern text editor

https://helix-editor.com/
316•doener•23h ago•158 comments

48x32, a 1536 LED Game Computer (2023)

https://jacquesmattheij.com/48x32-introduction/
66•duck•2d ago•13 comments

Ask HN: Would you use a job board where every listing is verified?

7•BelVisgarra•1h ago•10 comments

Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies

https://mujs.org
93•amaury_bouchard•13h ago•30 comments

Filesystems are having a moment

https://madalitso.me/notes/why-everyone-is-talking-about-filesystems/
161•malgamves•12h ago•98 comments

Verification debt: the hidden cost of AI-generated code

https://fazy.medium.com/agentic-coding-ais-adolescence-b0d13452f981
60•xfz•5h ago•63 comments