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

Comments

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

KDE is now my favorite desktop

https://kokada.dev/blog/kde-is-now-my-favorite-desktop/
144•todsacerdoti•1h ago•112 comments

Slack has raised our charges by $195k per year

https://skyfall.dev/posts/slack
1888•JustSkyfall•12h ago•837 comments

The quality of AI-assisted software depends on unit of work management

https://blog.nilenso.com/blog/2025/09/15/ai-unit-of-work/
26•mogambo1•51m ago•2 comments

Midcentury North American Restaurant Placemats

https://casualarchivist.substack.com/p/order-up
51•NaOH•1d ago•8 comments

This Website Has No Class

https://aaadaaam.com/notes/no-class/
128•robin_reala•5h ago•58 comments

You Had No Taste Before AI

https://matthewsanabria.dev/posts/you-had-no-taste-before-ai/
109•codeclimber•1h ago•94 comments

CERN Animal Shelter for Computer Mice

https://computer-animal-shelter.web.cern.ch/index.shtml
180•EbNar•7h ago•25 comments

WASM 3.0 Completed

https://webassembly.org/news/2025-09-17-wasm-3.0/
971•todsacerdoti•19h ago•422 comments

Show HN: The text disappears when you screenshot it

https://unscreenshottable.vercel.app/?text=Hello
376•zikero•11h ago•124 comments

Meta Ray-Ban Display

https://www.meta.com/blog/meta-ray-ban-display-ai-glasses-connect-2025/
502•martpie•13h ago•727 comments

Pnpm has a new setting to stave off supply chain attacks

https://pnpm.io/blog/releases/10.16
100•ivanb•6h ago•72 comments

Nvidia buys $5B in Intel stock in seismic deal

https://www.tomshardware.com/pc-components/cpus/nvidia-and-intel-announce-jointly-developed-intel...
189•stycznik•2h ago•128 comments

Fast Fourier Transforms Part 1: Cooley-Tukey

https://connorboyle.io/2025/09/11/fft-cooley-tukey.html
37•signa11•4h ago•5 comments

Flipper Zero Geiger Counter

https://kasiin.top/blog/2025-08-04-flipper_zero_geiger_counter_module/
4•wgx•28m ago•0 comments

CircuitHub (YC W12) Is Hiring Operations Research Engineers (UK/Remote)

https://www.ycombinator.com/companies/circuithub/jobs/UM1QSjZ-operations-research-engineer
1•seddona•4h ago

Keeping SSH sessions alive with systemd-inhibit

https://kd8bny.com/posts/session_inhibit/
21•kd8bny•2d ago•10 comments

60 years after Gemini, newly processed images reveal details

https://arstechnica.com/space/2025/09/60-years-after-gemini-newly-processed-images-reveal-incredi...
29•rbanffy•2d ago•1 comments

Nvidia to Invest $5B in Intel

https://www.ft.com/content/be8d4c0c-66ff-4dfd-9b43-af6c0b290ada
52•mmarian•2h ago•8 comments

Orange Pi RV2 $40 RISC-V SBC: Friendly Gateway to IoT and AI Projects

https://riscv.org/ecosystem-news/2025/09/orange-pi-rv2-40-risc-v-sbc-friendly-gateway-to-iot-and-...
80•warrenm•2d ago•70 comments

One Token to rule them all – Obtaining Global Admin in every Entra ID tenant

https://dirkjanm.io/obtaining-global-admin-in-every-entra-id-tenant-with-actor-tokens/
256•colinprince•14h ago•39 comments

Mirror Life Worries

https://www.science.org/content/blog-post/mirror-life-worries
8•etiam•2h ago•1 comments

Boring is good

https://jenson.org/boring/
240•zdw•2d ago•55 comments

A postmortem of three recent issues

https://www.anthropic.com/engineering/a-postmortem-of-three-recent-issues
328•moatmoat•17h ago•105 comments

YouTube addresses lower view counts which seem to be caused by ad blockers

https://9to5google.com/2025/09/16/youtube-lower-view-counts-ad-blockers/
392•iamflimflam1•23h ago•717 comments

History of the Gem Desktop Environment

https://nemanjatrifunovic.substack.com/p/history-of-the-gem-desktop-environment
49•ibobev•7h ago•21 comments

Hypervisor 101 in Rust

https://tandasat.github.io/Hypervisor-101-in-Rust/
143•pykello•12h ago•10 comments

Ton Roosendaal to step down as Blender chairman and CEO

https://www.cgchannel.com/2025/09/ton-roosendaal-to-step-down-as-blender-chairman-and-ceo/
354•cma•21h ago•70 comments

Stepping Down as Libxml2 Maintainer

https://discourse.gnome.org/t/stepping-down-as-libxml2-maintainer/31398
136•zdw•13h ago•69 comments

Elements of C Style (1994)

https://www.teamten.com/lawrence/style/
28•signa11•2d ago•3 comments

Towards a Physics Foundation Model

https://arxiv.org/abs/2509.13805
92•NeoInHacker•10h ago•17 comments