Playing with loggers

Shall we spend some time exploring a little bit about loggers? We shall! Let’s do it. Visit the docs for more detailed information about the logging module. Let’s use a simple example, from the documentation, to illustrate the basic usage: def simple_exmaple(): # create logger logger = logging.getLogger('StreamHandler') logger.setLevel(logging.DEBUG) # create console handler and set level to debug ch = logging.StreamHandler() # create formatter formatter = logging.Formatter('%(asctime)s- %(name)s- %(levelname)s- %(message)s') # add formatter to ch ch....

November 24, 2014

The bash bug

If you’ve following the news, here for example, you’re aware that there is a new bug out there. You can easily find information about it out there and how to fix it. We’ve patching servers and although we have the most recent one’s managed with Chef some legacy one’s are not. As a good practice I script everything, so this time wasn’t an exception. The script provided here as a gist, will help you check for the bug and patch it....

September 25, 2014

HelloGlass

Recently I’ve messing around with a Google Glass and started working on a small prototype to interface Glass with our internal systems. Let’s build a very simple, Hello World style application, using the GDK. The features of our application will be: Add a command to the main menu; Use voice to trigger that command; Launch an activity from that trigger. Let’s start by setting the string that will be added to the menu and be used as a trigger....

September 20, 2014

Speed, Speed, Speed!

I recently saw a talk from Brian Lonsdorf, where he talks about the obsession with speed in the JavaScript world. I have to say, I agree with him in many points. As a matter of fact, I don’t think it’s only in the JavaScript world (although it might be more evident nowadays) but it’s more or less generalized. It’s all about speed and scale! Many of us have participated in discussions where an idea is being pitched and, it’s not even a full idea yet, and people are already focussing on “if it scales”....

August 15, 2014

Why not try Python 3?

So, you’ve been using Python 2 since forever right? Well, Python 2 is still strong but you will, eventually, have to move on. The will be no Python 2.8. Python 3 is currently on version 3.4.1 and all of us should at least try it out. Or maybe you want to try some other “Python flavor”, like PyPy for example. Virtualenv will help us. Sure, you might be working professionally with Python 2 and you still want that to be your default....

August 10, 2014