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•7mo 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.

SQLite JSON at Full Index Speed Using Generated Columns

https://www.dbpro.app/blog/sqlite-json-virtual-columns-indexing
197•upmostly•5h ago•68 comments

Async DNS

https://flak.tedunangst.com/post/async-dns
28•todsacerdoti•1h ago•4 comments

4 billion if statements (2023)

https://andreasjhkarlsson.github.io//jekyll/update/2023/12/27/4-billion-if-statements.html
424•damethos•6d ago•126 comments

Secondary school maths showing that AI systems don't think

https://www.raspberrypi.org/blog/secondary-school-maths-showing-that-ai-systems-dont-think/
22•zdw•1h ago•31 comments

Show HN: tomcp.org – Turn any URL into an MCP server

https://github.com/Ami3466/tomcp
12•ami3466•1h ago•5 comments

String Theory Inspires a Brilliant, Baffling New Math Proof

https://www.quantamagazine.org/string-theory-inspires-a-brilliant-baffling-new-math-proof-20251212/
15•ArmageddonIt•2h ago•0 comments

Epic celebrates "the end of the Apple Tax" after court win in iOS payments case

https://arstechnica.com/tech-policy/2025/12/epic-celebrates-the-end-of-the-apple-tax-after-appeal...
122•nobody9999•2h ago•77 comments

Fedora: Open-source repository for long-term digital preservation

https://fedorarepository.org/
68•cernocky•5h ago•36 comments

CM0 – a new Raspberry Pi you can't buy

https://www.jeffgeerling.com/blog/2025/cm0-new-raspberry-pi-you-cant-buy
44•speckx•3h ago•3 comments

From text to token: How tokenization pipelines work

https://www.paradedb.com/blog/when-tokenization-becomes-token
83•philippemnoel•1d ago•12 comments

Oracle made a $300B bet on OpenAI. It's paying the price

https://finance.yahoo.com/news/oracle-made-a-300-billion-bet-on-openai-its-paying-the-price-20544...
57•pera•1h ago•35 comments

Framework Raises DDR5 Memory Prices by 50% for DIY Laptops

https://www.phoronix.com/news/Framework-50p-DDR5-Memory
92•mikece•2h ago•63 comments

BpfJailer: eBPF Mandatory Access Control [pdf]

https://lpc.events/event/19/contributions/2159/attachments/1833/3929/BpfJailer%20LPC%202025.pdf
35•voxadam•4h ago•4 comments

Google Releases Its New Google Sans Flex Font as Open Source

https://www.omgubuntu.co.uk/2025/11/google-sans-flex-font-ubuntu
16•CharlesW•21m ago•0 comments

Show HN: Tripwire: A new anti evil maid defense

https://github.com/fr33-sh/Tripwire
58•DoctorFreeman•1d ago•32 comments

The tiniest yet real telescope I've built

https://lucassifoni.info/blog/miniscope-tiny-telescope/
211•chantepierre•10h ago•55 comments

Id Software devs form "wall-to-wall" union

https://www.rockpapershotgun.com/id-software-devs-form-wall-to-wall-union-with-165-workers-at-doo...
12•simjue•18m ago•1 comments

Google de-indexed Bear Blog and I don't know why

https://journal.james-zhan.com/google-de-indexed-my-entire-bear-blog-and-i-dont-know-why/
353•nafnlj•17h ago•146 comments

Microservices Should Form a Polytree

https://bytesauna.com/post/microservices
52•mapehe•4d ago•50 comments

Nokia N900 Necromancy

https://yaky.dev/2025-12-11-nokia-n900-necromancy/
435•yaky•18h ago•173 comments

Berlin Approves New Expansion of Police Surveillance Powers

https://reclaimthenet.org/berlin-approves-new-expansion-of-police-surveillance-powers
90•robtherobber•2h ago•52 comments

Koralm Railway

https://infrastruktur.oebb.at/en/projects-for-austria/railway-lines/southern-line-vienna-villach/...
274•fzeindl•7h ago•155 comments

Senator endorses discredited book that claims chemical treats autism, cancer

https://www.propublica.org/article/ron-johnson-wisconsin-chlorine-dioxide-pierre-kory-endorsement
54•duxup•1h ago•19 comments

Japan law opening phone app stores to go into effect dec.18th

https://www3.nhk.or.jp/nhkworld/en/news/20251210_B1/
27•shlip•1h ago•5 comments

Guarding My Git Forge Against AI Scrapers

https://vulpinecitrus.info/blog/guarding-git-forge-ai-scrapers/
118•todsacerdoti•10h ago•75 comments

Octo: A Chip8 IDE

https://github.com/JohnEarnest/Octo
63•tosh•6d ago•10 comments

CRISPR fungus: Protein-packed, sustainable, and tastes like meat

https://www.isaaa.org/kc/cropbiotechupdate/article/default.asp?ID=21607
266•rguiscard•17h ago•196 comments

He set out to walk around the world. After 27 years, his quest is nearly over

https://www.washingtonpost.com/lifestyle/2025/12/05/karl-bushby-walk-around-world/
204•wallflower•5d ago•173 comments

The Tor Project is switching to Rust

https://itsfoss.com/news/tor-rust-rewrite-progress/
267•giuliomagnifico•5h ago•189 comments

Training LLMs for Honesty via Confessions

https://arxiv.org/abs/2512.08093
41•arabello•7h ago•30 comments