• Use asdf to manage Python, NodeJS, GoLang and more!

    asdf is a general purpose version manager that can manage versions of most programming language runtimes through a set of plugins.

    With micro-services being all the rage and the ever changing landscape of the development world, it is rare to utilize a single version of language runtime. Even when you want to upgrade from one to the other you'll need bot...

  • How to speak spanish like a colombian drug lord!

    I've been living in Puerto Rico for 4 years but two of those have been COVID and so I haven't been able to practice Spanish as much as I'd like. So to speed up my learning I've decided I want to watch a lot of spanish speaking television to start training my ears, but to do this I need a baseline of words I understand to be able to even know what they are saying!

    Learning through apps li...

  • Caesar Cipher in Python

    I'm currently teaching my wife to code and one of the problems that we worked on to teach her some fundamental programming concepts was re-implementing the caesar cipher in python. It was fun not only to code but to also start sending each other "secret" messages!

    The caesar cipher is a rather simple encoding, you just shift the alphabet a certain amount of characters. For example, if yo...

  • Convert a string to an integer in Python

    A fun interview question some developers like to ask is to have you convert ascii characters to an integer without using built in methods like string.atoi or int().

    So using python the obvious ways to convert a string to an integer are these:

    >>> int('12...
  • Tips and Tricks for the Python Interpreter

    I have seen a lot of people switch over to using ipython, bpython, etc to get auto-complete support without realizing that the standard interpreter does have this functionality.

    To enable auto-complete support in the python interpreter you need to create a python startup file that enables readline support. A python startup file is just a bunch of python code that gets executed at startup...

  • Writing tests for Pyramid and SQLAlchemy

    TL;DR: Putting it all together, the full code can be found here: https://gist.github.com/1420255


    Pyramid's documentation doesn't cover the preferred way to test with SQLAlchemy, because Pyramid tries to stay out of your way and allow you to make your own decisions. However, I feel i'ts necessary to document what I think is the ...