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.

Elsevier shuts down its finance journal citation cartel

https://www.chrisbrunet.com/p/elsevier-shuts-down-its-finance-journal
128•qsi•3h ago•18 comments

Sub-$200 Lidar could reshuffle auto sensor economics

https://spectrum.ieee.org/solid-state-lidar-microvision-adas
124•mhb•3d ago•138 comments

I built Timeframe, our family e-paper dashboard

https://hawksley.org/2026/02/17/timeframe.html
1171•saeedesmaili•16h ago•286 comments

0 A.D. Release 28: Boiorix

https://play0ad.com/new-release-0-a-d-release-28-boiorix/
149•jonbaer•3d ago•43 comments

Hacker News.love – 22 projects Hacker News didn't love

https://hackernews.love/
16•ohong•1h ago•8 comments

Magical Mushroom – Europe's first industrial-scale mycelium packaging producer

https://magicalmushroom.com/index
41•microflash•3h ago•13 comments

QRTape – Audio Playback from Paper Tape with Computer Vision (2021)

http://www.theresistornetwork.com/2021/03/qrtape-audio-playback-from-paper-tape.html
9•austinallegro•1h ago•4 comments

A NASA Engineer Discovered a World of Semi Truck Aerodynamics by Accident

https://www.thedrive.com/news/how-a-nasa-engineer-discovered-a-world-of-semi-truck-aerodynamics-b...
9•PaulHoule•4d ago•3 comments

Pope tells priests to use their brains, not AI, to write homilies

https://www.ewtnnews.com/vatican/pope-leo-xiv-tells-priests-to-use-their-brains-not-ai-to-write-h...
238•josephcsible•3h ago•199 comments

Show HN: CIA World Factbook Archive (1990–2025), searchable and exportable

https://cia-factbook-archive.fly.dev/
350•MilkMp•14h ago•80 comments

Loops is a federated, open-source TikTok

https://joinloops.org/
443•Gooblebrai•16h ago•301 comments

The JavaScript Oxidation Compiler

https://oxc.rs/
190•modinfo•8h ago•84 comments

SETI@home: Data Acquisition and Front-End Processing (2025)

https://iopscience.iop.org/article/10.3847/1538-3881/ade5a7
9•tosh•1h ago•0 comments

My journey to the microwave alternate timeline

https://www.lesswrong.com/posts/8m6AM5qtPMjgTkEeD/my-journey-to-the-microwave-alternate-timeline
258•jstanley•4d ago•91 comments

Bitmovin (YC S15) Is Hiring Interns in AI for Summer 2026 in Austria

https://bitmovin.com/careers/8023403002/
1•slederer•4h ago

Google restricting Google AI Pro/Ultra subscribers for using OpenClaw

https://discuss.ai.google.dev/t/account-restricted-without-warning-google-ai-ultra-oauth-via-open...
647•srigi•12h ago•534 comments

Show HN: AI Timeline – 171 LLMs from Transformer (2017) to GPT-5.3 (2026)

https://llm-timeline.com/
6•ai_bot•2h ago•4 comments

How to train your program verifier

https://risemsr.github.io/blog/2026-02-16-halleyyoung-a3/
58•matt_d•4d ago•11 comments

Man accidentally gains control of 7k robot vacuums

https://www.popsci.com/technology/robot-vacuum-army/
302•Brajeshwar•20h ago•170 comments

Six Math Essentials

https://terrytao.wordpress.com/2026/02/16/six-math-essentials/
233•digital55•16h ago•51 comments

What I learned designing a barebones UI engine

https://madebymohammed.com/miniui
39•teleforce•7h ago•6 comments

The Musidex: A physical music library for the streaming era

https://hannahilea.com/blog/musidex/
48•zdw•3d ago•15 comments

Pinterest is drowning in a sea of AI slop and auto-moderation

https://www.404media.co/pinterest-is-drowning-in-a-sea-of-ai-slop-and-auto-moderation/
26•trinsic2•7h ago•12 comments

Fix your tools

https://ochagavia.nl/blog/fix-your-tools/
252•vinhnx•19h ago•80 comments

How close are we to a vision for 2010?

https://shkspr.mobi/blog/2026/02/how-close-are-we-to-a-vision-for-2010/
36•ColinWright•7h ago•11 comments

Aqua: A CLI message tool for AI agents

https://github.com/quailyquaily/aqua
51•lyricat•9h ago•30 comments

Hello Worg, the Org-Mode Community

https://orgmode.org/worg/
132•dargscisyhp•17h ago•42 comments

Crawling a billion web pages in just over 24 hours, in 2025

https://andrewkchan.dev/posts/crawler.html
32•pseudolus•7h ago•1 comments

Linuxulator on FreeBSD Feels Like Magic

https://hayzam.com/blog/02-linuxulator-is-awesome/
117•vermaden•16h ago•47 comments

Show HN: Local-First Linux MicroVMs for macOS

https://shuru.run
186•harshdoesdev•16h ago•54 comments