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.

Boot a Virtual iPhone via Apple's Virtualization.framework

https://github.com/Lakr233/vphone-cli
86•hentrep•3h ago•24 comments

GUIs should be fully keyboard-driven

https://ckardaris.com/blog/2026/08/28/keyboard-driven-guis.html
624•ckardaris•10h ago•310 comments

Does the Sumerian King List Align with Paleoclimate Events?

https://www.vectorian.be/articles/2026-06-07/sumerian-king-list-paleoclimate-alignment-explorer/
47•dev_l1x_be•2h ago•13 comments

9th Circuit sides with states in Kalshi gambling fight

https://azmirror.com/2026/08/28/9th-circuit-sides-with-states-in-kalshi-gambling-fight-potentiall...
44•hungryhobbit•2h ago•21 comments

Htmx 4.0

https://four.htmx.org/announcements/2026-08-28-htmx-4.0.0-is-released
542•rmsaksida•12h ago•128 comments

StemDeck, a free, open-source and local AI stem separator

https://github.com/stemdeckapp/stemdeck
10•thclpr•44m ago•2 comments

U.S. sanctions against the A/I Collective

https://www.inventati.org/
488•exiguus•13h ago•470 comments

PPWR lands another blow to an precarious tabletop industry

https://www.rascal.news/ppwr-lands-another-blow-to-an-already-precarious-tabletop-industry/
23•healsdata•2h ago•12 comments

Just the rumour of a bug is enough to find an exploit these days

https://anil.recoil.org/notes/rumour-is-the-exploit
264•avsm•10h ago•92 comments

Inception-style curved map for turn-by-turn directions

https://www.orbify.eu/demo/
435•smoser•13h ago•145 comments

Judge rules Trump administration’s blacklisting of Anthropic was illegal

https://www.nytimes.com/2026/08/27/technology/anthropic-government-blacklisting-ruling.html
533•jbegley•1d ago•397 comments

I accidentally turned LLM memory into program analysis

https://pwning.systems/posts/llm-memory-program-analysis/
19•matt_d•2h ago•5 comments

Identifying fake cosmetics using AI

https://groverlab.org/hnbfpr/2026-08-26-ai-counterfeit-cosmetics.html
33•wgrover•3h ago•12 comments

Curvature Beziers: Improving on a timeless recipe

https://acko.net/blog/curvature-beziers/
81•leephillips•4d ago•11 comments

The Twelve-Factor App (2025)

https://12factor.net/
226•jxmorris12•1d ago•121 comments

GLM-5.3 is now open-weight

https://huggingface.co/zai-org/GLM-5.3
601•jeudesprits•10h ago•209 comments

Monzo Stand-In

https://monzo.com/blog/tolerating-full-cloud-outages-with-monzo-stand-in
3•coffeefuel•4d ago•0 comments

Luanti removed from Google Play due to baseless AI copyright notice

https://blog.luanti.org/2026/08/27/luanti-dmca-tracer-ai/
453•miniBill•19h ago•139 comments

Processing in Memory: DRAM Is About to Do Math

https://ben3d.ca/blog/processing-in-memory
73•bhouston•2d ago•24 comments

Autonomous Mathematical Discovery in an Open-World Multi-Agent Environment

https://arxiv.org/abs/2608.23691
84•stephenchung•9h ago•20 comments

Visual Analysis of Binary Files

https://binvis.io/#/
63•vismit2000•2d ago•18 comments

Show HN: Sesame - a local-first, open-source password manager

https://usesesame.app/
39•d0mkaaa•6h ago•42 comments

Attimet (YC F24) Is Hiring Members of Technical Staff – Engineering and Research

https://www.ycombinator.com/companies/attimet/jobs/6btZFDg-member-of-technical-staff-engineering
1•kbanothu•9h ago

Verschlimmbesserung: The Word Your Software Updates Need

https://geekyschmidt.com/post/2026-08-25-verschlimmbesserung/
110•speckx•11h ago•71 comments

Aspirational Clownmaxxing and Joey's cadillac todo list

https://charlesleifer.com/blog/aspirational-clownmaxxing-and-joey-s-cadillac-todo-list/
26•farlight•6h ago•9 comments

Experiments with Plotter Art

https://sometimes.digital/posts/experiments-with-plotter-art/
7•surprisetalk•4d ago•0 comments

EasyEffects can improve laptop speaker sound quality

https://www.osnews.com/story/145883/easyeffects-should-be-part-of-every-linux-distribution-and-de...
102•birdculture•10h ago•48 comments

Migrating to HTTPX2

https://github.com/openai/openai-python/blob/main/httpx2.md
186•tosh•14h ago•79 comments

An investigation into the state of corvid–human relations

https://www.audubon.org/magazine/are-crows-really-our-friends
115•speckx•13h ago•65 comments

State of the Map 2026

https://2026.stateofthemap.org/
145•lode•12h ago•52 comments