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.

Show HN: Sheet Ninja – Google Sheets as a CRUD Back End for Vibe Coders

https://sheetninja.io
7•sxa001•8m ago•4 comments

Overestimation of microplastics potentially caused by scientists' gloves

https://news.umich.edu/nitrile-and-latex-gloves-may-cause-overestimation-of-microplastics-u-m-stu...
22•giuliomagnifico•2h ago•2 comments

Founder of GitLab battles cancer by founding companies

https://sytse.com/cancer/
1120•bob_theslob646•18h ago•214 comments

Technology: The (nearly) perfect USB cable tester does exist

https://blog.literarily-starved.com/2026/02/technology-the-nearly-perfect-usb-cable-tester-does-e...
92•birdculture•3d ago•32 comments

AI overly affirms users asking for personal advice

https://news.stanford.edu/stories/2026/03/ai-advice-sycophantic-models-research
664•oldfrenchfries•21h ago•517 comments

CSS is DOOMed

https://nielsleenheer.com/articles/2026/css-is-doomed-rendering-doom-in-3d-with-css/
370•msephton•15h ago•85 comments

I turned my Kindle into my own personal newspaper

https://manualdousuario.net/en/how-to-kindle-personal-newspaper/
49•rpgbr•1d ago•21 comments

Siclair Microvision (1977)

https://r-type.org/articles/art-452.htm
14•joebig•2d ago•3 comments

Lat.md: Agent Lattice: a knowledge graph for your codebase, written in Markdown

https://github.com/1st1/lat.md
19•doppp•2h ago•5 comments

Show HN: Public transit systems as data – lines, stations, railcars, and history

https://publictransit.systems
15•qwertykb•4h ago•6 comments

Miasma: A tool to trap AI web scrapers in an endless poison pit

https://github.com/austin-weeks/miasma
10•LucidLynx•1h ago•1 comments

Alzheimer's disease mortality among taxi and ambulance drivers (2024)

https://www.bmj.com/content/387/bmj-2024-082194
141•bookofjoe•10h ago•93 comments

OpenBSD on Motorola 88000 Processors

http://miod.online.fr/software/openbsd/stories/m88k1.html
104•rbanffy•1d ago•11 comments

A Verilog to Factorio Compiler and Simulator (Working RISC-V CPU)

https://github.com/ben-j-c/verilog2factorio
83•signa11•3d ago•10 comments

Monado became the foundation for OpenXR runtimes

https://www.collabora.com/news-and-blog/news-and-events/how-monado-became-the-foundation-for-open...
11•mfilion•2d ago•0 comments

Further human + AI + proof assistant work on Knuth's "Claude Cycles" problem

https://twitter.com/BoWang87/status/2037648937453232504
221•mean_mistreater•17h ago•147 comments

I decompiled the White House's new app

https://thereallo.dev/blog/decompiling-the-white-house-app
537•amarcheschi•20h ago•196 comments

Nonfiction Publishing, Under Threat, Is More Important

https://newrepublic.com/article/207659/non-fiction-publishing-threat-important-ever
16•Hooke•3d ago•4 comments

What if AI doesn't need more RAM but better math?

https://adlrocha.substack.com/p/adlrocha-what-if-ai-doesnt-need-more
49•adlrocha•3h ago•17 comments

I Built an Open-World Engine for the N64 [video]

https://www.youtube.com/watch?v=lXxmIw9axWw
406•msephton•1d ago•68 comments

The ANSI art "telecomics" of the 1992 election

https://breakintochat.com/blog/2026/03/25/don-lokke-and-mack-the-mouse/
51•Kirkman14•2d ago•1 comments

The Loneliness of a Room of One's Own

https://newrepublic.com/article/206731/loneliness-room-one-virginia-woolf-hold-up
25•prismatic•3d ago•3 comments

A laser-based process that enables adhesive-free paper packaging

https://www.fraunhofer.de/en/press/research-news/2026/march-2026/sealing-paper-packaging-without-...
85•gnabgib•13h ago•37 comments

Android’s new sideload settings will carry over to new devices

https://www.androidauthority.com/android-sideload-carry-over-3652845/
104•croemer•15h ago•148 comments

OpenCiv1 – open-source rewrite of Civ1

https://github.com/rajko-horvat/OpenCiv1
158•caminanteblanco•17h ago•44 comments

Linux is an interpreter

https://astrid.tech/2026/03/28/0/linux-is-an-interpreter/
210•frizlab•18h ago•52 comments

The Last Contract: William T. Vollmann's Battle to Publish an Epic (2025)

https://www.metropolitanreview.org/p/the-last-contract
29•benbreen•3d ago•6 comments

Spanish legislation as a Git repo

https://github.com/EnriqueLop/legalize-es
754•enriquelop•23h ago•223 comments

Cat Itecture: Better Cat Window Boxes (2023)

https://gwern.net/catitecture
58•gggscript•1d ago•10 comments

The Hackers Who Tracked My Sleep Cycle

https://glama.ai/blog/2026-03-26-the-hackers-who-tracked-my-sleep-cycle
13•statements•2d ago•3 comments