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.

Google Workspace CLI

https://github.com/googleworkspace/cli
259•gonzalovargas•4h ago•109 comments

MacBook Neo

https://www.apple.com/newsroom/2026/03/say-hello-to-macbook-neo/
1654•dm•14h ago•1952 comments

Building a new Flash

https://bill.newgrounds.com/news/post/1607118
412•TechPlasma•8h ago•117 comments

Dario Amodei calls OpenAI’s messaging around military deal ‘straight up lies’

https://techcrunch.com/2026/03/04/anthropic-ceo-dario-amodei-calls-openais-messaging-around-milit...
362•SilverElfin•4h ago•181 comments

Something is afoot in the land of Qwen

https://simonwillison.net/2026/Mar/4/qwen/
582•simonw•12h ago•259 comments

Chaos and Dystopian news for the dead internet survivors

https://www.fubardaily.com
56•anonnona8878•2h ago•24 comments

What Python's asyncio primitives get wrong about shared state

https://www.inngest.com/blog/no-lost-updates-python-asyncio
11•goodoldneon•1h ago•7 comments

Malm Whale

https://www.atlasobscura.com/places/malm-whale
14•thunderbong•4d ago•3 comments

NRC issues first commercial reactor construction approval in 10 years [pdf]

https://www.nrc.gov/sites/default/files/cdn/doc-collection-news/2026/26-028.pdf
68•Anon84•6h ago•33 comments

Moss is a pixel canvas where every brush is a tiny program

https://www.moss.town/
209•smusamashah•18h ago•25 comments

Humans 40k yrs ago developed a system of conventional signs

https://www.pnas.org/doi/10.1073/pnas.2520385123
83•bikenaga•12h ago•39 comments

Jensen Huang says Nvidia is pulling back from OpenAI and Anthropic

https://techcrunch.com/2026/03/04/jensen-huang-says-nvidia-is-pulling-back-from-openai-and-anthro...
51•jnord•2h ago•11 comments

The View from RSS

https://www.carolinecrampton.com/the-view-from-rss/
91•Curiositry•8h ago•26 comments

Picking Up a Zillion Pieces of Litter

https://www.sixstepstobetterhealth.com/litter.html
60•colinbartlett•3d ago•30 comments

“It turns out” (2010)

https://jsomers.net/blog/it-turns-out
261•Munksgaard•13h ago•83 comments

NanoGPT Slowrun: Language Modeling with Limited Data, Infinite Compute

https://qlabs.sh/slowrun
136•sdpmas•10h ago•26 comments

BMW Group to deploy humanoid robots in production in Germany for the first time

https://www.press.bmwgroup.com/global/article/detail/T0455864EN/bmw-group-to-deploy-humanoid-robo...
98•JeanKage•7h ago•80 comments

Was Windows 1.0's lack of overlapping windows a legal or a technical matter?

https://retrocomputing.stackexchange.com/questions/32511/was-windows-1-0s-lack-of-overlapping-win...
66•SeenNotHeard•8h ago•42 comments

Qwen3.5 Fine-Tuning Guide

https://unsloth.ai/docs/models/qwen3.5/fine-tune
301•bilsbie•16h ago•70 comments

An interactive map of Flock Cams

https://deflock.org/map#map=5/37.125286/-96.284180
544•anjel•9h ago•198 comments

Raspberry Pi Pico as AM Radio Transmitter

https://www.pesfandiar.com/blog/2026/02/28/pico-am-radio-transmitter
83•pesfandiar•4d ago•31 comments

A bit of fluid mechanics from scratch not from scratch

https://tsvibt.blogspot.com/2026/02/a-bit-of-fluid-mechanics-from-scratch.html
39•surprisetalk•2d ago•13 comments

Glaze by Raycast

https://www.glazeapp.com/
205•romac•15h ago•125 comments

US tech firms pledge at White House to bear costs of energy for datacenters

https://www.theguardian.com/us-news/2026/mar/04/us-tech-companies-energy-cost-pledge-white-house
47•geox•2h ago•38 comments

Libre Solar – Open Hardware for Renewable Energy

https://libre.solar
228•evolve2k•3d ago•64 comments

Daemon (2006)

https://en.wikipedia.org/wiki/Daemon_(novel)
32•solomonb•11h ago•8 comments

Roboflow (YC S20) Is Hiring a Security Engineer for AI Infra

https://roboflow.com/careers
1•yeldarb•10h ago

Show HN: A GFM+GF-MathJax/Latex HTML formatting adventure

https://github.com/scottvr/phart/blob/main/docs/GHM-LATEX.md
3•ycombiredd•4d ago•0 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
123•jidoka•15h ago•33 comments

Flip Distance of Convex Triangulations and Tree Rotation Is NP-Complete

https://arxiv.org/abs/2602.22874
21•nill0•4d ago•0 comments