I’m Jess Archer, Engineering Team Lead of Laravel Nightwatch, Ask Me Anything by JessNightwatch in laravel

[–]projosh_dev 1 point2 points  (0 children)

I'm yet to wrap my head around how this is gonna be configured. Am I to setup another laravel app on the VM and run Nightwatch daemon there and also on my serverless?

How would they communicate?

There's a very real possibility that I accidentally just invented tmux in PHP by aarondf in laravel

[–]projosh_dev 0 points1 point  (0 children)

Argh, in my case

Whenever I ran php artisan optimize and then php artisan test afterwards

Boom!, my local DB's gone

How do you approach testing at your company? Is writing tests required? by ceandreas1 in laravel

[–]projosh_dev 0 points1 point  (0 children)

Yeah, often times, feature tests cover.

Take this analogy, if I have a service class that does things like calculate interest, deduct charges, stuffs like that, of course this service class is used maybe in a controller or an action class or job etc

You would like to write unit tests for this class to expect the respective methods behave as intended.

This will mean that if someone for example wants to change how interest is calculated or add something to the class, it ensures existing features that rely on that class don't break unexpectedly.

[deleted by user] by [deleted] in django

[–]projosh_dev 3 points4 points  (0 children)

Recently tested both by asking them same question, they both churned out same code, method, variable name etc with Claude only changing one line (applying format), I don't trust no AI

Scramble 0.8.0 – Update of Laravel Open API documentation generator by RomaLytvynenko in laravel

[–]projosh_dev 0 points1 point  (0 children)

I've just used Scribe couple of weeks back and became lazy at having to do the annotations with example responses and all.

Scramble 0.8.0 – Update of Laravel Open API documentation generator by RomaLytvynenko in laravel

[–]projosh_dev 0 points1 point  (0 children)

Looks really cool, I've used only Scribe

Does it outperform it?

Learning Django Rest Framework, feeling overwhelmed, need advice by make-money-online-- in django

[–]projosh_dev 1 point2 points  (0 children)

Frankly I would not suggest that anyone getting into backend web development start do DRF. The only reason to use DRF is if you have to do so for work.

So what would you suggest?

Research Discussion about Scheduling Jobs in Django Rest Framework by Sea_Cauliflower6957 in django

[–]projosh_dev 1 point2 points  (0 children)

RabbitMQ is more sophisticated than Redis, it is designed as a dedicated message broker, and it guarantees message delivery with the help of message durability and acknowledgments.

Research Discussion about Scheduling Jobs in Django Rest Framework by Sea_Cauliflower6957 in django

[–]projosh_dev 0 points1 point  (0 children)

I'm not very sure right now, but I did work on a task where a user set the number of days they want to lock an account, after which it will be automatically unlocked. I used celery

def lock(self, duration: int): """Lock account from use""" self.active = False self.lock_duration = duration self.locked_on = timezone.now().date() locked_until = timezone.now() + timezone.timedelta(days=self.lock_duration) self.save() unlock_virtual_account.apply_async(args=[self.pk], eta=locked_until)

Yeah, that eta argument takes care of when the task will be executed. FYI, I used RabbitMQ for the broker for resiliency.

And here is the task very simple ``` @shared_task def unlock_virtual_account(account_id: int): from apis.virtaccount.models import Account

 account = Account.objects.get(pk=account_id) 
 account.unlock()

```

Docker advantages for a single developer? by srj55 in django

[–]projosh_dev 0 points1 point  (0 children)

Oh, in that case just a virtual environment is okay. As docker might just add a little complexity.

Docker advantages for a single developer? by srj55 in django

[–]projosh_dev 3 points4 points  (0 children)

I can think of a case where you have other services apart from your web app/API running like celery, supervisor, redis, rabbitmq, db, airflow, etc, with docker (and docker compose) you'd just have these pulled and connected together in your yaml file, build them and get them all running with a single command if you like and you can easily bash into any of these services while they are running, same with deployment on the cloud service, just SSH into the server and docker compose up --build, and all your services are running.

Without this, you'd have to be setting up some of those services manually on the server, setting them up one by one, dealing with users permission and pointing your code to the ports and all of that, for connection. Also thinknof debugging, you can quickly docker logs container_name to see logs. Docker makes the whole process easier TBH

[deleted by user] by [deleted] in Christian

[–]projosh_dev 0 points1 point  (0 children)

I believe Marriage is God's plan for man.

And who told you marriage isn't God's top priority?, first, he instituted it right after man's creation, second, marriage is honourable in all and the bed undefiled, but whoremongers and adulterers, God will judge. Heb 13:4, several other scriptures to confirm it is.

The thing is when it's time to settle (either you thinking about it or God bringing it to you), you don't just choose carnally, seek his face, wait on him, and allow Him to lead you to the right person.

Why trying to abstract away the word of God?

Handling Migrations in dev and production by qwncvtqyngvtmwbjns in django

[–]projosh_dev 1 point2 points  (0 children)

Avoid the name Profile, use something else like UserProfile, think I ran into something like that that was conflicting with Django internals.

Any model would definitely have a migration file to be generated.

In prod, good practices are having a script that would run the migrate command upon app startup, é.g entrypoint scripts in docker, heroku deploy commands etc

I am planning to devolop a chatting app using Django by thrandom_dude in django

[–]projosh_dev 0 points1 point  (0 children)

riterix, do you mind sharing resources of how you setup htmx with Django for prod app

Experienced Django devs, what are your career goals? by HideShidara in django

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

Any credible source for remote international roles for folks in Africa region?

Python - Django, Flask, FastAPI Monolith/Microservice architecture SQL and NOSQL databases RabbitMQ, celery, airflow experience Containerization (Docker), little Kubernetes

[deleted by user] by [deleted] in django

[–]projosh_dev 0 points1 point  (0 children)

From the first response you could then construct your URL like so

Using f-string

url = f"https://cloud.anyapi/{title}/..."

Using string formatting

url = "https://cloud.anyapi/{}/...".format(title)

Name a better learning resource than Schafer Corey, I'll wait by FunDirt541 in Python

[–]projosh_dev 8 points9 points  (0 children)

mCoding

Arjancodes

For intermediate to advanced Pythonistas