To Python or not to Python…

… is not a question anymore. All our students learn Python, starting the day they enter the university (and even before), and when teaching you are expected to integrate Python and programming whenever possible.

Of course, it makes sense for the university to promote the use of a free, open-source software rather than a commercial product like Matlab, but for all of us old (and not so old) lecturers at the university who – like me – have done your data analysis and plotting since the beginning of time in Matlab, it is not an easy switch.

I took a Python course more than a year ago, and I’ve done a bit of Python here and there, but for a long time now, it has been one of those uncomfortable “have-to-do” but “not-right-now” things that keep accumulating at the horizon. Until a month ago, when a twitter-thread by a colleague (Thanks, Angelica!) who had decided to take the step (and who enjoyed it!) finally got me to dive headfirst into the Python world… so, I read a Python – book (Python for Data analysis by W. McKinney) and set my mental default “program-to- open-when-time-for-science” to Python (or Jupyter, Python is a programming language, not a program). I did not go as far as to uninstall Matlab, but I’m only using it for emergencies…

I quickly realized that I’m Google-dependent – whenever I don’t know how to do something – Google is there to help, directing me to Stackoverflow or one of the thousands of Python tutorials that are available online. It seems like (almost) every question has been asked before – and that there is an army of Python-enthusiasts out there ready to answer and help*!

Now, Matlab and Python have much in common – it is not like I’m starting to learn programming from scratch. Maybe more like learning to speak Norwegian (rather than Chinese) when your mother tongue is Swedish? You understand what the Norwegians are saying (i.e. you can read and  – at least roughly – understand code that others have written), but to write your own Norwegian text and to speak… hmmmm, not so easy! You quickly get used to all the small differences – like that you have to start counting on zero and not on one, and that you have to use # and not % to comment out lines – but get accustomed to all the different types of variables in Python, to build up a vocabulary of commands and to  “think” in a python way, rather than “translating” your Matlab – way of doing things will take longer time.

I’ve lived more than a decade in Norway – but my children still laugh if I open my mouth and try to speak Norwegian… hopefully, it won’t take that long to be fluent in Python!

“Hytte” office!

The Norwegian word “hytte” means cabin, and as a foreigner in Norway, you easily get the impression that *everyone* has (or has access to) a “hytte” (if not two or three). That is of course not true, but to “blend” in (end to enjoy lazy weekends away from home) my husband and I bought a “hytte” on an island not far from Bergen a few years ago.

With the kids away on scout camp this week, we took the opportunity to turn the hytte into “Hytte office”. With laptops, food, and an upgraded data deal with our mobile operator in the trunk we headed out to Øygarden earlier this week – and it’s amazing!

I do appreciate the changes in communication that the pandemic has forced upon us – from my “hytte office” I’ve participated in a Ph.D. defense in Paris (Congratulations, Ph.D. Lucie!), discussed figures and results from the Fimbul ice shelf with colleagues in Tromsø and checked in on what our seals in the Weddell Sea are up to… all while enjoying this wonderful view!

… it’s also a real treat to just step outside and munch a few blueberries (yes they are blue already!) while your Python script is munching away on the commands!

Have a nice summer!