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.

What an unprocessed photo looks like

https://maurycyz.com/misc/raw_photo/
796•zdw•6h ago•164 comments

You can make up HTML tags

https://maurycyz.com/misc/make-up-tags/
94•todsacerdoti•2h ago•31 comments

Unity's Mono problem: Why your C# code runs slower than it should

https://marekfiser.com/blog/mono-vs-dot-net-in-unity/
139•iliketrains•7h ago•67 comments

MongoBleed Explained Simply

https://bigdata.2minutestreaming.com/p/mongobleed-explained-simply
138•todsacerdoti•7h ago•57 comments

As AI gobbles up chips, prices for devices may rise

https://www.npr.org/2025/12/28/nx-s1-5656190/ai-chips-memory-prices-ram
80•geox•6h ago•72 comments

Spherical Cow

https://lib.rs/crates/spherical-cow
74•Natfan•5h ago•7 comments

Software engineers should be a little bit cynical

https://www.seangoedecke.com/a-little-bit-cynical/
136•zdw•7h ago•103 comments

Researchers discover molecular difference in autistic brains

https://medicine.yale.edu/news-article/molecular-difference-in-autistic-brains/
80•amichail•6h ago•56 comments

PySDR: A Guide to SDR and DSP Using Python

https://pysdr.org/content/intro.html
150•kklisura•8h ago•7 comments

Growing up in “404 Not Found”: China's nuclear city in the Gobi Desert

https://substack.com/inbox/post/182743659
722•Vincent_Yan404•22h ago•317 comments

Why I Think Valve's Retiring the Steam Deck LCD

https://gardinerbryant.com/why-valves-retiring-the-steam-deck-lcd/
6•Ariarule•1h ago•10 comments

Show HN: My app just won best iOS Japanese learning tool of 2025 award (blog)

https://skerritt.blog/best-japanese-learning-tools-2025-award-show/
73•wahnfrieden•4h ago•14 comments

62 years in the making: NYC's newest water tunnel nears the finish line

https://ny1.com/nyc/all-boroughs/news/2025/11/09/water--dep--tunnels-
97•eatonphil•5h ago•55 comments

Slaughtering Competition Problems with Quantifier Elimination (2021)

https://grossack.site/2021/12/22/qe-competition.html
42•todsacerdoti•5h ago•0 comments

A bitwise reproducible deep learning framework

https://github.com/microsoft/RepDL
6•noosphr•6d ago•0 comments

Building a macOS app to know when my Mac is thermal throttling

https://stanislas.blog/2025/12/macos-thermal-throttling-app/
254•angristan•17h ago•108 comments

Why I Disappeared – My week with minimal internet in a remote island chain

https://www.kenklippenstein.com/p/why-i-disappeared
64•eh_why_not•7h ago•47 comments

How to Complain (2024)

https://outerproduct.net/trivial/2024-03-25_complain.html
43•ysangkok•5h ago•5 comments

Learn computer graphics from scratch and for free

https://www.scratchapixel.com
218•theusus•17h ago•26 comments

Fast Cvvdp Implementation in C

https://github.com/halidecx/fcvvdp
20•todsacerdoti•5h ago•1 comments

Stepping down as Mockito maintainer after ten years

https://github.com/mockito/mockito/issues/3777
238•saikatsg•8h ago•143 comments

Remembering Lou Gerstner

https://newsroom.ibm.com/2025-12-28-Remembering-Lou-Gerstner
80•thm•10h ago•36 comments

Doublespeak: In-Context Representation Hijacking

https://mentaleap.ai/doublespeak/
63•surprisetalk•6d ago•5 comments

No, it's not a battleship

https://www.navalgazing.net/No-its-not
117•hermitcrab•9h ago•143 comments

Writing non-English languages with a QWERTY keyboard

https://altgr-weur.eu/altgr-intl.html
22•tokai•4d ago•11 comments

Time in C++: Inter-Clock Conversions, Epochs, and Durations

https://www.sandordargo.com/blog/2025/12/24/clocks-part-5-conversions
31•ibobev•2d ago•7 comments

Finding Jingle Town: Debugging an N64 Game Without Symbols

https://blog.chrislewis.au/finding-jingle-town-debugging-an-n64-game-without-symbols/
11•knackers•5d ago•0 comments

Self-hosting is being enshittified

https://troubled.engineer/posts/selfhosting-in-2025/
58•StrLght•2h ago•43 comments

One year of keeping a tada list

https://www.ducktyped.org/p/one-year-of-keeping-a-tada-list
246•egonschiele•6d ago•75 comments

C++ says “We have try. . . finally at home”

https://devblogs.microsoft.com/oldnewthing/20251222-00/?p=111890
110•ibobev•22h ago•125 comments