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

Comments

RedShift1•6mo ago
It'll be a cold day in hell before I start throwing away my 80+ "New" notepad++ tabs.
notTooFarGone•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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: KiDoom – Running DOOM on PCB Traces

https://www.mikeayles.com/#kidoom
229•mikeayles•11h ago•25 comments

Statistical Process Control in Python

https://timothyfraser.com/sigma/statistical-process-control-in-python.html
8•lifeisstillgood•52m ago•0 comments

Surprisingly, Emacs on Android is pretty good

https://kristofferbalintona.me/posts/202505291438/
125•harryday•3d ago•49 comments

Space Truckin' – The Nostromo (2012)

https://alienseries.wordpress.com/2012/10/23/space-truckin-the-nostromo/
83•exvi•7h ago•32 comments

Copyparty, the FOSS file server [video]

https://www.youtube.com/watch?v=15_-hgsX2V0
47•franczesko•6d ago•8 comments

A new bridge links the math of infinity to computer science

https://www.quantamagazine.org/a-new-bridge-links-the-strange-math-of-infinity-to-computer-scienc...
181•digital55•13h ago•84 comments

CS234: Reinforcement Learning Winter 2025

https://web.stanford.edu/class/cs234/
104•jonbaer•8h ago•9 comments

Show HN: We built an open source, zero webhooks payment processor

https://github.com/flowglad/flowglad
304•agreeahmed•15h ago•175 comments

Trillions spent and big software projects are still failing

https://spectrum.ieee.org/it-management-software-failures
436•pseudolus•21h ago•368 comments

Java Decompiler

http://java-decompiler.github.io
66•mooreds•3d ago•26 comments

New layouts with CSS Subgrid

https://www.joshwcomeau.com/css/subgrid/
198•joshwcomeau•17h ago•54 comments

Launch HN: Onyx (YC W24) – Open-source chat UI

194•Weves•19h ago•135 comments

How to repurpose your old phone into a web server

https://far.computer/how-to/
228•louismerlin•3d ago•86 comments

1,700-year-old Roman sarcophagus is unearthed in Budapest

https://apnews.com/article/hungary-roman-sarcophagus-discovery-budapest-77a41fe190bbcc167b43d0514...
63•gmays•1d ago•30 comments

FLUX.2: Frontier Visual Intelligence

https://bfl.ai/blog/flux-2
301•meetpateltech•17h ago•84 comments

BebboSSH: SSH2 implementation for Amiga systems (68000, GPLv3)

https://franke.ms/git/bebbo/bebbossh
28•snvzz•7h ago•5 comments

Google Antigravity exfiltrates data via indirect prompt injection attack

https://www.promptarmor.com/resources/google-antigravity-exfiltrates-data
659•jjmaxwell4•15h ago•176 comments

Ilya Sutskever: We're moving from the age of scaling to the age of research

https://www.dwarkesh.com/p/ilya-sutskever-2
309•piotrgrabowski•16h ago•243 comments

Python is not a great language for data science

https://blog.genesmindsmachines.com/p/python-is-not-a-great-language-for
229•speckx•16h ago•217 comments

The Bughouse Effect

https://tsvibt.blogspot.com/2025/11/the-bughouse-effect.html
35•surprisetalk•13h ago•8 comments

The fall of Labubus and the mush of modern internet trends

https://www.michigandaily.com/arts/digital-culture/the-fall-of-labubus-and-the-mush-of-modern-int...
81•gnabgib•2d ago•117 comments

Someone at YouTube Needs Glasses: The Prophecy Has Been Fulfilled

https://jayd.ml/2025/11/10/someone-at-youtube-needs-glasses-prophecy-fulfilled.html
611•jaydenmilne•11h ago•413 comments

Constant-time support coming to LLVM: Protecting cryptographic code

https://blog.trailofbits.com/2025/11/25/constant-time-support-coming-to-llvm-protecting-cryptogra...
76•ahlCVA•20h ago•25 comments

Marble Springs (1993)

https://www.eastgate.com/MS/Title_184.html
24•prismatic•6d ago•1 comments

Pitch Multiplication (2017)

https://klangnewmusic.weebly.com/direct-sound/pitch-multiplication
6•ofalkaed•3d ago•0 comments

Unifying our mobile and desktop domains

https://techblog.wikimedia.org/2025/11/21/unifying-mobile-and-desktop-domains/
146•todsacerdoti•16h ago•40 comments

Jakarta is now the biggest city in the world

https://www.axios.com/2025/11/24/jakarta-tokyo-worlds-biggest-city-population
322•skx001•1d ago•240 comments

Reinventing how .NET builds and ships (again)

https://devblogs.microsoft.com/dotnet/reinventing-how-dotnet-builds-and-ships-again/
167•IcyWindows•10h ago•80 comments

Space: 1999 – Special Effects Techniques

https://catacombs.space1999.net/main/pguide/upsfx.html
39•exvi•8h ago•11 comments

Notes on the Troubleshooting and Repair of Computer and Video Monitors

https://www.repairfaq.org/sam/monfaq.htm
44•WorldPeas•10h ago•11 comments