Boost productivity with virtualenv

“A Virtual Environment is a tool to keep the dependencies required by different projects in separate places, by creating virtual Python environments for them. It solves the “Project X depends on version 1.x but, Project Y needs 4.x” dilemma, and keeps your global site-packages directory clean and manageable.” - The Hitchhiker’s Guide to Python

In this blog post I’ll explain about virtualenv, venv, and how I use both.

Read More

*args and **kwargs

*args and **kwargs are a big deal in the python world, and to me, a bit magical:
On one hand, they allow one to inject arbitrary arguments to functions, which is extremely powerful.

On the other hand, if abused, can make your code extremely complex and unreadable.

I suggest reading args and kwargs to understand how they work in depth.

the march towards go

Have you heard about the go programming language?
I just read The March Towards Go and got extremely interested.

Here’s what go’s creators, Rob Pike & Ken Thomson, said about it:

Go attempts to combine the development speed of working in a dynamic language like Python with the performance and safety of a compiled language like C or C++. In our experiments with Go to date, typical builds feel instantaneous; even large binaries compile in just a few seconds. And the compiled code runs close to the speed of C. Go is designed to let you move fast.

We’re hoping Go turns out to be a great language for systems programming with support for multi-processing and a fresh and lightweight take on object-oriented design, with some cool features like true closures and reflection.

python & the global interpreter lock

I’m an internals guy. I read CLR via C# to understand the inner workings of C# (and I highly recommend it!)

After learning python’s syntax, I started digging into the fun stuff.
I just found out the python has a global interpreter lock (GIL) that basically makes python a single threaded language (not really).

In upcoming posts I’ll share links that explain how to bypass/handle this limitation (hint: multiprocessing). But for now, take a look at these articles:

Hello, World!

Dear diary, I decided to ditch you and open up a blog!


Mainly because my memory is horrible and I need a place to put my thoughts.
I hope somebody will find it useful!

what now?

Now I’ll start writing things :)