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

Comments

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

DeepSeek-v3.2: Pushing the frontier of open large language models [pdf]

https://huggingface.co/deepseek-ai/DeepSeek-V3.2/resolve/main/assets/paper.pdf
390•pretext•6h ago•164 comments

How to Attend Meetings – Internal guidelines from the New York Times

https://docs.google.com/presentation/d/1l7s1aAsNPlNhSye8OsMqmH6pMR32OYGGdLT6VKyFaQE/edit#slide=id.p
97•spagoop•1h ago•41 comments

India orders smartphone makers to preload state-owned cyber safety app

https://www.reuters.com/sustainability/boards-policy-regulation/india-orders-mobile-phones-preloa...
320•jmsflknr•15h ago•187 comments

Amazon faces FAA probe after delivery drone snaps internet cable in Texas

https://www.cnbc.com/2025/11/25/amazon-faa-probe-delivery-drone-incident-texas.html
36•jonathanzufi•5d ago•16 comments

Ghostty compiled to WASM with xterm.js API compatibility

https://github.com/coder/ghostty-web
159•kylecarbs•4h ago•41 comments

Ask HN: Who is hiring? (December 2025)

186•whoishiring•6h ago•238 comments

Why xor eax, eax?

https://xania.org/202512/01-xor-eax-eax
430•hasheddan•9h ago•165 comments

Cartographers Have Been Hiding Covert Illustrations Inside of Switzerland's Maps

https://eyeondesign.aiga.org/for-decades-cartographers-have-been-hiding-covert-illustrations-insi...
220•mhb•8h ago•43 comments

Instagram chief orders staff back to the office five days a week in 2026

https://www.businessinsider.com/instagram-chief-adam-mosseri-announces-five-day-office-return-202...
80•mfiguiere•1h ago•56 comments

Sycophancy is the first LLM "dark pattern"

https://www.seangoedecke.com/ai-sycophancy/
68•jxmorris12•1h ago•43 comments

Why Am I Paying $40k for the Birth of My Child?

https://aaronstannard.com/40k-baby/
55•Aaronontheweb•34m ago•4 comments

Durin is a library for reading and writing the Dwarf debugging format

https://github.com/tmcgilchrist/durin
28•mooreds•3h ago•3 comments

Ask HN: Who wants to be hired? (December 2025)

80•whoishiring•6h ago•161 comments

React and Remix Choose Different Futures

https://laconicwit.com/react-and-remix-choose-different-futures/
44•surprisetalk•3h ago•27 comments

ImAnim: Modern animation capabilities to ImGui applications

https://github.com/soufianekhiat/ImAnim
64•klaussilveira•6h ago•22 comments

Pose-free 3D Gaussian splatting via shape-ray estimation

https://arxiv.org/abs/2505.22978
6•PaulHoule•59m ago•0 comments

Better Auth (YC X25) Is Hiring

https://www.ycombinator.com/companies/better-auth/jobs/eKk5nLt-developer-relation-engineer
1•bekacru•5h ago

A vector graphics workstation from the 70s

https://justanotherelectronicsblog.com/?p=1429
126•ibobev•8h ago•30 comments

Mozilla's Latest Quagmire

https://rubenerd.com/mozillas-latest-quagmire/
3•nivethan•35m ago•1 comments

Self-hosting a Matrix server for 5 years

https://yaky.dev/2025-11-30-self-hosting-matrix/
226•the-anarchist•10h ago•102 comments

Lawmakers Want to Ban VPNs–and They Have No Idea What They're Doing

https://www.techdirt.com/2025/12/01/lawmakers-want-to-ban-vpns-and-they-have-no-idea-what-theyre-...
33•speckx•1h ago•7 comments

Games using anti-cheats and their compatibility with GNU/Linux or Wine/Proton

https://areweanticheatyet.com/
249•doener•15h ago•366 comments

Historic Engineering Wonders: Photos That Reveal How They Pulled It Off

https://rarehistoricalphotos.com/engineering-methods-from-the-past/
109•dxs•6d ago•23 comments

Show HN: RFC Hub

https://rfchub.app/
11•tlhunter•5h ago•6 comments

Intel could return to Apple computers in 2027

https://www.theverge.com/news/832366/intel-apple-m-chip-low-end-processor
92•DamnInteresting•3h ago•80 comments

It’s been a very hard year

https://bell.bz/its-been-a-very-hard-year/
357•surprisetalk•16h ago•440 comments

Ancestry and the NRS: when the corporate genealogy world turns ugly

http://scottishgenes.blogspot.com/2025/09/ancestry-and-nrs-when-corporate.html
6•ilamont•4d ago•1 comments

Langjam Gamejam: Build a programming language then make a game with it

https://langjamgamejam.com/
117•birdculture•1d ago•53 comments

Google unkills JPEG XL?

https://tonisagrista.com/blog/2025/google-unkills-jpegxl/
199•speckx•6h ago•178 comments

The Penicillin Myth

https://www.asimov.press/p/penicillin-myth
122•surprisetalk•8h ago•65 comments