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.

Local Journalism Is How Democracy Shows Up Close to Home

https://buckscountybeacon.com/2026/01/opinion-local-journalism-is-how-democracy-shows-up-close-to...
123•mooreds•1h ago•51 comments

Apple Creator Studio

https://www.apple.com/newsroom/2026/01/introducing-apple-creator-studio-an-inspiring-collection-o...
151•lemonlime227•1h ago•141 comments

Cowork: Claude Code for the rest of your work

https://claude.com/blog/cowork-research-preview
1108•adocomplete•19h ago•485 comments

Why Stoicism is one of the best mind hacks ever devised

https://aeon.co/essays/why-stoicism-is-one-of-the-best-mind-hacks-ever-devised
78•suioir•1h ago•57 comments

Show HN: SnackBase – Open-source, GxP-compliant back end for Python teams

https://snackbase.dev
26•lalitgehani•2h ago•0 comments

Text-based web browsers

https://cssence.com/2026/text-based-web-browsers/
179•pabs3•10h ago•67 comments

TimeCapsuleLLM: LLM trained only on data from 1800-1875

https://github.com/haykgrigo3/TimeCapsuleLLM
673•admp•23h ago•275 comments

Designing an IPv6-native P2P transport – lessons from building I6P

https://theushen.medium.com/designing-an-ipv6-native-p2p-transport-lessons-from-building-i6p-b8ca...
46•TheusHen•4d ago•36 comments

Owners, not renters: Mozilla's open source AI strategy

https://blog.mozilla.org/en/mozilla/mozilla-open-source-ai-strategy/
82•nalinidash•3h ago•54 comments

FOSS in times of war, scarcity and (adversarial) AI [video]

https://fosdem.org/2026/schedule/event/FE7ULY-foss-in-times-of-war-scarcity-and-ai/
113•maelito•5h ago•69 comments

Postal Arbitrage

https://walzr.com/postal-arbitrage
468•The28thDuck•21h ago•241 comments

Git Rebase for the Terrified

https://www.brethorsting.com/blog/2026/01/git-rebase-for-the-terrified/
84•aaronbrethorst•5d ago•93 comments

Floppy disks turn out to be the greatest TV remote for kids

https://blog.smartere.dk/2026/01/floppy-disks-the-best-tv-remote-for-kids/
694•mchro•1d ago•394 comments

Scott Adams has passed away

https://www.youtube.com/watch?v=Rs_JrOIo3SE
4•ekianjo•2m ago•0 comments

The chess bot on Delta Air Lines will destroy you (2024) [video]

https://www.youtube.com/watch?v=c0mLhHDcY3I
284•cjaackie•19h ago•251 comments

Unauthenticated remote code execution in OpenCode

https://cy.md/opencode-rce/
380•CyberShadow•1d ago•126 comments

NASA topples towers used to test Saturn rockets, space shuttle

https://arstechnica.com/space/2026/01/nasa-topples-towers-used-to-test-saturn-rockets-space-shuttle/
26•bookofjoe•2h ago•2 comments

Date is out, Temporal is in

https://piccalil.li/blog/date-is-out-and-temporal-is-in/
423•alexanderameye•1d ago•176 comments

Some ecologists fear their field is losing touch with nature

https://www.nature.com/articles/d41586-025-04150-w
140•Growtika•5d ago•67 comments

Learning Retro Computer Electronics Fault Finding and Restoration

https://retrogamecoders.com/learning-retrocomputer-electronics/
10•ibobev•3d ago•0 comments

Robotopia: A 3D, first-person, talking simulator

https://elbowgreasegames.substack.com/p/introducing-robotopia-a-3d-first
72•psawaya•4d ago•32 comments

Fabrice Bellard's TS Zip (2024)

https://www.bellard.org/ts_zip/
194•everlier•18h ago•80 comments

The Cray-1 Computer System (1977) [pdf]

https://s3data.computerhistory.org/brochures/cray.cray1.1977.102638650.pdf
114•LordGrey•3d ago•65 comments

LLVM: The bad parts

https://www.npopov.com/2026/01/11/LLVM-The-bad-parts.html
363•vitaut•1d ago•74 comments

Apple picks Gemini to power Siri

https://www.cnbc.com/2026/01/12/apple-google-ai-siri-gemini.html
947•stygiansonic•23h ago•580 comments

Implementing a web server in a single printf() call (2014)

https://tinyhack.com/2014/03/12/implementing-a-web-server-in-a-single-printf-call/
67•nateb2022•4d ago•8 comments

The UK is shaping a future of Precrime and dissent management

https://freedomnews.org.uk/2025/04/11/how-the-uk-is-shaping-a-future-of-precrime-and-dissent-mana...
133•robtherobber•2h ago•110 comments

Chromium Has Merged JpegXL

https://chromium-review.googlesource.com/c/chromium/src/+/7184969
245•thunderbong•8h ago•72 comments

Anthropic made a mistake in cutting off third-party clients

https://archaeologist.dev/artifacts/anthropic
335•codesparkle•1d ago•222 comments

F2 (YC S25) Is Hiring

https://www.ycombinator.com/companies/f2/jobs/cJsc7Fe-product-designer
1•arctech•16h ago