Experience Transfer: The Jedi Path

image

Sooner or later, each of us wonders if it makes sense to pass on our experience to children. To date, we can say that the project that we started more than two years ago has taken place and looks successful. Since the result is positive, we decided why not share it with a respected public.

It’s time! ... The horses were already rushing over the roofs ... (c) Mikhail Bulgakov


As a happy dad, I decided to pass on the programming experience to my son for 14 years. At this point, he had good experience developing his own programs for robots such as Lego-MindStorms and the summer club Id-tech, which they wrote in C there.

The day itself, when I nevertheless took up training, I remember rather vaguely. I woke up in the morning and decided: “It's time!” - as according to Bulgakov. He sat down at the computer and approached this business as a do-it-yourself business. The approach was not new. First you discuss what is supposed to be done, then you talk out the most interesting points, what remains to be done, and then you are already doing to the extent of the agreed development and other considerations. The first thing that was discussed and decided that the project would be some well-known toy. They didn’t take anything special from the ceiling - tic-tac-toe.

I opened the eclipse and started writing and telling what I'm doing. My son, I must say, was sitting next to him, remembering how to launch anything at all. After a week of two sporadic sessions, I managed to write a program on the command line that was already difficult to beat. After which he suggested that the younger brothers play a one-dollar bet with the program. I had to intervene in the home sweepstakes and stop the monetization experience at an early stage of the project.

At this point, it became clear that the development of programs seems to be like a child, but clearly to move forward requires solid knowledge and understanding of the Java language.

We started with a snap - they began to stupidly solve the problems of how to collapse, unwrap, factorial or fibonacci count. But it did not give the expected result for me. It became clear that his son needed to seriously study Java.

We bought a couple of textbooks ... In general, the textbooks took six months. Last summer, it was becoming more and more serious for the summer holidays. Over the summer, my son developed a UI and wrote a desktop application that talked so nicely with the player. I was busy at work, there was only time to look at the weekend, which wasn’t getting into the development process. The son of the campaign began to write another dynamic toy, something like tennis from the category of desktop vishigonyalok.

But, thank God, I brought the tic tac toe to its logical end.

image

How much faith and the forest fell! (c) Vladimir Vysotsky


The question arose of how to consolidate the result and formalize it in a technological trend. Here, in general, there was no doubt:

Say thanks to the California comprehensive school. There were no problems with the first paragraph, I said today - tomorrow the article has already been written. With the github, it was also not quick to fill in the code.

With the development of the project, I don’t remember who first came up with the idea of ​​how to make all the music under Android. Actually, I had not programmed under Android before, and it was essential that neither my son nor I had experience with the new framework. In my opinion, it is one thing to tell and show what you know how to do, it is another thing to look for a solution together and show how you use your previous experience to find a solution.

When the first stage of the development of a new framework for us was completed, things went more fun for me - I already gave more advice and did a general guide on how best to refactor and general considerations from best practice.

Fundamental study of strategy in a tic-tac-toe game


At some point, the son discovered that tic-tac-toe have three basic strategies that lead to the “fork” of one of the players, if you do not count forward two moves. Strategies look pretty funny.

Triangle
image

Arrow
image

Environment
image

I quietly went nuts and only could offer to issue the result of another article in the blog.

After that, we began to shockly patch the code, closing the discovered strategic holes.

image

Result


Last month, the son was transported with design and decoration:

image

Tic-tac-toe was modified in “Cats versus Dogs”. Added sane messages and some common interface.

In my opinion, the approach to making some kind of finished project completely paid off, as the son had to really learn not only the basic things, but also achieve a good understanding at the level of design of the project.

Project source code in github . I would be glad if someone would be interested to look and maybe repeat the epic. Do not count on an easy result. Be patient.

Good luck.

Also popular now: