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.

Google is dead. Where do we go now?

https://www.circusscientist.com/2025/12/29/google-is-dead-where-do-we-go-now/
72•tomjuggler•32m ago•39 comments

All Delisted Steam Games

https://delistedgames.com/all-delisted-steam-games/
65•Bondi_Blue•1h ago•16 comments

Static Allocation with Zig

https://nickmonad.blog/2025/static-allocation-with-zig-kv/
121•todsacerdoti•4h ago•64 comments

Flame Graphs vs. Tree Maps vs. Sunburst (2017)

https://www.brendangregg.com/blog/2017-02-06/flamegraphs-vs-treemaps-vs-sunburst.html
46•gudzpoz•2d ago•7 comments

List of domains censored by German ISPs

https://cuiiliste.de/domains
156•elcapitan•2h ago•61 comments

The production bug that made me care about undefined behavior

https://gaultier.github.io/blog/the_production_bug_that_made_me_care_about_undefined_behavior.html
49•birdculture•2h ago•23 comments

Show HN: Aroma: Every TCP Proxy Is Detectable with RTT Fingerprinting

https://github.com/Sakura-sx/Aroma
25•Sakura-sx•4d ago•12 comments

GOG is getting acquired by its original co-founder

https://www.gog.com/blog/gog-is-getting-acquired-by-its-original-co-founder-what-it-means-for-you/
405•haunter•4h ago•230 comments

Show HN: Superset – Terminal to run 10 parallel coding agents

https://superset.sh/
43•avipeltz•6d ago•31 comments

Meta's ads tools started switching out top-performing ads with AI-generated ones

https://www.businessinsider.com/meta-ai-generating-bizarre-ads-advantage-plus-2025-10
69•zdw•1h ago•38 comments

High-performance C++ hash table using grouped SIMD metadata scanning

https://github.com/Cranot/grouped-simd-hashtable
13•rurban•5d ago•2 comments

Libgodc: Write Go Programs for Sega Dreamcast

https://github.com/drpaneas/libgodc
159•drpaneas•7h ago•39 comments

Nvidia takes $5B stake in Intel under September agreement

https://www.reuters.com/legal/transactional/nvidia-takes-5-billion-stake-intel-under-september-ag...
133•taubek•3h ago•45 comments

Kidnapped by Deutsche Bahn

https://www.theocharis.dev/blog/kidnapped-by-deutsche-bahn/
805•JeremyTheo•8h ago•756 comments

The Future of Software Development Is Software Developers

https://codemanship.wordpress.com/2025/11/25/the-future-of-software-development-is-software-devel...
15•cdrnsf•1h ago•2 comments

Show HN: Evidex – AI Clinical Search (RAG over PubMed/OpenAlex and SOAP Notes)

https://www.getevidex.com
14•amber_raza•3h ago•2 comments

Which Humans?

https://osf.io/preprints/psyarxiv/5b26t_v1
3•surprisetalk•1h ago•0 comments

Linux DAW: Help Linux musicians to quickly and easily find the tools they need

https://linuxdaw.org/
129•prmoustache•8h ago•70 comments

You can't design software you don't work on

https://www.seangoedecke.com/you-cant-design-software-you-dont-work-on/
191•saikatsg•13h ago•67 comments

You can make up HTML tags

https://maurycyz.com/misc/make-up-tags/
512•todsacerdoti•18h ago•169 comments

Show HN: Z80-μLM, a 'Conversational AI' That Fits in 40KB

https://github.com/HarryR/z80ai
447•quesomaster9000•15h ago•100 comments

Why is calling my asm function from Rust slower than calling it from C?

https://ohadravid.github.io/posts/2025-12-rav1d-faster-asm/
76•gavide•2d ago•22 comments

Show HN: Per-instance TSP Solver with No Pre-training (1.66% gap on d1291)

11•jivaprime•7h ago•1 comments

Karpathy on Programming: "I've never felt this much behind"

https://twitter.com/karpathy/status/2004607146781278521
154•rishabhaiover•3d ago•95 comments

What an unprocessed photo looks like

https://maurycyz.com/misc/raw_photo/
2243•zdw•22h ago•364 comments

Binance's Trust Wallet extension hacked; users lose $7M

https://www.web3isgoinggreat.com/?id=trust-wallet-hack
19•ilamont•56m ago•0 comments

Feynman's Hughes Lectures: 950 pages of notes

https://thehugheslectures.info/the-lectures/
150•gnubison•10h ago•33 comments

Show HN: See what readers who loved your favorite book/author also loved to read

https://shepherd.com/bboy/2025
97•bwb•9h ago•24 comments

Show HN: Vibe coding a bookshelf with Claude Code

https://balajmarius.com/writings/vibe-coding-a-bookshelf-with-claude-code/
234•balajmarius•7h ago•181 comments

Swapping SIM cards used to be easy, and then came eSIM

https://arstechnica.com/gadgets/2025/12/i-switched-to-esim-in-2025-and-i-am-full-of-regret/
162•Brajeshwar•5h ago•160 comments