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

Comments

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

Show HN: Apfel – The free AI already on your Mac

https://apfel.franzai.com
316•franze•4h ago•57 comments

Show HN: I built a frontpage for personal blogs

https://text.blogosphere.app/
59•ramkarthikk•1h ago•26 comments

TDF ejects its core developers

https://meeksfamily.uk/~michael/blog/2026-04-02-tdf-ejects-core-devs.html
39•janvdberg•1h ago•19 comments

April 2026 TLDR Setup for Ollama and Gemma 4 26B on a Mac mini

https://gist.github.com/greenstevester/fc49b4e60a4fef9effc79066c1033ae5
104•greenstevester•4h ago•33 comments

Google releases Gemma 4 open models

https://deepmind.google/models/gemma/gemma-4/
1591•jeffmcjunkin•21h ago•423 comments

Samsung Magician disk utility takes 18 steps and two reboots to uninstall

https://chalmovsky.com/2026/03/29/samsung-magician.html
46•chalmovsky•4d ago•12 comments

Decisions that eroded trust in Azure – by a former Azure Core engineer

https://isolveproblems.substack.com/p/how-microsoft-vaporized-a-trillion
928•axelriet•21h ago•414 comments

What Category Theory Teaches Us About DataFrames

https://mchav.github.io/what-category-theory-teaches-us-about-dataframes/
64•mchav•5d ago•8 comments

ESP32-S31: Dual-Core RISC-V SoC with Wi-Fi 6, Bluetooth 5.4, and Advanced HMI

https://www.espressif.com/en/news/ESP32_S31_Release
102•topspin•5d ago•58 comments

NHS staff refusing to use FDP over Palantir ethical concerns

https://www.freevacy.com/news/financial-times/nhs-staff-refusing-to-use-fdp-over-palantir-ethical...
145•chrisjj•3h ago•43 comments

A Recipe for Steganogravy

https://theo.lol/python/ai/steganography/seo/recipes/2026/03/27/a-recipe-for-steganogravy.html
5•tbrockman•5d ago•1 comments

Critics say EU risks ceding control of its tech laws under U.S. pressure

https://www.politico.eu/article/fatal-decision-eu-slammed-for-caving-to-us-pressure-on-digital-ru...
90•nickslaughter02•2h ago•52 comments

United States Code (federal laws) in Git

https://github.com/nickvido/us-code
12•nickvido•2h ago•1 comments

Bun: cgroup-aware AvailableParallelism / HardwareConcurrency on Linux

https://github.com/oven-sh/bun/pull/28801
8•tosh•2h ago•1 comments

Intel Assured Supply Chain Product Brief

https://www.intel.com/content/www/us/en/content-details/850997/intel-assured-supply-chain-product...
17•aw-engineer•4d ago•0 comments

The True Shape of Io's Steeple Mountain

https://www.weareinquisitive.com/news/hidden-in-the-shadow
80•carlosjobim•5d ago•2 comments

Tailscale's new macOS home

https://tailscale.com/blog/macos-notch-escape
494•tosh•19h ago•250 comments

Cursor 3

https://cursor.com/blog/cursor-3
465•adamfeldman•19h ago•343 comments

Artemis II's toilet is a moon mission milestone

https://www.scientificamerican.com/article/artemis-iis-toilet-is-a-moon-mission-milestone/
287•1659447091•1d ago•126 comments

Qwen3.6-Plus: Towards real world agents

https://qwen.ai/blog?id=qwen3.6
558•pretext•23h ago•189 comments

Good ideas do not need lots of lies in order to gain public acceptance (2008)

https://blog.danieldavies.com/2004/05/d-squared-digest-one-minute-mba.html
291•sedev•20h ago•135 comments

C89cc.sh – standalone C89/ELF64 compiler in pure portable shell

https://gist.github.com/alganet/2b89c4368f8d23d033961d8a3deb5c19
152•gaigalas•2d ago•49 comments

LinkedIn is searching your browser extensions

https://browsergate.eu/
1798•digitalWestie•1d ago•728 comments

Vector Meson Dominance

https://johncarlosbaez.wordpress.com/2026/03/29/vector-meson-dominance/
41•chmaynard•5d ago•4 comments

New Rowhammer attacks give complete control of machines running Nvidia GPUs

https://arstechnica.com/security/2026/04/new-rowhammer-attacks-give-complete-control-of-machines-...
78•01-_-•5h ago•5 comments

Maze Algorithms (1997)

https://www.astrolog.org/labyrnth/algrithm.htm
74•marukodo•2d ago•24 comments

Proton meet isn't what they told you it was

https://www.sambent.com/proton-meet-isnt-what-they-told-you/
136•bundie•4h ago•122 comments

ParadeDB (YC S23) Is Hiring Database Internal Engineers (Rust)

https://paradedb.notion.site/
1•philippemnoel•15h ago

Show HN: Home Maker: Declare Your Dev Tools in a Makefile

https://thottingal.in/blog/2026/03/29/home-maker/
76•sthottingal•5d ago•46 comments

Significant progress made on Xbox 360 recompilation

https://readonlymemo.com/rexglue-xbox-360-recompilation-interview/
134•tetrisgm•5d ago•26 comments