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

Anthropic acquires Bun

https://bun.com/blog/bun-joins-anthropic
1145•ryanvogel•4h ago•559 comments

EmacsConf 2025

https://emacsconf.org/2025/
59•birdculture•1h ago•2 comments

Paged Out

https://pagedout.institute
132•varjag•2h ago•17 comments

Claude 4.5 Opus' Soul Document

https://simonwillison.net/2025/Dec/2/claude-soul-document/
204•the-needful•3h ago•114 comments

Amazon launches Trainium3

https://techcrunch.com/2025/12/02/amazon-releases-an-impressive-new-ai-chip-and-teases-a-nvidia-f...
95•thnaks•3h ago•40 comments

I designed and printed a custom nose guard to help my dog with DLE

https://snoutcover.com/billie-story
324•ragswag•2d ago•44 comments

OpenAI declares 'code red' as Google catches up in AI race

https://www.theverge.com/news/836212/openai-code-red-chatgpt
322•goplayoutside•7h ago•403 comments

Free static site generator for small restaurants and cafes

https://lite.localcafe.org/
44•fullstacking•2h ago•22 comments

Learning music with Strudel

https://terryds.notion.site/Learning-Music-with-Strudel-2ac98431b24180deb890cc7de667ea92
344•terryds•6d ago•84 comments

Delty (YC X25) Is Hiring

https://www.ycombinator.com/companies/delty/jobs/aPWMaiq-full-stack-software-engineer
1•lalitkundu•1h ago

Ecosia: The greenest AI is here

https://blog.ecosia.org/ecosia-ai/
24•doener•1h ago•7 comments

AI generated font using nano banana

https://constanttime.notion.site/Worlds-first-Ai-generated-font-using-nano-banana-2ba6f8e15af1801...
14•ebaad96•55m ago•2 comments

100k TPS over a billion rows: the unreasonable effectiveness of SQLite

https://andersmurphy.com/2025/12/02/100000-tps-over-a-billion-rows-the-unreasonable-effectiveness...
225•speckx•4h ago•86 comments

All about automotive lidar

https://mainstreetautonomy.com/blog/2025-08-29-all-about-automotive-lidar/
53•dllu•1d ago•27 comments

Zig's new plan for asynchronous programs

https://lwn.net/SubscriberLink/1046084/4c048ee008e1c70e/
172•messe•8h ago•137 comments

Cursed circuits: charge pump voltage halver

https://lcamtuf.substack.com/p/cursed-circuits-charge-pump-voltage
45•surprisetalk•4h ago•8 comments

Qwen3-VL can scan two-hour videos and pinpoint nearly every detail

https://the-decoder.com/qwen3-vl-can-scan-two-hour-videos-and-pinpoint-nearly-every-detail/
48•thm•2d ago•8 comments

School cell phone bans and student achievement

https://www.nber.org/digest/202512/school-cell-phone-bans-and-student-achievement
51•harias•4h ago•46 comments

The Junior Hiring Crisis

https://people-work.io/blog/junior-hiring-crisis/
177•mooreds•4h ago•218 comments

Code Wiki: Accelerating your code understanding

https://developers.googleblog.com/en/introducing-code-wiki-accelerating-your-code-understanding/
40•geoffbp•6d ago•12 comments

Mistral 3 family of models released

https://mistral.ai/news/mistral-3
603•pember•7h ago•181 comments

YesNotice

https://infinitedigits.co/docs/software/yesnotice/
134•surprisetalk•1w ago•50 comments

Show HN: Rhubarb – C89 Libraries in Latin

https://github.com/farant/rhubarb
5•water_badger•3d ago•3 comments

Addressing the adding situation

https://xania.org/202512/02-adding-integers
237•messe•11h ago•80 comments

Solving the Partridge Packing Problem Using MiniZinc

https://zayenz.se/blog/post/partridge-packing/
16•mzl•6d ago•1 comments

Advent of Compiler Optimisations 2025

https://xania.org/202511/advent-of-compiler-optimisation
318•vismit2000•12h ago•53 comments

Python Data Science Handbook

https://jakevdp.github.io/PythonDataScienceHandbook/
190•cl3misch•10h ago•39 comments

Nixtml: Static website and blog generator written in Nix

https://github.com/arnarg/nixtml
73•todsacerdoti•7h ago•33 comments

A series of vignettes from my childhood and early career

https://www.jasonscheirer.com/weblog/vignettes/
131•absqueued•10h ago•84 comments

Lowtype: Elegant Types in Ruby

https://codeberg.org/Iow/type
60•birdculture•4d ago•29 comments