📜 ⬆️ ⬇️

How I became a developer

Who am I?



We begin first with this question. I am an ordinary dropout student at Irkutsk State Linguistic University. In my free time I like different things, I use Linux and KDE4 on my laptop. I study as a specialist in theoretical and applied linguistics, here we are generally referred to as “technologists” by the teachers. In fact, we are up to technologists how these teach up to the realization of the open source principle. We even have a course of lectures called “Programming in promising environments,” where a strange teacher gives us a solution to solve problems in Delphi. In general, in order to learn how to program a language as such, it is not particularly critical, on the other hand, each programming language determines in which paradigm you will get used to “thinking”. This, of course, IMHO, but still.

In this article, I tried not to use specific names, because who needs it - he will find, and who does not need - there is no need to say.
')

Introduction to the project



I learned about the KDE4 project for Windows and began to closely monitor its development. Of course, at first I didn’t even have an Internet connection - it’s cruel to sit with a GPRS connection per ruble per meter. But even then I was tempted to try it by hook or by crook. Then anlim came and the opportunity was given. The first release I tried was 4.0.64, if memory serves me. The idea that all KDE applications can be used and intrigued me on Windows. A large number of bugs only added fire - with the help of a handy utility as part of KDE, the application could be written in a minute.

At about the same time, I often sat in IRC on the project channel. There I talked to the developers, found out the news, found out the points of interest to me. Often began to go to the page of the project. At first, I put everything on the description from that page. Something worked out, something not. I ran again to the channel, found out what and how. It turned out that the instruction page was rather outdated, because documenting was never a strong point for developers, especially when the team was working hard because of a lack of human resources. Then I suggested rewriting the manual. Sat down and after 30 minutes she was ready. I gave it to a person, he checked, corrected my mistakes (both grammatical and semantic) and made changes to the page that worked on the Wiki engine. Then I looked at the Russian version of the same page and updated it too. Along the way, I noticed that there are no localization packages. It turned out that they never existed on this platform. I tried to download files from SVN and translate them, but it didn't work out that way. I even wanted to try to join the team of translators, but something somehow did not work out with them. Yes, and not trying hard.

Then they showed me the Commit filter - the thing that sends each commit of the selected developer or to the selected project to you on the soap. So I began to follow the main changes in the code. Naturally, in C ++ I didn’t fumble at all, so just by comments to the patches and the keywords BUGFIX, for example, I could understand what was fixed there, or added a new feature.

Still here, there tried to do some creative work. I tried to do MsStyle that would bring the design of windows in the style of Oxygen, as well as standard widgets (in KDE applications, widgets can be given the Oxygen style with one tick in System Settings).

At some point I tried to learn C ++, with varying success and initial “victories”. I downloaded the programming books, but few of them read up to a third even. Everything seemed too complicated to me. And the person with whom we became quite close friends became more and more often hinting, they say, and this bug is waiting for you to fix it =)

First build



It should also be noted that for development it was necessary to at least compile the local version, and I still used the packages. But then I still didn’t take myself seriously as a possible programmer and developer. It’s just that a bug situation is created when a bug is fixed in a trunk, or when asked to check with a more recent version of KDE than the one with which the bug was found. And the version is newer than from the packages where to get it? That went all around, about.

At that time, I still downloaded a lot of different Linux distributions, and I had a partition on a disk of about 20 gigabytes in size that was packed with disk images. And then a “misfortune” happened - when checking the next distribution kit (I checked them by installing them in a section specially reserved for such checks), I parked all my accumulated good by parking.

It should also be noted that by this time I had already downloaded a book about programming in Qt4 and began to progress quite successfully in chapters. What seemed like creepy dances with a tambourine to me (like installing and setting up a compiler, not to mention compiling itself) turned out to be a completely trivial task. It became really interesting.

And then, when once again my friend in private suggested I was able to compile KDE from source, I simply could not find an excuse not to do this: I now have a lot of space, an initial checkout of 128kbps - yes, I have the weekend ahead! And most recently, they gave me special rights to bugs.kde.org - I could close the bugs myself, and the reports I created did not need to be confirmed (the standard report status is UNCONFIRMED, my own ones were already created as NEW). And I decided to build from source.

To maintain a truly fresh state, it was decided to use the emerge python script, which was developed specifically for KDE for Windows and has nothing to do with emerge from Gentoo.

I downloaded the python, subversion, set up the environment variables, decided on the utilities and launched the first build. At first there was a checkout of Qt and its dependencies, then its compilation began. Oh, it was (and remains to this day) a hell of a long and painful process. Then easier - kdelibs, kdebase- * and on.

It was already then that the secret was revealed to me - not something is being ported, but what was considered the privilege of Linux and X11 working operating systems only - Plasma itself!

Of course, not everything was built from the first, not everything worked out without a hitch. Instructions were copied and new patches were commited. Do not think that especially for me or I somehow was involved in this, but still.

There was a time when I had to select from the commit filter all the patches (or rather the commit numbers) that the guys made for Plasma. The task is not wise, but it was still nice that they asked me for it - I really wanted to be useful.

First patch



As you already know, a special installer is used to install KDE on Windows. There were a lot of flaws in it and there is still room for improvements, so to speak. And here I found another bug: with the next release, their list has changed, but in a strange way - one release from stable was duplicated in unstable. Since there was no such release in the unstable branch, respectively, the installer got into trouble when trying to select it. My friend suggested that I dig into the code. And what the hell is not joking. It is useful to look ... Since my mentor was more familiar with the device installer, he immediately indicated approximately in what files to look for the answer.

I dug a code all evening, but for me it was almost a filkin letter. Nearly. In the end, Assistant served me well. But I never found the answer. The next day - he looked a couple of times and, in desperation, closed it. And then I received a letter from "Sensei" - he found a bug, but did not fix it. Instead, he pointed out to me which file to look for, as well as which debug messages to pay attention to. Now it was rather a challenge.

I pored over the meaning of this code snippet decently. I flipped it far and wide, writing down the values ​​of all variables on paper every time I ran the code (I don’t even know how to use such utilities in normal IDEs that can monitor this data, but it doesn’t bother me much). All for nothing.

The next day I pored even longer and still could find an error. But finding an error is not everything. still need to fix it! Hmm ... But I have never written anything in another's code ... Even I was even confused about what to do. I looked through the Assistant and found the method I needed. I tried to add it and ... it worked out! =)

It makes no sense to describe my feelings at that time. My curator explained to me how to create a patch and said that it would be better if I open the bug report and attach my patch to it. It was terribly unpleasant, because in fact it was he who found the bug, and he brought me to it, even though I corrected it all the same ... I did as he asked and soon the bug report was closed. # 174452 - RESOLVED: FIXED

Module



Some time has passed since that patch. My curator said that he had a task for me to write a module that would register plasma.exe as a Windows shell instead of explorer.exe. Honestly, I was a little scared. Write a module ... Yes, I have no idea how it is!

Everything was much simpler - they said to take the module easier and throw out all the unnecessary from it. Well, breaking is not building! I copied the emoticon module into a separate folder, compiled it - it works. slowly began to castrate him until only the form remained. Compiled, installed. works. Dummy.

To work with her, my friend made me apply for a SVN account. Reluctantly, I still did it, and almost the same evening I received it! I was given a place in the playground, where I raised my brainchild. By the way, I zakosyachil my first commit - did not enter the log message> _ <Well, the first pancake ...

So I started working on my module. He began to fill the meat - the first couple of widgets to choose between existing shells. The data was read from the registry using the Qt library functions, so I was lucky not to see WinAPI’s horrors. But in the course I learned a lot of useful things, and I understood most of what I read in books. in fact, many of the recordings were simply incomprehensible to me. But my mentor helped. He explained everything very clearly to me, so that in general I had mastered this business quite well.

Then I needed more functions, more widgets for them, and new problems — to set the “right” wallpaper, I found the aspect ratio at the current screen resolution and chose the maximum resolution with the same aspect ratio. So with a screen resolution of 1152x864, I installed wallpaper with a resolution of 1600x1200. With a different resolution - others.

There were ideas during the execution, the implementation of which required the use of WinAPI, but in the end only one line remained to establish the “hidden” attribute of the file with the list of installed wallpapers (yes, there is one!).

Closer to release 4.2, the module was removed from the playground ... to be transferred to kdebase-runtime! Then this module, together with the Oxygen cursors specially converted for Windows, was packaged in a separate kde-additional package.

Other projects



In addition to the module, I looked into other projects. But I just looked in - reading someone else's code, you know, uncomfortable. In general, only in KDiff I found and fixed a bug (with the appearance of two dialogs of opening a file). My curator was pushing me to look into other projects. for example, when he ported Konsole, he suggested that I find out what the problem lies in, which prevents me from erasing characters. But this code was too tough for me. Then there was Konvi4 (the working title Konversation for KDE4), in which I also found a couple of bugs, but was not able to fix them. It is a pity, of course, but, apparently, the coder of me is not very good.

After some respite, I was busy with the trapping of Trayplayer with kde-apps.org, a player without a uniform that played music while sitting in the tray. The cool thing is, I almost screwed a playlist to it, but I found a snag and somehow forgot it too.

From time to time I still update my KDE build, but not so often the bases of such enthusiasm. I hope this is not for long. Maybe after the session I'll do it ..? I would not want to throw, and even more would not want to disappoint people.

Source: https://habr.com/ru/post/54991/


All Articles