Physics, History and Haskell. Interview with Rinat Stryungis
Could you unite a career in physics with writing and teaching Haskell, one of the (allegedly) most complex programming languages out there? Today, we have an interview with a person that can. Meet Rinat Stryungis.
While he started out wanting to be a historian, Rinat has since become a physicist and a teacher of a Haskell course at Moscow State University, and he does all that while working with Haskell at Serokell. Rinat is truly a person that can wear many hats.
In the interview, we talk about the difference between people studying exact sciences and humanities, Haskell and its use in physics, and Rinat’s course at Moscow State University. Let’s go!
Exact sciences vs. humanities
Hi! Do you divide people into techies and humanities? If so, how do you think the technician’s thinking differs from the humanities?
The mindsets of technicians and humanities are very different from each other. Sometimes, I even feel the difference between physicists and programmers.
Our profession greatly affects us. Once I wanted to be a historian, then as a student of the Faculty of Physics, I went to courses at the Faculty of History of Moscow State University. Also, my previous girlfriend instilled in me an interest in philology. So, I know the difference between techies and humanities well.
A person in the humanities profession must constantly do three things:
- They must study people. They must study them objectively and subjectively. It’s hard to learn a culture that you don’t feel at least a little. Because of this, the reasoning of the humanities at first seemed wildly inaccurate to me and it annoyed me. Then I understood the methodology of history and why it became so.
- They must study and process VERY much low-concentrated and unstructured information. To be a good historian, you need to thoroughly study the primary sources, constantly keep abreast of new works of other historians, work together with philologists and archaeologists. This information is simpler than in physics or mathematics, but it is VERY abundant. Therefore, it is a little bit more difficult for them to give rigorous reasoning. But then, it’s a little easier for them to quickly understand difficult situations in life since they can immediately recognize them from many angles.
- They should write a lot and very well. They should express their thoughts very well and competently. Suppose I am a historian who has studied the culture of Assyria well. I spent many years on this, understood the culture of the Assyrians: read books about them, read their inscriptions, studied life, myths, ideas about the world, etc. Suppose I feel their culture. Now, so that my sensation does not die with me, I need to be able to express my sensation, my many years of generalized experience and accumulated knowledge in one or several books. Express complex and interrelated facts. Express so that the reader has a similar sensation from a culture that he has never known before.
This is a very difficult task, which is irreplaceable for the humanities. Therefore, usually, they are better able to express themselves with words.
Cool! And now, it’s time to talk about functional programming. How did you get into Haskell? And programming as well?
It’s a long story. As a child, I wanted to be a historian. I even found my specialization — “The Late Roman Empire and Byzantium”. Then, in the 9th grade, I decided to be a physicist: I read a lot of science fiction books and decided that it is the only way I can move humanity forward into space.
Physics at the university didn’t go very well, unlike programming, but because of this childhood dream, I thought that any activity besides physics is something meaningless and without any value. I liked programming but for me it also seemed like something non-fundamental and fleeting.
In general, I liked IT, I worked as a system administrator, but perceived it as something temporary, which has to be done purely for the sake of money. In my previous job, I wrote a lot of different utilities in C ++. Although initially I was employed as a system administrator, at some point, I decided to learn something new. Python language in my case.
Suddenly, it was rather hard for me, although I had heard a lot about its simplicity. Then, I thought that probably I hadn’t studied anything new for too long and my brain had “stagnated”. To fix this, I decided to study something that would be as difficult and new as I can make it to be. I chose functional programming and the most “functional” of all the languages — Haskell. It seriously changed my life.
Pretty quickly I became interested in this language. I liked that certain problems are solved with the support of related math. Then, I admitted to myself that I didn’t quite want to be a physicist. It was difficult, but for a long time there was not a single moment when I regretted it. I studied functional programming excitedly, without even considering that I could ever work and use it. At least not for money.
Now I’m a little bit sad that I entered this area so late. I constantly need to catch up with something, but better late than never!
Does knowing Haskell help you in science over colleagues?
Definitely, yes. As it turned out, the language is quite suitable for writing code quickly, which, in fact, is really necessary in physics.
Maybe you can tell us more about the Haskell course you’re teaching to other physicists?
Sure. My course is based on the Serokell ITMO course, with minor changes. The main goal of the course is to give enough knowledge and experience to put the language into practice. In particular, at the end I will go through popular and often used libraries. Therefore, the course turned out to be quite extensive and difficult. I give a lot of homework, plus, at the end of the year or in the summer there will be individual projects.
I warned people in advance that the course would require a decent amount of time from them, but it would also give them a lot in return, not just being an overview course or an introduction to the language. Nevertheless, a significant part of people did not pull the combination of this load with the rest of their studies on the eve of the session. The course runs 2 days a week for 1.5 hours.
How is it different than teaching programmers and helping people here, at Serokell?
Usually, people come to me with zero knowledge in programming or at a very basic level, like the introductory semester of 1–2 courses of the physics department. This makes learning a language even more difficult due to the lack of a “background”. They do not have the intuition that helps programmers learn new areas of IT.
In addition, I explain some basic algorithms and data structures. This is an interesting experience; however, it requires a lot of time, both from me and from my students.
How did you get around to doing that?
I like and enjoy teaching. Previously, I taught a course on the history of the late Roman Empire for 5 years. Teaching helps to systematize one’s knowledge. When you are looking for a clear way to explain a concept, you understand the concept by yourself better than before, even if it seemed obvious. I decided to teach Haskell with several goals:
- I would like this language (or at least its ideas) to become mainstream in the industry, and so I at least slightly increase the likelihood of this.
- I would like my achievements made during the writing of the diploma to not sink into oblivion if I decide to leave the faculty.
- The more people know the principles of FP, even if they don’t use it, the greater the likelihood that it will be used somewhere, because current students will someday become specialists, and then leaders. And I would like for some of my current students to become my colleagues in the future:-)
What materials do you use when you prepare your courses?
For the introduction, I use Denis Moskvin’s lectures on lambda calculi and Pierce’s type theory. I’m actively using Graham Hutton’s textbook “Programming in Haskell”, “Learn You a Haskell for Great Good!” and “Thinking with Types”.
For homework, in addition to the above, I use tasks from the course of Denis Moskvin on Haskell on stepik.ru.
As a teacher, can you say that Haskell seems to be more popular with years among the students?
It’s not easy to say, as it is my first full-time course. But I think this will not happen.
Now I have the impression that Haskell is good as a tool for large-scale development of complex applications. But students-naturalists (physicists, chemists, etc.) often need just an auxiliary tool. Such as, for example, Python, in which you can write a simple script quickly and without going into the details of the programming language.
My course is purely voluntary and some of the students have stopped attending it. There are only those who, apparently, have already decided to connect their lives with IT. They are ready to spend a lot of their time on self-development in this area (2 lessons per week, often 3 + homework).
Perhaps, there is a way to interest in Haskell those who don’t plan to be programmers, but this requires a quick overview mini-course. This might be a good idea, but my current course is in a different format.
Originally published at https://serokell.io.