Embrace Language Idioms

July 12, 2018

Embrace the idioms of your language and tools. Write Swifty code with Swift, ObjC-like code with ObjC, Pythonic Python, idiomatic C++. Use git like git, not like Subversion.

If you are multilingual (both human and computer languages), you’ll often find yourself reaching for an elegant concept from another language which is not found in the language you’re using. You might be tempted to implement a solution using that concept, transliterated into the language you’re working with; but that would be as silly as transliterating a Chinese phrase directly into English, and expecting your listeners to have no difficulty understanding you.

For programmers, the recipients of your communication are the future maintainers of your code. Writing in a language’s native idioms makes it easy for them to understand and update your code.

Cannibalize Yourself

June 28, 2018

Someone smart once said: “If you don’t cannibalize yourself, someone else will.” This is often used to talk about a company’s products, but not often enough about a company’s internal engineering dynamic.

Group politics often stands in the way of choosing a rational course for the team. A powerful or popular personality who defends an existing product can become a formidable roadblock for newer, better technologies that are just emerging.

Organizations that consistently suppress superior solutions in fear of upsetting the big shots within their ranks are naturally doomed to mediocrity. They open the door for their competitors to fill the opportunity.

Leaders: make it clear to your teams that deference is not a virtue if it comes at the cost of missing an opportunity to obsolete yourself with a superior technology or product.

Incomprehensible Code

June 21, 2018

Incomprehensible code is unmaintainable code. Unmaintainable code is bad code.

Avoid code that violate customary idioms without having a very, very good reason for doing so.

“Cleverness” is not a good reason.

Pick Up a Scripting Language

May 17, 2018

Pick up a scripting language with access to a large library of utilities. Get good at it. Learn its trivia. Use it to automate your chores. A good scripting language enables you to turn your computer into a custom-made power tool.

Software Engineers are Craftspeople, not Scientists

May 4, 2018

Most software developers are engineers and craftspeople, not computer scientists. By nature, we don’t deal with the cutting edge of computer science; we hang way back from new research and implement what is tried and true.

When you think you’ve invented a completely novel data structure, algorithm, or design pattern, chances are you probably didn’t; you just rediscovered something a computer scientist described decades ago.

Don’t fall in love with your “invention”. Instead, take the opportunity to find other experienced engineers or scientists who can help you learn more about exactly what it is you’ve rediscovered.

You will probably learn of shortcomings in your technique you didn’t know about. And if you’re really lucky, you’ll find an even better way of solving your problem.