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

Where the goblins came from

https://openai.com/index/where-the-goblins-came-from/
646•ilreb•7h ago•347 comments

Noctua releases official 3D CAD models for its cooling fans

https://www.noctua.at/en/3d-cad-models
253•embedding-shape•2d ago•52 comments

Zed 1.0

https://zed.dev/blog/zed-1-0
1866•salkahfi•19h ago•596 comments

The Zig project's rationale for their anti-AI contribution policy

https://simonwillison.net/2026/Apr/30/zig-anti-ai/
298•lumpa•8h ago•133 comments

Mozilla's Opposition to Chrome's Prompt API

https://github.com/mozilla/standards-positions/issues/1213
82•jaffathecake•2h ago•33 comments

Craig Venter has died

https://www.jcvi.org/media-center/j-craig-venter-genomics-pioneer-and-founder-jcvi-and-diploid-ge...
239•rdl•8h ago•42 comments

Copy Fail

https://copy.fail/
994•unsnap_biceps•16h ago•364 comments

"Parse, don't validate" through the years with C++

https://derekrodriguez.dev/parse-dont-validate-through-the-years-with-c-/
21•dwrodri•2d ago•1 comments

Cursor Camp

https://neal.fun/cursor-camp/
958•bpierre•18h ago•154 comments

Biology is a Burrito: A text- and visual-based journey through a living cell

https://burrito.bio/essays/biology-is-a-burrito
103•the-mitr•7h ago•16 comments

Alignment whack-a-mole: Finetuning activates recall of copyrighted books in LLMs

https://github.com/cauchy221/Alignment-Whack-a-Mole-Code
137•reconnecting•7h ago•104 comments

London to Calcutta by Bus (2022)

https://www.amusingplanet.com/2022/08/london-to-calcutta-by-bus.html
65•CGMthrowaway•1d ago•24 comments

Why isn't AMD's MI300X competitive?

https://newsletter.semianalysis.com/p/mi300x-vs-h100-vs-h200-benchmark-part-1-training
13•colonCapitalDee•2d ago•6 comments

OpenTrafficMap

https://opentrafficmap.org/
277•moooo99•14h ago•67 comments

FastCGI: 30 years old and still the better protocol for reverse proxies

https://www.agwa.name/blog/post/fastcgi_is_the_better_protocol_for_reverse_proxies
343•agwa•18h ago•81 comments

Monad Tutorials Timeline

https://wiki.haskell.org/Monad_tutorials_timeline
38•brudgers•6h ago•13 comments

Mike: open-source legal AI

https://mikeoss.com/
100•noleary•9h ago•41 comments

HERMES.md in commit messages causes requests to route to extra usage billing

https://github.com/anthropics/claude-code/issues/53262
1135•homebrewer•15h ago•484 comments

Laws of UX

https://lawsofux.com/
274•bobbiechen•17h ago•41 comments

DataCenter.FM – background noise app featuring the sound of the AI bubble

https://datacenter.fm/
14•louisbarclay•2h ago•3 comments

An open-source stethoscope that costs between $2.5 and $5 to produce

https://github.com/GliaX/Stethoscope
256•0x54MUR41•19h ago•110 comments

Why I still reach for Lisp and Scheme instead of Haskell

https://jointhefreeworld.org/blog/articles/lisps/why-i-still-reach-for-scheme-instead-of-haskell/...
229•jjba23•1d ago•123 comments

Functional programmers need to take a look at Zig

https://pure-systems.org/posts/2026-04-29-functional-programmers-need-to-take-a-look-at-zig.html
124•xngbuilds•7h ago•91 comments

Creating a Color Palette from an Image

https://amandahinton.com/blog/creating-a-color-palette-from-an-image
75•evakhoury•1d ago•12 comments

Joby kicks off NYC electric air taxi demos with historic JFK flight

https://www.flyingmag.com/joby-nyc-electric-air-taxi-jfk-airport/
50•Jblx2•9h ago•132 comments

Consequences of passing too few register parameters to a C function

https://devblogs.microsoft.com/oldnewthing/20260427-00/?p=112271
62•aragonite•2d ago•24 comments

A grounded conceptual model for ownership types in Rust

https://cacm.acm.org/research-highlights/a-grounded-conceptual-model-for-ownership-types-in-rust/
37•tkhattra•8h ago•1 comments

A 25-Year-Fight over a 2-Second Sample

https://www.plagiarismtoday.com/2026/04/20/a-25-year-fight-over-a-2-second-sample/
14•speckx•1d ago•2 comments

We need a federation of forges

https://blog.tangled.org/federation/
574•icy•20h ago•363 comments

Gooseworks (YC W23) Is Hiring a Founding Growth Engineer

https://www.ycombinator.com/companies/gooseworks/jobs/ztgY6bD-founding-growth-engineer
1•shivsak•12h ago