Interview with a Pythonista

For our University of Hawai`i at Hilo CS294 Python class we were asked to find someone who uses Python code at their job and ‘charm’ them into a short-answer ten-minute phone interview as part of a ‘mentors coding habits and advice’ blog.

Gemini_at_sunsetWhat follows is my interview with Chris Stark who is an Information Systems Engineer for the Gemini Observatory, which has a pair of 8.1m world-class telescopes with Gemini North, located on the summit of Manua Kea and Gemini South, located near the summit of Cerro Pachon in central Chile.  Chris works out of the Gemini North’s base facilities here in Hilo, Hawai`i.  Because Chris is also a big coffee fan, we met at St. Arbucks where he graciously offered his suggestions and know-how for the bargain price of a Tall black coffee.

Q >>> When did you first hear about Python?
A >>> I first learned about Python in the late 90’s when I was working as a Web Developer.

db >>> What programming languages did you know before learning any Python?
cs >>> I mainly used Perl (for code maintenance), PHP, C and some Basic.

db >>> Were there any particular books, classes, or online instructional courses you took in order to teach yourself Python?
cs >>> I used an O’Reilly book on Python to begin teaching myself the language.

db >>> What do you see as the main strengths of Python as a programming language?
cs >>> Its straightforward syntax, its scripting capabilities, and its development process time.

db >>> What weaknesses of limitations have you personally found within Python?
cs >>> People talk about speed issues when they mention Python but I personally haven’t experienced any of those issues with the things I use Python for. Python is faster than a shell script.

db >>> What is the most complex use of Python you have seen at Gemini?
cs >>> The Quality Assessment of the Data Pipeline used by the astronomers at Gemini.

db >>> Has Gemini switched to any open-source software moving away from things proprietary like Subaru has?
cs >>> Gemini migrated from Sun Solaris to Linux.

db >>> Do you use any simple Python scripts to automate any of you day-to-day tasks either at work or at home?
cs >>> I use it daily at Gemini for simple queries as well as for any task that is repeated more than once. At home, I use Python in my own weather station and for tracking the efficiency of our solar panels

db >>> On to something more controversial; What text editor do you use?
cs >>> [Laughing] Vim.

db >>> What does Gemini use for version tracking?
cs >>> Subversion…often abbreviated SVN, after the command name svn.

db >>> What extra skills would you suggest students to acquire who want to work for an observatory?
cs >>> Being comfortable in Linux, troubleshooting skills, being able to write a shell script, and being conscious about security.

Coffee_OwlBig mahalo’s Chris!

The Fizz Buzz ‘Challenge’?



Simple enough…

You show up fifteen minutes early for your interview and wait calmly in the lobby. Plenty of time to center yourself and go over a few of the responses you have planned for certain interview questions. Hell, you’ve even got a response ready for the “Why are manhole covers round?” question and a plausible solution to the “Three Switches, One Light” puzzle. The interviewer finally arrives and takes you into a nearby office. The interview proceeds just like you’ve envisioned. You’re personable, confident, discerning, funny, and upbeat. You can almost see the rapport between you and the interviewer being built right in front your eyes.

Then it happens; the interviewer pulls out a seemingly blank sheet of paper and passes it over to you with a pen and says, “You have five minutes.” You read the short set of instructions and try to swallow your beating heart that suddenly has found its way into your throat back into your chest. You have been presented with the last thing you thought you would ever see during an interview for your ‘dream job’…

…the infamous FizzBuzz Challenge:

Write a program that prints the numbers from 1 to 100.
But, for multiples of three, print ‘Fizz’ instead of the number
and for multiples of five, print ‘Buzz’. For numbers which are
multiples of both three and five, print ‘FizzBuzz’.


Ahh, the time-honored interview question meant to separate the programmer-wheat from the programmer-chaff. As one site suggests “The ‘Fizz-Buzz Test’ is an interview question designed to help filter out the 99.5% of programming job candidates who can’t seem to program their way out of a wet paper bag.” Ahh, the time-honored interview screening device that you completely dismissed as being too trivial to even bother preparing for. But now, the heat is on, and you quickly realize that your ill-fated choice this cool winter’s morning to wear your ‘lucky’ necktie to the interview is only making matters worse.

Now, the proceeding scenario hasn’t happened to me personally. Nor do I ever anticipate it happening to me. Not that a potential employer wouldn’t ‘stoop’ to utilize FizzBuzz as a screening technique. It’s just that I don’t see myself ever applying for a strictly ‘programming’ position where such a filter might be implemented. I would hope that if I ever did, I would be able to easily implement a FizzBuzz solution without all the aforementioned stress and shock.

Earlier this semester at UH, the FizzBuzz Challenge was actually used in my Computational Physics mid-term. I would like to say I “easily implemented” a solution but, alas, I fumbled and choked being so easily thrown by being asked to use pseudocode instead of Python.

Here is my Python solution to the FizzBuzz Challenge:fizzbuzz

Programming for Everybody from Coursera

pythonProgramming for Everybody (Getting Started with Python) by University of Michigan for Coursera

  • I initially was going to start with “Learn Python the Hard Way” but realized that I had signed up for the University of Michigan’s “Programming for Everybody (Getting Started with Python)” online course through Coursera so opted for Charles Severance’s pathway via the Coursera course and his associated book, “Python for Informatics: Exploring Information”.
  • The online coursework is divided into seven weeks roughly covering the first five chapters of Professor Severance’s book.  During my first two hours I covered both weeks 1 and 2 which dealt with “Why Program?”, “Hardware Overview”, “Python as a Language” and “Installing Python” (including Windows, Mac, and Linux installations)
  • I made it to week 3 which has some basic “Hello World!” type assignments, a review, and the first quiz.
  • I didn’t experience any issues during any of these initial lectures as they are very basic covering things I’ve come across many times from different sources.  I’m looking forward to week 4 when he delves into the material directly from his book beginning with “Variables, Expressions, and Statements”
  • Professor Severance explains things and a fun and down-to-earth way.  I’m sure his teaching style will be a value later on for more complex  concepts.

Programmer Problems

xkcd: Computer Problems

xkcd: Computer Problems

This is the xkcd that popped up on the ASTR 260 Computational Physics & Astronomy Laulima page today.  It seemed appropriate considering the trouble I was having yesterday getting Pascal’s Triangle to turn upright into a pyramid.  Arghh, trial & error work out again instead of logic & knowledge.


LanguaguesWhat do I expect to get out of the CS294 Python class?

Initially I was hoping to just get a good beginner’s handle on programming in Python itself, but now, I’m actually hoping to take away a much larger skill set thanks to our intrepid leader’s overall vision.

Our instructor began off the course by introducing us to a text-editor (Vim) that some people either hate or really hate. (H8TR turned BIV: Believer In Vim).  At first I was in the ‘hate’ crowd; I couldn’t figure out how to even begin entering in any text.  Some text-editor!   As I continue to use it (in this course as well as in the ASTR260 Computational Physics course) I am starting to get a bit of muscle memory for it.  It grows on you like a clingy but friendly vime.

WOW. This is like being in a house built by a child using nothing but a hatchet and a picture of a house.

We’re also diving headfirst into version control using Git and GitHub. I’ve even got my own GitHub account set up like a real genuine bona fide honest to God programmer/scientist/PhD/professor.  No more foo_draft.tex  → foo_draftier.tex → foo_proof.tex → foo_proofier.tex → foo_proofiest.tex!


Bash (Unix shell)

I am committed to learning Python because it is becoming one of the most widely used programming languages within the scientific community.  During my recent Software Systems for Astronomy intensive through the University of Hawaii at Hilo’s Astronomy department,  Dr. Al Conrad talked about how IDL is on the decline within the Astronomical community as its go-to language because of IDL’s cost and proprietary nature.  Python is undeniably on the rise.

We report on an informal survey about the use of software in the worldwide astronomical community.  The survey was carried out between December 2014 and February 2015.  Participants were asked to “Select any of these [programming languages] that you regularly use in your research” <sub-divided by sub-field>


The cost of Python (free!) added to the abundant availability of libraries/packages  and its innate readability make it an enticing language to invest the time to learn.  codeeval2014

Abell 2744 ~HST

So, my expectations are GR8!  I plan to have an array of tools and know-how to offer a research astronomer (for one of their projects) or an observatory on Mauna Kea (for an actual job!)  And, yes Brian, I know it will take 10,000 hours.


Centroid Visualization with Python Heatmapping ~muku42

Data Sharing – Thoughts and Ideas

© Jon Carter ~ cartertoons

Data sharing is an important part of the scientific method.  Without data sharing, the wheels of science would grind to a halt (or at least slow to an unbearable pace).

Science is not done in a vacuum…well, sometimes, but you know what I mean.  Scientists, to a marked degree, build upon the works of others that have gone before them.  Without access to a published scientist’s data, science wouldn’t be science.  It would be riddled with heresay, lacking any way of true verification.

nullius in verba

As an example, without data sharing, I would not have been able to create this time-lapse of Hurricane Ignacio approaching (and sliding by) the Hawaiian Islands.

Python Development Environment

For the CS 294 course (and ASTR 260) I’m going to be using a Mac Mini ( 2.3 GHz Intel Quad-Core i7) running both OSX Yosemite (10.10.5) and Windows (8.1 via Boot Camp).

Courtesy Eliot Phillips/flikr

Courtesy Eliot Phillips/flikr

For Python, I have installed the following on both OSX and Windows:

  • Python 2.7.10
  • Python 3.4.3
  • IDLE 2.7.10
  • IDLE 3.4.3
  • Anaconda
  • IPython Notebook 3.2.1

I’m going to be adding a Raspberry Pi 2 to the mix in the near future running Ubuntu Mate.  It should be interesting to see what type of environment I can set up there!