Quickie: KISSing is for the experienced
Posted by Felix Geisendörfer, on May 15, 2008 - in Everything else » Quickies
If you are new to a programming language, forget about the KISS principle. Experiment with crazy & complex code.
This might not be obvious but a conversation with somebody on #jquery today made this very clear to me. Trying to apply KISS when getting into a new technology is STUPID. Writing the most succinct and simple code is only possible if you know all nuances of what you are working with. Otherwise your simplicity will be based on wrong assumptions and lead to buggy code.
A prime example for PHP developers learning JavaScript:
javascript
-
var isEmpty = [];
-
if (isEmpty) {
-
// You are not ready for your first KISS : )
-
}
(JavaScript type juggles empty objects / arrays to true in a boolean context)