 Hi, everyone. So this is a little talk on Calc, which is my very first open source project. This was done as part of the season of KDE 2021. Hi, everyone. I'm Rohan Ashokan. I'm a student developer from India. I'm really sorry the slides are pretty messed up. I think it's possibly something from the conversion. Yes, I'm a student developer from India. I'm currently a web developer too, and I'm working on a game startup. So it always started when I actually wanted to get into open source. Open source was something really alluring to me, and I wanted to jump in naturally. So the only piece of open source software that I was using back then was KDE Plasma. And naturally I wanted to do something for KDE. So I jumped in and the first thing I started doing was setting up the environment. And it took me around three months. I was on a Cali OS back then. I guess it wasn't the right OS for development. It took me a really long time to set it up. And once I set up, I started working on this issue that was bugging me since the beginning and was possibly one of the reasons why I wanted to come into open source. This was a search bar in Dolphin. I tried asking around. I tried looking into the code. It was pretty overwhelming. I was a complete newbie back then. I didn't know what to do or what to start. And it was pretty overwhelming. And at the end, I ended up forgetting about it. And then came Season of KDE. This was something for beginners. And I was being a beginner myself. I was all in for doing something with Season of KDE. So I worked on this project called Calc. Calc is an open source cross-platform calculator application that is built using the KDE origami framework. It has its focus on power and being lightweighted. So it's really user-friendly in that sense. And back then, the calculator had a basic calculation model, you know, additions, subtractions and all that, including a few scientific functions like time, cost, and the like. So what I wanted to do was add up to this already existing arsenal of scientific functions and also bring in an entirely new binary calculation module. So I call this thing the programming mode wherein you can add binary numbers or subtract binary numbers or do operations with binary numbers in general. And also, I wanted to see the converted output surface. So let's say I type in 1001 in binary. I should be able to see it in decimal or octal or hexadecimal for that matter. And I also wanted to introduce a new feature called the date calculation module. So it's really common that, I mean, I can't calculate dates practically speaking. If you ask me, what's the difference between two dates, that's really hard for me. And I tend to use a calculator. So I wanted to see how a date calculation module would fit into an application like Calc wherein Calc was focused on power and the end user friendliness. So my first course of action was adding to the scientific calculations module. To put it into perspective, the code base of Calc was really small. Just to say there'll be a bunch of files that are the back end, a bunch of files for the front end. And there was some parser files. So at the most, it'll be a dozen files and it wasn't much code. But then back then, being a newbie, I wasn't able to understand much. I felt overwhelmed by the code and it was pretty bad. I didn't know where to start. I didn't know what to do. So I went and talked to my mentor, Hanya. She helped me out and she pointed out to a few PRs and those actually helped me a lot. And I figured out how to add some features, add some functions to this. And that was my very first merge request with KDE and open source in general. So I guess you can see that. So my next course of action was obviously building the binary calculation module. Compared to the previous feature, this was something, this was a massive overtaking for me, undertaking for me. And that's because it was a completely new mold and it required completely different parsers and different ways that I should flow the data. Initially, when I started working on it, it wasn't very easy to figure out where I should add, where I should change, where I should update. I didn't have that understanding of the code base. And yeah, I ended up taking an entire month, digging around, searching for things and still not understanding the code base. And then I realized that I had a mentor and I could talk to her and figure out what I should do, obviously. So I went ahead and talked to her and surprise, surprise, it took only three days and I was done with the calculator module. That was a huge realization for me. One month of digging around on my own and figuring out nothing. But then three days, I just talked to a mentor and three days it was done. So these are some revised pictures of the calculator module as it stands today. And at the right, you can see some calculations being made. And I guess in this version, the optimal conversion wasn't being done and it was only binary decimal and hexadecimal. We did a couple of operations, but the binary calculator module is currently limited to only two numbers. So you can add two numbers or subtract two numbers, but more than two numbers, currently it's not possible. That was a design decision considering that the calculator is very lightweight. And the next thing we faced was someone actually pointed out that we were using a C++ data type. The project was based in C++. So we were naturally using a C++ data type which had non-infinite precision. So the precision was limited. There was a limit to how big the numbers could get or how small the numbers could get. So possibly over 10.24 or 10.20 or something. I wouldn't be able to calculate with that version of the calculator. So we had to port to an infinite precision calculations in the back end. So we used something called K number, which is part of the KDE API. And during this time, I was able to form a complete understanding of the calc module after all this time. This was when I actually was able to form a full picture. This is because K number required changes in every single aspect of the program. And because of that, I was able to piece together a full image of how the data flow happened within the program. And this was pretty important going on because I was designing a new date calculation module. And on planning about it, there were pretty much three operations that I wanted to build. These were finding a difference between two dates. So given a date in the future and given today's date, I want to find how many days are between these two. This feature would be able to do it. And next was, let's say you have a given date. That is, let's say, 21st of this month. And I want to know what the date would be 20 days from then. So that would be the use of that feature, the add a number of days to the given date. And the subtract a number of days from the given days is essentially, let's say, 30 of this month. And I want 20 days before that. That would give me a date that is 20 days before some given date. That was a core idea. And I started building up some UI for this. This was pretty straightforward. And I used some models and calculators from the KGAMI framework and QT. We actually did not push this to the current version. That's because we were not sure if this would stood the user base, essentially, because tag focuses on simplicity and ease of use. We were not sure if this date module would really fit in with that theme. Obviously, it depends on the community now. If you guys need it, we'll be ready to build it up. And out of all of this, my takeaways were quite a lot because this was my very first experience with open source and it caught me a lot. And I'll just put it out there. So maybe someone who is planning to get into or is scared of getting into open source could use it. So the very first thing I faced was being scared of a code base which put out that open source journey for a long time. And there's nothing to be scared of it because when we renew these, we don't understand how code works, how data flow works and all that. So what one needs to do is just pick up a feature that you want to implement and start from there instead of starting by learning the code base or something like that. Starting from what feature you want to build and then seeing where that leads you is possibly the best way to learn about a code base. And the next thing I understood from the full experience was you really need to talk to people and because they obviously have worked with the code base before and they know quite a lot and they'll be at least able to point you in the right direction. And for that reason, you really need to talk in this case with other people. And yes, the most important of all do ask doubts might seem really stupid to you. Most of my doubts still seem stupid to me, but those might not, that might not be the same way other people look at it. So they might be able to help you with the doubt and worst case, what might happen? There's nothing that could happen out of it. So the other thing that I learned was, especially from that experience with the binary calculator, I spent an entire month trying to figure out what to do is that you have to look at what to do yourself, but then you have to maintain that balance of communicating with others and doing your own work. That is very important and open source because the code bases are really huge over here. That is something I learned out of this. And thank you, everyone who has been directly or indirectly part of this journey and helping me with it. And thank you. That is my talk.