📜 ⬆️ ⬇️

How I was an open source ...

Once upon a time, in a distant, distant galaxy ...


It all started quite prosaically ... there was a desire to modify the software, but there was no idea how it all worked out there ... and that was a long time ago, a long time ago ...

Probably for a year in 2003 ... by that time I had been a Slackware distribution user for quite a long time, so I knew quite well how to build software, but I didn’t have much knowledge of “C” (running ahead I confess I still don't know him very well :). Nevertheless, I strongly wanted to add one useful feature for me in the Midnight Commander. Namely, the option of sorting files, when the “executable files” go first, as it is done, for example, in far. With the help of ICQ, stupid questions for sishnikov-friends and perseverance worthy of better use, at the very least, I managed to do what I wanted ... although it was crooked ... But the main thing was that it worked! (what a buzz to ruin for 2 days but to do what I wanted)
I didn’t touch mc anymore, having stopped at what had been achieved ... Years went by ... :)

ASUS wl-500gP


At some point in time, 2-3 years ago, I became the happy owner of a funny white box, with a proud name - Asus WL500g Premium. Because with the native mc from the oleo repository everything was completely “not very”, then I had to sit down and saw so that it would be very poor to have the opportunity to work with names in UTF-8 ... I had to drank considerably because with UTF-8 patches from Debian and FC to get mc on I flatly refused the box, it was not easy, but I did the asil ... (I myself was in shock :)). Given the almost zero knowledge of C, the process was somewhat delayed. But when everything was finished, I laid out the result in the form of a package in the appropriate forum, for the same UTF sufferers in mc on the “box”.

As a result of tinkering, I certainly didn’t learn how to bite, I just realized that in principle I’ve had enough persistence and patience to make small patches. The main thing is not to break the system too much and use XP techniques ( Extreme Programming ) such as Continuous Code Efficiency, etc. So I decided to take on the first project under the “box”. This is a lightweight DC ++ client that could work on completely dead hardware, had good support for national languages ​​and could distribute and receive files in parts and from various sources. As a concept, the approach of the wget utility was chosen, i.e. We give the link to the utility, and she continues to do everything herself and finishes the work when the work is done. That is how the idea of ​​console dc ++ client dcget was born. Having reviewed a lot of lightweight open source projects, ShakesPeer was found, which is a client-server implementation of the DC ++ client, which is based on communication via UI sockets and the actual engine that downloads and distributes content.
That's what I decided to fork, adding the missing functionality to me. The task was not so difficult, but navigating through someone else's code caused a lot of inconvenience, a suitable editor was required. I really lacked an editor similar to far editor with similar keyboard shortcuts, and its source code capabilities, such as the transition to defining functions and other pleasant little things inherent to convenient editors. In order not to be completely in trouble, I set up the necessary tools in vim that turn it into an IDE and slowly used it. But it is hard to retrain the old dog new tricks. Remembering 3 sets of hot keys on the machine turned out to be just an impossible task for me, and it happened that after working far I spoiled the text on the machine in vim and vice versa ... it happened that it didn’t do without a mat (where I already said that ... :).
')

Midnight commander


In the meantime, I stumbled upon the news on opennet that a new version of mc appeared with additional patches, such as file coloring and other useful little things (many of which, by the way, were already in my box). team in terms of “share experience” and give away a couple of small patches from the assembly under the WL500gP. As it turned out, the guys were "friendly young, promising team" ( ) :) with whom it is easy to find a common language and understanding. All that had to be done to join the team was to make a private and public key and send the received public key to Patrick Wienertz, so that I would be registered on the website of the Midnight Commander and I got access to write to the git repository. So it all started ...

So, what was the bottom line: the inability to use git, ignorance of the C language, programming experience in many languages ​​and a great desire to make mcedit more convenient to use an editor that has the same feature set as far. The first patch I took was a patch implementing the display of executable files at the top of the list. At this time the patch was implemented ideologically correctly and was not a dirty hack. Fortunately, there were those in the team who looked at my patches and did a lot of work on revising my code without them, I probably wouldn't have mastered the tenth part of what was written. As a result, I had an editor that completely satisfied my needs in terms of using it as an IDE. And what is most interesting is that almost everything I needed there and so it was, only buried so deep that it could not be reached, or in a bit of “undershot” state. In general, the more I dribbled with the text of the editor, the more I found unrealized features, sometimes it was funny that after completing the next patch I found a similar implementation in the most unexpected place, after which I deleted my own and modified what is up to the necessary condition ... The approach is basically It was this way: to make your code as simple and clear as possible for further maintenance and to the maximum fit into the overall concept and style of the project.

So I became a typical red-eyed open source :), in the evening coding for the soul, writing reports and forms in the company where I work in the afternoon.

Findings :)


By the way, writing open source is just a freebie from a programmer's point of view :) everything you need has usually been written before you, and you just need to find the code you need and successfully copy it :) I understand, of course, that sooner or later you get tired and ends ... even the most interesting things. And there are still quite uninteresting ones, such as finding and correcting not obvious and difficult-repeatable bugs, but what can you do if you get into a sect so easily you can’t get out of it :)) But I hope this happens, not before fixing the last critical problem, as it has not I want to let the guys down ...

Teamwork is of course a separate topic ... an interesting experience from the programmer's point of view - code revisions, pair programming, discussion of tasks and methods of possible implementation, and other-other-other ...

fin


PS: here and so, having received the necessary and convenient tool for working on my craft - dcget, lost, almost complete, interest in it ... all la la vie :)

PPS: although if anyone is interested in a console DC ++ client under * nix, you are welcome.

I apologize for some crumpled narration, fucking T9 :)

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


All Articles