📜 ⬆️ ⬇️

Sunduk or 10 seconds per name

image

For a long time I was going to write an article on Habr, but I still could not get together. That topic was not worthy, it was, but too voluminous, it is lazy. Or maybe it was always lazy. But now, in any case, he was going.


Prologue


I do not know about you, but I hooked on hakatony. I go to them at any opportunity. And I get very upset when, for one reason or another, it’s impossible for me to go to the next night programmers ’gatherings. There is no need to go far behind the topic for the project - ideas are born in my head by themselves. As a rule, bad, but funny. Awl in a famous place always makes me write a thread "cool thing." And, as a rule, the Shila is lucky - the Projects / 4Fun folder is replenished with a new project, sometimes even going into public.
')

Outset


I had the experience of winning the hackathon, and the audience award ... But now is not about that. And about quite an ordinary participation, but, I hope, not about an ordinary result. A week ago, on May 17-18, the regional stage of the Qiwi Universe hackathons took place in Minsk. Me and my partner decided to go. We decide to go to hackathons we often do, but we don’t always go to them. But this time, our opportunities coincided with our desires, and we sacrificed the weekend for the sake of ... I don't even know how to say it ... for the sake of a good mood, perhaps.

Action development


Who does not know what a hackathon is - welcome to Wikipedia . In short: programmers, designers and other IT-characters are idly hanging around, they sit for 1 or 2 days (depending on the format of the hackathon), drink coffee, sometimes eat, and give the result to the jury and other participants as a result of their attempts - the web websites, mobile applications, desktop programs, sometimes some hardware or robots. Who is that much, in general. My partner and I turned out to be ready for a mobile application ...

Probably, unlike most hackathon participants, many of whom consider, or want to consider themselves, startups, I try to do in a limited time not just a project that has the potential to capture the world, but a cool project that has a wow effect, or at least trying to surprise. This is the very “cool thing” that I occasionally want to do, and not just another social network for dogs, a book exchange service, or a search for fellow travelers. All this has already happened, and not once. Even at one of the hackathons, I had an idea to make a program for its participants, into which they would drive in their ideas / projects, and other participants would rate them: “Boyan”, “100,500th Facebook”, “Crowd funding service? Seriously?". I even presented this idea for implementation to everyone. But, apparently, no one appreciated. But I got distracted again.

The mobile application that we were going to do (and did), should not have been useful, simplifying the life of its user, or bringing him benefit. It was supposed to serve one purpose - to please the eye. And first of all its creators. We should have been pleased that everything worked out, it works as we planned. And it looks good. In the end, that's how it turned out. We called the program ... Sunduk. As the partner put it - “this is the name generated in 10 seconds.” It was necessary to urgently register the team in the list of participants, and there was nothing left but to turn on the project name generator in my head. And the generator gave - "Sunduk". I had to agree with him. Popular wisdom says: "As you call a boat, so it floats." Perhaps it was this name that played the role in the number of the place we occupied. And we took "no" place.

However, the project turned out. The idea was as follows - using a simultaneous swipe (swipe) on the screens of phones lying next to each other, let them out among themselves, and transfer "money" gestures from one phone to another. Files, music or something like that could be “money”, but “qiwi -> e-commerce -> money”. We wrote all this on Unity3d - a very convenient engine for cross-platform development. I had to honestly activate the 30-day Pro version of Unity3d, because in the free non-Pro version there is no possibility of working with sockets for mobile platforms. And so we needed sockets - phones communicated with each other and communicated over the network.

Climax


The technical part of the project seemed simple to us. But it always happens until you start directly implementing it. It happened this time. There was a moment at night when everyone wanted to quit. Nothing worked. More precisely worked, but through time. Between 2 computers everything is OK: they connect normally, the money is transferred. And 2nd mobiles (iPhone and Android) - well, no way. Then they see each other, then no. We both approached the problem and that. They even wanted to find a stable sequence of actions (first we turn on here, then here after 5 seconds ...), during which the program worked without failures - in order not to lose face during the project demonstration. And they seemed to find her. And then bang - and the spent sequence stopped working ...

This problem and the upcoming deadline added adrenaline. There are no redbuly and burns needed, although at such events they are probably the most popular drinks. Someone was sleeping, snoring and unnerving non-sleeping participants. Someone routinely program their service to search for bank deposits. And we frantically searched for the reason - “Why,! # $ @%, Nothing works ?!”. And they found her!

Decoupling


The reason for all this disgrace was found a few hours after the first symptoms. The whole thing was in the installed software on the Android phone - Opera Max was the culprit. This is such a thing that should compress mobile (not wifi!) Traffic, saving the user money. Someone may have this money and this program saves, but here she ate a lot of nerves, effort and time.

For some reason, wifi traffic went through a VPN created by Opera Max, and because of this, Broadcast packets were lost - our server could not inform potential clients that it was alive and is on such and such IP. In any case, everything dramatically earned, as soon as I demolished this, of course, useful (but not in our case) prog. And just had to zakardkodit server IP in the client part of the Chest and live in peace. Many would have done so, and would have been right. But "we have our own way" (c).

But happiness was full of pants, when the phones finally saw each other and the first $ 50 transferred from one screen to another. We realized that we hadn’t slept that night and sawed the code. The task was completed - the project was made and it works, we figured out things new to us, we realized that we need to remove all the beta software before the hackathon. But the main thing - we ate 2 whole days for free!

Epilogue


And here is the Chest, or rather its contents:

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


All Articles