📜 ⬆️ ⬇️

We participate in the recent Telegram Contest, write a cool OpenGL ES application and win nothing


Looking ahead, I would like to draw attention to the chaotic situation with the winner of the first stage of the competition. The winner took 50K American presidents. BUT, there was at least one more developer who wrote an identical application and was not rewarded in any way. He did not even take the last place. This developer publicly, through his website https://tgcontest.braychuk.com/ , addressed the Telegram team with questions. If anyone knows anything about this, please write in the comments.


So let's get started.


As you know, recently, Telegram sent out a direct message to all its users that he was going to hold a programming competition.



"How cool," I thought.
Well, read the terms of the Android contest:



And what we see there, - "The main criterion is speed and performance." Fine! Isn't that what many programmers love about optimization tasks? I just adore them. So, the decision to participate in the competition has been made, it remains to determine the approach to implementation. One thing is clear, you need to approach the performance problem thoroughly and fundamentally. So that to break, if not all, then at least the majority. Since another criterion of the competition, of course less in rank than performance, was compliance with the UI design, we most likely need to spin around the Java UI, using standard controls that appear in the designer sketch. However, using Java UI and rendering graphics overlay in the OpenGL area will be expensive, at least they will give a context switch. And we want to break all the high performance. So Java UI disappears, we rely on performance, and we hammer on design. Let the designers do it, we are proud programmers :) . The solution is obvious - use full-screen OpenGL, vertex shader, and write all the code in NDK / C ++. Those. we just need to write a graphics engine / render, which is usually written for mobile games, in order to simply draw Telegram graphics.
Yes, I know, I'm crazy :)


There is one big disadvantage to this approach - we will need to write all the UI elements and set interactivity for them, which will be eaten by a large chunk of time. Therefore, we will focus on the simplest UI implementation: we write simple UI interactive widgets that can detect clicking on themselves and do it in dynamics (when moving around the screen, in realtime).


It turned out about the following:



Actually, all of the above has been implemented in two weeks, in his spare time from office work, with sleepless nights, of course.


What does Telegram do? Completely cuts out my application from the competition with the wording, - "Inconsistency to design, displaying graphs on one screen."


SHTA?



Probably, I initially made a mistake with the competition :) It turns out that this is NOT a COMPETITION FOR DEVELOPERS who can show their level of competence through the implementation of high-performance applications / algorithms, but rather a COMPETITION OF DESIGNERS? Or is this the maximum competition for UI developers who are able to use standard UI design tools, as well as podrogat on canvas at the same UI?


Ok, figs with him, with design. I do not argue, there is a discrepancy :) . And what about the wording - “displaying graphs on one screen”? But this is already interesting.
If you look at the conditions of the competition, we will not see there such requirements from the word “absolutely”. That's impossible. So I was wrong somewhere. Telegram strictly follows its design sketches and strictly protects them. So this requirement "visually" should be displayed in the same sketch.


We look at the sketches:



Hmm ... Nowhere is it visible that the graphs are on one common “sheet” and scrolled. Instead, we see separately drawn graphics on one screen. There are two possible options:


  1. All the charts are really on one common sheet and scrolling, but they just didn’t visually show it on the sketches and just didn’t write it down clearly in the competition conditions
  2. The charts somehow switch. How it is not specified, which means this "default" and, accordingly, is relegated to the developer. He can do it on his own.

In general, the Telegram team, learn how to write TK, this is still useful for you ;) . Seriously.


Performance evaluation


It follows from the above - my application did not live to see the performance evaluation. But still. How does the cart evaluate performance?


It looks like this - “We tested your application on OLD devices and it works less smoothly compared to the others.”


SHTA?



Telegram, where are the numbers? Test summary tables, comparison with other applications based on objective data expressed in numerical equivalent?


It should look like this:


  1. We took your application, launched it on 1000 starting points of our schedule, then on 10 000, then on 100 000 and on 1 000 000, we received these FPS numbers
  2. For the achieved performance your application received plus so many points
  3. For inconsistency with the design and important for us crap, your application received a minus so many points
  4. As a result, your application scored a total of N points.
  5. And as a result, your application K-th in the table of general results

This approach to assessing something is a matter of course for any professional. Perhaps Telegram also evaluates the quality of its audio communication algorithms? Aurally? No wonder then why it still leaves much to be desired. My American colleagues, in such cases like to say, - “It's pain in ass”. However, it is fair to say, I had a much better opinion about the Telegram team as a whole.


Evaluation of application stability


And finalechka.


How does the Cart evaluate application stability? After all, according to this criterion, the Cart cut out a whole TON of applications from the competition. For a minute, I would like to draw your attention to the fact that the stability criterion in the conditions of the “Stage 2” contest does not appear from the word “absolutely”.


But nonetheless. They cut out applications with a standard wording, “We launched your application on several devices. On device K and M, it crashed. ”



I hesitate to ask - and where is the list of the line of devices on which you are going to test competitive applications? This list was supposed to be public so that all contestants would know about it in advance. Otherwise, who will give a guarantee that if one application out of 10 crashed on one device out of 5, then it works less stably than all the remaining applications that did not "fall"? And what if I take these 9 applications and run them on the other 5 devices, on which they will crash everything, and then one thing is not? How do you like this case? How, in this case, will Telegram evaluate the stability of all 10 applications?


Thus, the classic SURVIVORED ERROR is allowed here.


We applaud the Telegram, the curtain ....


The conclusion of the pathologist


Thus we conclude that this competition is a financial and food pyramid, Naedalovo -



And unfortunately, there are many participants in the competition who also do not understand how and why they took one place or another, or did not take it at all. Of course, it is a pity spent time and effort. But all the regrets would be leveled if the competition were open and transparent.


Thanks for attention!


PS
Download apk-shechka from here


')

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


All Articles