Iterative development is a style where you write something and then modify it in a series of small iterations until it does what you want.
Which means that he did indeed string maps and greps together until it worked the way he wanted to. As part of a deliberate coding style.
I respect that style because it sometimes is mine as well. I've seen it be particularly popular among people who believe in some or all of; test-first development, dynamic programming techniques, and rapid prototyping.
Proponents will claim that it produces more robust code in less development time. They will not claim that it produces the fastest code in the world, but then again there is no need to optimize what is already fast enough...