What I am up to these unsettling days

The world is crazy, but I don’t let it deter me. I am a great believer in doing things during challenging times. So my brother and I are spending our spare (from work) time at Codewars and Hackerrank.


First, I returned to HackerRank to do some SQL, and I completed everything I found relevant to my current studies. It seems like from the lack of use I lost some of my SQL knowledge and I want to fix that.

My modest achievements at HackerRank

I plan to do much more with Problem Solving (there are a few data structures and algorithms I am not yet very familiar with). Maybe I will return and do more of Python, but at this point I just feel bored and uninspired.

SQL Academy

Then I jumped to SQL Academy, and I loved it, but it has too many bugs to my taste

UPD. 24.03.22 – I am a moron. I don’t see bugs, I just missed some details and therefore couldn’t successfully submit a few tasks. Now I bought a Premium account for $10 and realized my mistakes. I use it after I complete the tasks to see how a DB expert would solve it. Can’t wait to finish the task list by end of the week (wish me luck hehe).

One downside for me – it requires MySQL syntax, and I am not really interested in it. I personally find PostgreSQL more accomodating to Python users and those who don’t specialize solely in databases too.

The interface is fantastic and I love how you can see queries and tables and an ERM. I will be completing everything that bugs will let me – it has been very useful to me.


Meanwhile my brother has been devoured by Codewars, so after all these websites I returned to it. I have a rather old account there (since 2018), but I haven’t touched it in a while. I have had 5 kyu since forever, now I really want to get 4 kyu, even though it is not just in Python hehe.

My modest achievements at Codewars

In February I upgraded my DS/Algorithms skills with Udemy courses, Yandex Youtube lectures and personal studies here and there. I am excited to return to Problem Solving katas at Codewars with all this acquired knowledge.

Summing Up

All in all, right now I am very much into coding simulators. They bring me a sense of accomplishment that I desperately need right now. Badges and certificates – small achievements you can touch. That brings comfort if anything. So I encourage everybody I know who struggles with reality right now – to do the same. At very least, you came out of it more educated and with brighter prospects.

get_or_create created 2 instances [Sloppy Development]

I am a woman enough to talk about this. I usually don’t let these things happen, but this is such a small thing that let me down on a really high amount of requests.

The statistics of an API I was using showed that at 00:00 UTC we stopped using it altogether.

So, the culprit is the simplest model ever:

class Date(models.Model):
    date = DateField()

And I only ever created it (or altered) like this:

    date, cr = Date.objects.get_or_create(

As it always happens, 4am Sunday it well went to hell – Django create two instances of ‘2021-08-15’.

Eventually every requests that had this line in it just crashed.

Why did this happen? Well, apparently two instances are not supposed to be made.

My friends and I came to a conclusion that with a very high amount of requests Django missed that tiny bit of time between executing get_or_create method and actually writing an instance to PostgreSQL.

Well good thing - I went to bed late, and my team woke me up much earlier than I would wake up.

What is he solution? If the field is meant to be unique, make it unique:

class Date(models.Model):
    date = DateField(unique=True)