Tag Archives: clever

Clever code and WWDC

In his 9th essay about avoiding crashes in your code, Brent Simmons writes about learning to be even less clever:

“But over the years I’ve come to think that I should write code that’s about 10% as clever as I am. And I’ve come to believe that true cleverness is in making code so clear and obvious that it looks like nothing at all.”

I’m in San Francisco for WWDC this week, but without a ticket again. I took some time this afternoon — miles away from the hotel and Moscone — to reflect on what I’m doing here and what I need to do next. I’ve been to WWDC many times; my first was in 1996. And it has taken almost all of those years for me to understand the truth of Brent’s statement about being clever.

I also believe that a programming language can either encourage or discourage clever code based on the syntax it allows. I saw it with Ruby — programmers intent on fitting as much logic into a single line of code as possible. I think I see it with Swift as well, in operator overloading and maybe even a kind of rejection of Objective-C’s notorious verbosity. We’ll know for sure if we eventually see a Swift book in the pattern of JavaScript: The Good Parts.