Do not create unnecessary methods

Methods should be short, from 1 to 7 lines of code, maximum 10 in some cases (with the exception of some algorithms). Because a method does just one thing its name should describe it precisely. But it should not contain implementation details (like data types). The...

Return: get out as soon as possible

I believe the idea of a single exit point for functions comes from the 70’s. A function used to have only one exit point, a single return statement. I still see some developers doing this but it’s not a good idea. As soon as you have found what you were...

WebSockets and Android

I didn’t know that the default browser installed on Android is called Webview. I haven’t created any native Android app ever. But I wanted my web app to run on Android using Websockets. Unfortunately, websockets are not implemented in Android Webview. In...