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.

Sergey Brin's Unretirement

https://www.inc.com/jessica-stillman/google-co-founder-sergey-brins-unretirement-is-a-lesson-for-...
41•iancmceachern•5d ago•22 comments

The creator of Claude Code's Claude setup

https://twitter.com/bcherny/status/2007179832300581177
43•KothuRoti•4d ago•11 comments

Microsoft probably killed my Snapdragon Dev Kit

https://jasoneckert.github.io/myblog/how-microsoft-killed-my-snapdragon-devkit/
89•jasoneckert•2h ago•52 comments

On the slow death of scaling

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5877662
25•sethbannon•1h ago•4 comments

Stop Doom Scrolling, Start Doom Coding: Build via the terminal from your phone

https://github.com/rberg27/doom-coding
343•rbergamini27•9h ago•247 comments

A 30B Qwen model walks into a Raspberry Pi and runs in real time

https://byteshape.com/blogs/Qwen3-30B-A3B-Instruct-2507/
170•dataminer•8h ago•49 comments

Opus 4.5 is not the normal AI agent experience that I have had thus far

https://burkeholland.github.io/posts/opus-4-5-change-everything/
424•tbassetto•11h ago•582 comments

Electronic nose for indoor mold detection and identification

https://advanced.onlinelibrary.wiley.com/doi/10.1002/adsr.202500124
48•PaulHoule•4h ago•34 comments

Oral microbiome sequencing after taking probiotics

https://blog.booleanbiotech.com/oral-microbiome-biogaia
111•sethbannon•7h ago•49 comments

Show HN: SMTP Tunnel – A SOCKS5 proxy disguised as email traffic to bypass DPI

https://github.com/x011/smtp-tunnel-proxy
11•lobito25•4h ago•3 comments

Show HN: VaultSandbox – Test your real MailGun/SES/etc. integration

https://vaultsandbox.com/
9•vaultsandbox•15h ago•0 comments

We recreated Steve Jobs's 1975 Atari horoscope program

https://blog.adafruit.com/2026/01/06/we-recreated-steve-jobss-1975-atari-horoscope-program-and-yo...
35•ptorrone•4h ago•3 comments

Vietnam bans unskippable ads

https://saigoneer.com/vietnam-news/28652-vienam-bans-unskippable-ads,-requires-skip-button-to-app...
1178•hoherd•12h ago•625 comments

CES 2026: Taking the Lids Off AMD's Venice and MI400 SoCs

https://chipsandcheese.com/p/ces-2026-taking-the-lids-off-amds
81•rbanffy•7h ago•47 comments

Two ways to crack a walnut, per Grothendieck (2025)

https://shreevatsa.net/post/grothendieck-approaches/
10•ethanseal•2d ago•2 comments

Show HN: Make audio loops online

https://makeloops.online/
14•bilalba•1d ago•4 comments

Calling All Hackers: How money works (2024)

https://phrack.org/issues/71/17
190•krrishd•8h ago•123 comments

Comparing AI agents to cybersecurity professionals in real-world pen testing

https://arxiv.org/abs/2512.09882
78•littlexsparkee•7h ago•52 comments

Launch HN: Tamarind Bio (YC W24) – AI Inference Provider for Drug Discovery

57•denizkavi•11h ago•16 comments

I wanted a camera that doesn't exist, so I built it

https://medium.com/@cristi.baluta/i-wanted-a-camera-that-doesnt-exist-so-i-built-it-5f9864533eb7
301•cyrc•4d ago•97 comments

Laylo (YC S20) – Head of Growth (Organic and Partners and Loops and AI) – Remote US

https://www.ycombinator.com/companies/laylo/jobs/ZtLHRXe-head-of-growth
1•amellin794•7h ago

One Hundred Years of Gossip

https://www.plough.com/en/topics/community/one-hundred-years-of-gossip
8•lermontov•2d ago•1 comments

The Manifold Mind of Saul Bellow

https://www.metropolitanreview.org/p/the-manifold-mind-of-saul-bellow
9•samclemens•2d ago•0 comments

High-Performance DBMSs with io_uring: When and How to use it

https://arxiv.org/abs/2512.04859
104•matt_d•9h ago•22 comments

Locating a Photo of a Vehicle in 30 Seconds with GeoSpy

https://geospy.ai/blog/locating-a-photo-of-a-vehicle-in-30-seconds-with-geospy
106•kachapopopow•10h ago•97 comments

PassSeeds – hijacking Passkeys to unlock new cryptographic use cases

https://backalleycoder.com/posts/passseeds-an-experiment-in-hijacking-passkeys-to-unlock-cryptogr...
32•csuwldcat•4h ago•25 comments

Hyundai Introduces Its Next-Gen Atlas Robot at CES 2026 [video]

https://www.youtube.com/watch?v=9e0SQn9uUlw
101•surprisetalk•5h ago•73 comments

The Oddest Couple in American Literature: Part II

https://airmail.news/issues/2026-1-3/the-oddest-couple-in-american-literature-part-ii
4•prismatic•21h ago•1 comments

Why the trans flag emoji is the 5-codepoint sequence it is

https://hecate.pink/blog/2026/trans-flag-emoji/
106•todsacerdoti•4h ago•38 comments

Passing of Joe Mancuso

https://github.com/MasoniteFramework/masonite/discussions/853
150•wilsonfiifi•10h ago•12 comments