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.

Make.ts

https://matklad.github.io/2026/01/27/make-ts.html
69•ingve•3h ago•37 comments

There's only one Woz, but we can all learn from him

https://www.fastcompany.com/91477114/steve-wozniak-woz-apple-the-tech-interactive-humanitarian-award
106•coloneltcb•4d ago•38 comments

SVG Path Editor

https://yqnn.github.io/svg-path-editor/
85•gurjeet•5d ago•7 comments

Prism

https://openai.com/index/introducing-prism
655•meetpateltech•16h ago•379 comments

A few random notes from Claude coding quite a bit last few weeks

https://twitter.com/karpathy/status/2015883857489522876
630•bigwheels•1d ago•510 comments

Rust at Scale: An Added Layer of Security for WhatsApp

https://engineering.fb.com/2026/01/27/security/rust-at-scale-security-whatsapp/
40•ubj•4h ago•4 comments

Thirty Years of the Square Kilometre Array

https://physicsworld.com/a/thirty-years-of-the-square-kilometre-array-heres-what-the-worlds-large...
12•mooreds•2d ago•0 comments

Golden Ratio using an equilateral triangle inscribed in a circle

https://geometrycode.com/free/how-to-graphically-derive-the-golden-ratio-using-an-equilateral-tri...
79•peter_d_sherman•4d ago•21 comments

430k-year-old well-preserved wooden tools are the oldest ever found

https://www.nytimes.com/2026/01/26/science/archaeology-neanderthals-tools.html
424•bookofjoe•18h ago•222 comments

Rust’s Standard Library on the GPU

https://www.vectorware.com/blog/rust-std-on-gpu/
180•justaboutanyone•4d ago•29 comments

Parametric CAD in Rust

https://campedersen.com/vcad
170•ecto•14h ago•113 comments

ASML firing 1700 people, mostly managers

https://www.dutchnews.nl/2026/01/after-record-year-asml-is-to-cut-1700-jobs-mainly-in-nl/
202•dep_b•2h ago•167 comments

Pandas 3.0

https://pandas.pydata.org/community/blog/pandas-3.0.html
22•jonbaer•4d ago•0 comments

Doing the thing is doing the thing

https://www.softwaredesign.ing/blog/doing-the-thing-is-doing-the-thing
400•prakhar897•1d ago•128 comments

Lennart Poettering, Christian Brauner founded a new company

https://amutable.com/about
301•hornedhob•15h ago•441 comments

Xfwl4 – The Roadmap for a Xfce Wayland Compositor

https://alexxcons.github.io/blogpost_15.html
321•pantalaimon•21h ago•242 comments

Time Station Emulator

https://github.com/kangtastic/timestation
176•FriedPickles•14h ago•42 comments

Amazon closing its Fresh and Go stores

https://finance.yahoo.com/news/amazon-closing-fresh-grocery-convenience-150437789.html
237•trenning•19h ago•446 comments

AI2: Open Coding Agents

https://allenai.org/blog/open-coding-agents
194•publicmatt•17h ago•30 comments

Show HN: One Human + One Agent = One Browser From Scratch in 20K LOC

https://emsh.cat/one-human-one-agent-one-browser/
247•embedding-shape•21h ago•114 comments

FBI is investigating Minnesota Signal chats tracking ICE

https://www.nbcnews.com/tech/internet/fbi-investigating-minnesota-signal-minneapolis-group-ice-pa...
760•duxup•17h ago•1034 comments

SoundCloud Data Breach Now on HaveIBeenPwned

https://haveibeenpwned.com/Breach/SoundCloud
179•gnabgib•17h ago•94 comments

I found the perfect yearly calendar (for me)

https://blog.notmyhostna.me/posts/i-found-the-perfect-yearly-calendar-for-me
66•dewey•4d ago•25 comments

Notes on starting to use Django

https://jvns.ca/blog/2026/01/27/some-notes-on-starting-to-use-django/
92•ingve•11h ago•37 comments

Extremophile molds are invading art museums

https://www.scientificamerican.com/article/how-extremophile-molds-are-destroying-museum-artifacts/
108•sohkamyung•4d ago•51 comments

AISLE’s autonomous analyzer found all CVEs in the January OpenSSL release

https://aisle.com/blog/aisle-discovered-12-out-of-12-openssl-vulnerabilities
162•mmsc•9h ago•118 comments

Show HN: LemonSlice – Upgrade your voice agents to real-time video

97•lcolucci•16h ago•99 comments

Bridging the Gap Between PLECS and SPICE

https://erickschulz.dev/posts/plecs-spice/
38•eschu•2d ago•15 comments

Try text scaling support in Chrome Canary

https://www.joshtumath.uk/posts/2026-01-27-try-text-scaling-support-in-chrome-canary/
103•linolevan•15h ago•35 comments

The Texas Instruments CC-40 invades Gopherspace (plus TI-74 BASICALC)

http://oldvcr.blogspot.com/2025/12/the-texas-instruments-cc-40-invades.html
20•PaulHoule•5d ago•1 comments