Back to articles list Articles Cookbook
13 minutes read

A Mathematician in the World of SQL

Agnieszka


She has a PhD in Mathematics and over 10 years’ experience teaching mathematics and computer science at the University of Warsaw. She knows SQL better than just about anyone I’ve met. Let’s get to know Agnieszka Kozubek-Krycuń, Vertabelo’s Chief Content Officer at Vertabelo.





Let's go back in time. How did your adventure with math start?

I’ve always enjoyed abstract concepts and problem solving. I was fascinated by variables when we learned to solve simple equations like x+2=5 in primary school. My mother was a math teacher, so I had seen mathematical formulas before. They looked very mysterious and intriguing to the 6-year-old me. And now I could understand them! I felt so smart!

Later in primary school, my teacher encouraged me to participate in a math competition. She gave me a problem set book to work on as preparation for the contest and I got hooked on problem solving. Sometimes I would solve a problem in minutes. And sometimes I would ponder a problem for hours or days. When I got stuck on something, the problem was always at the back of my mind. I didn’t think about it all the time, but it was always there – when I was walking to school or taking a shower. The satisfaction when you finally solve that kind of problem cannot be compared to anything else!

It sounds like you enjoyed math.

I used to learn math on my own. I would read my textbooks ahead of time to see what was coming and learn it on my own. I spent one summer studying my mother’s high school math book, discovering quadratic equations. I know it’s a weird summertime activity, but I had a lot of fun.

I still have this approach to learning new things. I like to know a lot and as soon as possible. I try to bring my students to this way of thinking. I also use it to create new courses at LearnSQL.com.

And how did your teachers react to your enthusiasm?

I was very lucky that I had great math teachers, both in primary school and in high school. They encouraged me to work beyond the school curriculum; they challenged my curiosity and interest in math. My high school mathematics teacher, apart from teaching us, was also responsible for the model of teaching this subject for our whole province. She advised local authorities on education, so it's fair to say that she knew her stuff. She published books and had her own innovative educational methods. I sometimes use the teaching methods they used on me and my classmates in my work.

I envy you. I didn't have such teachers. I liked math, but I didn’t love it. So, what happened after high school?

I took the university entrance exam – on a hospital pass!

After graduating high school, I had severe pneumonia. I ended up in the pulmonary ward of the Kielce hospital. I had to ask the doctors to let me go for a day. If they didn't agree, I would have run away to Warsaw for my entrance exam.

What determination! How did that go?

Well, I went to the University. I couldn’t decide between studying mathematics (which is what I wanted) and computer science (which seemed more practical), so I decided to study both. The University of Warsaw offers something called a JSIM (a double degree program in Computer Science and Mathematics), a special program for students who want to get both Mathematics and Computer Science diplomas. So I’ve got two Master’s degrees: one in Computer Science and one in Mathematics.

Agnieszka

Even though I wanted to study math and I chose computer science only for its job prospects, it was computer science – especially theoretical computer science – that I enjoyed the most. My PhD is in that field. My PhD thesis is titled “A Formalization of the Naive Type Theory”. Technically, this is a PhD in Mathematics.

Agnieszka

You are an academic lecturer. What do you teach students?

I’m a Teaching Assistant for the course “Foundations of Mathematics” at the University of Warsaw. My class teaches the basic vocabulary of mathematics – set theory, cardinality theory, some logic – and how to conduct formal rigorous mathematical reading. A popular book on this subject is Ian Stewart’s Foundations of Mathematics. I recommend that everybody read it.

I used to teach other courses at one point or another: object-oriented programming, lambda calculus, and functional programming. However, the workload of university teaching and full-time work at Vertabelo was difficult to juggle.

You don’t teach easy subjects. Do you have a special way to transfer knowledge to students?

I usually start each class with a quick overview of the material covered in the lecture. I try to explain the concepts once again in simple terms. I give examples that are accessible to students and showcase common mistakes or pitfalls. We start with doing a few easy exercises to familiarize everyone with the concepts, then we go on to more challenging problems.

I try to include all students in my classes. It’s very easy, especially in a university setting, to only focus on “good” students. Some students can understand complex things almost at once. Others need more time. I know that those who need time can often feel excluded from the class. Yet, those who need more time to process ideas often end up understanding them on a deeper level. They are afraid to ask questions when everyone around seems to just “get it”.

I encourage students to ask questions. I always repeat a difficult solution, highlighting the key steps to make sure that everyone understands it. And it’s important that everyone does plenty of exercises on their own. It's exactly the same with our SQL courses.

The course I teach is a first semester course. The students are straight from high school and they need some time to adapt to university learning. It’s very different. The material is more difficult, the pace is faster, and there’s less guidance. The students are expected to be independent.

What do your students think?

The department runs a survey for each class at the end of the semester. I’m very proud that the feedback I get for my classes is usually positive.

When did programming and computer science appear in the world of mathematics?

Euclid

If you think computer science is “algorithms”, then Greeks already had some algorithms: the Euclidean algorithm to find the greatest common divisor (GCD) of two integers and the sieve of Eratosthenes that lists all prime numbers up to a certain limit. Though I read somewhere that Euclid did not like his algorithm. He wanted to have a “formula” for a GCD, but he only found a procedure. He thought it was half a solution.


In the 18th century, we have Charles Babbage and his difference engine, which we think of as the first idea for a computer. Babbage’s machine didn’t really exist in his lifetime, but Ada Lovelace, the daughter of the poet Lord Byron, wrote programs to run on this machine. Ada Lovelace is thought to be the world’s first programmer. There is a programming language, Ada, named after her.

Alan Turing


In the 1930s, years before the first computer was made, two theoretical models of computation were invented: Alan Turing invented his Turing machine and Alonzo Church invented lambda calculus. The Turing machine was an inspiration for John von Neumann when he worked on the first real computer. Lambda calculus is the theoretical model of computation for functional languages.





Do you remember your first line of code?

Yes! As I said, my mother was a teacher. At some point, she needed to get some additional formal training in mathematics. Her college classes included a course in programming. She got a floppy disk with the Turbo Pascal compiler and multiple photocopied listings of simple programs with one of her courses.

I learned to program from my mother’s resources: I typed the program listings into a computer and ran them. My first program would probably ask your name and then it would say “Hello Jakub”.

Borland Pascal

I learned to code properly at university.

How did you start working with SQL and databases? Was it by chance, or was it a conscious decision?

It was by chance. When I was doing my PhD, I worked part-time as a Java programmer. The project I worked on, OneWebSQL, was a Java library that helped programmers generate correct SQL queries in Java. This was my first serious exposure to SQL, where I had to look at the SQL ANSI standard and think about the role of SQL in application development.

As part of this project, I got to write some blog posts about Java and the connection between Java and SQL. I think we also had a mini-series on the basics of SQL, which prepared me mentally for creating the SQL Basics course at Vertabelo Academy. Writing for the blog made me realize that I enjoy writing and sharing my knowledge.

Some time later, I joined Vertabelo – the owner of LearnSQL.com – as a Java programmer. At the time, Vertabelo only had one product, our database modeling tool. This job made me learn a lot about relational databases, different database management systems (PostgreSQL, Oracle, SQL Server, MySQL), SQL, managing databases, etc.

For me, working with SQL happened by chance, but I don’t regret it.

Do you think it’s important for others to learn SQL?

Everyone should learn SQL. People in IT often dismiss SQL because it’s quite an old language and they like following new trends. But I’ve noticed that many programmers and IT people could benefit from learning more SQL. If they knew SQL and databases better, they could write more efficient or more readable queries.

For example, we have a unique course about Window Functions. Window functions are a less-known SQL feature that can simplify a lot of queries. We talked about it some time ago when it was our SQL Course of the Month. We also have a course that teaches recursive queries, which can be useful to programmers.

LearnSQL.com

People outside of IT can also learn SQL. It can be useful for data analysts, marketing specialists, and finance specialists. SQL syntax was designed to resemble the syntax of an English sentence. The idea was that non-IT specialists can select data from a database without the help of an IT professional.

Knowing SQL can be a good way to develop a career. If you don’t believe it, look at job offers for SQL developers or analysts. (See the article 10 Websites That Will Help You Find the Perfect SQL Job.) Good pay, interesting work. What more could you want?

What I enjoy the most about SQL is that it has solid mathematical foundations. SQL was built as an implementation of Codd’s relational algebra. There are a number of theorems about the expressive power of SQL. These foundations are the strength of SQL and, in my opinion, one of the reasons why SQL has stood the test of time.

You were one of the creators of Vertabelo Academy. Now you are working on developing Learn SQL.com. Do you like this job?

Yes, I do. I like that my job is varied and involves a lot of different tasks. I manage the content team, which means I’m responsible for the creation and maintenance of content – our SQL courses, technical blog articles, cheat sheets, and SQL challenges. I get to work on the big picture: I help prepare the road map for upcoming SQL courses or work on the outlines for new courses. But I also get to work on little details, like the exact phrasing of some exercises or why a specific user solution is not accepted by the platform even though it should be.

My job involves working with the development team on technical issues and cooperating with the marketing team on some creative projects. I enjoy the broad perspective my role offers.

I enjoy seeing things happen. It’s thrilling to see what once was an idea materialize as a working SQL course that people can complete.

As Vertabelo’s Chief Content Officer, what kind of boss are you?

My team is very talented and highly motivated, so they make my job easy. The way I see it, my job as a boss is to make sure things get done. This means that I must prioritize tasks so that we work on the most important ones first. I need to remove obstacles that prevent my team members from being successful. I ask about the challenges and difficulties my colleagues face and I try to deal with or at least lessen those problems.

It’s important to know your team members and to understand how they approach tasks. Some people need order and routine to thrive in the workplace. For these people, it's important to help build their routine. And don’t break the rules you agreed upon.

Others need frequent changes; routine work bores them. Assign varied tasks to these people. Offer them a change of pace. Accept that they will be a little chaotic in their work.

It’s the manager’s job to figure out which style works best for each person and to assign the tasks so that everyone gets to work in their unique style.

You have a lot of things on your mind. How do you relax?

Nothing exciting here. I’m an introverted bookworm. My favorite pastime is reading. I like fiction – I’ve been reading a lot of detective stories and medical thrillers. I also like historical fiction; I think I read over 50 novels set in Tudor England, and I went through an Elizabethan phase. I also like science fiction and contemporary literature. My favorite author is Terry Pratchett. I enjoy his sarcastic humor.

Agnieszka

I like going for long walks in the forest and hiking in the mountains with my husband. I come from the Świętokrzyskie region, which is hilly. We often go there to visit my family and to go hiking in the Świętokrzyskie (Holy Cross) Mountains.

My husband loves the mountains, so every year we visit some higher peaks. They can be Polish mountains, like Bieszczady or the Tatras, or they can be the Alps. However, our favorite holiday destination is Slovakia. We’ve been there more than 10 times. We find the Slovakian mountains very peaceful, and the Slovaks are friendly and welcoming.

An additional thrill in going to Slovakia is listening to Slovakian language. Slovakian and Polish are similar, so Slovakian sounds funny to Poles and Polish sounds funny to Slovaks. But we are beyond the “funny” stage now and I’m just excited to hear Slovakian and learn some new phrases and expressions.

Getting to know Slovakian better gives me the opportunity to learn about the history of the Polish language, about European history, and sometimes even about the history of civilization. For example, did you know that the Polish verb “płacić” (to pay, “platiť” in Slovakian) comes from the word “płótno” (cloth or linen), which was traded by the Slavic tribes? I learned that in a Slovakian museum.

Agnieszka

You help others learn. Have you learned anything exciting lately?

A year ago, I went back to learning French. Fluently speaking the language of Hugo, Dumas, Proust, and Moliere is my childhood dream. I learned some French at university, and then I took a break from it. My French is now intermediate, which for me is the most frustrating phase! You understand a lot, but you can’t say or write much. You feel like you’re not making any progress.

I treat learning French as a hobby. I try to find something new in this language everyday – I’ll watch a French video on Youtube, listen to a podcast for French learners, write a short note, do a grammar exercise. I don’t set myself a crazy schedule; 10-20 minutes a day is fine. If I can do more, that’s great. And when life gets hectic and I have no time for French for a week, that's fine, too. I’ll go back to it next week, when things calm down.

Do you have a message for young students and programmers who might want to follow in your footsteps?

Never stop learning. It makes us develop and become rich in new experiences.