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•11mo ago

Comments

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

Ghostty is leaving GitHub

https://mitchellh.com/writing/ghostty-leaving-github
412•WadeGrimridge•33m ago•84 comments

OpenAI models coming to Amazon Bedrock: Interview with OpenAI and AWS CEOs

https://stratechery.com/2026/an-interview-with-openai-ceo-sam-altman-and-aws-ceo-matt-garman-abou...
43•translocator•53m ago•7 comments

A playable DOOM MCP app

https://chrisnager.com/blog/doom-runs-in-chatgpt-and-claude/
49•chrisnager•1h ago•16 comments

Waymo in Portland

https://waymo.com/blog/shorts/waymo-in-portland/
150•xnx•2h ago•167 comments

CJIT: C, Just in Time

https://dyne.org/cjit/
26•smartmic•1h ago•3 comments

Your phone is about to stop being yours

https://keepandroidopen.org/en/
537•doener•4h ago•288 comments

Claude.ai unavailable and elevated errors on the API

https://status.claude.com/incidents/9l93x2ht4s5w
192•shorsher•2h ago•158 comments

Warp is now Open-Source

https://github.com/warpdotdev/warp
67•doppp•3h ago•21 comments

GitHub RCE Vulnerability: CVE-2026-3854 Breakdown

https://www.wiz.io/blog/github-rce-vulnerability-cve-2026-3854
126•bo0tzz•4h ago•36 comments

Patch applies fake diffs from commit messages

https://samizdat.dev/phantom-patch/
30•reconquestio•1d ago•5 comments

VibeVoice: Open-source frontier voice AI

https://github.com/microsoft/VibeVoice
285•tosh•8h ago•162 comments

Localsend: An open-source cross-platform alternative to AirDrop

https://github.com/localsend/localsend
668•bilsbie•8h ago•216 comments

Infisical (YC W23) Is Hiring Full Stack Software Engineers (Remote)

https://jobs.ashbyhq.com/infisical/782b9da8-20e1-48b2-919e-6c5430c58628
1•vmatsiiako•3h ago

I have officially retired from Emacs

https://nullprogram.com/blog/2026/04/26/
130•Fudgel•2d ago•73 comments

AISLE Discovers 38 CVEs in OpenEMR Healthcare Software

https://aisle.com/blog/aisle-discovers-38-critical-security-vulnerabilities-in-healthcare-softwar...
155•mmsc•4h ago•98 comments

UAE to leave OPEC

https://www.ft.com/content/8c354f2d-3e66-47f1-aad4-9b4aa30e386d
241•bazzmt•7h ago•359 comments

Who owns the code Claude Code wrote?

https://legallayer.substack.com/p/who-owns-the-claude-code-wrote
188•senaevren•8h ago•218 comments

Show HN: Live Sun and Moon Dashboard with NASA Footage

https://www.lumara-space.app/
139•beeswaxpat•6h ago•45 comments

Laguna XS.2 and M.1

https://poolside.ai/blog/laguna-a-deeper-dive
79•tosh•4h ago•32 comments

Warp is now open-source

https://www.warp.dev/blog/warp-is-now-open-source
74•meetpateltech•4h ago•30 comments

Things C++26 define_static_array can't do

https://quuxplusone.github.io/blog/2026/04/24/define-static-array/
35•jandeboevrie•2d ago•11 comments

GitHub Actions is the weakest link

https://nesbitt.io/2026/04/28/github-actions-is-the-weakest-link.html
165•dochtman•8h ago•54 comments

Talkie: a 13B vintage language model from 1930

https://talkie-lm.com/introducing-talkie
604•jekude•22h ago•241 comments

Bankruptcies increase 11.9 percent

https://www.uscourts.gov/data-news/judiciary-news/2026/04/23/bankruptcies-increase-119-percent
132•jaredwiener•1h ago•65 comments

FCC Funding Application Notes Paramount Will Be 49.5% Foreign-Owned Post-Merger

https://deadline.com/2026/04/paramount-fcc-request-wbd-merger-middle-east-1236873732/
171•throw0101c•4h ago•108 comments

GitHub Copilot code review will start consuming GitHub Actions minutes

https://github.blog/changelog/2026-04-27-github-copilot-code-review-will-start-consuming-github-a...
203•whtsky•11h ago•144 comments

ASML became the chokepoint for cutting-edge chips

https://worksinprogress.co/issue/the-worlds-most-complex-machine/
291•mellosouls•3d ago•178 comments

A good AGENTS.md is a model upgrade. A bad one is worse than no docs at all

https://www.augmentcode.com/blog/how-to-write-good-agents-dot-md-files
44•gmays•1h ago•4 comments

Deep under Antarctic ice, a long-predicted cosmic whisper breaks through

https://phys.org/news/2026-04-deep-antarctic-ice-cosmic-strange.html
97•rbanffy•1d ago•39 comments

Can You Find the Comet?

https://apod.nasa.gov/apod/ap260427.html
131•ColinWright•1d ago•84 comments