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•1y ago

Comments

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

GenCAD

https://gencad.github.io/
257•dagenix•9h ago•60 comments

I turned a $80 RK3562 Android tablet into a Debian Linux workstation

https://github.com/tech4bot/rk3562deb
327•tech4bot•18h ago•147 comments

Ask an Astronaut: 333 hours of Q&A footage with astronauts

https://askanastronaut.issinrealtime.org/
115•gaws•2d ago•9 comments

Prolog Coding Horror

https://www.metalevel.at/prolog/horror
115•RohanAdwankar•10h ago•39 comments

Show HN: Semble – Code search for agents that uses 98% fewer tokens than grep

https://github.com/MinishLab/semble
289•Bibabomas•15h ago•100 comments

Jank now has its own custom IR

https://jank-lang.org/blog/2026-05-08-optimization/
106•DASD•2d ago•7 comments

Crystals found inside wreckage from the first nuclear bomb test

https://www.scientificamerican.com/article/strange-crystals-found-inside-wreckage-from-the-first-...
33•jumploops•2d ago•5 comments

WriteUp: 16 Bytes of x86 that turn Matrix rain into sound

https://hellmood.111mb.de//wake_up_16b_writeup.html
101•HellMood•8h ago•15 comments

Two EA-18 fighter jets collide at Mountain Home airshow, pilots ejected safely

https://idahonews.com/news/local/two-f-18-fighter-jets-have-crashed-during-an-airshow-at-mountain...
182•ChrisArchitect•9h ago•163 comments

Show HN: Mezz, a curl-able WiFi sandbox for IoT pentesting

https://github.com/ABGEO/mezz
18•ABGEO•2d ago•2 comments

Profunctor Equipment in Haskell

https://bartoszmilewski.com/2026/05/16/profunctor-equipment-in-haskell/
7•g0xA52A2A•1d ago•0 comments

A Good Lemma Is Worth a Thousand Theorems (2007)

https://sites.math.rutgers.edu/~zeilberg/Opinion82.html
44•susam•2d ago•9 comments

Tesla Solar Roof is on life support as it pivot to panels

https://electrek.co/2026/05/14/tesla-solar-roof-promise-vs-reality-pivot-panels/
237•celsoazevedo•1d ago•228 comments

Hindenburg’s Smoking Room

https://www.airships.net/hindenburg-smoking-room/
194•crescit_eundo•3d ago•154 comments

CUDA Books

https://github.com/alternbits/awesome-cuda-books
176•dariubs•18h ago•36 comments

Prolog Basics Explained with Pokémon

https://unplannedobsolescence.com/blog/prolog-basics-pokemon/
249•birdculture•2d ago•38 comments

Magical Realism: “Northern Exposure” 25 Years Later (2015)

https://www.rogerebert.com/streaming/magical-realism-nothern-exposure-25-years-later
101•walterbell•2d ago•43 comments

I don't think AI will make your processes go faster

https://frederickvanbrabant.com/blog/2026-05-15-i-dont-think-ai-will-make-your-processes-go-faster/
561•TheEdonian•19h ago•386 comments

Cannibalistic attacks between gray seals leave telltale “corkscrew” injuries

https://www.science.org/content/article/scientists-id-corkscrew-killer-behind-gruesome-seal-deaths
60•gmays•3d ago•20 comments

High-Entropy Alloy

https://en.wikipedia.org/wiki/High-entropy_alloy
131•leonidasrup•3d ago•23 comments

Étienne Ghys: The Shape of Letters: From Leonardo da Vinci to Donald Knuth

https://www.youtube.com/watch?v=1OIxzewWilc
18•tzury•2h ago•3 comments

Trials on veterans suggest ibogaine could provide a new treatment for PTSD

https://www.bbc.com/future/article/20260514-how-hallucinogenic-ibogaine-helps-veterans-overcome-ptsd
92•bushwart•19h ago•96 comments

VoIP brings back old-fashioned pay phones to rural Vermont (2025)

https://spectrum.ieee.org/payphone-voip
147•bookofjoe•11h ago•44 comments

The History of ThinkPad: From IBM’s Bento Box to Lenovo’s AI Workstations

https://www.jdhodges.com/blog/thinkpad-history/
94•zdw•9h ago•43 comments

The SGI Buyer's Guide (2003)

https://hardware.majix.org/computers/sgi/buyers-guide.shtml
21•uticus•2d ago•9 comments

A nicer voltmeter clock

https://lcamtuf.substack.com/p/a-nicer-voltmeter-clock
334•surprisetalk•1d ago•44 comments

Mercurial, 20 years and counting: how are we still alive and kicking? [video]

https://fosdem.org/2026/schedule/event/AGWUVH-mercurial-aint-you-dead-yet/
186•ibobev•2d ago•192 comments

Colossus: The Forbin Project

https://en.wikipedia.org/wiki/Colossus:_The_Forbin_Project
229•doener•3d ago•91 comments

America's Most-Spoken Languages After English and Spanish

https://www.visualcapitalist.com/mapped-americas-most-spoken-languages-after-english-and-spanish/
40•RyeCombinator•3h ago•6 comments

Mozilla to UK regulators: VPNs are essential privacy and security tools

https://blog.mozilla.org/netpolicy/2026/05/15/mozilla-to-uk-regulators-vpns-are-essential-privacy...
711•WithinReason•1d ago•301 comments