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•9mo 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.

Keep Android Open

https://f-droid.org/2026/02/20/twif.html
1036•LorenDB•7h ago•398 comments

Turn Dependabot Off

https://words.filippo.io/dependabot/
239•todsacerdoti•4h ago•68 comments

CERN rebuilt the original browser from 1989

https://worldwideweb.cern.ch
64•tylerdane•2h ago•19 comments

I found a Vulnerability. They found a Lawyer

https://dixken.de/blog/i-found-a-vulnerability-they-found-a-lawyer
321•toomuchtodo•6h ago•150 comments

Facebook is cooked

https://pilk.website/3/facebook-is-absolutely-cooked
693•npilk•7h ago•419 comments

Ggml.ai joins Hugging Face to ensure the long-term progress of Local AI

https://github.com/ggml-org/llama.cpp/discussions/19759
659•lairv•11h ago•160 comments

Wikipedia deprecates Archive.today, starts removing archive links

https://arstechnica.com/tech-policy/2026/02/wikipedia-bans-archive-today-after-site-executed-ddos...
282•nobody9999•6h ago•150 comments

OpenScan

https://openscan.eu/pages/scan-gallery
88•joebig•4h ago•3 comments

Show HN: Mines.fyi – all the mines in the US in a leaflet visualization

https://mines.fyi/
47•irasigman•4h ago•30 comments

Every company building your AI assistant is now an ad company

https://juno-labs.com/blogs/every-company-building-your-ai-assistant-is-an-ad-company
84•ajuhasz•6h ago•39 comments

Blue light filters don't work – controlling total luminance is a better bet

https://www.neuroai.science/p/blue-light-filters-dont-work
113•pminimax•7h ago•145 comments

Uncovering insiders and alpha on Polymarket with AI

https://twitter.com/peterjliu/status/2024901585806225723
74•somerandomness•7h ago•38 comments

The true story behind the Toronto mystery tunnel

https://macleans.ca/society/elton-mcdonald-and-the-incredible-true-story-behind-the-toronto-myste...
26•mhb•3d ago•6 comments

Across the US, people are dismantling and destroying Flock surveillance cameras

https://www.bloodinthemachine.com/p/across-the-us-people-are-dismantling
93•latexr•2h ago•15 comments

Trump's global tariffs struck down by US Supreme Court

https://www.bbc.com/news/live/c0l9r67drg7t
1225•blackguardx•9h ago•997 comments

The path to ubiquitous AI (17k tokens/sec)

https://taalas.com/the-path-to-ubiquitous-ai/
663•sidnarsipur•14h ago•379 comments

Be Wary of Bluesky

https://kevinak.se/blog/be-wary-of-bluesky
67•kevinak•1h ago•47 comments

Lil' Fun Langs

https://taylor.town/scrapscript-000
88•surprisetalk•7h ago•11 comments

Building a model that visualizes strategic golf

https://golfcoursewiki.substack.com/p/i-spent-the-last-month-and-a-half
34•scoofy•4d ago•13 comments

Show HN: A native macOS client for Hacker News, built with SwiftUI

https://github.com/IronsideXXVI/Hacker-News
168•IronsideXXVI•11h ago•130 comments

I found a useful Git one liner buried in leaked CIA developer docs

https://spencer.wtf/2026/02/20/cleaning-up-merged-git-branches-a-one-liner-from-the-cias-leaked-d...
597•spencerldixon•11h ago•214 comments

Legion Health (YC) Is Hiring Cracked SWEs for Autonomous Mental Health

https://jobs.ashbyhq.com/legionhealth/ffdd2b52-eb21-489e-b124-3c0804231424
1•ympatel•8h ago

How to Review an AUR Package

https://bertptrs.nl/2026/01/30/how-to-review-an-aur-package.html
48•exploraz•3d ago•6 comments

Don't create .gitkeep files, use .gitignore instead

https://adamj.eu/tech/2023/09/18/git-dont-create-gitkeep/
16•frou_dh•2h ago•9 comments

Making frontier cybersecurity capabilities available to defenders

https://www.anthropic.com/news/claude-code-security
93•surprisetalk•7h ago•49 comments

Lexega Turns SQL into Signals

https://lexega.com/blog/how-lexega-turns-sql-into-signals
4•whoami4041•1h ago•2 comments

Untapped Way to Learn a Codebase: Build a Visualizer

https://jimmyhmiller.com/learn-codebase-visualizer
195•andreabergia•16h ago•34 comments

Child's Play: Tech's new generation and the end of thinking

https://harpers.org/archive/2026/03/childs-play-sam-kriss-ai-startup-roy-lee/
338•ramimac•10h ago•209 comments

A chatbot's worst enemy is page refresh

https://zknill.io/posts/chatbots-worst-enemy-is-page-refresh/
35•zknill•3d ago•10 comments

How were video transfers made? (2011)

https://www.film-tech.com/ubb/f12/t000972.html
8•exvi•5d ago•1 comments