4 ms·
Behold, 12283 lines of very good engineering: https://github.com/DrKLO/Telegram/blob/e9e40cb13ea942b148b259c083fb3364a0cd90ea/TMessagesProj/src/main/java/org/t
by veeti 9y ago
Behold, 12283 lines of very good engineering:
https://github.com/DrKLO/Telegram/blob/e9e40cb13ea942b148b259c083fb3364a0cd90ea/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java https://github.com/DrKLO/Telegram/blob/e9e40cb13ea942b148b25...
- parmesan 9y agoTakes a great engineer to make that work as well as it does..
- orbifold 9y agoWell the c++ code is pretty good... In any case it works much better than the signal app on android.
- mintplant 9y agoI've never had any problems with Signal for Android. With Telegram, though, I once woke up to find myself added to what looked like the first 500 groups in their database, alphabetically sorted. My phone was buzzing continuously from the stream of notifications. Had to remove myself from them one by one.
- zingmars 9y agoLooks to be UI related stuff, some of which looks automatically generated to some extent, some parts look boilerplate. Having files with many LoCs can be unavoidable when the system you're building on encourages design like that (.NET comes to mind, wouldn't be surprised if Android was like that as well), and does not necessarily mean that it's badly engineered.
- 0x445442 9y agocreateView... just awesome.
- balladeer 9y agoWell, writing a createView method itself isn't an issue unless you do it as a generic behaviour and for everything like in this Activity.
- tomsmeding 9y agoAs far as I can see, that's lots of code for generating a UI. Interesting that they do that instead of using the usual xml files for specifying the UI on android; the result is that there's lots of code, a number of statements for each single UI element, and all the listeners and such are declared inline. The compiled code will be fine, probably. It won't be much different from that would happen if they used the standard method of xml files and separate classes for that stuff, and might even be slightly faster. But it surely is less maintainable, and the code definitely doesn't look generated to me. Maybe if you count copy-paste as code generation. I hope they don't use Atom as an editor, because it surely won't be able to cope with such a file. [/s; but might even be true. not tested.]
- balladeer 9y agoLess maintainable? That's a nightmare. As an Android developer who has struggled with couple of 4 digit lines long activity classes I literally shuddered. This is as if someone used a tool to translate UI code from some other platform to Android (completely into Java) and forgot to refactor.