The answer is simple: The Arduino programmers are lazy and don't have much of a clue. The whole of the core is riddled with wrong data types, bad practices, and generally stupid ways of doing things. All of which end up rubbing off on users who are new to programming and blindly copy how Arduino have done things, picking up said bad habits and practices for themselves.
Well now that we are dissing Arduino, allow me to add my gripes!
The HARDWARE design is all wrong. Ever try to use the "mounting" holes on the board? Impossible. They are too close to connectors, and there are no "keep-outs" to protect traces from screw heads or standoffs.
There are not enough VCC and GND points available for prototyping.
There is no good place to clip on a ground wire (like for a scope probe).
There is not enough keep-out clearance around the ICSP connector for the MEGA16 USB processor, and BARELY enough room around the main ICSP connector.
The USB interface uses a 16.000 crystal
, but the CPU uses a lousy resonator that drifts with temperature.
Don't believe this one? Setup a 60 Hz square wave (or 50 depending on where you live), watch it on your scope with the scope sync'd to the line and watch it's drift.
Then touch the resonator and you will see the frequency slowly change (drift rate changes) as it warms up.
It's not finger capacitance - the change doesn't happen immediately, it SLOWLY drifts! Remove the finger and it drifts back down.
Wonderful design where PRECISION TIMING is needed (not).
The connectors on the board should have been MALE pins, not a female header. It's much easier to make a custom female-to-female cable with Sparkfun or Pololu jumper wires and single row or dual row connectors.
Because of this, the first thing I usually do is de-solder the connectors on an Arduino and replace them with male header pins.
Voltage regulator: Why not use something more beefy like a 7805 and some decent heat sinking (or at least provide a spot to solder in an optional one)?
Pin numbers: How stupid is that? What's wrong with "PORTB, BIT 7"?
Why is map() done with long ints? It's almost useless that way. I modified my library (overloaded the function) to also support floats.
Speaking of floats, why doesn't the IDE have the option
or disable floating point support
for printf, sprintf, sscanf, etc? I had to write my own mod to add that feature!
Gosh I feel so much better now!