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•9mo 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.

Defeating a 40-year-old copy protection dongle

https://dmitrybrant.com/2026/02/01/defeating-a-40-year-old-copy-protection-dongle
158•zdw•2h ago•30 comments

We (As a Society) Peaked in the 90s

https://chris.pagecord.com/we-as-a-society-peaked-in-the-90s
27•stog•1h ago•26 comments

Show HN: NanoClaw – “Clawdbot” in 500 lines of TS with Apple container isolation

https://github.com/gavrielc/nanoclaw
97•jimminyx•1h ago•24 comments

Apple I Advertisement (1976)

http://apple1.chez.com/Apple1project/Gallery/Gallery.htm
165•janandonly•6h ago•105 comments

My thousand dollar iPhone can't do math

https://journal.rafaelcosta.me/my-thousand-dollar-iphone-cant-do-math/
86•rafaelcosta•3h ago•39 comments

Adventure Game Studio: OSS software for creating adventure games

https://www.adventuregamestudio.co.uk/
252•doener•10h ago•46 comments

Netbird – Open Source Zero Trust Networking

https://netbird.io/
628•l1am0•14h ago•239 comments

Kiki – The accountability monster for people who are easily distracted

https://www.kiki.computer/
34•pikseladam•3h ago•35 comments

Efficient String Compression for Modern Database Systems

https://cedardb.com/blog/string_compression/
67•jandrewrogers•2d ago•8 comments

I taught my neighbor to keep the volume down

https://idiallo.com/blog/teaching-my-neighbor-to-keep-the-volume-down
465•firefoxd•5h ago•178 comments

Typechecking is undecidable when 'type' is a type (1989) [pdf]

https://dspace.mit.edu/bitstream/handle/1721.1/149366/MIT-LCS-TR-458.pdf?sequence=6
48•zem•2d ago•21 comments

Troublemaker: The fierce, unruly life of Jessica Mitford

https://www.lrb.co.uk/the-paper/v48/n02/rosemary-hill/one-of-the-worst-things
5•against•4d ago•1 comments

What I learned building an opinionated and minimal coding agent

https://mariozechner.at/posts/2025-11-30-pi-coding-agent/
341•SatvikBeri•14h ago•142 comments

Founding is a snowball

https://blog.bawolf.com/p/founding-is-a-snowball
16•bryantwolf•3d ago•2 comments

MicroPythonOS graphical operating system delivers Android-like user experience

https://www.cnx-software.com/2026/01/29/micropythonos-graphical-operating-system-delivers-android...
166•mikece•3d ago•50 comments

Clearspace (YC W23) Is Hiring an Applied Researcher (ML)

https://www.ycombinator.com/companies/clearspace/jobs/GOWiDwp-research-engineer-at-clearspace
1•anteloper•5h ago

TIL: Apple Broke Time Machine Again on Tahoe

https://taoofmac.com/space/til/2026/02/01/1630
161•rcarmo•4h ago•87 comments

Treasures found on HS2 route stored in secret warehouse

https://www.bbc.com/news/articles/c93v21q5xdvo
6•breve•2h ago•0 comments

A Collection of Awesome Nostr Projects

https://github.com/aljazceru/awesome-nostr
9•nout•3h ago•0 comments

Reliable 25 Gigabit Ethernet via Thunderbolt

https://kohlschuetter.github.io/blog/posts/2026/01/27/tb25/
196•kohlschuetter•5d ago•100 comments

MRI scans show exercise can make the brain look younger

https://www.sciencedaily.com/releases/2026/01/260121034130.htm
46•amichail•2h ago•3 comments

Show HN: ÆTHRA – Writing Music as Code

56•CzaxTanmay•2d ago•13 comments

Amiga Unix (Amix)

https://www.amigaunix.com/doku.php/home
107•donatj•13h ago•37 comments

Towards a science of scaling agent systems: When and why agent systems work

https://research.google/blog/towards-a-science-of-scaling-agent-systems-when-and-why-agent-system...
36•gmays•6h ago•15 comments

FOSDEM 2026 – Open-Source Conference in Brussels – Day#1 Recap

https://gyptazy.com/blog/fosdem-2026-opensource-conference-brussels/
175•yannick2k•13h ago•105 comments

1-Click RCE to steal your Moltbot data and keys

https://depthfirst.com/post/1-click-rce-to-steal-your-moltbot-data-and-keys
140•arwt•4h ago•60 comments

The Book of PF, 4th edition

https://nostarch.com/book-of-pf-4th-edition
196•0x54MUR41•16h ago•38 comments

Margin Call

https://asymco.com/2026/02/01/margin-call-3/
123•zdw•2h ago•64 comments

English professors double down on requiring printed copies of readings

https://yaledailynews.com/articles/english-professors-double-down-on-requiring-printed-copies-of-...
102•cmsefton•8h ago•143 comments

VisualJJ – Jujutsu in Visual Studio Code

https://www.visualjj.com/
147•demail•4d ago•60 comments