It's OK to throw away your old code.
Sometimes, writing code is absolutely a throwaway activity.
For quite a while now, I've been using Asana for my project kanban. Perfectly happy with it, until I wanted to add a touch of integration. I then found out:
- It meant a paid tier, which then meant a minimal number of seats, and I only needed one (me).
- The integration didn't even work the way I wanted.
So obviously, at that point, I pulled out Claude and created my own Kanban. I normally use laravel, but it can be a bit sluggish for some intensive, reactive UIs, so I asked Claude, and it said "Use Elixir".
"What the hell," I thought. I'm barely looking at code anyway, so who cares what language it's in?
It worked great.
So I added the ability to track open issues and PRs from github (created when I'm out and about, using my phone).
Then pulling small todos from the repo itself and showing them in the web app.
Then adding an in-app AI chat with Claude, that gets saved in the project.
Then the ability to add project-level attachments.
Then the ability to generate and save various market research data.
And the ability to generate marketing collateral.
And...
And...
And the app collapsed under the weight of way too many lines of code in each file. Well, it worked, but I wasn't happy with that approach. Even two days ago I was working on it, and that's when I realised it was getting problematic.
I come from a laravel background, which is structured, clean, tidy. In other words: understandable.
And I missed that.
"What the hell", I thought, again, and decided to rewrite it back in laravel again. Just the kanban first, to see how responsive I could get it. Amazingly, using livewire, it's working great. Really well. (I recommend Flux UI for livewire apps).
And it's taken an amazingly small amount of time to reproduce that Elixir app. Because the thinking had been done. The gotchas discovered and thought about. The design completed. The refinements done.
It's taken me about 4 hours to reproduce in Laravel.
Was that Elixir code wasted? Not at all. I just consider it thinking practice.