I like it to develop small programs for different purposes in my free time. Here is a description of some of them. Many of them use foreign source code, a variety of libraries and external programs, which complicate the creation of executable files and making them available to others. Therefore, all of them run only from my development environment, but on a beautiful day I'll try to upload executables here.
Note: I have uploaded videos, which demonstrate base functionalities of my programs, to YouTube. But for some unknown reason YouTube shows them in a lower quality by default. So, please, set the quality on 1080p before watching, as shown on the right.
Text comparison program
One day, I thought it would be nice to have a program for comparison of the clipboard contents. That is, you copy a text, you copy another one, then you press a button and get the result of their comparison in graphical form. The analysis of source code could be simplified in that way. Suspicious code fragments could be compared and it could be determined how much they differ from each other or whether they are identical.
All the programs known to me at that time could only compare the files, but not the contents of the clipboard. After using a search engine, I learned that programs with such functionality already existed, but for some reason they were all not free. After a little more googling I ran across a freely available implementation of Myers' algorithm for text comparison. I figured out how to display the result of the algorithm using Swing, put everything together, and the program was finished.
Program for learning English grammar
After reading the book Praktitscheskaya grammatika angliyskogo yasyka s uprashneniyami i kluchami, I wanted to review its material. It contains a large number of examples explaining various grammatical phenomena. And I had an idea to create a program which would playback all of these examples and provide additional capabilities (for example, opening a book to the page containing the example).
New ideas emerged during the implementation and it was finished with the following results:
The main window contains a phrase or a sentence in English and its translation into Russian. The English text is read aloud by the program
If the mouse cursor moves over the main window, the playback will pause and a window with the grammatical explanation will be displayed.
The program is controlled via the context menu,
with the help of which one can:
- turn sound on or off,
- pause and resume playback,
- choose a material to be played,
- open the book to the page that contains the example being played and
- exit the program
Main points of the implementation
- A text-to-speech synthesizer is used to generate speech from the English texts
- All the Russian and English texts are saved in an XML file. It is also used to display the book contents as a tree
- HTML markup is used to highlight text with different colors
Program for viewing DJVU files
Probably many people have already opened PDF files with Acrobat Reader and have seen a column with the document contents on the left side. After clicking on a chapter, section etc., the related page will be opened.
When working with textbooks and reference books it is often necessary to make a bookmark, do an exercise, add a comment, etc. And I recalled the wonderful DJVU format and the fact that there is an open source program for viewing files in this format.
After analyzing its source code and making some changes in it I got the following functionality:
First, one creates the book contents that will be displayed in the left column and used for navigation. To do this,
a text file must be created in the following format:
... Part 15 Chapter 30 Section 80 ...The number of TABs before an item in the contents determines its level in the hierarchy: no TABs - a part, 1 TAB - a chapter, 2 TABs - a section, etc. Then follows a space and a number indicating the page on which the item is placed. This file is placed in the same folder where the DJVU file is and gets the same name except for the extension .TXT.
- After opening the DJVU file one can make bookmarks on its contents items. The whole path to a bookmarked item is highlighted so that all the bookmarks can quickly be found even in the collapsed tree
- Comments can be added. They can contain any thoughts or notes to a chapter, section, etc. It is also useful while doing exercises. HTML markup can be used during editing
Why did I start inline skating? First, because in any kind of drive I was always attracted by the fact that a high speed can be developed without great efforts. For the same reason I started Skate Skiing. Second, because I thought I could get a dose of adrenaline during inline skating, which turned out to be true :)
In general, during inline skating one gets a lot of positive emotions, a feeling of flying and freedom. After all, what a pleasure to skate quick as the wind past the slow-moving passersby. Or to skate up a hill and to skate down it, and then to recall that in the past you wouldn't have done it for anything. Or to make a turn and to realize that it was more sharp and was made at a higher speed than a week ago. In general, inline skating is always fun and interesting, and there is no limit to perfection.
So you have decided to enrich your life with this exciting activity but don't know where to start? I taught myself to skate without outside assistance and I'll describe my observations during skating and give some tips which I hope will be useful to you.
Note: All information provided below reflects only my own experience in inline skating and should by no means be taken as recommendations of a certified instructor. This information is also not exhaustive and should serve as a starting point for the beginning of learning.
Feet warm up greatly during skating, and therefore start to sweat. Since no inline skates have a perfect ventilation, the sweat begins to accumulate gradually in the socks and shoes.
Conventional socks absorb almost all the moisture, the feet steams out, corns arise easily. Special socks for inline skating drain moisture into the shoe and the foot remains relatively dry. Before buying them it is worth paying attention to the fact that they do not contain cotton. When I was inexperienced I bought my first special socks which were made of 60% cotton. After I had bought another ones without cotton, I did not want to put the first ones anymore. Another problem with conventional socks is that they don't fit tightly on feet, which leads to wrinkles and chafing of feet. Special socks fit tightly on feet (some manufacturers even mark the left and right sock), which eliminates the problems mentioned above.
Such socks are substantially more expensive than conventional ones, but they are necessary for comfortable skating.
The choice of inline skates depends on the skating style. There are many different styles, about which you can find a lot of information on the Internet. Here we will restrict ourselves to the fitness style, as it is considered to be the most appropriate style for beginning skaters.
The figure below shows the structure of inline skates for fitness with its basic elements:
I chose inline skates for fitness with the following characteristics:
- Composite frame
- Wheel diameter 80mm
- Soft boots
- The inner boots are removable. So they can be dried after every drive and can be washed about once a month
I advise you to buy skates from leading manufacturers, such as Rollerblade, K2, Powerslide and others, in a specialty store and not in a sports supermarket.
Before trying on the skates, it is necessary to put on the socks that you will wear while skating. Put on the skates you like and tighten the laces, strap, and buckle. Skate around the store for about 10 minutes and make up conclusions. If you have a feeling that the skates pinch your toes, or vice versa, that they are too loose, then put them aside and try on skates of another size. You can also try on the skates of the same size but from another manufacturer. After suitable skates have been found, buy them.
While trying on skates in a store it is difficult to determine how comfortable they will be during a long drive. Therefore it is necessary to skate at home for 1.5-2 hours, or if your flat conditions do not allow this, then at least to walk. Thereby, the skates will not lose their marketability and can be returned to the store if they don't fit.
Protective gear and clothing
Unfortunately falls are unavoidable during skating, therefore an appropriate protective gear and clothing are required. A basic protective gear consists of elbow pads, knee pads and wrist guards. They are often sold as a set. If your safety is very important to you, you can also buy a helmet. It is mandatory for children!
Of course the clothing should correspond to the weather, but it also should not limit movement. It is worth paying special attention to the trousers. They suffer the most when falling, therefore it is desirable that their material was relatively thick, otherwise holes will appear very fast in unprotected areas. I think that old jeans, which can be damaged with no regret, are very suitable for this.
One should only skate on a clean, dry asphalt and with a good lighting. The wheels grip on a wet or dirty asphalt very bad and the skating becomes unsafe. Besides water promotes better penetration of mud and sand into the bearings, which quickly puts them out of action. It is best to start learning skating in places where there are few people and little traffic (for example in parks on working days).
Except for some exercises which are not discussed here, the skater always maintains the stance shown on the right.
- The skates are shoulder width apart
- The wheels are perpendicular to the asphalt
- The knees are a little bent. First, it is necessary in order to keep one's balance easier, as it is well known that the lower an object, the more stable it is. Second, it is impossible to push off with straight legs, because they are already unbent. And third, legs with bent knees give an additional flexibility and act as shock absorbers, which smooth road irregularities and therefore contribute to a better stability.
- The body is bent slightly forward. If it is not done, the chances are high to fall back
- The hands are in front of the body
The rolling is carried out by shifting one's weight from one foot to the other and pushing off with the other foot. Therefore, the ability to balance is of primary importance.
I think that many people, who had just started to skate, made abrupt body movements and swung their arms once they started to lose balance, which in most cases didn't give any positive results, and it all ended on the asphalt. Later, a friend of mine advised me to balance by bending the legs to the sides and moving the pelvis and to ensure that the shoulders and upper body remain motionless, as shown at the figure on the left. It turned out to be more effective.
You can easily find a description of the main types of falling on the Internet: forward, sideward and backward. I shan't describe them here, because others have done it perfectly long ago. I can just say that despite the fact that I had studied them very well before my first skating, I still didn't manage to fall as described in such manuals. The fact is that I found myself lying on asphalt before I had time to think about how to fall correctly. In my opinion, one shouldn't try to fall as described in a textbook, but to squat down as far as possible before falling, as it is much safer to fall from a low height than from a large one. And the rest will be done by the protective gear.
You can brake with the regular brake (see the construction of inline skates) or with the wheels. Here, I want to note that I almost did not use the regular brake and soon took it off. It seemed to me that to brake with it at a high speed is unsafe. Besides, it hinders skaters from maintaining some postures (e.g. monoline).
From the very beginning I managed to brake with wheels well enough, so-called plough braking (also known as V-stop). This braking method is considered to be the easiest one to learn by beginners.
I think that in any case the dismantling of the regular brake is only a matter of time. You will not see it by those who have been skating for a long time. Therefore, it is worth removing it as soon as possible so that it does not inhibit your development as a skater.
Always skate intelligently and progress won't let you wait for it long!
As I have already written above I like the feeling of speed and flying, which are given by all kinds of drives, so I try to enjoy it in summer and winter.
The technique of skate skiing is very similar to the one of inline skating. When I started with inline skating, I noticed that keeping balance, rolling forward, plough braking (V-stop) weren't something completely new to me. Skate skiing has an advantage over inline skating. It is less painful falls :) But unfortunately skis have a lower maneuverability as inline skates.