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

Claude Cowork Exfiltrates Files

https://www.promptarmor.com/resources/claude-cowork-exfiltrates-files
268•takira•2h ago•127 comments

Scaling long-running autonomous coding

https://cursor.com/blog/scaling-agents
33•samwillis•44m ago•15 comments

Sun Position Calculator

https://drajmarsh.bitbucket.io/earthsun.html
31•sanbor•1h ago•6 comments

Show HN: WebTiles – create a tiny 250x250 website with neighbors around you

https://webtiles.kicya.net/
77•dimden•4d ago•11 comments

The State of OpenSSL for pyca/cryptography

https://cryptography.io/en/latest/statements/state-of-openssl/
22•SGran•58m ago•3 comments

Ask HN: Share your personal website

319•susam•5h ago•1082 comments

Why some clothes shrink in the wash and how to unshrink them

https://www.swinburne.edu.au/news/2025/08/why-some-clothes-shrink-in-the-wash-and-how-to-unshrink...
389•OptionOfT•3d ago•215 comments

Roam 50GB is now Roam 100GB

https://starlink.com/support/article/58c9c8b7-474e-246f-7e3c-06db3221d34d
223•bahmboo•6h ago•241 comments

SparkFun Officially Dropping AdaFruit due to CoC Violation

https://www.sparkfun.com/official-response
333•yaleman•8h ago•329 comments

Show HN: Webctl – Browser automation for agents based on CLI instead of MCP

https://github.com/cosinusalpha/webctl
45•cosinusalpha•8h ago•6 comments

Native ZFS VDEV for Object Storage (OpenZFS Summit)

https://www.zettalane.com/blog/openzfs-summit-2025-mayanas-objbacker.html
50•suprasam•4h ago•8 comments

Find a pub that needs you

https://www.ismypubfucked.com/
167•thinkingemote•7h ago•125 comments

I hate GitHub Actions with passion

https://xlii.space/eng/i-hate-github-actions-with-passion/
375•xlii•12h ago•285 comments

Ford F-150 Lightning outsold the Cybertruck and was then canceled for poor sales

https://electrek.co/2026/01/13/ford-f150-lightning-outsold-tesla-cybertruck-canceled-not-selling-...
342•MBCook•5h ago•443 comments

Ask HN: How do you safely give LLMs SSH/DB access?

35•nico•3h ago•63 comments

The Influentists: AI hype without proof

https://carette.xyz/posts/influentists/
159•LucidLynx•2h ago•93 comments

So, you’ve hit an age gate. What now?

https://www.eff.org/deeplinks/2026/01/so-youve-hit-age-gate-what-now
268•hn_acker•5h ago•224 comments

Ski map artist James Niehues, the 'Monet of the mountains' (2021)

https://adventure.com/ski-map-artist-james-niehues/
92•gyomu•4d ago•7 comments

Show HN: Digital Carrot – Block social media with programmable rules and goals

https://www.digitalcarrot.app/
28•newswangerd•7h ago•10 comments

You Can Just Buy Far-UVC

https://www.jefftk.com/p/you-can-just-buy-far-uvc
50•surprisetalk•4d ago•67 comments

Generate QR Codes with Pure SQL in PostgreSQL

https://tanelpoder.com/posts/generate-qr-code-with-pure-sql-in-postgres/
4•tanelpoder•4d ago•0 comments

Every country should set 16 as the minimum age for social media accounts

https://www.afterbabel.com/p/why-every-country-should-set-16
81•paulpauper•3h ago•113 comments

GitHub should charge everyone $1 more per month to fund open source

https://blog.greg.technology/2025/11/27/github-should-charge-1-dollar-more-per-month.html
184•evakhoury•6h ago•172 comments

Show HN: Harmony – AI notetaker for Discord

https://harmonynotetaker.ai/
23•SeanDorje•3h ago•7 comments

I’m leaving Redis for SolidQueue

https://www.simplethread.com/redis-solidqueue/
290•amalinovic•13h ago•122 comments

Is Rust faster than C?

https://steveklabnik.com/writing/is-rust-faster-than-c/
190•vincentchau•4d ago•229 comments

Lago (Open-Source Billing) is hiring across teams and geos

1•Rafsark•10h ago

How much of my observability data is waste?

https://usetero.com/blog/the-question-your-observability-vendor-wont-answer
90•binarylogic•6h ago•45 comments

Edge of Emulation: Game Boy Sewing Machines (2020)

https://shonumi.github.io/articles/art22.html
103•mosura•8h ago•6 comments

Show HN: A 10KiB kernel for cloud apps

https://github.com/ReturnInfinity/BareMetal-Cloud
57•ianseyler•6h ago•8 comments