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.

Show HN: Minimalist editor that lives in browser, stores everything in the URL

https://github.com/antonmedv/textarea
169•medv•3h ago•63 comments

Fabrice Bellard: Biography (2009) [pdf]

https://www.ipaidia.gr/wp-content/uploads/2020/12/117-2020-fabrice-bellard.pdf
150•lioeters•4h ago•40 comments

Show HN: Vibium – Browser automation for AI and humans, by Selenium's creator

https://github.com/VibiumDev/vibium
168•hugs•5h ago•65 comments

Nvidia buying AI chip startup Groq for about $20B in cash

https://www.cnbc.com/2025/12/24/nvidia-buying-ai-chip-startup-groq-for-about-20-billion-biggest-d...
198•nickrubin•1h ago•106 comments

CSRF protection without tokens or hidden form fields

https://blog.miguelgrinberg.com/post/csrf-protection-without-tokens-or-hidden-form-fields
23•adevilinyc•2d ago•1 comments

Qntm's Power Tower Toy

https://qntm.org/files/knuth/knuth.html
32•ravenical•4d ago•12 comments

When Compilers Surprise You

https://xania.org/202512/24-cunning-clang
183•brewmarche•9h ago•83 comments

Spaced repetition for efficient learning (2019)

https://gwern.net/spaced-repetition
64•tsenturk•2h ago•23 comments

A faster path to container images in Bazel

https://www.tweag.io/blog/2025-12-18-rules_img/
52•malt3•6d ago•22 comments

Keystone (YC S25) is hiring engineer #1 to automate coding

https://www.ycombinator.com/companies/keystone/jobs/J3t9XeM-founding-engineer
1•pablo24602•1h ago

The dawn of a world simulator

https://odyssey.ml/the-dawn-of-a-world-simulator
12•olivercameron•4d ago•0 comments

Fabrice Bellard Releases MicroQuickJS

https://github.com/bellard/mquickjs/blob/main/README.md
1333•Aissen•1d ago•510 comments

Jingle Bells (Batman Smells): An incomplete festive folk-rhyme taxonomy

https://loreandordure.com/2025/12/16/jingle-bells/
35•helsinkiandrew•3d ago•8 comments

How GNU Guile is 10x better (2021)

https://www.draketo.de/software/guile-10x
33•Tomte•3d ago•1 comments

My 2026 Open Social Web Predictions

https://www.timothychambers.net/2025/12/23/my-open-social-web-predictions.html
67•todsacerdoti•6h ago•62 comments

The IPv4 address swamp: The new normal

https://blog.apnic.net/2025/12/23/the-ipv4-address-swamp-the-new-normal/
21•speckx•1d ago•10 comments

Confessions to a Data Lake

https://confer.to/blog/2025/12/confessions-to-a-data-lake/
8•kkl•1d ago•1 comments

Beijing is enforcing tough rules to ensure chatbots don’t misbehave

https://www.wsj.com/tech/ai/china-is-worried-ai-threatens-party-ruleand-is-trying-to-tame-it-bfdc...
56•bookofjoe•2h ago•14 comments

Why did we use leaded petrol for so long? (2017)

https://www.bbc.com/news/business-40593353
29•simonebrunozzi•3d ago•22 comments

The e-scooter isn't new – London was zooming around on Autopeds a century ago

https://www.ianvisits.co.uk/articles/the-e-scooter-isnt-new-london-was-zooming-around-on-autopeds...
132•zeristor•14h ago•100 comments

I'm returning my Framework 16

https://yorickpeterse.com/articles/im-returning-my-framework-16/
115•YorickPeterse•9h ago•196 comments

Quake's Player Speed (2017)

https://rome.ro/quakes-player-speed-1
42•klaussilveira•1d ago•7 comments

Avoid Mini-Frameworks

https://laike9m.com/blog/avoid-mini-frameworks,171/
104•laike9m•10h ago•80 comments

Show HN: A local-first, reversible PII scrubber for AI workflows

https://medium.com/@tj.ruesch/a-local-first-reversible-pii-scrubber-for-ai-workflows-using-onnx-a...
5•tjruesch•6h ago•0 comments

Steam Store is offline

https://steamstat.us/
30•DetectDefect•59m ago•9 comments

Your inbox is a bandit problem

https://parentheticallyspeaking.org/articles/bandit-inbox/
63•zdw•2d ago•57 comments

Making a game on a custom bytecode VM in 7 days and 3kB

https://laurent.le-brun.eu/blog/making-a-game-on-a-custom-bytecode-vm-in-7-days-and-3kb
67•laurentlb•5d ago•11 comments

Google's year in review: areas with research breakthroughs in 2025

https://blog.google/technology/ai/2025-research-breakthroughs/
165•Anon84•13h ago•122 comments

Researchers achieved 1,270 Wh/L in an anode-free lithium metal battery

https://postech.ac.kr/eng/research/research_results.do?mode=view&articleNo=43617&title=Anode-Free...
95•giuliomagnifico•4h ago•48 comments

Lessons from the PG&E outage

https://waymo.com/blog/2025/12/autonomously-navigating-the-real-world
129•scoofy•20h ago•114 comments