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

Comments

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

Discord will require a face scan or ID for full access next month

https://www.theverge.com/tech/875309/discord-age-verification-global-roll-out
1211•x01•11h ago•1217 comments

What Functional Programmers Get Wrong About Systems

https://www.iankduncan.com/engineering/2026-02-09-what-functional-programmers-get-wrong-about-sys...
48•subset•2h ago•16 comments

The shadowy world of abandoned oil tankers

https://www.bbc.com/news/articles/cddg885344do
60•1659447091•2h ago•11 comments

Converting a $3.88 analog clock from Walmart into a ESP8266-based Wi-Fi clock

https://github.com/jim11662418/ESP8266_WiFi_Analog_Clock
398•tokyobreakfast•9h ago•134 comments

Why is the sky blue?

https://explainers.blog/posts/why-is-the-sky-blue/
408•udit99•10h ago•153 comments

LiftKit – UI where "everything derives from the golden ratio"

https://www.chainlift.io/liftkit
59•peter_d_sherman•4h ago•25 comments

Hard-braking events as indicators of road segment crash risk

https://research.google/blog/hard-braking-events-as-indicators-of-road-segment-crash-risk/
211•aleyan•8h ago•317 comments

How I've run major projects (2025)

https://www.benkuhn.net/pjm/
101•thomascountz•6d ago•15 comments

Stop Using Icons in Data Tables

https://medium.com/@codythistleward/stop-using-icons-in-data-tables-7537af18ea0d
64•ctward•4d ago•21 comments

Game Theory Patterns at Work (2016)

https://daeus.blog/2026/01/18/game-theory-patterns-at-work/
28•kurinikku•5h ago•1 comments

Everyone’s building “async agents,” but almost no one can define them

https://www.omnara.com/blog/what-is-an-async-agent-really
24•kmansm27•8h ago•19 comments

UEFI Bindings for JavaScript

https://codeberg.org/smnx/promethee
202•ananas-dev•12h ago•100 comments

Sandboxels

https://neal.fun/sandboxels/
161•2sf5•10h ago•27 comments

Richard F. Burton: On the English adventurer and writer

https://thelampmagazine.com/issues/issue-32/richard-f-burton
5•CrocodileStreet•5d ago•0 comments

Expansion Microscopy Has Transformed How We See the Cellular World

https://www.quantamagazine.org/expansion-microscopy-has-transformed-how-we-see-the-cellular-world...
49•sohkamyung•4d ago•3 comments

Game Boy Advance Audio Interpolation

https://jsgroth.dev/blog/posts/gba-audio-interpolation/
71•ibobev•8h ago•31 comments

F# 10

https://devblogs.microsoft.com/dotnet/introducing-fsharp-10/
77•tosh•5d ago•12 comments

Thoughts on Generating C

https://wingolog.org/archives/2026/02/09/six-thoughts-on-generating-c
199•ingve•12h ago•61 comments

Show HN: Algorithmically finding the longest line of sight on Earth

https://alltheviews.world
378•tombh•16h ago•152 comments

Data exfil from agents in messaging apps

https://www.promptarmor.com/resources/llm-data-exfiltration-via-url-previews-(with-openclaw-examp...
14•sarelta•5h ago•4 comments

Information Is Beautiful

https://informationisbeautiful.net/
109•surprisetalk•6d ago•11 comments

Sleeper Shells: Attackers Are Planting Dormant Backdoors in Ivanti EPMM

https://defusedcyber.com/ivanti-epmm-sleeper-shells-403jsp
127•waihtis•10h ago•47 comments

America has a tungsten problem

https://www.noleary.com/blog/posts/1
121•noleary•5h ago•121 comments

Ask HN: What are you working on? (February 2026)

258•david927•1d ago•881 comments

Show HN: VillageSQL = MySQL and Extensions

https://github.com/villagesql/villagesql-server
12•metzby•4d ago•1 comments

The Traffic Mimes of Bogotá

https://www.atlasobscura.com/articles/traffic-mimes-of-colombia
91•IgorPartola•4d ago•22 comments

Like Game-of-Life, but on Growing Graphs, with WASM and WebGL

https://znah.net/graphs/
170•znah•1d ago•24 comments

Another GitHub outage in the same day

https://www.githubstatus.com/incidents/lcw3tg2f6zsd
271•Nezteb•7h ago•200 comments

Pg-dev-container is a ready-to-run VS Code development container for PostgreSQL

https://github.com/jnidzwetzki/pg-dev-container
30•mariuz•4d ago•6 comments

What's the Entropy of a Random Integer?

https://quomodocumque.wordpress.com/2026/02/03/whats-the-entropy-of-a-random-integer/
39•sebg•4d ago•7 comments