Making modern presentations with markdown

Posted on Wed 18 July 2018 in programming • Tagged with markdown, presentations

This month I have the pleasure of co-teaching the Jump Start Live course for the Ada Developers Academy - a short course designed to reinforce basic programming concepts to students prior to the start of the full program. Part of the course material is available online in markdown format, but the …


Continue reading

Pin your versions. Or don't.

Posted on Mon 25 June 2018 in programming • Tagged with python

Here's a hypothetical situation. Suppose you're starting a new project and you want to use the requests library. Installing requests also installs the libraries that it depends on. Should you be explicit and pin the versions of all installed libraries (equivalent to the output of pip freeze)

certifi==2018.4 …

Continue reading

Supercharge your jupyter startup with bash and tmux

Posted on Fri 08 June 2018 in programming • Tagged with python, shell

If you're like me, you dislike doing repetitive tasks when a script could have just as easily done the work for you. For example, starting a jupyter server on my local machine requires me to do the following:

  1. open a terminal
  2. source the virtual environment I use for jupyter work …

Continue reading

Making method chains readable

Posted on Sun 06 May 2018 in programming • Tagged with python

I do a fair amount of data manipulation work in pandas and as such, I find myself doing a lot of method chaining. In the past I've struggled to find a good way of keeping my code concise while still maintaining readability.

What do I mean by that? Suppose we have census data on a group of people.


Continue reading

For loop and list comprehension performance

Posted on Fri 27 April 2018 in programming • Tagged with python

For loops are the de facto default looping mechanism for python and is a concept that almost all programmers are familiar with. However, if you've been around the python block a few times you've probably seen (and maybe dabbled in) list comprehensions from time to time.

The decision to use …


Continue reading