There are engineers and programmers who insist on marching to their own peculiar drums. Sometimes that can be a good thing, but for managers it can be a complete nightmare.
One of my team members was a very quirky character, which also translated into his style of coding.
On one project, we were writing a somewhat large embedded code in ARM, with more than 60 modules. Instead of adhering to our common style, he insisted on doing it his way.
At a certain point, I gave him the task to design several complex data entry screens, with a particular "look and feel" to communicate over our dumb terminal interface.
After leaving him at it for a month, I went over his code to peer review it. I was absolutely astonished. All his screens -- very complex, context-sensitive screens -- were contained in a single printf() statement.
He wrote the longest printf call I had ever seen in my entire life. The line was 1,450 characters long!
It was constructed with ternary operators like {"%s%s%s%s.....%s%s", a > 2 ? b < c ? "this" : "that" : f == 0 ? ......}. Just imagine a line with more than 8 layers of logic, over 60 extremely complex ternary operators, spanning over 1,400 characters in a single printf() evaluation.
It worked, but I presumed that it would be impossible to maintain. I trashed his work and asked him to redesign it from scratch.
It was very tense, and we argued intensely, but he ended up doing it right in the end. He was a brilliant engineer, actually.
Jonny Doin is CEO of GridVortex Systems. He has over 25 years experience working with embedded systems R&D and hardware and firmware design. He has worked on medical, broadcast video, industrial, and energy applications and founded GridVortex in 2012 to design and deploy IoT intelligent networks for large-area urban projects and embedded micro-clouds.
用户1406868 2015-12-18 02:50
用户1152031 2014-1-14 09:22