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.

I canceled my book deal

https://austinhenley.com/blog/canceledbookdeal.html
168•azhenley•2h ago•71 comments

Privacy and control. My tech setup

https://toidiu.com/blog/2025-12-25-privacy-and-control/
51•todsacerdoti•2h ago•16 comments

The compiler is your best friend

https://blog.daniel-beskin.com/2025-12-22-the-compiler-is-your-best-friend-stop-lying-to-it
107•based2•4h ago•55 comments

My role as a founder-CTO: year 8

https://miguelcarranza.es/cto-year-8
31•ridruejo•5d ago•20 comments

Scaffolding to Superhuman: How Curriculum Learning Solved 2048 and Tetris

https://kywch.github.io/blog/2025/12/curriculum-learning-2048-tetris/
90•a1k0n•4h ago•18 comments

Demystifying DVDs

https://hiddenpalace.org/News/One_Bad_Ass_Hedgehog_-_Shadow_the_Hedgehog#Demystifying_DVDs
26•boltzmann-brain•2d ago•3 comments

All-optical synthesis chip for large-scale intelligent semantic vision

https://www.science.org/doi/10.1126/science.adv7434
3•QueensGambit•25m ago•0 comments

Akin's Laws of Spacecraft Design [pdf] (2011)

https://www.ece.uvic.ca/~elec399/201409/Akin%27s%20Laws%20of%20Spacecraft%20Design.pdf
233•tosh•10h ago•57 comments

39C3 Grafana Dashboard

https://dashboard.congress.ccc.de/public-dashboards/e6cf86b287304662b4d1b8eb31b5ab50
6•immibis•4d ago•2 comments

FTX whistleblower Caroline Ellison set for early release next month

https://invezz.com/news/2025/12/26/ftx-whistleblower-caroline-ellison-set-for-early-release-next-...
4•jxmorris12•46m ago•0 comments

Microtonal Spiral Piano

https://shih1.github.io/spiral/
36•phoenix_ashes•5d ago•7 comments

SigNoz (YC W21, open source observability platform) Is Hiring across roles

https://signoz.io/careers
1•pranay01•3h ago

When square pixels aren't square

https://alexwlchan.net/2025/square-pixels/
75•PaulHoule•6h ago•34 comments

Stewart Cheifet, creator of The Computer Chronicles, has died

https://obits.goldsteinsfuneral.com/stewart-cheifet
91•spankibalt•2h ago•32 comments

The most famous transcendental numbers

https://sprott.physics.wisc.edu/pickover/trans.html
109•vismit2000•8h ago•58 comments

Show HN: Use Claude Code to Query 600 GB Indexes over Hacker News, ArXiv, etc.

https://exopriors.com/scry
257•Xyra•12h ago•85 comments

Efficient method to capture carbon dioxide from the atmosphere

https://www.helsinki.fi/en/news/innovations/efficient-method-capture-carbon-dioxide-atmosphere-de...
222•lrasinen•6h ago•228 comments

The rise of industrial software

https://chrisloy.dev/post/2025/12/30/the-rise-of-industrial-software
184•chrisloy•11h ago•137 comments

Nvidia GB10's Memory Subsystem, from the CPU Side

https://chipsandcheese.com/p/inside-nvidia-gb10s-memory-subsystem
49•ingve•7h ago•4 comments

Doom in Django: testing the limits of LiveView at 600.000 divs/segundo

https://en.andros.dev/blog/7b1b607b/doom-in-django-testing-the-limits-of-liveview-at-600000-divss...
146•andros•3d ago•46 comments

How AI labs are solving the power problem

https://newsletter.semianalysis.com/p/how-ai-labs-are-solving-the-power
70•Symmetry•6h ago•121 comments

Meta created 'playbook' to fend off pressure to crack down on scammers

https://www.reuters.com/investigations/meta-created-playbook-fend-off-pressure-crack-down-scammer...
124•lossolo•2h ago•46 comments

Kitchen optimizations

https://www.natemeyvis.com/kitchen-optimizations/
34•Theaetetus•1w ago•65 comments

Back to the future: the story of Squeak, a practical Smalltalk written in itself [pdf] (1997)

http://www.vpri.org/pdf/tr1997001_backto.pdf
76•fanf2•6d ago•16 comments

France targets Australia-style social media ban for children next year

https://www.theguardian.com/world/2025/dec/31/france-plans-social-media-ban-for-under-15s-from-se...
122•belter•5h ago•131 comments

Stardew Valley developer made a $125k donation to the FOSS C# framework MonoGame

https://monogame.net/blog/2025-12-30-385-new-sponsor-announcement/
455•haunter•5h ago•188 comments

RoboCop – Breaking the Law. H0ffman Cracks RoboCop Arcade from DataEast

https://hoffman.home.blog/2025/12/26/robocop-breaking-the-law/
66•birdculture•4d ago•3 comments

Animated AI

https://animatedai.github.io/
286•frozenseven•5d ago•24 comments

Tixl: Open-source realtime motion graphics

https://github.com/tixl3d/tixl
157•nateb2022•5d ago•25 comments

Claude wrote a functional NES emulator using my engine's API

https://carimbo.games/games/nintendo/
61•delduca•7h ago•59 comments