Sunday, October 17, 2021

Software development conventions

No comments

We use proper variable names instead of comments. The only exceptions for comments are "//TODO" temporary labels.

Order of class members in within the class definition

Internet suggests multiple ways for ordering and sorting members, and I follow neither of them. It is up to everybody to choose his/her own way of sorting members. It is not important how we sort members; rather it is important how consistently we follow our chosen methodology. So my way to sort members is as follows:

  1. Inherited (overridden) members from the parent class.
  2. Everything else.

In within of each of these, items are sorted as follows:

  1. Variables
  2. Init{} block
  3. Constructors(){}
  4. Functions(){}
  5. Everything else

In within of each of these, items are sorted as follows:

  1. Abstract
  2. Public
  3. Private
  4. Everything else

Sunday, October 10, 2021

How to connect an OBD device (car scanner) to an Android phone

Plug in the OBD and turn on the engine. Make sure you see the OBD device bright light is on under the car dashboard.

In the phone Bluetooth settings, connect to the "OBDII" device with the password "1234".

If the phone doesn't see " OBDII" device, try to plug the OBD device out of the car's socket and plug it in again. 

Download "Car scanner" app:
https://play.google.com/store/apps/details?id=com.ovz.carscanner

In the app, connect to the "OBD" device.

In the app, press "Engine codes"