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

Comments

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

AI will make formal verification go mainstream

https://martin.kleppmann.com/2025/12/08/ai-formal-verification.html
228•evankhoury•2h ago•118 comments

alpr.watch

https://alpr.watch/
574•theamk•7h ago•291 comments

No Graphics API

https://www.sebastianaaltonen.com/blog/no-graphics-api
346•ryandrake•4h ago•60 comments

Ty: A fast Python type checker and LSP

https://astral.sh/blog/ty
211•gavide•3h ago•42 comments

GPT Image 1.5

https://openai.com/index/new-chatgpt-images-is-here/
280•charlierguo•5h ago•140 comments

No AI* Here – A Response to Mozilla's Next Chapter

https://www.waterfox.com/blog/no-ai-here-response-to-mozilla/
34•MrAlex94•1h ago•25 comments

40 percent of fMRI signals do not correspond to actual brain activity

https://www.tum.de/en/news-and-events/all-news/press-releases/details/40-percent-of-mri-signals-d...
381•geox•10h ago•161 comments

Mozilla appoints new CEO Anthony Enzor-Demeo

https://blog.mozilla.org/en/mozilla/leadership/mozillas-next-chapter-anthony-enzor-demeo-new-ceo/
400•recvonline•10h ago•603 comments

MIT professor shot at his Massachusetts home dies

https://www.bbc.com/news/articles/cly08y25688o
133•mosura•2h ago•60 comments

Midjourney is alemwjsl

https://www.aadillpickle.com/blog/midjourney-is-alemwjsl
13•aadillpickle•5d ago•4 comments

Thin desires are eating life

https://www.joanwestenberg.com/thin-desires-are-eating-your-life/
286•mitchbob•23h ago•111 comments

Dafny: Verification-Aware Programming Language

https://dafny.org/
8•handfuloflight•1h ago•1 comments

Chat-tails: Throwback terminal chat, built on Tailscale

https://tailscale.com/blog/chat-tails-terminal-chat
37•nulbyte•2h ago•9 comments

I ported JustHTML from Python to JavaScript with Codex CLI and GPT-5.2 in hours

https://simonwillison.net/2025/Dec/15/porting-justhtml/
11•pbowyer•1h ago•0 comments

Americans overestimate how many social media users post harmful content

https://academic.oup.com/pnasnexus/article/4/12/pgaf310/8377954?login=false
8•bikenaga•37m ago•6 comments

Writing a blatant Telegram clone using Qt, QML and Rust. And C++

https://kemble.net/blog/provoke/
74•tempodox•8h ago•41 comments

The World Happiness Report is beset with methodological problems

https://yaschamounk.substack.com/p/the-world-happiness-report-is-a-sham
82•thatoneengineer•23h ago•96 comments

Japan to revise romanization rules for first time in 70 years

https://www.japantimes.co.jp/news/2025/08/21/japan/panel-hepburn-style-romanization/
96•rgovostes•15h ago•70 comments

Sega Channel: VGHF Recovers over 100 Sega Channel ROMs (and More)

https://gamehistory.org/segachannel/
210•wicket•10h ago•32 comments

Artie (YC S23) Is Hiring Senior Enterprise AES

https://www.ycombinator.com/companies/artie/jobs/HyaHWUs-senior-enterprise-ae
1•j-cheong•7h ago

Letta Code

https://www.letta.com/blog/letta-code
43•ascorbic•3h ago•20 comments

GitHub will begin charging for self-hosted action runners on March 2026

https://github.blog/changelog/2025-12-16-coming-soon-simpler-pricing-and-a-better-experience-for-...
442•nklow•6h ago•209 comments

Nvidia Nemotron 3 Family of Models

https://research.nvidia.com/labs/nemotron/Nemotron-3/
128•ewt-nv•1d ago•21 comments

Show HN: Sqlit – A lazygit-style TUI for SQL databases

https://github.com/Maxteabag/sqlit
109•MaxTeabag•1d ago•13 comments

Meta's new A.I. superstars are chafing against the rest of the company

https://www.nytimes.com/2025/12/10/technology/meta-ai-tbd-lab-friction.html
46•furcyd•6d ago•57 comments

Rust GCC backend: Why and how

https://blog.guillaume-gomez.fr/articles/2025-12-15+Rust+GCC+backend%3A+Why+and+how
162•ahlCVA•10h ago•85 comments

Creating custom yellow handshake emojis with zero-width joiners

https://blog.alexbeals.com/posts/custom-yellow-handshake-emojis-with-zero-width-joiners
55•dado3212•23h ago•3 comments

Reverse-Engineering the RK3588 NPU: Hacking Limits to Run Vision Transformers

https://amohan.dev/blog/2025/shard-optimizing-vision-transformers-edge-npu/
18•rcarmo•2h ago•3 comments

30 years of <br> tags

https://www.artmann.co/articles/30-years-of-br-tags
141•FragrantRiver•3d ago•42 comments

How geometry is fundamental for chess

https://lichess.org/@/RuyLopez1000/blog/how-geometry-is-fundamental-for-chess/h31wwhUX
52•fzliu•5d ago•20 comments