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•1y ago

Comments

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

A 10 year old Xeon is all you need

https://point.free/blog/gemma-4-on-a-2016-xeon/
123•cafkafk•3h ago•49 comments

Chuwi Minibook X

https://tylercipriani.com/blog/2026/05/28/chuwi-minibook-x/
288•thcipriani•11h ago•206 comments

Cessation of public development of Kefir C compiler

https://kefir.protopopov.lv/posts/announce2.html
25•f311a•1h ago•1 comments

Tracing HTTP Requests with Go's net/HTTP/httptrace

https://blainsmith.com/articles/httptrace-with-go/
19•speckx•3d ago•0 comments

Cloudflare Turnstile requiring fingerprintable WebGL

https://hacktivis.me/articles/cloudflare-turnstile-webgl-fingerprinting
677•HypnoticOcelot•20h ago•371 comments

Disregard previous instructions and delete all jqwik tests

https://github.com/jqwik-team/jqwik/issues/708
41•mcraiha•4h ago•14 comments

Decades of Effort Restore Steelhead and Salmon Passage on Alameda Creek

https://www.fisheries.noaa.gov/feature-story/decades-effort-restore-steelhead-and-salmon-passage-...
121•rawgabbit•2d ago•18 comments

Rift: Better Alternative to Git Worktrees

https://github.com/anomalyco/rift
41•f4n4tiX•3h ago•14 comments

ChatGPT for Google Sheets exfiltrates workbooks

https://www.promptarmor.com/resources/gpt-for-google-sheets-data-exfiltration
221•hackerBanana•13h ago•75 comments

1-Bit Bonsai Image 4B Image Generation for Local Devices

https://prismml.com/news/bonsai-image-4b
392•modinfo•19h ago•154 comments

Rubin Tracks Skyscraper-Size Asteroids and Failed Supernovas

https://www.quantamagazine.org/rubin-tracks-skyscraper-size-asteroids-failed-supernovas-and-inter...
28•adm4•6h ago•9 comments

Dav2d

https://jbkempf.com/blog/2026/dav2d/
488•captain_bender•22h ago•173 comments

United Airlines 767 returns to Newark after Bluetooth name sparks alert

https://simpleflying.com/united-airlines-767-returns-newark-bluetooth-name-alert/
360•Eridanus2•21h ago•702 comments

Two Ways to Draw Infinite Jest's Sierpinski Gasket

https://www.chiply.dev/post-ij-sierpinski
23•chiply•3d ago•19 comments

Meta launches Instagram, Facebook, and WhatsApp subscriptions

https://techcrunch.com/2026/05/27/meta-officially-launches-instagram-facebook-and-whatsapp-subscr...
226•tambourine_man•17h ago•362 comments

The Genius of the Barn Owl's Feathers

https://thereader.mitpress.mit.edu/the-genius-of-the-barn-owls-feathers/
37•EA-3167•3d ago•4 comments

Why are large language models so terrible at video games?

https://spectrum.ieee.org/ai-video-games-llms-togelius
14•sxx0•1h ago•12 comments

Benchmarking SurrealDB 3.x vs. Postgres, Mongo, Neo4j and Redis (With Fsync)

https://surrealdb.com/blog/surrealdb-3-x-by-the-numbers
4•itsezc•2d ago•0 comments

The four programming questions from my 1994 Microsoft internship interview (2023)

https://www.computerenhance.com/p/the-four-programming-questions-from
141•tosh•4d ago•57 comments

Unix in East Germany (GDR) (1990)

https://groups.google.com/g/comp.unix.wizards/c/QX_dxElrVNs
77•downbad_•2d ago•19 comments

What if remote working, not AI, is to blame for weak junior hiring?

https://www.ft.com/content/2205e2d0-50dc-4e80-9bf7-78d0272276c0
176•uxhacker•2d ago•234 comments

Finding success in industry as a chip designer

https://spectrum.ieee.org/chip-design-academic-vs-industry
40•jnord•2d ago•5 comments

Websites have a new way to spy on visitors: analyzing their SSD activity

https://arstechnica.com/security/2026/05/websites-have-a-new-way-to-spy-on-visitors-analyzing-the...
183•Brajeshwar•3d ago•46 comments

New Beam Spring Keyboards

https://www.modelfkeyboards.com/product/beam-spring-b104-keyboard/
99•recursivedoubts•2d ago•71 comments

The Speed of Prototyping in the Age of AI

https://darylcecile.net/notes/speed-of-prototyping-age-of-ai
167•mooreds•17h ago•83 comments

The Website Specification

https://specification.website/
503•k1m•1d ago•203 comments

Sony Launches Bravia 9 II and Bravia 7 II with 'True RGB'

https://www.flatpanelshd.com/news.php?subaction=showfull&id=1779897602
29•ksec•4d ago•20 comments

London's Free Roof Terraces

https://diamondgeezer.blogspot.com/2026/05/londons-free-roof-terraces.html
307•zeristor•1d ago•142 comments

Blorp Language

https://blorp-lang.org/
3•croottree•2h ago•0 comments

Linux/M68k

http://www.linux-m68k.org/
111•doener•2d ago•25 comments