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•1y ago

Comments

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

Valve releases Steam Controller CAD files under Creative Commons license

https://www.digitalfoundry.net/news/2026/05/valve-releases-steam-controller-cad-files-under-creat...
1575•haunter•22h ago•519 comments

Indian matchbox labels as a visual archive

https://www.itsnicethat.com/features/the-view-from-mumbai-matchbook-graphic-design-130426
52•sahar_builds•2d ago•13 comments

RaTeX: KaTeX-compatible LaTeX rendering engine in pure Rust

https://ratex.lites.dev/
32•atilimcetin•2d ago•6 comments

Boris Cherny: TI-83 Plus Basic Programming Tutorial (2004)

https://www.ticalc.org/programming/columns/83plus-bas/cherny/
87•suoken•2d ago•37 comments

Grand Theft Oil Futures: Insider traders keep making a killing at our expense

https://paulkrugman.substack.com/p/grand-theft-oil-futures
155•Qem•2h ago•108 comments

Agent-harness-kit scaffolding for multi-agent workflows (MCP, provider-agnostic)

https://ahk.cardor.dev
37•enmanuelmag•3h ago•8 comments

Appearing productive in the workplace

https://nooneshappy.com/article/appearing-productive-in-the-workplace/
1357•diebillionaires•21h ago•542 comments

SQLite Is a Library of Congress Recommended Storage Format

https://sqlite.org/locrsf.html
400•whatisabcdefgh•15h ago•116 comments

GovernGPT (YC W24) Is Hiring Engineers to Build Thinking Systems in Montreal

https://www.ycombinator.com/companies/governgpt/jobs/hRyltS0-backend-engineer-thinking-systems
1•owalerys•1h ago

Permacomputing Principles

https://permacomputing.net/principles/
194•andsoitis•11h ago•98 comments

LinkedIn profile visitor lists belong to the people, says Noyb

https://www.theregister.com/offbeat/2026/05/05/noyb-cries-foul-on-linkedin-withholding-profile-vi...
91•robin_reala•2h ago•49 comments

The brave souls who bought a used, 340k-mile rental camper van

https://www.thedrive.com/news/meet-the-brave-souls-who-bought-a-used-340000-mile-rental-camper-van
35•PaulHoule•1d ago•16 comments

SingleRide: Longest route on NYC Subway without visiting the same station twice

https://singleride.nyc/
50•TMWNN•1d ago•19 comments

Diskless Linux boot using ZFS, iSCSI and PXE

https://aniket.foo/posts/20260505-netboot/
129•stereo-highway•10h ago•69 comments

Chevrolet Performance eCrate package (400v/200hp)

https://www.chevrolet.com/performance-parts/crate-engines/ecrate
91•mindcrime•2d ago•60 comments

Photoshop's challenges with focus, pt. 2

https://unsung.aresluna.org/photoshops-challenges-with-focus-pt-2/
87•frizlab•2d ago•32 comments

Vibe coding and agentic engineering are getting closer than I'd like

https://simonwillison.net/2026/May/6/vibe-coding-and-agentic-engineering/
658•e12e•22h ago•746 comments

RSS feeds send me more traffic than Google

https://shkspr.mobi/blog/2026/05/rss-feeds-send-me-more-traffic-than-google/
174•SpyCoder77•13h ago•38 comments

The mechanical latching memory of an adhesive tape

https://iopscience.iop.org/article/10.1088/1367-2630/ae4acc
3•gnabgib•1d ago•0 comments

ProgramBench: Can Language Models Rebuild Programs from Scratch?

https://arxiv.org/abs/2605.03546
91•jonbaer•10h ago•51 comments

Show HN: Trust – Coding Rust like it's 1989

https://github.com/wojtczyk/trust
60•wojtczyk•7h ago•18 comments

Google Cloud fraud defense, the next evolution of reCAPTCHA

https://cloud.google.com/blog/products/identity-security/introducing-google-cloud-fraud-defense-t...
344•unforgivenpasta•19h ago•358 comments

Making LLM Training Faster with Unsloth and NVIDIA

https://unsloth.ai/blog/nvidia-collab
81•segmenta•6h ago•11 comments

Show HN: Agent-skills-eval – Test whether Agent Skills improve outputs

https://github.com/darkrishabh/agent-skills-eval
39•darkrishabh•7h ago•15 comments

From Supabase to Clerk to Better Auth

https://blog.val.town/better-auth
272•stevekrouse•20h ago•200 comments

Pen pal programs endure in a digital age

https://apnews.com/article/pen-pals-letters-comeback-bc87e1b9c229665bafd368e19751d6ca
69•petethomas•1d ago•14 comments

The Old Guard: Confronting America's Gerontocratic Crisis

https://harpers.org/archive/2026/05/the-old-guard-samuel-moyn-gerontocracy/
76•Caiero•13h ago•126 comments

Community firmware for the Xteink X4 e-paper reader

https://github.com/crosspoint-reader/crosspoint-reader
126•dmos62•2d ago•43 comments

Show HN: Hallucinopedia

http://halupedia.com/
260•bstrama•21h ago•227 comments

Show HN: Tilde.run – Agent sandbox with a transactional, versioned filesystem

https://tilde.run/
181•ozkatz•21h ago•124 comments