• Memoization in Python and JavaScript

    Memoization is a technique that is used a lot in Dynamic Programming and in general to speed up algorithms.
    Memoization is the same as caching but in functional programming. The Caching mechanism will store the data into a cache store, and that data can be from anywhere (HTTP page, REST call, … etc) , where memoization is specific to cache the results of a function, and it create and maintain the store inside the function itself (so the function will be pure function) and send the store as a parameter into the function arguments.

    read more ...
    Python Virtual Environment, and Package Management

    Python virtual environments, and as well package management, has a shaky history, and it has been changing a lot for last few years.
    Even currently, (early 2018), it is confusing because there are many tools for virtual environments (venv, virtualenv, pyvenv, pyenv).
    I couldn’t find one tutorial that describe everything in just one place, so I thought, I will write it down.
    This post is a combination of many official documentation, answers of StackOverflow, and different blog posts that I think will give you comprehensive picture, not only for the virtual environment, but for the package management as well.

    read more ...