For example..."Use strict; to prevent stupid or careless mistakes".
A direct tone can be useful. Combining a direct tone with the word "stupid" is probably... not smart. Yes, a "stupid mistake" does not actually imply that the actor is generally stupid. But I'm sure there will be readers who are... um... not fluent enough in English to realize that. The word "careless" is not much less loaded.
I would suggest combining the direct tone with the phrase "typographical errors (typos)". Though, not having read the tutorial, there might be another approach that better fits into it.