We take part 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 other 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/ , contacted 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 a direct message to all its users that it 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.” Excellent! Isn't this what many programmers like optimization tasks? I just adore them. So, the decision to participate in the competition was made, it remains to determine the approach to implementation. One thing is clear, you need to approach the solution of the performance problem thoroughly and fundamentally. So, to break if not all, then at least the majority. Since one more criterion of the competition, of course, less in terms of rank than performance, was UI design compliance, we most likely need to revolve around Java UI and use the standard controls that appear in the design sketch. However, it will be unprofitable to use the Java UI and render in the overlay area of ​​OpenGL, here at least they will cause a drawdown in context switching. But we want to break everyone with high performance. So Java UI disappears, we rely on performance, and we hammer on design. Let 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 just draw Telegram graphics.
    Yes, I know, I'm crazy :)

    There is one big minus for this approach - we will need to write all the UI elements and prescribe interactivity for them, which will eat a big chunk of time. Therefore, we will dwell on the simplest UI implementation: we write simple UI interactive widgets that are able to determine the click on themselves and do it in dynamics (when moving around the screen, in realtime).

    It turned out approximately the following:

    Actually, all of the above was implemented in two weeks, in free time from office work, with sleepless nights, of course.

    What does Telegram do? Completely cuts my application out of the competition with the wording, “Non-compliance with design, displaying graphs on one screen.”


    I guess I was initially mistaken by the competition :) So, this is not a competition of developers who can show the level of their competencies through the implementation of high-performance applications / algorithms, but rather a competition of designers? Or is it a maximum competition for UI developers who are able to use standard UI-design tools, as well as be able to touch canvas on the same UI?

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

    We look at the sketches:

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

    1. All the schedules are really on the same common sheet and scroll, but they just didn’t visually show it on the sketches and just didn’t explicitly register everything in the competition
    2. The graphs are somehow switching. How it is not indicated, which means that it is "default" and, accordingly, is left to the developer. He can realize this at his discretion.

    In general, the Telegram team, learn to write TK, it will come in handy for you ;) . Seriously.

    Performance rating

    From the foregoing it follows - my application did not live up to a performance assessment. But still. How does the cart rate performance?

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


    Telegram, where are the numbers? Summary tables of tests, comparison with other applications based on objective data expressed in numerical terms?

    It should have looked like this:

    1. We took your application, launched it at 1000 starting points of our chart, then at 10,000, then at 100,000 and at 1,000,000, we got these FPS numbers
    2. Your application received plus so many points for the achieved performance.
    3. For the discrepancy between the design and the crap important to us, your application received minus so many points
    4. As a result, in total, your application scored N points
    5. And as a result, your application is Kth in the overall results table

    This approach in evaluating 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.” Nevertheless, it is fair to say, I had a much better opinion of the Telegram team as a whole.

    App Stability Assessment

    And the ending.

    How does the cart evaluate application stability? Indeed, according to this criterion, the Cart cut out a whole ton of applications from the competition. For a moment, I’ll draw your attention to the fact that the criterion of stability in the conditions of the “Stage 2” competition does not appear from the word “completely”.

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

    I’m embarrassed to ask, but where is the list of devices on which you are going to test competitive applications? This list was supposed to be public, so that all competitors knew about it in advance. Otherwise, who will guarantee that if one application out of 10 crashes on one device out of 5, then it works less stable than all the remaining applications that did not “fall”? But what if I take these 9 applications and run them on the other 5 devices on which they will crash everything, otherwise one isn’t? How do you like this case? How then will Telegram evaluate the stability of all 10 applications?

    Thus, there is a classic mistake made by the survivor.

    Applaud Telegram, 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 this or that place, or did not take it at all. Of course, I feel sorry for the time and effort spent. But all the regrets would be leveled if the contest were open and transparent.

    Thanks for attention!

    Download apk-chechka from here

    Also popular now: