I just open-sourced my first Django package: Cotton. Inspired by Vue, Svelte and Laravel Blade components, it brings component-based design to Django templates. Check it out! 🙏 https://t.co/8oEloJjUvM
A few things I've noticed as all devs write code with AI.
When you write foundational / architectural code of a new project by hand, you "feel" the code pushing back if your abstraction isn't right. You feel when something is harder than it should be. The code is telling you it's not in the right shape. Good engineers are sensitive to this.
When you're using an LLM, you keep pushing right through this in a way that feels like you're making progress, and it may even be directionally correct in a sense, but the underlying foundation of it all is actually bad in a way that either kills progress of the LLM later as it buckles under the complexity it has created or destroys your ability to maintain the code long term.
Related to this, I see a general restlessness with just sitting and thinking about a problem for a while.
As I've been working on a new library here at Laravel, there have been days where it feels like I mainly just stare at my screen thinking about something. When Claude Code is at your fingertips, it's tempting to just start yapping into the terminal and watching code come out the other end. Again, directionally correct in some ways, but often doesn't land on the elegant solution that is waiting to be discovered.
I wrote up a blog post demonstrating my reason for starting to use django-cotton.
In short: when I want an include that can accept one or more blocks of HTML, I'll use a component instead.
https://t.co/CHVTO9wX6y
#Python#Django
@tibo_maker@levelsio Tax agencies don't use whatsapp, in probably most countries. Same with traditional banks, investment platforms etc etc. So Skype was nice because you could pay low price from calling landlines.
Currently trying Django Cotton in pair with @htmx_org and django-template-partials and.. it's a banger !
Trying to see if I really need template partials though if you go full component mode with django cottons.
Once everything is its own component and with the flexibility django cotton adds, I don't really see a good use case.
I am building a small library of components based on Daisy UI and with HTMX doing it's magic + django's ORM and features in the backend, really is the best DX.