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.

Transparent Leadership Beats Servant Leadership

https://entropicthoughts.com/transparent-leadership-beats-servant-leadership
115•ibobev•3h ago•48 comments

It’s time to free JavaScript (2024)

https://javascript.tm/letter
473•pavelai•7h ago•234 comments

I ignore the spotlight as a staff engineer

https://lalitm.com/software-engineering-outside-the-spotlight/
229•todsacerdoti•5h ago•80 comments

Japanese Four-Cylinder Engine Is So Reliable Still in Production After 25 Years

https://www.topspeed.com/reliable-japanese-four-cylinder-engine-still-in-production/
82•teleforce•4h ago•53 comments

Functional Quadtrees

https://lbjgruppen.com/en/posts/functional-quadtree-clojure
59•lbj•3h ago•20 comments

A lost Amazon world just reappeared in Bolivia

https://www.sciencedaily.com/releases/2025/11/251130205421.htm
39•ashishgupta2209•3d ago•5 comments

PGlite – Embeddable Postgres

https://pglite.dev/
347•dsego•5h ago•81 comments

The Free Software Foundation Europe deleted its account on X

https://fsfe.org/news/2025/news-20251204-01.en.html
100•latexr•1h ago•67 comments

Microsoft drops AI sales targets in half after salespeople miss their quotas

https://arstechnica.com/ai/2025/12/microsoft-slashes-ai-sales-growth-targets-as-customers-resist-...
54•OptionOfT•1h ago•16 comments

Uncloud - Tool for deploying containerised apps across servers without k8s

https://uncloud.run/
248•rgun•10h ago•110 comments

Show HN: MTXT – Music Text Format

https://github.com/Daninet/mtxt
58•daninet•4d ago•22 comments

Show HN: OnlyRecipe 2.0 – I added all features HN requested – 4 years later

https://onlyrecipeapp.com/?url=https://www.allrecipes.com/turkish-pasta-recipe-8754903
11•AwkwardPanda•1h ago•1 comments

Proxmox Datacenter Manager 1.0 available

https://www.proxmox.com/en/about/company-details/press-releases/proxmox-datacenter-manager-1-0
18•speckx•1h ago•0 comments

Show HN: Walrus – a Kafka alternative written in Rust

https://github.com/nubskr/walrus
99•janicerk•3d ago•32 comments

Building optimistic UI in Rails (and learn custom elements)

https://railsdesigner.com/custom-elements/
50•amalinovic•5h ago•6 comments

Unreal Tournament 2004 is back

https://old.reddit.com/r/unrealtournament/comments/1pdbe69/breaking_unreal_tournament_2004_is_back/
308•keithoffer•6h ago•112 comments

Human hair grows through 'pulling' not pushing, study shows

https://phys.org/news/2025-12-human-hair.html
82•pseudolus•3h ago•17 comments

Contextualization Machines

https://stochasm.blog/posts/contextualization-machines/
9•jxmorris12•3d ago•0 comments

What Is "Open Recursion"?

https://journal.stuffwithstuff.com/2013/08/26/what-is-open-recursion/
5•andsoitis•2d ago•0 comments

30 years ago today "Netscape and Sun announce JavaScript"

https://web.archive.org/web/20070916144913/http://wp.netscape.com/newsref/pr/newsrelease67.html
125•donohoe•5h ago•48 comments

RAM is so expensive, Samsung won't even sell it to Samsung

https://www.pcworld.com/article/2998935/ram-is-so-expensive-samsung-wont-even-sell-it-to-samsung....
191•sethops1•3h ago•173 comments

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

https://conwaylife.com/forums/viewtopic.php?&p=222136#p222136
492•nooks•23h ago•188 comments

Saturn (YC S24) Is Hiring Senior AI Engineer

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

Average DRAM price in USD over last 18 months

https://pcpartpicker.com/trends/price/memory/
437•zekrioca•16h ago•324 comments

All the Way Down

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

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

https://finfam.app/blog/credit-union-mortgages
335•mhashemi•20h ago•108 comments

Elites could shape mass preferences as AI reduces persuasion costs

https://arxiv.org/abs/2512.04047
353•50kIters•8h ago•363 comments

Ghostty is now non-profit

https://mitchellh.com/writing/ghostty-non-profit
1236•vrnvu•22h ago•265 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
892•evolve2k•1d ago•757 comments

Bootloader Unlock Wall of Shame

https://github.com/zenfyrdev/bootloader-unlock-wall-of-shame
9•thunderbong•47m ago•0 comments