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.

Fabrice Bellard Releases MicroQuickJS

https://github.com/bellard/mquickjs/blob/main/README.md
311•Aissen•1h ago•82 comments

We replaced H.264 streaming with JPEG screenshots (and it worked better)

https://blog.helix.ml/p/we-mass-deployed-15-year-old-screen
101•quesobob•1h ago•54 comments

Meta is using the Linux scheduler designed for Valve's Steam Deck on its servers

https://www.phoronix.com/news/Meta-SCX-LAVD-Steam-Deck-Server
231•yellow_lead•2h ago•101 comments

Volvo Centum is Dalton Maag's new typeface for Volvo

https://www.wallpaper.com/design-interiors/corporate-design-branding/volvo-new-font-volvo-centum
15•ohjeez•54m ago•3 comments

Adobe Photoshop 1.0 Source Code (1990)

https://computerhistory.org/blog/adobe-photoshop-source-code/
362•tosh•5d ago•100 comments

Towards a secure peer-to-peer app platform for Clan

https://clan.lol/blog/towards-app-platform-vmtech/
21•throawayonthe•1h ago•4 comments

Test, don't (just) verify

https://alperenkeles.com/posts/test-dont-verify/
152•alpaylan•6h ago•100 comments

Instant database clones with PostgreSQL 18

https://boringsql.com/posts/instant-database-clones/
303•radimm•11h ago•125 comments

Astrophotography Target Planner: Discover Hidden Nebulas

https://astroimagery.com/techniques/imaging/astrophotography-target-planner/
30•kianN•3d ago•2 comments

Executorch: On-device AI across mobile, embedded and edge for PyTorch

https://github.com/pytorch/executorch
92•klaussilveira•5d ago•12 comments

Font with Built-In Syntax Highlighting (2024)

https://blog.glyphdrawing.club/font-with-built-in-syntax-highlighting/
124•california-og•8h ago•26 comments

Space Math Academy

https://space-math.academy
10•dynamicwebpaige•3d ago•4 comments

The Coffee Warehouse

https://www.scopeofwork.net/the-coffee-warehouse/
33•NaOH•3d ago•25 comments

Show HN: Yapi – FOSS terminal API client for power users

https://yapi.run/blog/what-is-yapi
33•jamiepond•1d ago•11 comments

The post-GeForce era: What if Nvidia abandons PC gaming?

https://www.pcworld.com/article/3013044/the-post-geforce-era-what-if-nvidia-abandons-pc-gaming.html
65•taubek•3d ago•115 comments

Local AI is driving the biggest change in laptops in decades

https://spectrum.ieee.org/ai-models-locally
96•barqawiz•19h ago•74 comments

Dancing around the rhythm space with Euclid

https://pv.wtf/posts/euclidean-rhythms
23•dracyr•1d ago•0 comments

Show HN: CineCLI – Browse and torrent movies directly from your terminal

https://github.com/eyeblech/cinecli
274•samsep10l•14h ago•95 comments

Carnap – A formal logic framework for Haskell

https://carnap.io/
92•ravenical•10h ago•19 comments

Snitch – A friendlier ss/netstat

https://github.com/karol-broda/snitch
289•karol-broda•18h ago•91 comments

An initial analysis of the discovered Unix V4 tape

https://www.spinellis.gr/blog/20251223/?yc261223
13•DSpinellis•1h ago•0 comments

Ryanair fined €256M over ‘abusive strategy’ to limit ticket sales by OTAs

https://www.theguardian.com/business/2025/dec/23/ryanair-fined-limit-online-travel-agencies-ticke...
191•aquir•8h ago•218 comments

Stop Slopware

https://stopslopware.net/
69•bradley_taunt•3h ago•88 comments

It's Always TCP_NODELAY

https://brooker.co.za/blog/2024/05/09/nagle.html
428•eieio•22h ago•154 comments

The Illustrated Transformer

https://jalammar.github.io/illustrated-transformer/
460•auraham•1d ago•85 comments

10 years bootstrapped: €6.5M revenue with a team of 13

https://www.datocms.com/blog/a-look-back-at-2025
224•steffoz•11h ago•88 comments

Inside CECOT – 60 Minutes [video]

https://archive.org/details/insidececot
1335•lawlessone•18h ago•390 comments

Ask HN: What are the best engineering blogs with real-world depth?

293•nishilpatel•9h ago•92 comments

Ultrasound Cancer Treatment: Sound Waves Fight Tumors

https://spectrum.ieee.org/ultrasound-cancer-treatment
323•rbanffy•23h ago•89 comments

GLM-4.7: Advancing the Coding Capability

https://z.ai/blog/glm-4.7
404•pretext•1d ago•217 comments