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•9mo ago

Comments

RedShift1•9mo ago
It'll be a cold day in hell before I start throwing away my 80+ "New" notepad++ tabs.
notTooFarGone•9mo 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•9mo 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•9mo 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•9mo 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•9mo 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•9mo 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•9mo 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•9mo 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.

Agent Skills

https://agentskills.io/home
17•mooreds•24m ago•6 comments

What's up with all those equals signs anyway?

https://lars.ingebrigtsen.no/2026/02/02/whats-up-with-all-those-equals-signs-anyway/
289•todsacerdoti•4h ago•95 comments

Decentralizing My Smartphone with Single Purpose Devices

https://ambertherambler.bearblog.dev/decentralizing-my-smartphone-with-single-purpose-devices/
17•speckx•24m ago•3 comments

Floppinux – An Embedded Linux on a Single Floppy, 2025 Edition

https://krzysztofjankowski.com/floppinux/floppinux-2025.html
185•GalaxySnail•10h ago•111 comments

Show HN: Safe-now.live – Ultra-light emergency info site (<10KB)

https://safe-now.live
82•tinuviel•5h ago•16 comments

Ask HN: Is there anyone here who still uses slide rules?

15•blenderob•23m ago•13 comments

The Codex App

https://openai.com/index/introducing-the-codex-app/
734•meetpateltech•20h ago•549 comments

Anki ownership transferred to AnkiHub

https://forums.ankiweb.net/t/ankis-growing-up/68610
476•trms•17h ago•187 comments

KDE's new Plasma Login Manager is tightly bound to systemd

https://forums.FreeBSD.org/threads/kde-plasma-login-manager-wont-support-systemd-free-linux-or-bs...
37•voxadam•1h ago•39 comments

Emerge Career (YC S22) is hiring a product designer

https://www.ycombinator.com/companies/emerge-career/jobs/omqT34S-founding-product-designer
1•gabesaruhashi•2h ago

Banning lead in gas worked. The proof is in our hair

https://attheu.utah.edu/health-medicine/banning-lead-in-gas-worked-the-proof-is-in-our-hair/
126•geox•12h ago•27 comments

LNAI – Define AI coding tool configs once, sync to Claude, Cursor, Codex, etc.

https://github.com/KrystianJonca/lnai
43•iamkrystian17•5h ago•20 comments

Todd C. Miller – Sudo maintainer for over 30 years

https://www.millert.dev/
527•wodniok•21h ago•267 comments

How does misalignment scale with model intelligence and task complexity?

https://alignment.anthropic.com/2026/hot-mess-of-ai/
214•salkahfi•14h ago•66 comments

GitHub experience various partial-outages/degradations

https://www.githubstatus.com?todayis=2026-02-02
236•bhouston•17h ago•85 comments

See how many words you have written in Hacker News comments

https://serjaimelannister.github.io/hn-words/
103•Imustaskforhelp•3d ago•160 comments

Show HN: Minikv – Distributed key-value and object store in Rust (Raft, S3 API)

https://github.com/whispem/minikv
47•whispem•6h ago•17 comments

Ask HN: Who is hiring? (February 2026)

287•whoishiring•22h ago•362 comments

The Connection Machine CM-1 "Feynman" T-shirt

https://tamikothiel.com/cm/cm-tshirt.html
99•tosh•4d ago•24 comments

xAI joins SpaceX

https://www.spacex.com/updates#xai-joins-spacex
784•g-mork•16h ago•1739 comments

Archive.today is directing a DDoS attack against my blog?

https://gyrovague.com/2026/02/01/archive-today-is-directing-a-ddos-attack-against-my-blog/
229•gyrovague-com•2d ago•104 comments

4x faster network file sync with rclone (vs rsync) (2025)

https://www.jeffgeerling.com/blog/2025/4x-faster-network-file-sync-rclone-vs-rsync/
340•indigodaddy•4d ago•150 comments

Hacking Moltbook

https://www.wiz.io/blog/exposed-moltbook-database-reveals-millions-of-api-keys
359•galnagli•22h ago•217 comments

The TSA's New $45 Fee to Fly Without ID Is Illegal

https://www.frommers.com/tips/airfare/the-tsa-new-45-fee-to-fly-without-id-is-illegal-says-regula...
509•donohoe•15h ago•572 comments

Linux From Scratch ends SysVinit support

https://lists.linuxfromscratch.org/sympa/arc/lfs-announce/2026-02/msg00000.html
198•cf100clunk•20h ago•278 comments

Carnegie Mellon Unversity Computer Club FTP Server

http://128.237.157.9/pub/
108•1vuio0pswjnm7•5d ago•22 comments

Zig Libc

https://ziglang.org/devlog/2026/#2026-01-31
316•ingve•21h ago•131 comments

Why The Jetsons still matters (2012)

https://www.smithsonianmag.com/history/50-years-of-the-jetsons-why-the-show-still-matters-43459669/
28•fortran77•4d ago•11 comments

Pretty soon, heat pumps will be able to store and distribute heat as needed

https://www.sintef.no/en/latest-news/2026/pretty-soon-heat-pumps-will-be-able-to-store-and-distri...
239•PaulHoule•1d ago•198 comments

Nano-vLLM: How a vLLM-style inference engine works

https://neutree.ai/blog/nano-vllm-part-1
265•yz-yu•1d ago•26 comments