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.

East Germany balloon escape

https://en.wikipedia.org/wiki/East_Germany_balloon_escape
387•robertvc•12h ago•134 comments

Cloudflare acquires Astro

https://astro.build/blog/joining-cloudflare/
762•todotask2•14h ago•342 comments

FLUX.2 [Klein]: Towards Interactive Visual Intelligence

https://bfl.ai/blog/flux2-klein-towards-interactive-visual-intelligence
72•GaggiX•5h ago•23 comments

High-Level Is the Goal

https://bvisness.me/high-level/
54•tobr•1d ago•10 comments

6-Day and IP Address Certificates Are Generally Available

https://letsencrypt.org/2026/01/15/6day-and-ip-general-availability
370•jaas•13h ago•220 comments

Cursor's latest “browser experiment” implied success without evidence

https://embedding-shapes.github.io/cursor-implied-success-without-evidence/
465•embedding-shape•14h ago•191 comments

LLM Structured Outputs Handbook

https://nanonets.com/cookbooks/structured-llm-outputs
169•vitaelabitur•1d ago•32 comments

Michelangelo's first painting, created when he was 12 or 13

https://www.openculture.com/2026/01/discover-michelangelos-first-painting.html
332•bookofjoe•15h ago•163 comments

IKEA for Software

https://tommaso-girotto.co/blog/an-ikea-for-software
27•tgirotto•4d ago•6 comments

Beebo, a wave simulator written in C

https://git.sr.ht/~willowf/beebo/
11•anon25783•2d ago•0 comments

Releasing rainbow tables to accelerate Net-NTLMv1 protocol deprecation

https://cloud.google.com/blog/topics/threat-intelligence/net-ntlmv1-deprecation-rainbow-tables
101•linolevan•7h ago•61 comments

Lock-Picking Robot

https://github.com/etinaude/Lock-Picking-Robot
285•p44v9n•4d ago•123 comments

Experts Warn of Growing Parrot Crisis in Canada

https://www.ctvnews.ca/ottawa/video/2026/01/06/experts-warn-of-growing-parrot-crisis-in-canada/
28•debo_•4d ago•8 comments

Dell UltraSharp 52 Thunderbolt Hub Monitor

https://www.dell.com/en-us/shop/dell-ultrasharp-52-thunderbolt-hub-monitor-u5226kw/apd/210-bthw/m...
176•cebert•12h ago•237 comments

Local-only Marstek Venus e-battery integration with Home Assistant

https://du.nkel.dev/blog/2026-01-11_marstek-battery-homeassistant/
9•Helmut10001•22h ago•0 comments

STFU

https://github.com/Pankajtanwarbanna/stfu
733•tanelpoder•11h ago•476 comments

Install.md: A standard for LLM-executable installation

https://www.mintlify.com/blog/install-md-standard-for-llm-executable-installation
50•npmipg•7h ago•68 comments

Why DuckDB is my first choice for data processing

https://www.robinlinacre.com/recommend_duckdb/
245•tosh•18h ago•89 comments

Patching the Wii News Channel to serve local news (2025)

https://raulnegron.me/2025/wii-news-pr/
73•todsacerdoti•16h ago•18 comments

Keifu – A TUI for navigating commit graphs with color and clarity

https://github.com/trasta298/keifu
20•indigodaddy•4h ago•5 comments

Reading across books with Claude Code

https://pieterma.es/syntopic-reading-claude/
80•gmays•10h ago•22 comments

Crypto grifters are recruiting open-source AI developers

https://www.seangoedecke.com/gas-and-ralph/
48•lalitmaganti•2h ago•13 comments

HTTP RateLimit Headers

https://dotat.at/@/2026-01-13-http-ratelimit.html
45•zdw•2d ago•13 comments

The five orders of ignorance (2000)

https://cacm.acm.org/opinion/the-five-orders-of-ignorance/
40•svilen_dobrev•4d ago•14 comments

Emoji Use in the Electronic Health Record is Increasing

https://jamanetwork.com/journals/jamanetworkopen/fullarticle/2843883
67•giuliomagnifico•11h ago•63 comments

Elasticsearch was never a database

https://www.paradedb.com/blog/elasticsearch-was-never-a-database
116•jamesgresql•5d ago•83 comments

Drone Hacking Part 1: Dumping Firmware and Bruteforcing ECC

https://neodyme.io/en/blog/drone_hacking_part_1/
5•tripdout•2h ago•0 comments

Dev-owned testing: Why it fails in practice and succeeds in theory

https://dl.acm.org/doi/10.1145/3780063.3780066
120•rbanffy•15h ago•147 comments

A Calif. teen trusted ChatGPT's drug advice. He died from an overdose

https://www.sfgate.com/tech/article/calif-teen-chatgpt-drug-advice-fatal-overdose-21266718.php
15•freediver•1h ago•4 comments

Zep AI (Agent Context Engineering, YC W24) Is Hiring Forward Deployed Engineers

https://www.ycombinator.com/companies/zep-ai/jobs/
1•roseway4•12h ago