How I Spent My [Google] Summer [of Code] Part 1
How this journey started
“Congratulations, you won the school fiction competition.”
“We’re excited to inform you of being accepted to Harvard University.”
“We’re happy to have you in this team, working here with us in NASA.”
At each step of our lives, there are such announcements which may be quite different in scale relative to the outer world but always have a great value to us at that exact moment.
For me, working in the software engineering industry for the second year, coming from an absolutely non-related field, this announcement was “Welcome to Google Summer of Code 2022”. First, I heard about this program in the autumn of the previous year. Although it’s the 18th iteration, it was something new for me. And luckily, it was the year this programme was largely updated, the first time since its appearance allowing non-students to participate. I was no longer a student, but I was sure I had much to take from it.
Google Summer of Code is a programme connecting organisations working on open-source software and individuals passionate about computer science who want to get into this open-source world. Besides providing an opportunity to collaborate, Google also awards students with stipends allowing them to focus on learning for the summer.
In the autumn of 2021, I heard about this and understood that I’d be able to participate. But the next step which demanded any actions from me was not until the following spring, so I just created a reminder for myself and remembered about it only on the 1st of April. But, unfortunately, it reminded me of itself a month after the organisations were announced so I couldn’t choose them with greater care.
The idea of GSoC is not to connect organisations that need some tasks to be done and young professionals eager to add one more point to their resumes. Instead, it focuses on making the open-source community sustainable by gently pulling in new contributors.
That is why I was slightly frustrated that I didn’t have enough time to consider all the interesting organisations but had to make a single choice instead. Still, it was a conscious one based on a desire to dive into more technological aspects after working 1,5 years dealing mainly with business problems.
In a short period, I had to get to know the codebase and make my own contributions (which is a requirement for your proposal to be considered by the organisation). But the most challenging part was writing the proposal. I’m pretty sure that if I started earlier and had enough time to get acquainted with different options and understand how I could make them better, I’d come up with my own idea. Still, I was short on time, and luckily the organisation already had a set of ideas which were quite varied and challenging (probably, the most important criteria for me).
Hoping to start with 2–3 pages for my initial draft of the proposal, I managed to write 9 on my first attempt. Unfortunately, there wasn’t enough time to get two revisions from mentors, but I overcame this issue.
Surprisingly even for myself, I was pretty confident that I’d be accepted, so I wasn’t that nervous. Instead, I used that time waiting for a decision, getting acquainted with the codebase and working on other issues. Finally, on the 20th of May, I got my letter on ̶w̶i̶n̶n̶i̶n̶g̶ ̶a̶ ̶w̶r̶i̶t̶i̶n̶g̶ ̶c̶o̶n̶t̶e̶s̶t̶/̶g̶e̶t̶t̶i̶n̶g̶ ̶i̶n̶t̶o̶ ̶S̶t̶a̶n̶f̶o̶r̶d̶/̶a̶c̶c̶e̶p̶t̶a̶n̶c̶e̶ ̶t̶o̶ ̶N̶a̶s̶a̶/̶ my project being accepted at Mathesar.
I had time to get acquainted with the team and prepare to work on my project. The actual coding period started on the 13th of June. And I’d like to tell a bit more about how the actual work proceeded.
For code lovers
There are multiple reasons I applied exactly to Mathesar:
Tech stack
- I knew Python a bit but mostly used it to write personal scripts. With this project, I have a chance to deepen my knowledge, learn one more framework for creating web applications (namely Django) and take over best practices which is difficult to do when you either learn by yourself or use some courses/tutorials/guides.
- Stack Overflows survey shows that Svelte is one of the most lovable frontend frameworks. I know Angular, used it in a couple of projects, and really like it. But, at the same time, I’m not a huge fan of React, so I wanted to learn something new to have it in the arsenal.
- PostgreSQL. I love this database more than SQL Server, which I had a chance to work with. But I mostly use it to create tables, write queries, etc. The stuff that around 90% (not a precise number, never calculated) of web developers do when working with databases. In Mathesar, I had to use some of the under-the-hood features of this database, and I’m always eager to play with this kind of stuff.
The name of my project is “Construct Dependency Graph for Database Objects”. Its idea is to have a Web API endpoint (and potentially a UI representation) that returns a list of database objects that depend on another.
Usually, when we use data definition language in SQL, making some modifications (mostly deleting), we get those warnings from the database that prevent us from removing objects with any dependants. And I have to recreate it for the application with the end user inmind.
The easiest part in all of this was that there is a set of functions and views called “pg depend display” that does exactly what I need. So my task was to rewrite it using SQLAlchemy statements (one of the main libraries in Mathesar), make it modular to match the whole project’s architecture, add tests and everything else.
I’m halfway through the implementation, but I assume that the most challenging parts (and the most interesting ones) are already behind. However, there were some challenging moments that I had to deal with:
- Although SQLAlchemy is a very versatile and powerful library, it takes some time to get used to how SQL statements are structured. But it starts to make sense the more time you spend working with it.
- My main tech stack is .NET Core. And the fact that it’s strongly-typed as opposed to dynamically-typed Python makes the whole flow of working a little bit different. (And it’s not just those accidental vars or types before the variable names). The lack of types forced me to look into the documentation more often than I usually do with .NET Core. When you have types, the compiler knows its attributes and tools like IntelliSense help you all the way.
On the other hand, there are some things that I found pretty pleasant when working with Python:
- Although there are features like Hot Reload in .NET Core, most of the time, you have to fully rebuild the application even if the change is relatively small. In Python, on the contrary, it takes a couple of seconds to see the change in action without any additional clicks besides pressing “Ctrl+S.”
- Somehow, Python just works for me. I also noticed it earlier when writing personal scripts. JS is also a dynamically-typed language, but you constantly stumble upon different issues. In Python, I was getting surprising results even when I was sure I screwed something up. It improves the overall impression of the coding process.
It’s really much easier to get to the point of proof of concept, which you might present to your colleagues and elaborate on that code later, making refactoring and necessary optimisations.
I’m pretty early in my software engineering path. I have to learn about dozens of other languages, tools and paradigms, but I like both .NET Core and Python. And I’m happy I had this opportunity to try both of them on complex projects and learn how professionals write their code.
Still, the most challenging part of the whole part of the Google Summer of Code was not learning the database, new technologies or implementing something specific. It was decomposition. Before starting the project, I had quite a detailed proposal with everything I needed to achieve to make it work and even the timeline. But that’s not enough. Developers use tasks to track their job not because it’s a standard we must comply with but because it’s convenient.
The thing is that previously in my practice, there were people in the team whose full-time job was creating those tasks based on high-level requirements. This summer, I had to do them myself. I struggled with this, which is why I spent almost 1,5 months just working on a single-POC task. Only after finishing it and having a revealing conversation with my mentor (thank you, Mukesh) was I able to take another high-level look and clearly understand what else needed to be done. This time, I could extract tasks I could work on and do them the usual way.
Overall impression
Google Summer of Code is one of the best things that happened to me in this world of software engineering, the best being the Binary Studio Academy, which helped me get into this world (I wrote about it here, unfortunately, not in English).
Still, the impressions are the same. It’s an opportunity to get acquainted with real language and some tools while working on an actual project. I have a chance to communicate with professionals who point out my mistakes and share their experiences.
One of the main goals of Google Summer of Code is to attract new people into the open-source community, which definitely worked for me. Although the terms of the program are limited, I’m sure that after taking a little break after its end, I will continue contributing to Mathesar and look for other projects to which I’d like to lend my hand.
And last but not least. Different people have different mechanisms to cope when something terrible happens. I’m from Ukraine, the country that was attacked by russian federation at the beginning of 2022. I’m not a soldier, and I’m of little or no use on the front, so the only way I can get help is to be an effective backfield. Sometimes, it’s mentally challenging when you know what is happening there, have close people being much closer to the battlefield, or when you are forced to go to the shelter several times in a day.
And the best coping mechanism I have is work. When the war started, it was difficult to focus on doing my job in the first couple of weeks. Still, a bit later I understood that I was even more effective than before the war started because work helped me to distract. And Google Summer of Code was even the better candidate for this kind of distraction because it’s something new, requiring a lot of full attention. So, I’m grateful for participating in the project during this cruelty in the 21st century.