GSoC’17: From 1 Line of Code to 4828

Hello folks,

This had been one of the best summers in my entire life, and one of the most productive one too. All the hard work and love for the work which I did start last year, mostly by this time only I guess, paid off. One of the greatest blessing in my life which happened is getting into a University which has a diverse FOSS culture. The people there, they are total bliss 🙂 The amount of help they have provided and the amount of effort they have put into me, making me what I’m and that is tremendous. I’m unable to find a better way to appreciate them for the amount of help they have put into me. To be honest I still feel like all these are just a dream. I still can’t digest the fact that, I was possible to get this done.

So all start during this same time, last year. A beautiful Caption, Experience Freedom got into my head. Yes, it is the Tagline of my favorite community KDE. Following that, I did almost everything an Open-Source Enthusiast does. Joined their IRC, went to Bug trackers to solve some issues, Talked with developers who have diverse knowledge on the things which they do, rather than someone like me 😛 People in KDE are so helpful and friendly that, at any time I was having a doubt or was stuck at anywhere, let it be some silliest mistake at my end itself (most of the time though :P)

I still remember the time, I struggled to get my build running and fix a bug which I assigned to myself :P. It took me almost 2 months in KDE to fix my first bug, In fact, that was in KIO framework :). (I was searching for the code section in the code base of system settings the whole time, where I should have looked into KIO, Rookie issues — you know 😉 ). I still remember my first patch was just removing a clear button from the system settings, because it had an inline clear already, and it was just roughly 8 line of code change.

They are there to help me and support me. With the flow of this going through, I got to know about a program called KDE-SoK similar to Google Summer of Code, But a bit different, without any stipend and hassle free of deadlines, whatever maybe, the thought of my work going for the betterment of the community I love, It pulled me to be a part of it. yay! I was a part of it. I worked for a project in KDE called KStars. Within this, I exposed myself to new opportunities after that. I got to know about KDE conf India, conf.kde.in, I got invited to give a talk there on the topic Object Tracking Using OpenCV and Qt. That was the place where I got to know a few of KDE devs face. (Argh, again, the blog post about it really late too, still in my Draft! Seriously! what was I so busy with :P)

Then came the Google Summer of Code, one of the most hyped programs in our college. Not only in our college, from the people I know in different parts of India, It is almost the same situation in almost every college, where there exists some FOSS culture. Project List for KDE was published. I thought, Since I have done KDE SoK project with KStars I will move with that itself, but it had lot of astronomical content and the project seemed to be a fair bit complex and for me, because I was in my freshman year and only had a fair bit knowledge on the programming skill set that the whole KDE community required. I always felt that I might have got in with KStars itself, but for me what mattered was successfully completing the project with in the deadline. Then I saw a project in Krita, and looking through the codebase itself, I don’t know why, but I was able to understand what was happening under the hood. And fortunately, I found a pretty good project as well in Krita, Integrate share.krita.org [Phabricator | idea]. This was profound enough for me.

Went into Krita IRC channel talked with the people around. Started to fix some bugs in the codebase. And when we were talking, they mentioned that at least 3 bug fix should be there for a GSoC participant in Krita. And that was mind boggling because I had to get that done in 1 week of time, where I had to start working on my proposal too. But I never gave up and did those 3 bug fixes in the span of 1 week and completed the proposal in time and submitted it off! Even though those bug fixes weren’t that huge ones, just roughly maybe 50 lines of code. But I did it 😛 And Luckily guess what, I got selected.

Meanwhile, after getting selected, during the community bonding period, I was continuously blogging in most of the reports and about my project idea on how I was thinking to move on and make this project into a reality. Here comes my life saver to the rescue leinir, according to plan we might have to recreate KNSCore again if we were going to create the content downloader with libaattica. But seeing my blog posts, I got in touch with leinir and from then, they were a real help to me.  Still, I was a bit confused and needed some space to get a clear idea on what I should do in order to get the project done in the perfect way. There comes one of the best camps I attended here for a week, a camp called Gitaamritam, one of most irritating but the best rule for this camp was that we weren’t allowed to use any kind of devices until the camp gets over. Even though, this was tough for me because, especially during the time of GSoC, but that was the time when the whole perspective on how I viewed my project changed and I got an evident idea on how to proceed. (I had lot of ample time to think and think and only think about the project for a whole of 1 week 😛 )

Before I get into much more technical aspects, I would like to thank my mentors, Timothée GIET, Scott Petrovic and Boudewijn Rempt for the tremendous help for shaping the whole procedure into an awesome one. Thanks a lot!!!

 

Screenshot_20170906-180002
I just love my mentors :), They are super cool. Just like the art we create and the code we write 😀

 

After that, everything started off with a blast! All the functionalities as planned from the wireframe mock up and all was done with easy with hell lot of help from the community.

Created a widget class named DlgContentDownloader, which will act as the interface between, the dialog and the user. After all the work, the content downloader ended up having all of these functionalities:

  1. Download/Install the specific content.
  2. Remove/Uninstall the specific content.
  3. List View Mode
  4. Icon View Mode
  5. Search functionality
  6. Provision for rating.
  7. Selection method for the categories/bundle.
  8. Order by function.
  9. Shows number of downloads/download Count

Classes and functions for different functions have been written down and almost complete.

  1. entrydetailsdialog: Gets all the entries in the server which could be downloaded or manipulated.
  2. itemsgridviewdelegate: For the grid view of items.
  3. itemsviewbasedelegate: Acts as the base class for all the delegates.
  4. itemsviewdelegate: Gets the list of widgets or the items.
  5. widgetquestionlistener: It allows the framework to ask the question to the user in a widget based level.

Since I was handling bits and parts of libraries as well, I learned a technique in Qt, d-pointer(d-pointer implementation is a part of design pattern is also called opaque pointers in other architectures).

Also, going into a deeper level of the project, we have used certain KDE primary level framework/APIs in order to complete the GUI and get things working as planned. SOme of them are:

  • Kconfig

The KConfig framework offers functionality around reading and writing configuration. KConfig consists of two parts, KConfigCore and KConfigGui. KConfigCore offers an abstract API to configuration files. It allows grouping and transparent cascading and (de-)serialization. KConfigGui offers, on top of KConfigCore, shortcuts, and configuration for some common cases, such as session and window restoration.

  • KWidgetsAddons

KWidgetAddons contains higher-level user interface elements for common tasks. KWidgetAddons contains widgets for the following areas:

  • Keyboard accelerators
  • Action menus and selections
  • Capacity indicator
  • Character selection
  • Color selection
  • Drag decorators
  • Fonts
  • Message boxes
  • Passwords
  • Paging of e.g. wizards
  • Popups and other dialogs
  • Rating
  • Ruler
  • Separators
  • Squeezed labels
  • Titles
  • URL line edits with drag and drop
  • View state serialization
  • KRatingWidget

This class is a part of KWidgetAddons class. It displays a rating value as a row of pixmaps. The KRatingWidget displays a range of stars or other arbitrary pixmaps and allows the user to select a certain number by mouse.

After all of this, I was working on the UI for the content downloader. as planned as the mock-up and here is the implemented dialog with the mockup we planned according to the wireframe.

 

After this was the second part of the project, Improving the design aspect of bundle manager and fix the issues and add certain UI features into the resource manager, such as search functionality for finding the bundles of your choice.

Here is the before and after of the bundle manager:

 

Hence that was it, the most exciting summer of my life, so not elongating this blog post anymore, just dropping down my pen here with some snaps, where my favs ❤ appreciating my effort during the whole struggle, they know the whole struggle story 😛

All the Blog posts till now related to GSoC’17:

Work Product: https://cgit.kde.org/krita.git/?h=Aniketh%2FT6108-Integrate-with-share.krita.org

Status Reporthttps://community.kde.org/GSoC/2017/StatusReports/AnikethGirish

Cheers.

Advertisements

3 thoughts on “GSoC’17: From 1 Line of Code to 4828

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s