“Biggest achievement” question on the interview?

In 2022, I went through the job interview process for a middle-to-senior software developer position. During the interview, one of the co-owners asked me a completely unexpected question: “In your honest opinion, what was your biggest lifetime achievement so far, not counting

Python dict.get() vs dict[‘brackets’], which approach is better?

Python dict.get() vs dict['brackets'], which approach is better?

Using the .get() method on a dictionary is generally considered a better approach than using the direct dictionary indexing dictionary[‘key’] method because the .get() method provides a default value if the key is not found in the dictionary, whereas direct dictionary indexing

Why its better to use .exists() method on query rather then do try-except block?

Why its better to use .exists() method on query rather then do try-except block

Both of the provided code samples achieve the same result, but they use different approaches to handle the case when the instance with the given primary key does not exist. class Balance(models.Model): current_balance = models.DecimalField(_(“Current Balance”), max_digits=12, decimal_places=2, default=0.00) last_balance = models.DecimalField(_(“Last

Where should I store database queries in Django?

Where should I store queries to my database in Django

The Django business logic dilemma? In general, it’s a good practice to keep your code organized and modular. If your view code includes complex database queries or large amounts of database-related logic, it might be a good idea to move those queries