20 years ago I was very nearsighted -7 vs -14. The doctors of that time could not find the right glasses that I would take to the cinema. A miracle saved me. I became one of the first patients of the Moscow Center for Eye Surgery EXIMER, where in 1999 I had an operation to correct my eyesight using LASIK laser technology. Each eye cost just over $ 1,000. After the operation, I forgot about glasses and became a happy person.
And he was happy when his vision began to deteriorate. In 2013, I began to see the puck badly, by 2015 - a soccer ball (I play football and hockey 6 times a week) and finally I stopped meeting ugly women. The question loomed in the brain - what, again?
Despite the advice of the local Habr-doctor, whom we all know and respect, I decided to do a second vision correction operation.
Of course, I again chose the EXIMER, but not Moscow, but closer Nizhny Novgorod.
I had surgery on Friday the 13th. 350 euros per eye. Like 17 years ago, I became temporarily farsighted; the fact is that after the operation, near vision returns to normal mode not immediately. Edemas and fogs can disappear in 2 days, or in a month - it all depends on the individual who's eyes are cut.
')
What is farsightedness? When you can't read and write and the lifestyle changes. Basically you listen, feel and reflect. Any nonsense climbs into my head, including mathematical riddles that are quite difficult to solve in my mind.
One of these puzzles unexpectedly long stuck in my head. This is a rebus about a fake coin. I recall the condition of the problem -
Given 12 coins and weights weights. It is known that one of the coins is false, that is, it is either lighter or heavier than the others.
How to find a fake coin with three weighings?
Once I successfully solved this problem with a pencil on paper, but not in my mind. Now I did not have the patience to go through all the options in the darkness of consciousness.
And I decided to write a simple application for iOS, simulating the conditions of the problem. Blind programming is a quest. Like writing this article. But I managed through the two keys
CMD and
+ . At this point in time, I can recognize the text on a 27-inch monitor, if the screen holds no more than 18-20 lines. Not clear. With the keyboard is also not easy - the fingers remember, but quite often they lose their way from the usual positions. I, generally speaking, do not see the keys themselves, but I differ from i.
There were quite a few funny and tragicomic moments, you yourself can guess; but it is important that I was able to escape from the twilight state of the soul.
The application, of course, is completely insane, and it has brought me a favor. Including intellectually. I can now solve the problem of a fake coin with my eyes closed, in various modifications, with continuations, from left to right and from top to bottom. By the way, she is still being asked for job interviews.
A few words about the development life cycle. Initially, I made one original level repeating the conditions of the problem. Having accumulated plenty, I added levels with 2, 3, 4 and so on, 11 coins. Even preschoolers have learned to solve simplified problems.
I thought it would be nice to add levels in which you can solve the problem with a probability of at least 0.5 and added 5 more levels with 13,14,15,16,17 coins. Having quickly passed through new frontiers, I added an infinite number of levels within 5 bits and calmed down. Yes, calm down you!
Especially for Habr readers, the game is free and translated into Russian.
CounterfeiterDo not send any comments on errors in the article. Remember, I can not read them.
Of course, the article has a deliberate mathematical error; who discovered it is a real programmer, not like me.
Hope to see you soon!