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.

How to Code Claude Code in 200 Lines of Code

https://www.mihaileric.com/The-Emperor-Has-No-Clothes/
145•nutellalover•2h ago•95 comments

Sopro TTS: A 169M model with zero-shot voice cloning that runs on the CPU

https://github.com/samuel-vitorino/sopro
48•sammyyyyyyy•1h ago•13 comments

Bose is open-sourcing its old smart speakers instead of bricking them

https://www.theverge.com/news/858501/bose-soundtouch-smart-speakers-open-source
1862•rayrey•7h ago•280 comments

The Unreasonable Effectiveness of the Fourier Transform

https://joshuawise.com/resources/ofdm/
84•voxadam•3h ago•32 comments

SQL Studio

https://sql.studio/
37•handfuloflight•1h ago•15 comments

Google AI Studio is now sponsoring Tailwind CSS

https://twitter.com/OfficialLoganK/status/2009339263251566902
305•qwertyforce•3h ago•105 comments

The Jeff Dean Facts

https://github.com/LRitzdorf/TheJeffDeanFacts
342•ravenical•9h ago•129 comments

Fixing a Buffer Overflow in Unix v4 Like It's 1973

https://sigma-star.at/blog/2025/12/unix-v4-buffer-overflow/
58•vzaliva•3h ago•14 comments

Mux (YC W16) is hiring a platform engineer that cares about (internal) DX

https://www.mux.com/jobs
1•mmcclure•1h ago

AI coding assistants are getting worse?

https://spectrum.ieee.org/ai-coding-degrades
153•voxadam•7h ago•190 comments

Ushikuvirus: Newly discovered virus may offer clues to the origin of eukaryotes

https://www.tus.ac.jp/en/mediarelations/archive/20251219_9539.html
45•rustoo•17h ago•11 comments

Show HN: macOS menu bar app to track Claude usage in real time

https://github.com/richhickson/claudecodeusage
46•RichHickson•3h ago•16 comments

Digital Red Queen: Adversarial Program Evolution in Core War with LLMs

https://sakana.ai/drq/
70•hardmaru•6h ago•6 comments

Task-free intelligence testing of LLMs

https://www.marble.onl/posts/tapping/index.html
25•amarble•2h ago•4 comments

PgX – Debug Postgres performance in the context of your application code

https://docs.base14.io/blog/introducing-pgx/
8•rshetty•1d ago•3 comments

IBM AI ('Bob') Downloads and Executes Malware

https://www.promptarmor.com/resources/ibm-ai-(-bob-)-downloads-and-executes-malware
212•takira•4h ago•100 comments

Show HN: A geofence-based social network app 6 years in development

https://www.localvideoapp.com
5•Adrian-ChatLocl•1h ago•1 comments

Lights and Shadows (2020)

https://ciechanow.ski/lights-and-shadows/
212•kg•6d ago•30 comments

I used Lego to design a farm for people who are blind – like me

https://www.bbc.co.uk/news/articles/c4g4zlyqnr0o
87•ColinWright•3d ago•25 comments

Intellectual Junkyards

https://www.forester-notes.org/QHXS/index.xml
23•ysangkok•3d ago•6 comments

Making Magic Leap past Nvidia's secure bootchain and breaking Tesla Autopilots

https://fahrplan.events.ccc.de/congress/2025/fahrplan/event/making-the-magic-leap-past-nvidia-s-s...
4•rguiscard•1w ago•0 comments

Project Patchouli: Open-source electromagnetic drawing tablet hardware

https://patchouli.readthedocs.io/en/latest/
409•ffin•17h ago•47 comments

Support for the TSO memory model on Arm CPUs (2024)

https://lwn.net/Articles/970907/
10•weinzierl•1h ago•5 comments

A closer look at a BGP anomaly in Venezuela

https://blog.cloudflare.com/bgp-route-leak-venezuela/
360•ChrisArchitect•15h ago•189 comments

Iran Goes Into IPv6 Blackout

https://radar.cloudflare.com/routing/ir
334•honeycrispy•6h ago•248 comments

Richard D. James aka Aphex Twin speaks to Tatsuya Takahashi

https://web.archive.org/web/20180719052026/http://item.warp.net/interview/aphex-twin-speaks-to-ta...
8•lelandfe•1h ago•6 comments

Texas court blocks Samsung from tracking TV viewing, then vacates order

https://www.bleepingcomputer.com/news/security/texas-court-blocks-samsung-from-tracking-tv-viewin...
34•speckx•1h ago•9 comments

Dell admits consumers don't care about AI PCs

https://www.pcgamer.com/hardware/dells-ces-2026-chat-was-the-most-pleasingly-un-ai-briefing-ive-h...
326•mossTechnician•1d ago•241 comments

Open Infrastructure Map

https://openinframap.org
404•efskap•18h ago•90 comments

Memoir by Steve Jobs’ eldest daughter describes ways he was cruel to her (2018)

https://finance.yahoo.com/news/memoir-steve-jobs-apos-daughter-133000491.html
29•rendx•1h ago•20 comments