Re:TDLib – Build Your Own Telegram Client
by orbifold on Thursday February 01, 2018 @07:31AM
(#16281377)
I like how they do very good engineering (just straight C++, Swift, with little to no external dependencies) with a very small team of apparently very talented people. Most of their products are typically owned by one or two people. It's also pretty smart of them to make all of the clients available as open source and keep the server implementations private. This way they don't have to license QT for example.
[ Parent
| on HN ]
Re:TDLib – Build Your Own Telegram Client
by veeti on Thursday February 01, 2018 @08:08AM
(#16281572)
Behold, 12283 lines of very good engineering:
https://github.com/DrKLO/Telegram/blob/e9e40cb13ea942b148b25...
Re:TDLib – Build Your Own Telegram Client
by zingmars on Thursday February 01, 2018 @08:52AM
(#16281808)
Looks 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.
Re:TDLib – Build Your Own Telegram Client
by tomsmeding on Thursday February 01, 2018 @01:34PM
(#16284416)
As 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.]
Re:TDLib – Build Your Own Telegram Client
by balladeer on Thursday February 01, 2018 @01:56PM
(#16284615)
Less 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.
Re:TDLib – Build Your Own Telegram Client
by orbifold on Thursday February 01, 2018 @08:29AM
(#16281682)
Well the c++ code is pretty good... In any case it works much better than the signal app on android.
Re:TDLib – Build Your Own Telegram Client
by mintplant on Thursday February 01, 2018 @10:05AM
(#16282296)
I'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.
Re:TDLib – Build Your Own Telegram Client
by parmesan on Thursday February 01, 2018 @08:22AM
(#16281636)
Takes a great engineer to make that work as well as it does..
Re:TDLib – Build Your Own Telegram Client
by 0x445442 on Thursday February 01, 2018 @09:04AM
(#16281880)
createView... just awesome.
Re:TDLib – Build Your Own Telegram Client
by balladeer on Thursday February 01, 2018 @01:59PM
(#16284645)
Well, writing a createView method itself isn't an issue unless you do it as a generic behaviour and for everything like in this Activity.
Re:TDLib – Build Your Own Telegram Client
by eitland on Thursday February 01, 2018 @07:35AM
(#16281395)
QT was very liberally licensed for a while. Are they back to copyleft or something now?
Re:TDLib – Build Your Own Telegram Client
by Aissen on Thursday February 01, 2018 @07:42AM
(#16281435)
It started moving from LGPLv2.1 to LGPLv3 in Qt 5.4 with new features, and is now the norm since Qt 5.7 (latest in 5.10):