Coding Notes

Series: Python Interview Questions #3

Task: Define the function that takes two parameters (dictionaries as default). Without modifying original dictionaries return the new one that includes all key and value pairs however, if key repeats itself, then add values

a = {'a': 5, 'b': 1, 'c': -1, 'd': 1}
b = {'a': 1, 'b': 5, 'c': 1, 'e': 1}
solution = {'a': 6, 'b': 6, 'c': 0, 'd': 1, 'e': 1}

Best Django hosting server

In my spare time, I am creating small Django web application, designed for language schools administration. This month I decided to deploy it to the server finally. Quick research gave me a few possibilities: home setup with raspberry pi (kind of free), pythonanywhere.com (free/paid), heroku.com (free/paid), digitalocean.com (paid), linode.com (paid). I have chosen DigitalOcean, and here are is why.

Django problems as a mature web framework

Santa Claus Rally is a seasonal increase of stock value in financial markets that usually occurs in last weeks of December. It is caused by, as always too optimistic, feelings of traders. This year expected rally did not start very positively (special greetings for crypto holders), and I can almost hear cries of many people.. ;)

Well, at least in software development things are not changing in such a drastic way. A good example of this is the Django web framework. Because Django is mature and stable, even having an increased release cycle (currently feature release is every eight months and LTS every two years), things are progressing rather slowly.

Python Interview Questions for Web Developer Position

My little tour on Python Web Shops is over for now. It has been an excellent chance to see what is going on in the town. I have been applying mainly for a web developer position. Below is a list of few interview questions I have got. I will answer the most interesting or ones that require more in-depth research in the next articles.

Politically (In)correct Resume/Linkedin Summary

As software developers, we have a very comfortable life because usually, the recruiters are calling to us, and not otherwise. Not always the talks are intelligent and sometimes are just a waste of time. Usually, it is not the fault of recruiters, because it is easy to get lost in the myriads of technology buzzwords and misinterpret them. Occasionally they are just not experienced enough to distinguish junior from a senior candidate.

Sometimes, however, the developers need to put more work in having a well presented professional side of our personality, and worse, update it often. Apparently, this is not our strongest side, an excellent solution would be to put ourselves in the hands of the professional agency. Some still will choose the harder way, well…

I did “Learn Python the Hard Way”

Python dictionary is now officially ordered!

Python 3.5 brought us 4-100 times faster OrderedDict thanks to its implementation in C, before was written in Python. Python 3.6 improved a standard library dictionary, by making it use more compact representation. Now dictionary could use 20% to 25% less memory compared to Python 3.5, and the order of items was kept but as suggested it was only an implementation detail and should not be used officially (backwards compatibility). Well, in Python 3.7 it has been approved.

Which one should we use now? Standard dict or OrderedDict ?

Wargames Bandit

I have just finished Bandit wargame from overthewire. Twenty-six levels packed with mini quizzes aimed at beginner Linux/security enthusiasts. First thirteen levels can be solved by using simple Linux commands with the goal of finding password hidden or encrypted in some file. Then it becomes interesting because we start to play with bits of networking knowledge like ssh, netcat, telnet etc. And last five are about cron jobs and writing bash scripts. I totally recommend this game.

Codility Demo Test

I have had a chance to solve Codility demo test. It is available for free, and you can try it unlimited times. While I do not believe that such tests correlate to typical real-world programming tasks, they are often used as a first interview filter by some companies. Here I show a few Python variations for the solution.