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.

Using the railway network as a flatbed scanner

https://philo.gay/linecam/
204•otherayden•3h ago•38 comments

Fixing a Bricked Framework Laptop

https://quantum5.ca/2026/08/16/fixing-bricked-amd-7040-series-framework-13-laptop-with-20-tools/
147•jp_sc•2h ago•63 comments

The Amazon Tax

https://seths.blog/2026/08/the-amazon-tax/
321•herbertl•2h ago•244 comments

Linux 7.3 improves performance when running out of vRAM

https://pixelcluster.dev/VRAM-Overcommit/
387•flaburgan•8h ago•153 comments

Python Polars Cheatsheet (based on our O'Reilly book)

https://opensource.posit.co/resources/cheatsheets/polars/
62•jeroenjanssens•2h ago•10 comments

How I Under-Engineered My Book

https://chriskiehl.com/article/how-i-under-engineered-my-book
20•goostavos•20h ago•0 comments

Teaching my kid to code with a modern MUD

https://tau.dev/2026/08/07/canon
131•andrewjanke•6d ago•43 comments

Fairphone is now officially available in the United States

https://www.fairphone.com/nl/stories/the-fairphone-gen-6-is-all-about-giving-you-more
190•Vinnl•3h ago•97 comments

Composable Tests

https://newsletter.kentbeck.com/p/composable-tests
35•vinipolicena•3h ago•28 comments

Babies born under sugar rationing grew into adults with lower cancer risk

https://theconversation.com/babies-born-under-sugar-rationing-grew-into-adults-with-lower-cancer-...
73•zeristor•2h ago•15 comments

Splitting a Git Commit

https://blog.gnoack.org/post/git-history-split
20•signa11•3d ago•11 comments

Code-native generation of highly programmable 3D assets (2026)

https://arxiv.org/abs/2607.22738
12•baigy•1h ago•5 comments

Meta Files Patent for Facial Recognition, Automatic Recording of People

https://www.privacyguides.org/news/2026/08/17/meta-files-patent-for-facial-recognition-automatic-...
150•DeepLogin•3h ago•98 comments

How Bluesky draws its logo on screenshots

https://timmarinin.net/2026/bluesky-screenshots/
647•gavide•17h ago•411 comments

Google buys crashed airline Spirit's data at auction

https://www.theregister.com/ai-and-ml/2026/08/18/google-buys-crashed-airline-spirits-data-at-auct...
411•pseudolus•5h ago•289 comments

Show HN: Shoehorn – Quantize any model down to run on your machine

https://notactuallytreyanastasio.github.io/shoehorn/
7•rhgraysonii•1h ago•2 comments

The coolest anti-surveillance tools at Defcon [video]

https://www.youtube.com/watch?v=-2uAsJ5EPAw
24•neom•1h ago•0 comments

Quake Shareware, a CD-ROM just a little too full

https://fabiensanglard.net/quake_shareware_cd/index.html
448•shdon•18h ago•189 comments

Baking a Model: A Metaphor for LLM Training

https://newsletter.kentbeck.com/p/baking-a-model
22•KentBeck•3d ago•1 comments

Finger: Social network that never died

https://en.andros.dev/blog/54572bc7/finger-the-1971-social-network-that-never-died/
113•andros•8h ago•37 comments

Israel creates fake think tank in likely attempt to dupe AI chatbots

https://responsiblestatecraft.org/israel-influence-chatgpt/
912•DeepLogin•19h ago•531 comments

GPT-5.6 Sol Pricing Cut by 50%

https://openrouter.ai/openai/gpt-5.6-sol
583•Topfi•19h ago•386 comments

Deus Ex creator Warren Spector is retiring from game development

https://www.videogameschronicle.com/news/its-just-not-as-much-fun-for-me-anymore-deus-ex-creator-...
84•danbolt•3h ago•55 comments

Claude writing a macOS driver for my obscure HP printer built only for Windows

https://twitter.com/kuberwastaken/status/2089377982536388964
99•porridgeraisin•3h ago•32 comments

Rethinking Database Programming

https://acadia.engineering/blog/rethinking-database-programming
169•honungsburk•8h ago•81 comments

The Size of the World Wide Web

https://www.worldwidewebsize.com/
4•1970-01-01•23h ago•0 comments

Fairphone 6 and PostmarketOS working main camera

https://catcrafts.net/posts/fairphone-6-postmarketos-working-main-camera
268•pizzaiolo•18h ago•68 comments

IBM Simon (1994): the original smartphone, explained in its own ad [video]

https://www.youtube.com/watch?v=xoTFywZpPcc
73•kls0e•2d ago•42 comments

Exercise intensity modulates interorgan communication and is associated with

https://www.cell.com/cell-reports-medicine/fulltext/S2666-3791%2826%2900405-2?_returnURL=https%3A...
85•newsomix9xl•11h ago•44 comments

Muse Glimmer is a memory hierarchy disguised as a 30B Transformer

https://abstractextraordinary.com/blog/how-muse-glimmer-fits-an-agent-on-your-device/
4•stepnivlk•1h ago•0 comments