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.

NTP at NIST Boulder Has Lost Power

https://lists.nanog.org/archives/list/nanog@lists.nanog.org/message/ACADD3NKOG2QRWZ56OSNNG7UIEKKT...
183•lpage•5h ago•73 comments

What Does a Database for SSDs Look Like?

https://brooker.co.za/blog/2025/12/15/database-for-ssd.html
49•charleshn•3h ago•31 comments

Charles Proxy

https://www.charlesproxy.com/
198•handfuloflight•7h ago•60 comments

Skills Officially Comes to Codex

https://developers.openai.com/codex/skills/
69•rochansinha•5h ago•28 comments

CSS Grid Lanes

https://webkit.org/blog/17660/introducing-css-grid-lanes/
582•frizlab•15h ago•163 comments

A terminal emulator that runs in your terminal. Powered by Turbo Vision

https://github.com/magiblot/tvterm
69•mariuz•2d ago•7 comments

New Quantum Antenna Reveals a Hidden Terahertz World

https://www.sciencedaily.com/releases/2025/12/251213032617.htm
45•aacker•4d ago•1 comments

Mistral OCR 3

https://mistral.ai/news/mistral-ocr-3
578•pember•1d ago•103 comments

Raycaster (YC F24) Is Hiring a Research Engineer (NYC, In-Person)

1•levilian•1h ago

Garage – An S3 object store so reliable you can run it outside datacenters

https://garagehq.deuxfleurs.fr/
608•ibobev•21h ago•136 comments

The Deviancy Signal: Having "Nothing to Hide" Is a Threat to Us All

https://thompson2026.com/blog/deviancy-signal/
86•NickForLiberty•7h ago•52 comments

Contrails Map

https://map.contrails.org/
60•schaum•5h ago•23 comments

Privacy doesn't mean anything anymore, anonymity does

https://servury.com/blog/privacy-is-marketing-anonymity-is-architecture/
136•ybceo•7h ago•94 comments

A proof of concept of a semistable C++ vector container

https://github.com/joaquintides/semistable_vector
7•joaquintides•4d ago•0 comments

Airbus to migrate critical apps to a sovereign Euro cloud

https://www.theregister.com/2025/12/19/airbus_sovereign_cloud/
230•saubeidl•4h ago•148 comments

Hash tables in Go and advantage of self-hosted compilers

https://rushter.com/blog/go-and-hashmaps/
19•f311a•5d ago•8 comments

Sharp: High performance Node.js image processing/optimization

https://github.com/lovell/sharp
21•nateb2022•3d ago•2 comments

TP-Link Tapo C200: Hardcoded Keys, Buffer Overflows and Privacy

https://www.evilsocket.net/2025/12/18/TP-Link-Tapo-C200-Hardcoded-Keys-Buffer-Overflows-and-Priva...
304•sibellavia•19h ago•90 comments

Fuzix on a Raspberry Pi Pico

https://ewpratten.com/blog/fuzix-pi-pico
75•ewpratten•5d ago•6 comments

Graphite is joining Cursor

https://cursor.com/blog/graphite
243•fosterfriends•21h ago•236 comments

8-bit Boléro

https://linusakesson.net/music/bolero/index.php
273•Aissen•1d ago•41 comments

LLM Year in Review

https://karpathy.bearblog.dev/year-in-review-2025/
253•swyx•16h ago•71 comments

Carolina Cloud – One third the cost of AWS for data science workloads

https://carolinacloud.io/
119•bojangleslover•5d ago•65 comments

A better zip bomb (2019)

https://www.bamsoftware.com/hacks/zipbomb/
148•kekqqq•15h ago•53 comments

Brown/MIT shooting suspect found dead, officials say

https://www.washingtonpost.com/nation/2025/12/18/brown-university-shooting-person-of-interest/
165•anigbrowl•1d ago•203 comments

Build Your Own React

https://pomb.us/build-your-own-react/
140•howToTestFE•13h ago•13 comments

Show HN: TinyPDF – 3kb pdf library (70x smaller than jsPDF)

https://github.com/Lulzx/tinypdf
202•lulzx•1d ago•24 comments

Rust's Block Pattern

https://notgull.net/block-pattern/
194•zdw•1d ago•96 comments

Feast Your Eyes on Japan's Fake Food

https://www.newyorker.com/culture/annals-of-gastronomy/feast-your-eyes-on-japans-fake-food
28•Kaibeezy•4d ago•11 comments

History LLMs: Models trained exclusively on pre-1913 texts

https://github.com/DGoettlich/history-llms
829•iamwil•1d ago•397 comments