Several months ago I was asked if I would consider teaching a course in Python to scientists and engineers at my lab. I'm a very loud proponent of learning how to code, even if you aren't a software engineer, so naturally I jumped on the idea and Python For Everyone was born.
Several factors motivated my final decision to teach this course:
- Ease of transition. Our lab's workforce is incredibly diverse and very savvy. Most of our engineers are proficient in things like Matlab, C, and even Perl. Scientists too, many have cobbled code together over the years to do their jobs.
- Community. The brilliance of companies like Amazon is they understand the power of exposing internal data through service interfaces. Like anywhere else, I work in a place where there are small caches of useful and amazing code and data that often go unnoticed by other teams. Solving part of this problem requires gravitating to a common language.
- Cost. Matlab is the soup du jour for engineers. It's "easy" to use, relatively pretty, and taught at a lot of colleges. It's also expensive as hell, slow to update, and impossible to share with anyone but licensed users. Matlab is also closed-source so you are reliant on their support to address bugs.
- Fun. I still love writing code, a lot. I think other people would like coding, a lot. Undergraduate CS courses I think fail to capture the fun and excitement of writing code, all theory no application. For my course I wanted to really show Python used in real applications.
Python For Everyone
This 2-part course starts with an introduction to basic programming, using Python, and ends with a rundown of applied Python. Initially I had wanted to run this class over the course of a week and allow newer users time to acclimate to writing code. Unfortunately time constraints forced my hand and I had to condense programming and Python in to a single lesson. Ever tried explaining object oriented programming to someone in an hour? Me either and it was a shit idea.
The advanced course takes a step back and covers general Python use cases. Things like: Databases, PyQT, Numpy, SciPy, Orange, and a few other modules. It's not fun learning raw syntax without having something to do with that knowledge. There is a time and a place for rote memorization and painfully pedantic CS discussions but this was not that time.
This is the code for the first slide [source]:
class: center, middle, inverse # Python For Everyone: Beginners Course ### by [@jeremy_carson](mailto:firstname.lastname@example.org?Subject=Python%20Beginners%20Course) .footnote[Presentation developed with [Remark](https://github.com/gnab/remark)] ---
class: center, middle, inversedictates slide formatting information to Remark.
# Python For Everyone: Beginners Courseis a Markdown heading
### by [@jeremy_carson]is a smaller Markdown heading w/ a link to my email
.footnote[...is custom syntax for adding a smaller footnote to the bottom right.
Remark supports extensions to Markdown to create slides and slide transitions. There are several other extensions covered in that wiki that are worth investigating. Documentation is so-so, I found more utility in perusing other Remark presentations.
At the time of this writing there is a bug in how Remark slides print to PDF. Slides with columns are reformatted to a single column. I also found it necessary to edit the font sizes directly in remark.js.
One of the downsides to working with Markdown is that most live editors are online only. What standalone versions I could find were buggy, old, and slow. Imagine my surprise then when I came across Github's Atom.io editor that supports a live Markdown preview (amongst a massive list of amazing features and community modules)
It shouldn't come as any surprise that I LOVE Sublime Text so when I saw Atom.io in action it was love at first sight:
Atom.io takes the very best features of our favorite text editors and rolls them in to one package. Much of the power of Atom.io comes from the fact that it's basically a browser window, you can even bring up Firebug if you like. Atom.io modules are available directly through the settings menu and can be updated directly from the source repositories. Here are a few modules I have installed:
- Monokai Theme - The default Sublime Text theme, I love these colors.
- Minimap - The text preview scrollbar from Sublime Text.
- Merge Conflicts - Resolve
git mergeconflicts directly in editor.
I welcome any changes to the original presentations. They were written to be part of a lectured class and aren't likely useful for self-directed learners.