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.

Vibe coding is mad depressing

https://law.gmnz.xyz/vibe-coding-is-mad-depressing/
100•dirtylowprofile•57m ago•28 comments

Size of Life

https://neal.fun/size-of-life/
1563•eatonphil•12h ago•191 comments

Getting a Gemini API key is an exercise in frustration

https://ankursethi.com/blog/gemini-api-key-frustration/
337•speckx•8h ago•133 comments

Australia begins enforcing world-first teen social media ban

https://www.reuters.com/legal/litigation/australia-social-media-ban-takes-effect-world-first-2025...
631•chirau•1d ago•1015 comments

Patterns.dev

https://www.patterns.dev/
64•handfuloflight•3h ago•24 comments

Auto-grading decade-old Hacker News discussions with hindsight

https://karpathy.bearblog.dev/auto-grade-hn/
353•__rito__•11h ago•169 comments

Fossils reveal anacondas have been giants for over 12 million years

https://www.cam.ac.uk/stories/twelve-million-years-of-giant-anacondas
17•ashishgupta2209•1w ago•6 comments

Incomplete List of Mistakes in the Design of CSS

https://wiki.csswg.org/ideas/mistakes
8•OuterVale•26m ago•1 comments

Super Mario 64 for the PS1

https://github.com/malucard/sm64-psx
191•LaserDiscMan•9h ago•66 comments

VCMI: An open-source engine for Heroes III

https://vcmi.eu/
27•eamag•4d ago•6 comments

How Google Maps allocates survival across London's restaurants

https://laurenleek.substack.com/p/how-google-maps-quietly-allocates
164•justincormack•1d ago•83 comments

Qwen3-Omni-Flash-2025-12-01:a next-generation native multimodal large model

https://qwen.ai/blog?id=qwen3-omni-flash-20251201
223•pretext•12h ago•87 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/
196•italophil•1d ago•313 comments

Show HN: Automated license plate reader coverage in the USA

https://alpranalysis.com
142•sodality2•11h ago•89 comments

3D-Printed Carotid Artery-on-Chips for Personalized Thrombosis Investigation

https://advanced.onlinelibrary.wiley.com/doi/10.1002/adma.202508890
4•PaulHoule•1w ago•0 comments

Gundam is just the same as Jane Austen but happens to include giant mech suits

https://eli.li/gundam-is-just-the-same-as-jane-austen-but-happens-to-include-giant-mech-suits
176•surprisetalk•1w ago•121 comments

Common Lisp, ASDF, and Quicklisp: packaging explained

https://cdegroot.com/programming/commonlisp/2025/11/26/cl-ql-asdf.html
56•todsacerdoti•17h ago•14 comments

When would you ever want bubblesort? (2023)

https://buttondown.com/hillelwayne/archive/when-would-you-ever-want-bubblesort/
75•atan2•7h ago•51 comments

Terrain Diffusion: A Diffusion-Based Successor to Perlin Noise

https://arxiv.org/abs/2512.08309
108•kelseyfrog•10h ago•31 comments

Scientists create ultra fast memory using light

https://www.isi.edu/news/81186/scientists-create-ultra-fast-memory-using-light/
73•giuliomagnifico•6d ago•17 comments

Valve: HDMI Forum Continues to Block HDMI 2.1 for Linux

https://www.heise.de/en/news/Valve-HDMI-Forum-Continues-to-Block-HDMI-2-1-for-Linux-11107440.html
581•OsrsNeedsf2P•11h ago•323 comments

The future of Terraform CDK

https://github.com/hashicorp/terraform-cdk
92•mfornasa•9h ago•103 comments

Launch HN: InspectMind (YC W24) – AI agent for reviewing construction drawings

45•aakashprasad91•12h ago•44 comments

Is it a bubble?

https://www.oaktreecapital.com/insights/memo/is-it-a-bubble
180•saigrandhi•11h ago•265 comments

OpenRouter Broadcast

https://openrouter.ai/docs/guides/features/broadcast/overview
25•Topfi•4d ago•9 comments

Golang's big miss on memory arenas

https://avittig.medium.com/golangs-big-miss-on-memory-arenas-f1375524cc90
110•andr3wV•1w ago•91 comments

RoboCrop: Teaching robots how to pick tomatoes

https://phys.org/news/2025-12-robocrop-robots-tomatoes.html
76•smurda•13h ago•36 comments

Typewriter Plotters (2022)

https://biosrhythm.com/?p=2143
108•LaSombra•5d ago•7 comments

Show HN: A 2-row, 16-key keyboard designed for smartphones

https://k-keyboard.com/Why-QWERTY-mini
59•QWERTYmini•10h ago•49 comments

9 Mothers (YC X26) Is Hiring

https://app.dover.com/jobs/9mothers
1•ukd1•11h ago