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

Comments

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

Capital One to acquire Brex for $5.15B

https://www.reuters.com/legal/transactional/capital-one-buy-fintech-firm-brex-515-billion-deal-20...
254•personjerry•8h ago•179 comments

GPTZero finds 100 new hallucinations in NeurIPS 2025 accepted papers

https://gptzero.me/news/neurips/
778•segmenta•14h ago•416 comments

Show HN: isometric.nyc – giant isometric pixel art map of NYC

https://cannoneyed.com/isometric-nyc/
778•cannoneyed•12h ago•165 comments

Talking to LLMs has improved my thinking

https://philipotoole.com/why-talking-to-llms-has-improved-my-thinking/
33•otoolep•1h ago•15 comments

Why does SSH send 100 packets per keystroke?

https://eieio.games/blog/ssh-sends-100-packets-per-keystroke/
376•eieio•10h ago•230 comments

I was banned from Claude for scaffolding a Claude.md file?

https://hugodaniel.com/posts/claude-code-banned-me/
441•hugodan•11h ago•333 comments

Qwen3-TTS family is now open sourced: Voice design, clone, and generation

https://qwen.ai/blog?id=qwen3tts-0115
525•Palmik•15h ago•166 comments

Turso is an in-process SQL database, compatible with SQLite

https://github.com/tursodatabase/turso
83•marklit•3d ago•42 comments

The lost art of XML

https://marcosmagueta.com/blog/the-lost-art-of-xml/
40•Curiositry•2h ago•29 comments

Bugs Apple Loves

https://www.bugsappleloves.com
361•nhod•3h ago•126 comments

Douglas Adams on the English–American cultural divide over "heroes"

https://shreevatsa.net/post/douglas-adams-cultural-divide/
389•speckx•15h ago•380 comments

Improving the usability of C libraries in Swift

https://www.swift.org/blog/improving-usability-of-c-libraries-in-swift/
80•timsneath•6h ago•3 comments

Scaling PostgreSQL to power 800M ChatGPT users

https://openai.com/index/scaling-postgresql/
114•mustaphah•8h ago•37 comments

Captive Wi-Fi

https://en.wikipedia.org/wiki/Captive_portal
14•nomilk•4d ago•9 comments

Your app subscription is now my weekend project

https://rselbach.com/your-sub-is-now-my-weekend-project
283•robteix•4d ago•210 comments

Launch HN: Constellation Space (YC W26) – AI for satellite mission assurance

34•kmajid•12h ago•15 comments

Why medieval city-builder video games are historically inaccurate (2020)

https://www.leidenmedievalistsblog.nl/articles/why-medieval-city-builder-video-games-are-historic...
94•benbreen•5h ago•53 comments

CSS Optical Illusions

https://alvaromontoro.com/blog/68091/css-optical-illusions
161•ulrischa•12h ago•14 comments

My first year in sales as technical founder

https://www.fabiandietrich.com/blog/first-year-in-sales.html
99•f3b5•5d ago•46 comments

Show HN: Text-to-video model from scratch (2 brothers, 2 years, 2B params)

https://huggingface.co/collections/Linum-AI/linum-v2-2b-text-to-video
58•schopra909•13h ago•11 comments

Recent discoveries on the acquisition of the highest levels of human performance

https://www.science.org/doi/abs/10.1126/science.adt7790
118•colincooke•11h ago•55 comments

Stunnel

https://www.stunnel.org/
49•firesteelrain•5h ago•13 comments

'Active' sitting is better for brain health: review of studies

https://www.sciencealert.com/not-all-sitting-is-equal-one-type-was-just-linked-to-better-brain-he...
87•mikhael•10h ago•34 comments

Anthropic Economic Index economic primitives

https://www.anthropic.com/research/anthropic-economic-index-january-2026-report
76•malshe•7h ago•44 comments

Show HN: BrowserOS – "Claude Cowork" in the browser

https://github.com/browseros-ai/BrowserOS
49•felarof•13h ago•23 comments

In Europe, wind and solar overtake fossil fuels

https://e360.yale.edu/digest/europe-wind-solar-fossil-fuels
530•speckx•15h ago•541 comments

Compiling Scheme to WebAssembly

https://eli.thegreenplace.net/2026/compiling-scheme-to-webassembly/
82•chmaynard•5d ago•11 comments

Composing APIs and CLIs in the LLM era

https://walters.app/blog/composing-apis-clis
46•zerf•12h ago•11 comments

The Cscript Style Guide – CScript is the standard C

https://github.com/domenukk/CScript
9•domenukk•2h ago•4 comments

A Year of 3D Printing

https://brookehatton.com/blog/making/a-year-of-3d-printing/
118•nindalf•5d ago•106 comments