What data type to use?

https://github.com/arduino/Arduino/blob/master/build/shared/examples/10.StarterKit/p08_DigitalHourglass/p08_DigitalHourglass.ino#L31
Why is the interval between each LED turning on not a constant?

https://github.com/arduino/Arduino/blob/master/build/shared/examples/10.StarterKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino#L36
Why is the threshold at which the lamp will turn on not a constant?

https://github.com/arduino/Arduino/blob/master/build/shared/examples/10.StarterKit/p13_TouchSensorLamp/p13_TouchSensorLamp.ino#L51
Why is the variable to hold the sensor’s value of type long?

The examples used in documentation is not peer-reviewed and is often subject to mistakes and sloppy programming.

Since changing the data types does not change the circuits’ reaction, could I conclude that these fall under ‘sloppy programming’?

Dansercoer:
Since changing the data types does not change the circuits’ reaction, could I conclude that these fall under ‘sloppy programming’?

Probably. Remember that Arduino was designed for artists, not for programmers.