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.

Tailcat – Like netcat, but over Tailscale’s data plane

https://github.com/tailscale/tailcat
422•nderjung•5h ago•79 comments

GLM-5.3-Flash

https://z.ai/blog/glm-5.3-flash
811•Philpax•9h ago•404 comments

AWS Acquires DuckLabs

https://ducklabs.com/news/2026/08/26/ducklabs-to-join-aws
924•onderkalaci•10h ago•275 comments

Actinide is first startup to produce high-assay low-enriched uranium (HALEU)

https://www.actinideinc.com/press/actinide-becomes-first-startup-to-ever-enrich-natural-uranium-t...
127•dsalzman•3h ago•57 comments

An ongoing 3D-printer AGPL violation

https://lwn.net/SubscriberLink/1089390/46116614cc74b814/
258•Velocifyer•5h ago•114 comments

GitHub Outage Tracker: Is GitHub Cooked?

https://isgithubcooked.com/
118•toomanyrichies•3h ago•52 comments

The Hugging Face incident and the road ahead

https://openai.com/index/hugging-face-incident-and-the-road-ahead/
127•amrrs•3h ago•141 comments

IBM Unveils Next Generation Dual-Architecture Processor

https://newsroom.ibm.com/2026-08-24-ibm-unveils-next-generation-dual-architecture-processor-for-i...
55•porridgeraisin•2h ago•51 comments

CoMaps: The Offline App That Guided Rescuers Without a Signal in Venezuela

https://hotosm.org/en/news/comaps-the-offline-app-that-guided-rescuers-without-a-signal-in-the-ve...
170•gedankenstuecke•5h ago•43 comments

Worst-case glacial lake flood scenarios in a transboundary Himalayan basin 2022

https://nhess.copernicus.org/articles/22/3765/2022/nhess-22-3765-2022.html
11•totetsu•25m ago•3 comments

Serve Markdown to AI Agents with Accept Headers

https://acceptmarkdown.com/
65•tilt•3h ago•27 comments

Qwen3.8-Flash-Next

https://qwen.ai/blog?id=qwen3.8-flash-next
595•tosh•10h ago•193 comments

Disruption with Some GitHub Services

https://www.githubstatus.com/incidents/hcbtzksccj2f
254•blimmer•7h ago•154 comments

U.S. State Department Pauses Immigrant Visa Applications

https://www.wsj.com/politics/policy/u-s-state-department-pauses-immigrant-visa-applications-25b31b23
147•sss111•5h ago•163 comments

FDA Approves First in Class Targeted Therapy for Metastatic Pancreatic Cancer

https://www.fda.gov/news-events/press-announcements/fda-approves-first-class-targeted-therapy-met...
136•leopoldj•6h ago•30 comments

The Tariff Cost: analysis of the costs to Americans from new tariffs on Canada

https://thetariffcost.com/
147•mikestorrent•5h ago•150 comments

Twitter Viewer – View Twitter Without Account

https://twitterwebviewer.com/
274•motownphilly•8h ago•142 comments

Nebula Sans

https://www.nebulasans.com
311•GavinAnderegg•8h ago•123 comments

mold: A Parallel Linker

https://arxiv.org/abs/2608.23228
42•matt_d•2h ago•4 comments

Tim Curry has died

https://www.theguardian.com/film/2026/aug/26/tim-curry-dies-rocky-horror-show-stephen-king-it-leg...
536•mykowebhn•7h ago•187 comments

Taylor Farms: How One Company's Reach Became a National Risk

https://farmaction.us/taylorfarmsreport/
213•speckx•8h ago•148 comments

Show HN: Build your own theme park

https://www.magicpatterns.com/theme-park
22•thealexanderlee•6h ago•13 comments

The turbulent AI era is here

https://www.gatesnotes.com/a-turbulent-ai-era-and-critical-choices-to-make
133•LVB•7h ago•111 comments

Stalking the Wily Hacker: 40 years later – Cliff Stoll [video]

https://www.youtube.com/watch?v=656058JxTM0
281•zoenolan•4d ago•85 comments

It’s so hard to finish an idea that is not yours and is just suggested by AI

https://www.ssp.sh/brain/using-obsidian-with-ai/
156•zazuke•7h ago•85 comments

Just say something people want

https://www.gkogan.co/say-something-people-want/
27•gk1•11h ago•8 comments

US sanctions Italian hosting provider Autistici Inventati

https://home.treasury.gov/news/press-releases/sb0616
108•unfocso•7h ago•140 comments

Proliferate (YC S25) Is Hiring

https://www.ycombinator.com/companies/proliferate/jobs/OgpCKYJ-founding-product-engineer
1•pablo24602•11h ago

YouTube Format IDs

https://gist.github.com/MartinEesmaa/2f4b261cb90a47e9c41ba115a011a4aa
88•ksec•5h ago•46 comments

VMs won't contain cyber-capable agents

https://blog.trailofbits.com/2026/08/26/vms-wont-contain-cyber-capable-agents/
131•polyrand•8h ago•110 comments