For years business consultants have instructed businesses to “know your core competencies.” What this means is “know what you do well and stick to it.”
For example: Harley Davidson makes great motorcycles. But they’re probably not so good at making perfume.
Smith & Wesson makes some of the best six-shooters around, but I question whether their bicycles will be a smashing success.
McDonald’s is…well I won’t say they’re very good at making food, but they are pretty good at selling a ton of it. But they should never, and I mean not between now and the day that Eternity decides to cash it in and become a Las Vegas showgirl, make a Lobster Sandwich.
As a developer knowing your core competencies can help keep you out of trouble. I’ve been building web applications for most of my career and I’d like to think that I’m pretty good at it. But there are certain things I’ve never done and would not do well right off the bat: writing a compiler, building a super-fast search application, and implementing my own encryption algorithm are a few that come to mind. This reminds me of a story…
I was co-maintaining a successful e-commerce website and we were looking for a way to encrypt passwords so they wouldn’t be stored in plain text. The site was written in Java, which I had used for the previous 6 months or so, but even after 6 months I could not for the life of me find anything in Sun’s documentation (does anyone know how to effectively use their search tool?).
After literally hours of combing through the documentation I gave up and decided to write a quick, simple encryption algorithm to hash passwords. Take the ascii value of each character, add something to it, divide by something…whatever, it’s all just numbers, right?
I implemented it. We launched. And sure enough, within a few days people were complaining that they couldn’t login. I thought surely we had a bizarre coincidence on our hands; ten people all at once misremembering their passwords. I was ready to call the papers until, after about 20 minutes of investigation, I realized that my encryption algorithm didn’t really work for a couple of characters at the edge of the visible ascii range. It processed the values, but the encrypted result was actually an invisible character, also known as a “control” character.
Control characters can create difficulty because anytime they cross a boundary, whether from the database to the application, or the application to a web browser, they run the risk of being accidentally changed up by a mis-encoding between the layers. Sure enough, some of the decrypted ascii values were incorrect resulting in a handful of people who couldn’t login.
On that day I learned the importance of sticking to what you do well. After many successful launches we had our first setback; luckily we were able to fix it without a lot of effort.
This doesn’t mean that you should never branch into new things. On the contrary, you must constantly build on your core competencies or become outdated. But be smart about it.
Realize that moving from building web applications to desktop applications is not a huge stretch. Moving from web applications to compilers, while possible, is going to take more than browsing an online tutorial. And stay away from encryption; it’s a nasty beast!
When dealing with tasks completely outside your realm of knowledge expect to spend a lot of time researching, becoming familiar with the subject, and learning it slowly as opposed to copying and pasting the first code sample you see.
I can make web applications like it’s nobody’s business, but don’t hire me to work on your next compiler.