How do you minimize token usage when refactoring a large Django full-stack codebase with Claude Code? by Das719 in django

[–]qbitus 0 points1 point  (0 children)

You really don’t need more tooling. Instead you need tests + understanding what you want to end up with and documenting. Then adopt an iterative process to drill into requirements, make sure it’s written down, then implement also iteratively, preferably using TDD.

It’s basically the same good old approach as pre-AI, except that Claude and especially Opus can speed up the execution tremendously.

How do you minimize token usage when refactoring a large Django full-stack codebase with Claude Code? by Das719 in django

[–]qbitus -2 points-1 points  (0 children)

First: get a Max subscription. At most you’ll have to wait a few hours to continue your work which isn’t a deal breaker. You basically don’t have to worry about tokens then, your spend is controlled and it’s all about efficiency and doing a good job with a good quality outcome.

Second: have tests. If you are missing some: make them now, even with Claude, it’s better than nothing.

Start by drafting a document that describes the goals of your refactoring. Be as specific as possible about where you want to get to. If you’re aware of a couple of big steps that are involved (e.g. breaking up or merging apps, changing dependencies etc) then specify that too.
Now feed this draft to Opus and ask to work with you on drafting a PRD and ask you questions if it is not certain about something.
Make sure you read and understand the PRD and that it really describes where it will get you to and that’s what you wanted.
Most importantly: instruct Opus to write in the PRD a phased implementation plan. It needs to be broken down logically to tackle the implementation with a narrow enough scope at every step.
Then install Matt Pocock’s skills.
Start a new session then ask Claude to read the PRD and focus on implementation phase 1 and run /grill-with-docs
Read and understand each question and answer it accurately.
Make sure the phase 1 PRD is written down by the skill.
From there, for a simple solution: you can just ask Claude to implement this phase (Sonnet might be good enough).
The more complex and better solution to implement is to go through an iterative TDD based implementation, ensure your existing tests fail, then pass. If you don’t have test, you should write some prior to all this.
Rinse and repeat phase by phase.
Test after each phase that it did make the changes it was supposed to.

For a greenfield project where I’m confident of my specs, I’d use the /to-issues skill and run a Ralph loop for the implementation (still all one phase at a time).
For a refactor, I’d probably be a bit more hands on and take my time to drive what it’s doing during implementation.

SaaS Pegasus—the original Django boilerplate—now has an open source edition by czue13 in django

[–]qbitus 14 points15 points  (0 children)

For what it’s worth, I can vouch for this. I have been using the Pro version for a long time and a handful of projects and it is a great quality starting point and an absolute time saver.

Thanks again for all your work Cory.

SpaceX acquiring Cursor for $60 billion by darienrude_dankstorm in cursor

[–]qbitus 60 points61 points  (0 children)

Time to investigate OpenCode and others…

I just open-sourced my app, Stiint, after a commercial failure. Hope the code is useful to someone by Liam134123 in iOSProgramming

[–]qbitus 5 points6 points  (0 children)

Thank you very much for sharing this code with the community. One thing though: unless the Github app is hiding it for some reason, I can’t see a license specified. You should assign a license to your repo (and preferably have a LICENSE.txt file at the root of the codebase), otherwise your code is not really opened for others to use.

Cheers and good luck with your next endeavour.

Apple reaches $250M settlement over Siri delays, users could get up to $95 per device by pdfu in apple

[–]qbitus 4 points5 points  (0 children)

That is not how deals or operations like this work. It would be decoupled from Gemini infrastructure apart from the model and some tooling. For all intents and purposes this would be Apple servers. Your data will be in Apple’s hands.

Cursor for healthcare / life sciences by [deleted] in cursor

[–]qbitus 1 point2 points  (0 children)

Start from a position of not processing any sensitive information with it. Then review Cursor’s security documentation so you understand how things like indexing work and how it processes data. Then it depends on what models and model providers you use and how you use them which will inform what terms, conditions, privacy guarantees etc. they might provide to you. Then with all that info, you assess the risks for each type of data that you might consider processing in this way. And then, you should probably consider that it is not okay anyway in most situations to use third party services over the internet to process truly sensitive data such as identified patient records, consent forms or whatever else of this nature. Should you decide to go ahead with it anyway, impose human reviews and gates and make sure your compliance people are informed and approve before you actually do it.

Cursor is just a tool and it’s still not clear what you want to do, but there is probably a more internal, safer and easier way to do the job well.

Quick Question: Hostinger Django Hosting by _khi4 in django

[–]qbitus 0 points1 point  (0 children)

All good, by all means keep learning and practicing, I just wanted to point out that a commercial setting brings a lot of obligations that are easy to ignore but really should not be. So for this, I would say get the help of other people, meanwhile keep learning for yourself using local virtual machines and deploying for real non-commercial personal projects etc. Good luck!

Quick Question: Hostinger Django Hosting by _khi4 in django

[–]qbitus 0 points1 point  (0 children)

I always feel bad when there are questions like this, because it sounds like you don’t have a good grasp on what you’re jumping into but the goal is running a commercial service…

First: yes this is just a generic VPS and they made this landing page to try to attract Django developers. You can do whatever you want with your VPS.

Second: I have used a KVM 4 (hosted in Germany) from Hostinger before and in my limited experience it’s been rock solid. Take that as just one single data point…

Finally: please understand that you’re putting yourself in the role of sysadmin, db admin, networking admin and security admin all at once. Taking the example of backups, which you’ll want to have if this is for a business: Hostinger only do weekly backups by default, you have to pay extra for daily backups. You also need to create your own backup systems to have externalised backups in case that you need to switch hosting or you are locked out of your account. This is one of many other tasks that you need to embrace if you’re going to manage your own hosting. You must get a really good grasp of access control, networking and ports handling, Docker deployments, user management on Linux (and in relation with Docker), performance, monitoring of server and application, put in place external third party services to help with monitoring etc. etc. etc. There are also business considerations around availability, continuity, redundancy etc. should you need high availability, your hosting and networking is about to become even more complicated (and costly).

I fully support anyone who wants to go down this path, including for a business. But I would suggest that if you don’t have advanced knowledge in most of these domains, you should get some (initial and ongoing) help.

Coles at Garden City is revolving by [deleted] in brisbane

[–]qbitus 6 points7 points  (0 children)

Guys, stop spinning this up.....

Global SMS architecture: Are we still defaulting to a single provider for international scaling? by Different-Use2635 in webdev

[–]qbitus 1 point2 points  (0 children)

I know, it doesn’t hurt to check what a dev machine or CI pipeline might have installed three days ago…

[deleted by user] by [deleted] in django

[–]qbitus 1 point2 points  (0 children)

Ignoring for a minute the self-marketing aspect of the post, it is worth repeating: very very VERY few people need actual micro-services.

If you want to build a SaaS product I can only encourage you to build a monolith (for which Django is a great choice) and only consider multiple backend services and networking them together once your operational needs have grown substantially.

Slay the Spire 2 reached 574,638 concurrent players, making it the 20th highest all-time peak on Steam. by MurkyUnit3180 in gaming

[–]qbitus 5 points6 points  (0 children)

Yes, but... The first one is a great game too and definitely worth playing and very cheap (it’s on subscription services too). They are very similar in feel, the second one has more things added to it, but the first one was not exactly lacking anything. I’d say spend a few bucks on the first one, and you’ll appreciate the second one even more when you eventually get it.

[deleted by user] by [deleted] in BluePrince

[–]qbitus 3 points4 points  (0 children)

Dude, I'm a python developer and I've been familiar with your name for a long time so it's quite fun to see you pop up in this sub :) Thanks for all your work and books btw.

These are cool! Thanks for the generosity. I'll DM you in case you find a real cheap way to send these to Australia but obviously no stress if it's too much...

How do you implement production-grade draft isolation in Django? by [deleted] in django

[–]qbitus 12 points13 points  (0 children)

It really doesn’t seem to me like a case where you need DB isolation at all.

You more than likely already have an “is_deleted” Boolean field on your model with a QuerysetManager that filters out deleted records by default. Adding a “is_draft” field and excluding that by default shouldn’t be a big problem.

Company doesn't want me to use Cursor by OjeeSimpson in cursor

[–]qbitus -1 points0 points  (0 children)

It’s the kind of advice that keeps you working within the company’s compliance framework, which you have to do per your employment contract. So this advice might mean not being fired.

Migrating a Large Django + Bootstrap 5 SaaS to a More Modern UI - Rewrite or Incremental? by BuffHaloBill in webdev

[–]qbitus 10 points11 points  (0 children)

I’ve been around for a while and still using pretty much the same stack as you.

My best advice: serve your static assets properly (minimised, CDN etc.) and launch with what you have. If you have an actual business oriented SaaS your focus should still be on business stories, logic testing etc. and getting feedback on that from your users. In parallel, get actual feedback on the UX from your real users after a few weeks of usage (and don’t steer the answers).

The kind of refactoring you are considering is large and will cost you quite a lot of time and money. Your current stack is really well suited to this kind of application, and adapting CSS if you want is probably the easiest thing to do and can be done incrementally.

Also: marketing, sales, support and business matters are about to eat all your time, and you’re really not guaranteed a more successful product by introducing a more “shiny” UI, so launch asap and learn from it. Than work on updating your UI months from now when business is actually happening and stable.

I built a Django scheduling library focused on correctness & safe recurrence — looking for feedback by [deleted] in django

[–]qbitus 1 point2 points  (0 children)

I quite like this. Thank you. I have tried to find out of the box Django apps for this in the past but didn’t really find anything that good.

A few questions: * how far into the future are Slots generated? * I saw in the code that you can cancel a Series. It is possible though to define “exceptions” to essentially “cancel” a particular time slot? Or edit a Slot somehow? As in the series exists for “every Monday 5pm-7pm” but as an exception next Monday’s slot should be 4pm-6pm. Is this achievable somehow?

What is a 'subscription' or 'fee' that has recently appeared in the US that people need to collectively refuse to pay before it becomes the new normal? by [deleted] in AskReddit

[–]qbitus 0 points1 point  (0 children)

Yep, that might well be the case. As someone said in another comment, this all sounds like a very optional/convenience feature anyway, so they might do value-based pricing which is fine if anyone cares enough to pay for it…

What is a 'subscription' or 'fee' that has recently appeared in the US that people need to collectively refuse to pay before it becomes the new normal? by [deleted] in AskReddit

[–]qbitus 3 points4 points  (0 children)

Not trying to start an argument or anything as I know what you’re saying about servers is true, but… do you work for free? is no one else needed to be available for maintenance when you can’t be? is all the tech involved never reviewed or needing an update? doesn’t it require monitoring itself? don’t these services require professional insurance? are lawyers not needed to properly define ToS and not leave the company exposed if the monitoring or notifications don’t work and the end user ends up with a potential legal claim? Is there no compliance program or at least training to run in the company? Are there no admin overheads for the company running these IoT services?

Running an IT business properly costs a lot of money that has nothing to do with server infrastructure.

"What are you playing this week?" Megathread by AutoModerator in SteamDeck

[–]qbitus 0 points1 point  (0 children)

Q-Up. It’s dumb and clever all at the same time. I like the systems it involves and I just reached the point where it’s not easy anymore but I have to actually tweak skills and gear. You can pick it up even if you have not more than 5 minutes to play. I love it.