PyDev of the Week: Samuel Hinton

This week we welcome Samuel Hinton (@samreayh) as our PyDev of the Week! Samuel has written quite a few projects in Python and given lots of talks on astronomy. If you are interested in either of those topics, then you should definitely check out his website or his Github profile.

Let’s take a few moments to get to know Samuel better!

Can you tell us a little about yourself (hobbies, education, etc):

Sure thing! I’m an astrophysicist that started off my career in robotics engineering. I’ve always been one for trying out new things and don’t mind jumping topics, so from there I went into IT, software engineering, the finance sector, physics and then decided that space science was cool enough to put a few years into it! When I’m not coding, either for work or on a fun side project, I’ll tend to jump between introverted phases of devouring fantasy novels, and the occasion extroverted phase of doing science outreach, including one fun time when I was invited to play Australia Survivor as an academic champion. That was fun. Crazy, but fun.

The goal is to one day live and work on every continent on the planet, which means one of these days I better leave my home country of Australia and go exploring!

Why did you start using Python?

Many years ago in astronomy Python wasn’t the dominant force it was today. My supervisors during undergraduate gave me two options – one, we use Python for new projects and I’m on my own, or they can pass on their knowledge of IDL to me and I could code in that. For those unaware, IDL is a proprietary coding language like Fortran and Matlab had an ugly baby. However, it was NASA’s tool of choice for many years and there was a huge existing body of code and packages to be used.

By the beauty of Python brokes no challengers, and it was an easy decision. And now, years later, IDL is beginning to fade out of memory and into legend, whilst Python remains king, with R his right-hand man.

What other programming languages do you know and which is your favorite?

Let’s get the favourite out of the way – Its Python. A hundred times over.

As to other languages, oh boy.

I implemented a browser-based (client side only) scientific redshifting tool, which involved many thousands of lines of Javascript code and AngularJS, back when it was new and shiny. This was a nightmare.

In the finance industry, server-side architecture was a GWT Java application. Better than Javascript, until you had to add Groovy into the mix. Then it was a mix of painful expressions and overwhelming boilerplate!

For squeezing every drop out of numerical simulations, C++, which was always fun, and always mind-blowing to see what geniuses coded up the compiler such that it can rig up so much magic.

For microprocessor and most robotics coding, C. Those these days you could just use a Raspberry Pi and write it all in Python, what a time to be alive!

Of course, you could probably do all of the above easily in Python today. Which makes me very happy.

What projects are you working on now?

There are so many balls in the air right now! As I write this, it’s April 4th and we’re weeks into the COVID-19 pandemic. My current main focus is as the project architect and lead data analyst for an international collaboration of over 200 hospitals from more than 40 countries, all funnelling ICU data together to try and quantify the response of patients to methods of ventillation and medical treatments. Before that took up every waking hour, I worked primarily on supernova cosmology – using exploding stars to map out the expansion history of the universe. I work with the Dark Energy Survey in a bid to – you guessed it – quantify the nature of Dark Energy.

Which Python libraries are your favorite (core or 3rd party)?

It’s got to be pandas. Once you master it, your productivity in cleaning, manipulating and transforming data into viable products goes through the roof. And any library that allows me to spend less time wrestling with data and more time thinking of fun things to do with it gets a big gold star in my book.

How did you become an online instructor?

I had hosted a national coding workshop on coding practises for academics to try and increase the self-taught skill level of the average astronomer to something closer to an “industry-professional” and I had some attendees ask if the material was online. I sent them a link to the GitHub repo, and they mentioned that it would make a good introductory course. I never did turn that one into a course, but I made two separate ones – one on Applied Statistics in Python, with a heavy focus on doing the code and keeping it practical, and another thats a pandas crash course. They’re both linked from my personal website, if you’re curious.

Do you have any advice for people that want to get into content creation too?

Hmm, well your mileage may vary wildly, but I do it because I like teaching, I like creating the courses and breaking down concepts. Unless you’re in a very hot and new area (looking at you, deep learning), my experience has been so far that you’re not going to live off it, so make sure that you enjoy creating the content for its own sake, don’t approach it like a job.

Though then again, maybe that’s my issue with it. If only I had more hours in a day to spread around!

Is there anything else you’d like to say?

Space is crazy, come study it.

Thanks for doing the interview, Sam!