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

Publish on your own site, syndicate elsewhere

https://indieweb.org/POSSE#
553•47thpresident•11h ago•127 comments

Daft Punk Easter Egg in the BPM Tempo of Harder, Better, Faster, Stronger?

https://www.madebywindmill.com/tempi/blog/hbfs-bpm/
402•simonw•10h ago•71 comments

IQuest-Coder: A new open-source code model beats Claude Sonnet 4.5 and GPT 5.1 [pdf]

https://github.com/IQuestLab/IQuest-Coder-V1/blob/main/papers/IQuest_Coder_Technical_Report.pdf
36•shenli3514•3h ago•17 comments

Show HN: Website that plays the lottery every second

https://lotteryeverysecond.lffl.me/
140•Loeffelmann•7h ago•65 comments

2026 will be my year of the Linux desktop

https://xeiaso.net/notes/2026/year-linux-desktop/
426•todsacerdoti•7h ago•293 comments

Of Boot Vectors and Double Glitches: Bypassing RP2350's Secure Boot

https://streaming.media.ccc.de/39c3/relive/2149
32•aberoham•6d ago•0 comments

A Basic Just-In-Time Compiler (2015)

https://nullprogram.com/blog/2015/03/19/
48•ibobev•6h ago•11 comments

Adventure 751 (1980)

https://bluerenga.blog/2026/01/01/adventure-751-1980/
29•quuxplusone•4h ago•2 comments

IPv6 just turned 30 and still hasn't taken over the world

https://www.theregister.com/2025/12/31/ipv6_at_30/
326•Brajeshwar•16h ago•663 comments

Clicks Communicator

https://www.clicksphone.com/en/communicator
309•microflash•14h ago•204 comments

Loud noises heard in Venezuela capital, southern area without electricity

https://www.reuters.com/world/americas/loud-noises-heard-venezuela-capital-southern-area-without-...
30•jumpocelot•52m ago•8 comments

Ask HN: Who is hiring? (January 2026)

279•whoishiring•15h ago•176 comments

Linux kernel security work

http://www.kroah.com/log/blog/2026/01/02/linux-kernel-security-work/
90•chmaynard•9h ago•40 comments

Unix v4 (1973) – Live Terminal

https://unixv4.dev/
139•pjmlp•12h ago•64 comments

The Cost of a Closure in C: The Rest

https://thephd.dev/the-cost-of-a-closure-in-c-c2y-followup
20•ingve•2d ago•7 comments

Einstein Probe detects an X-ray flare from nearby star

https://phys.org/news/2025-12-einstein-probe-ray-flare-nearby.html
29•wglb•5h ago•4 comments

Jank Lang Hit Alpha

https://github.com/jank-lang/jank
150•makemethrowaway•11h ago•23 comments

Japan joining growing global trend of declining democracy

https://www.asahi.com/ajw/articles/16262732
37•wahnfrieden•1h ago•21 comments

Fighting Fire with Fire: Scalable Oral Exams

https://www.behind-the-enemy-lines.com/2025/12/fighting-fire-with-fire-scalable-oral.html
158•sethbannon•13h ago•204 comments

Ask HN: Who wants to be hired? (January 2026)

105•whoishiring•15h ago•195 comments

TinyTinyTPU: 2×2 systolic-array TPU-style matrix-multiply unit deployed on FPGA

https://github.com/Alanma23/tinytinyTPU-co
102•Xenograph•12h ago•42 comments

Accounting for Computer Scientists (2011)

https://martin.kleppmann.com/2011/03/07/accounting-for-computer-scientists.html
92•tosh•13h ago•33 comments

A Beginner's Two-Component Crystal-Style Wi-Fi Detector

https://siliconjunction.wordpress.com/2025/12/12/a-beginners-two-component-crystal-style-wi-fi-de...
6•jensgk•2d ago•2 comments

Multiple explosions in Venezuela's capital Caracas

https://www.cnn.com/2026/01/03/americas/venezuela-explosions-intl-hnk
39•breppp•38m ago•18 comments

The rsync algorithm (1996) [pdf]

https://www.andrew.cmu.edu/course/15-749/READINGS/required/cas/tridgell96.pdf
113•vortex_ape•14h ago•12 comments

Punkt. Unveils MC03 Smartphone

https://www.punkt.ch/blogs/news/punkt-unveils-mc03
136•ChrisArchitect•15h ago•124 comments

Chain Flinger

https://nealstephenson.substack.com/p/kdk-kinetik-der-kontinua-part-1-introduction
41•roomey•5d ago•7 comments

Uxn32: Uxn Emulator for Windows and Wine

https://github.com/randrew/uxn32
51•ibobev•6d ago•4 comments

Assorted less(1) tips

https://blog.thechases.com/posts/assorted-less-tips/
197•todsacerdoti•18h ago•45 comments

HPV vaccination reduces oncogenic HPV16/18 prevalence from 16% to <1% in Denmark

https://www.eurosurveillance.org/content/10.2807/1560-7917.ES.2025.30.27.2400820
525•stared•21h ago•298 comments