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

Comments

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

Level S4 solar radiation event

https://www.swpc.noaa.gov/news/g4-severe-geomagnetic-storm-levels-reached-19-jan-2026
201•WorldPeas•4h ago•77 comments

Nanolang: A tiny experimental language designed to be targeted by coding LLMs

https://github.com/jordanhubbard/nanolang
61•Scramblejams•3h ago•29 comments

Reticulum, a secure and anonymous mesh networking stack

https://github.com/markqvist/Reticulum
25•brogu•1h ago•4 comments

Nearly a third of social media research has undisclosed ties to industry

https://www.science.org/content/article/nearly-third-social-media-research-has-undisclosed-ties-i...
184•bikenaga•6h ago•81 comments

What came first: the CNAME or the A record?

https://blog.cloudflare.com/cname-a-record-order-dns-standards/
273•linolevan•8h ago•97 comments

British redcoat's lost memoir reveals harsh realities of life as a disabled vet

https://phys.org/news/2026-01-british-redcoat-lost-memoir-reveals.html
33•wglb•3d ago•19 comments

Is the Constitution Broken

https://www.harvardmagazine.com/social-sciences/is-the-constitution-broken
4•KnuthIsGod•18m ago•1 comments

The assistant axis: situating and stabilizing the character of LLMs

https://www.anthropic.com/research/assistant-axis
47•mfiguiere•3h ago•6 comments

How we made Python's packaging library 3x faster

https://iscinumpy.dev/post/packaging-faster/
26•rbanffy•3d ago•1 comments

Use Social Media Mindfully

https://danielleheberling.xyz/blog/mindful-social-media/
24•mooreds•3h ago•11 comments

Notes on Apple's Nano Texture (2025)

https://jon.bo/posts/nano-texture/
127•dsr12•6h ago•77 comments

From Nevada to Kansas by Glider

https://www.weglide.org/flight/978820
94•sammelaugust•4d ago•16 comments

Show HN: An interactive physics simulator with 1000's of balls, in your terminal

https://github.com/minimaxir/ballin
25•minimaxir•7h ago•5 comments

Conditions in the Intel 8087 floating-point chip's microcode

https://www.righto.com/2025/12/8087-microcode-conditions.html
84•diogotozzi•4d ago•23 comments

The coming industrialisation of exploit generation with LLMs

https://sean.heelan.io/2026/01/18/on-the-coming-industrialisation-of-exploit-generation-with-llms/
61•long•17h ago•51 comments

Weight Transfer for RL Post-Training in under 2 seconds

https://research.perplexity.ai/articles/weight-transfer-for-rl-post-training-in-under-2-seconds
16•jxmorris12•5h ago•0 comments

Sending Data over Offline Finding Networks

https://cc-sw.com/find-my-and-find-hub-network-research/
63•findmysanity•5d ago•6 comments

Graphics In Flatland – 2D ray tracing [video]

https://www.youtube.com/watch?v=WYTOykSqf2Y
52•evakhoury•3d ago•11 comments

Upgrading DrizzleORM logging with AsyncLocalStorage

https://numeric.substack.com/p/upgrading-drizzleorm-logging-with
16•bihla•5d ago•1 comments

CSS Web Components for marketing sites (2024)

https://hawkticehurst.com/2024/11/css-web-components-for-marketing-sites/
99•zigzag312•9h ago•47 comments

Simple Sabotage Field Manual (1944) [pdf]

https://www.cia.gov/static/5c875f3ec660e092cf893f60b4a288df/SimpleSabotage.pdf
101•praptak•4h ago•44 comments

Radicle 1.6.0 – Amaryllis

https://radicle.xyz/2026/01/14/radicle-1.6.0
22•zdw•5d ago•3 comments

Show HN: Pipenet – A Modern Alternative to Localtunnel

https://pipenet.dev/
81•punkpeye•9h ago•16 comments

There's a hidden Android setting that spots fake cell towers

https://www.howtogeek.com/theres-a-hidden-android-setting-that-spots-fake-cell-towers/
103•rmason•5h ago•26 comments

Bypassing Gemma and Qwen safety with raw strings

https://teendifferent.substack.com/p/apply_chat_template-is-the-safety
97•teendifferent•20h ago•26 comments

San Francisco coyote swims to Alcatraz

https://www.sfgate.com/local/article/san-francisco-coyote-alcatraz-21302218.php
134•kaycebasques•22h ago•42 comments

Show HN: A creative coding library for making art with desktop windows

https://github.com/willmeyers/window-art
23•willmeyers•5h ago•2 comments

Fix your robots.txt or your site disappears from Google

https://www.alanwsmith.com/en/37/wa/jz/s1/
115•bobbiechen•8h ago•67 comments

Iterative image reconstruction using random cubic bézier strokes

https://tangled.org/luthenwald.tngl.sh/splined
72•luthenwald•4d ago•16 comments

Letter from a Birmingham Jail (1963)

https://www.africa.upenn.edu/Articles_Gen/Letter_Birmingham.html
426•hn_acker•5h ago•138 comments