Weird one for me, also not really a trick, I just never really thought about coding in that way. A former colleague showed of some code and it was completely reversed from how I'd write.
The code uses a library, which provides a number of classes. Rather than encapsulating those classes within his own code, he'd simple use them as base classes and overwrite and extend a needed. Again no tricks, but basic OOP, but I just never really considered doing it like that, but it saves a ton of code.
The code uses a library, which provides a number of classes. Rather than encapsulating those classes within his own code, he'd simple use them as base classes and overwrite and extend a needed. Again no tricks, but basic OOP, but I just never really considered doing it like that, but it saves a ton of code.