Wednesday, August 31, 2016

An easy explanation of the difference between concurrency and parallelism

Sometimes it takes a long time to acquire understanding of something and finally I've understood the difference between parallelism and concurrency.

Suppose you have 3 huge bags you have to move from your house to your friend's house. You want to save money thus you don't take a taxi and decide to go on foot caring the bags only by yourself. They're so huge, however, that you can only carry one bag at a time. The city you're in is safe enough so you can leave them on the street and no one will steal them.

Concurrency: you carry one bag 10 meters, quickly return to the place where you left your 2nd and 3rd bags, grad the 2nd one and carry it 10 meters, then again quickly come back, grab the 3rd one and carry the same 10 meters. Then you take the 1st bag again, carry it for 10 meters, come back and grab the 2nd one, carry it and take the 3rd one. And so on and so forth until you bring all of them to your friend's house.

Parallelism: you ask two your brothers to help you out and you three take those three bags at the same time, one bag for each person, and bring them to your friend's house.

Asynchronism: it's not directly related to these 2.

Wednesday, August 24, 2016

Playforitsownsake has been re-written to Elixir. Finally!

And more impotently, I've been able to deploy it -- -- on VPS at digital ocean. Now it's working. It took me a loooooong time and effort, only deploying along took me around 2-3 days this time. Previously it was even longer. That's because of the lack of up-to-date documentation and documentation in general of how to build and deploy Phoenix/Elixir applications and also plenty of bugs in the tools.

Monday, August 15, 2016

Chaos and difficulty is our bread and butter

Developers complain about the fact that there’re plenty of standards in some areas, dependency hell in NodeJS, and in other areas there’re no standards at all, for example, in C++ there’s still no naming convention and package manager, thus in C++ everyone is free to adopt naming convention they desire. Thus all that makes software development a drudgery, nasty, unpleasant, boring.

Bus in Malaysia

As for me, I'm positive that this chaos is an awfully good thing. Imagine that everything in software development was easy and smooth, there was only one way to achieve what you wanted to and there were no bugs. That would make software development extremely easy and available for everyone. Everyone would be able to build software applications by clicking a few buttons in a wizard in the blink of an eye with neither thinking nor special knowledge. 

Then the question would arise: what would you as a software developer do? Who would need your skills? How would you make a living? Who would be willing to pay you to solve some kind of a problem they have if there would almost be no problems with creating software? Even if there was one, if could be fixed by a person having that problem themselves. We as software developers have jobs and are able to earn money only because we have skills and knowledge that other people don’t have and those people need us to solve their problems.

The more chaos and difficulty there is, the better off you are as a software developer.

Friday, August 12, 2016

Arch Linux

I truly like Arch Linux and the more I use it, the more I like it. Before installing it I was concerned I wouldn't be able to find the packages in the standard repository of Arch and I'd have to compile them from sources, unlike in Ubuntu where most of the packages can be installed by apt-get install xxx. But it's turned out to be a false assumption and later I've found out that Arch Linux has a tremendously higher number of packages in its standard repository. It's way more and it's always fresh -- up to date.

Not only that, installing a package from the community repository of Arch rarely causes errors of any kind. On top on that, Arch has AUR -- Arch User Repository -- where new packages that haven't become popular enough yet are found.

Tuesday, August 9, 2016

Speed reading of technical literature

Not only the amount of information increases day by day, but also the pace with which new information and technology are created. It’s easy to become overwhelmed. Every day I learn programming, work on my projects, read books or articles, forums, learn spanish, english, japanese, sometimes chinese and portugues, although I have no time to learn them all at once, hence I learn mostly spanish and english at the moment, a bit of japanese and only occasionally portugues and chinese.

How do you thrive in this kind of environment with tons of information? In particular, how can you speed up your book reading ability? Recently I've read a book about this topic – speed reading of technical literature. The book described how to be able to read more effectively, faster and remember better what you've read. It’s only applicable for technical literature because the aim of technical literature is to convey information rather than give you pleasure of reading.

So in short there’re 3 steps: skimming a book for 5-10% of the time you plan to devote to reading it, reading it carefully – around 80% of the time, and reading it again making notes – 10%. Note that you can move around and skip chapters, you can read very fast and you can decide not to read it at all if in the 1st phase you feel you should.

Saturday, August 6, 2016

Back to Elixir/Phoenix framework

Not long ago I tried to deploy my Elixir/Phoenix application on Digital Ocean with no avail, hence I’d decided to put using Phoenix framework and Elixir off for a while. Things have changed and now I’m in the process of rewritting my travel blog from Clojure to Elixir. There’s one more project I’m working on currently which is also in Elixir/Phoenix.

Monday, August 1, 2016

4 years working as a freelancer

4 years ago I left my office in Saint-Petersburg, Russia at Fontanka river and has never gone to an office since then. 2 months later I bought a ticket to Thailand and off I went. I had $500 with me.