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•7mo ago

Comments

RedShift1•6mo ago
It'll be a cold day in hell before I start throwing away my 80+ "New" notepad++ tabs.
notTooFarGone•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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.

Elites Could Shape Mass Preferences as AI Reduces Persuasion Costs

https://arxiv.org/abs/2512.04047
140•50kIters•2h ago•142 comments

Ghostty is now non-profit

https://mitchellh.com/writing/ghostty-non-profit
1112•vrnvu•15h ago•227 comments

Valve reveals it’s the architect behind a push to bring Windows games to Arm

https://www.theverge.com/report/820656/valve-interview-arm-gaming-steamos-pierre-loup-griffais
767•evolve2k•1d ago•650 comments

Uncloud - Tool for deploying containerised apps across servers without k8s

https://uncloud.run/
127•rgun•4h ago•49 comments

Reverse engineering a $1B Legal AI tool exposed 100k+ confidential files

https://alexschapiro.com/security/vulnerability/2025/12/02/filevine-api-100k
689•bearsyankees•16h ago•231 comments

The Mysterious Realm of JavaScriptCore (2021)

https://www.cyberark.com/resources/threat-research-blog/the-mysterious-realm-of-javascriptcore
12•program•2h ago•0 comments

Average DRAM price in USD over last 18 months

https://pcpartpicker.com/trends/price/memory/
325•zekrioca•10h ago•214 comments

All the Way Down

https://www.futilitycloset.com/2025/11/17/all-the-way-down-2/
20•surprisetalk•5d ago•1 comments

Micron Announces Exit from Crucial Consumer Business

https://investors.micron.com/news-releases/news-release-details/micron-announces-exit-crucial-con...
585•simlevesque•16h ago•284 comments

Unreal Tournament 2004 is back

https://old.reddit.com/r/unrealtournament/comments/1pdbe69/breaking_unreal_tournament_2004_is_back/
17•keithoffer•33m ago•2 comments

1D Conway's Life glider found, 3.7B cells long

https://conwaylife.com/forums/viewtopic.php?&p=222136#p222136
449•nooks•17h ago•153 comments

Show HN: I built a dashboard to compare mortgage rates across 120 credit unions

https://finfam.app/blog/credit-union-mortgages
262•mhashemi•14h ago•83 comments

Saturn (YC S24) Is Hiring Senior AI Engineer

https://www.ycombinator.com/companies/saturn/jobs/R9s9o5f-senior-ai-engineer
1•etticat•3h ago

RCE Vulnerability in React and Next.js

https://github.com/vercel/next.js/security/advisories/GHSA-9qr9-h5gf-34mp
540•rayhaanj•18h ago•193 comments

Show HN: Walrus – a Kafka alternative written in Rust

https://github.com/nubskr/walrus
7•janicerk•2d ago•1 comments

Kea DHCP: Modern, open source DHCPv4 and DHCPv6 server

https://www.isc.org/kea/
95•doener•10h ago•30 comments

Acme, a brief history of one of the protocols which has changed the Internet

https://blog.brocas.org/2025/12/01/ACME-a-brief-history-of-one-of-the-protocols-which-has-changed...
120•coffee--•11h ago•48 comments

Why WinQuake exists and how it works

https://fabiensanglard.net/winquake/index.html
84•wicket•8h ago•5 comments

8086 Microcode Browser

https://nand2mario.github.io/posts/2025/8086_microcode_browser/
110•zdw•13h ago•0 comments

In Northern Scotland, the Neolithic Age Never Ended

https://www.newyorker.com/magazine/2025/12/01/in-northern-scotland-the-neolithic-age-never-ended
18•samizdis•4d ago•21 comments

Show HN: A Minimal Monthly Task Planner (printable, offline, no signup)

https://printcalendar.top/
45•defcc•5h ago•14 comments

Launch HN: Phind 3 (YC S22) – Every answer is a mini-app

112•rushingcreek•16h ago•83 comments

Ethiopian Volcano Erupts for First Time in Nearly 12K Years of Records

https://www.smithsonianmag.com/smart-news/ethiopian-volcano-erupts-for-the-first-time-in-nearly-1...
61•pseudolus•3d ago•13 comments

Show HN: Mirror_bridge – C++ Reflection powered Python binding generation

https://github.com/FranciscoThiesen/mirror_bridge
14•fthiesen•4h ago•2 comments

Lie groups are crucial to some of the most fundamental theories in physics

https://www.quantamagazine.org/what-are-lie-groups-20251203/
138•ibobev•15h ago•49 comments

Euler Conjecture and CDC 6600

https://fortran-lang.discourse.group/t/euler-conjecture-and-cdc-6600/10501
34•zaikunzhang•6h ago•4 comments

Preserving Snow Crystals

https://www.its.caltech.edu/~atomic/snowcrystals/preserve/preserve.htm
46•jameslk•5d ago•13 comments

How to Synthesize a House Loop

https://loopmaster.xyz/tutorials/how-to-synthesize-a-house-loop
228•stagas•6d ago•80 comments

Why are my headphones buzzing whenever I run my game?

https://alexene.dev/2025/12/03/Why-do-my-headphones-buzz-when-i-run-my-game.html
194•pacificat0r•19h ago•130 comments

Everyone in Seattle hates AI

https://jonready.com/blog/posts/everyone-in-seattle-hates-ai.html
808•mips_avatar•15h ago•818 comments