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.

Show HN: Gemini Pro 3 hallucinates the HN front page 10 years from now

https://dosaygo-studio.github.io/hn-front-page-2035/news
1799•keepamovin•10h ago•630 comments

PeerTube is recognized as a digital public good by Digital Public Goods Alliance

https://www.digitalpublicgoods.net/r/peertube
391•fsflover•8h ago•64 comments

Django: what’s new in 6.0

https://adamj.eu/tech/2025/12/03/django-whats-new-6.0/
144•rbanffy•4h ago•36 comments

Mistral releases Devstral2 and Mistral Vibe CLI

https://mistral.ai/news/devstral-2-vibe-cli
481•pember•10h ago•243 comments

If you're going to vibe code, why not do it in C?

https://stephenramsay.net/posts/vibe-coding.html
305•sramsay•8h ago•351 comments

10 Years of Let's Encrypt

https://letsencrypt.org/2025/12/09/10-years
440•SGran•6h ago•179 comments

Handsdown one of the coolest 3D websites

https://bruno-simon.com/
386•razzmataks•9h ago•99 comments

Pebble Index 01 – External memory for your brain

https://repebble.com/blog/meet-pebble-index-01-external-memory-for-your-brain
380•freshrap6•10h ago•379 comments

Italy's longest-serving barista reflects on six decades behind the counter

https://www.reuters.com/lifestyle/culture-current/anna-possi-six-decades-behind-counter-italys-ba...
61•NaOH•4d ago•13 comments

Qt, Linux and everything: Debugging Qt WebAssembly

http://qtandeverything.blogspot.com/2025/12/debugging-qt-webassembly-dwarf.html
40•speckx•3h ago•11 comments

Donating the Model Context Protocol and establishing the Agentic AI Foundation

https://www.anthropic.com/news/donating-the-model-context-protocol-and-establishing-of-the-agenti...
143•meetpateltech•8h ago•63 comments

Agentic AI Foundation

https://block.xyz/inside/block-anthropic-and-openai-launch-the-agentic-ai-foundation
56•thinkingkong•5h ago•12 comments

The stack circuitry of the Intel 8087 floating point chip, reverse-engineered

https://www.righto.com/2025/12/8087-stack-circuitry.html
77•elpocko•7h ago•30 comments

So you want to speak at software conferences?

https://dylanbeattie.net/2025/12/08/so-you-want-to-speak-at-software-conferences.html
115•speckx•6h ago•43 comments

LLM from scratch, part 28 – training a base model from scratch on an RTX 3090

https://www.gilesthomas.com/2025/12/llm-from-scratch-28-training-a-base-model-from-scratch
471•gpjt•1w ago•99 comments

ULID: Universally Unique Lexicographically Sortable Identifier

https://packagemain.tech/p/ulid-identifier-golang-postgres
48•der_gopher•1w ago•31 comments

Linux CVEs, more than you ever wanted to know

http://www.kroah.com/log/blog/2025/12/08/linux-cves-more-than-you-ever-wanted-to-know/
20•voxadam•2h ago•17 comments

Kaiju – General purpose 3D/2D game engine in Go and Vulkan with built in editor

https://github.com/KaijuEngine/kaiju
149•discomrobertul8•10h ago•67 comments

OpenEvolve: Teaching LLMs to Discover Algorithms Through Evolution

https://algorithmicsuperintelligence.ai/blog/openevolve-overview/index.html
12•codelion•2h ago•5 comments

A supersonic engine core makes the perfect power turbine

https://boomsupersonic.com/flyby/ai-needs-more-power-than-the-grid-can-deliver-supersonic-tech-ca...
59•simonebrunozzi•9h ago•99 comments

My favourite small hash table

https://www.corsix.org/content/my-favourite-small-hash-table
121•speckx•10h ago•29 comments

Apple's slow AI pace becomes a strength as market grows weary of spending

https://finance.yahoo.com/news/apple-slow-ai-pace-becomes-104658095.html
225•bgwalter•10h ago•280 comments

Clearspace (YC W23) Is Hiring a Founding Designer

https://www.ycombinator.com/companies/clearspace/jobs/yamWTLr-founding-designer-at-clearspace
1•roycebranning•8h ago

Operando interlayer expansion of curved graphene for dense supercapacitors

https://www.nature.com/articles/s41467-025-63485-0
3•westurner•5d ago•0 comments

30 Year Anniversary of WarCraft II: Tides of Darkness

https://www.jorsys.org/archive/december_2025.html#newsitem_2025-12-09T07:42:19Z
181•sjoblomj•16h ago•119 comments

The Joy of Playing Grandia, on Sega Saturn

https://www.segasaturnshiro.com/2025/11/27/the-joy-of-playing-grandia-on-sega-saturn/
177•tosh•15h ago•115 comments

Rubio stages font coup: Times New Roman ousts Calibri

https://www.reuters.com/world/us/rubio-stages-font-coup-times-new-roman-ousts-calibri-2025-12-09/
27•italophil•1h ago•9 comments

The Mysterious Realm of JavaScriptCore (2021)

https://www.cyberark.com/resources/threat-research-blog/the-mysterious-realm-of-javascriptcore
26•program•5d ago•5 comments

Launch HN: Mentat (YC F24) – Controlling LLMs with Runtime Intervention

38•cgorlla•8h ago•30 comments

Agentic QA – Open-source middleware to fuzz-test agents for loops

29•Saurabh_Kumar_•6d ago•5 comments