Please join me at my new location bryankyle.com

Tuesday, October 26, 2010

Do Smart IDEs Cause Dumbening?

The other day I read an interesting blog post from Luke Palmer the other day titled IDEWTF. In the article Luke discusseshow IDEs appear to be falling behind in the state-of-the-art compared to creative tools like Photoshop, Premiere, AutoCAD, etc. Luke's main point is that as developers we should be able to create and use the best tools for our craft. IDEs should be much more advanced than they currently are. While I agree with his point in spirit, I'm not sure that making our IDEs do more is the best thing for developers.

In 2003, a study (pdf) was conducted by a psychologist named Christof van Nimwegen. In the study 2 groups of people were asked to play a logic game. The game involved transfering colours balls according to a set of rules. One group was given a piece of software that assisted them in playing the game. For example, the software would highlight moves the player could make at a given point in time. The other group was given software that was not helpful -- it would not highlight permitted moves.

In the beginning, the group that was given the helpful software was able to solve the problems faster than the group that had the non-helpful software. However as the study progressed the group that was given the non-helpful software became much more proficient. In the end, the group using the non-helpful software was able to solve the puzzles using fewer extra moves, and produced fewer dead-end states where no more moves were possible.

The two groups were brought back in 8 months later to re-run the tests and try a different, but similar, logic puzzle. The group that had initially used the non-helpful software hit the ground running, so to speak. Not only were they able to solve the puzzles faster than the group using the helpful software but they were able to adapt their knowledge to the second puzzle.

This study suggests that helpful software, or software that offloads complexity from the user onto the software, makes us reliant on it. This doesn't say that it's a zero-sum game in which by the IDEs getting smarter the developers must get dumber. Far from it. I believe that we need to strike a balance between HAL 9000 and Notepad.

If the IDEs become too smart, and coddle the developer too much the developer will learn to rely on it. Automatic correction of syntax, imports, exceptions, etc are not in and of themselves bad. They certainly improve productivity. But the developer then learns to rely on their presence, like a drug. If the developer ever tries to work with a language that doesn't have the kind of tooling their used to they will pay a huge cognitive price up front, something that might be enough to scare them away.

So where do we draw the line? Which features improve both long term and short term productivity, and which cause dependence? I think the line is right between those features that do something automatically for the developer and those that provide advice. A feature that does something for the developer effectively offloads the cognitive complexity from the developer to the software; the developer is freed from having to think about it -- at least that's how they see it. With features that simply provide advice to the developer the IDE is allowing them to be more productive without having to pay a long term price.

An IDE like Eclipse has many of types of features. The classic example of an automatic feature is "Quick Fix". When Eclipse notices that something is wrong with the code that it can fix, it allows the user to tell the IDE to fix the problem for them. Developers that are experienced without the IDE will probably understand what it's doing. They would have been able to make the correction themselves without the help of the IDE. To them, this automatic feature is simply a way of improving their productivity. For the less experienced developer however, its mode insidious. Because the user doesn't understand what the IDE is doing, or why it needs to the user becomes more dependent.

Eclipse also has a variety of features that are designed to assist the developer. Call Hierarchy, and Class Hierarchy are two great examples. The developer still needs to understand what these features are used for; the tool simply gives the user advice, quick information that helps them make a decision or explore a code base. These features still cause a sort of dependence, but since the developer understands what the tools are for, and why they need to use them the dependence is less insidious. Without these tools the developer can still do her job, but productivity might be affected. In contrast with automatic tools where the developer wouldn't be able to do his job.

So, do smarter IDEs cause dumbening? You be the judge.


Footnote: I know "dumbening" is not grammatically correct. The word comes from a Simpsons episode where Lisa worries that she's losing her intelligence and writes in her journal:

Dear log. Can it be true? Do all Simpsons go through a process of dumbening? Wait, that's not how you spell dumbening... waaait, dumbening isn't even a word!

Wednesday, October 20, 2010

Predictions Report Card

So Apple held their much anticipated Back to the Mac event today. Since I made some predictions, I thought I'd follow up to see how well I did on my first attempt and predicting what was going to be shown.

To recap, I made the following predictions. I'll address each of these in turn.

  • Sneak peek of OS X 10.7, to be called Lion
  • New OS will have more user facing features
  • New OS will have over-the-air syncing with portables
  • OS will be seeded to developers shortly
  • OS will be generally available around WWDC '11
  • New release of iWork
  • New release of iLife
  • New MacBook, MacBook Pro and MacBook Air
  • Minor speed improvements for new models
  • SSD becoming standard equipment
  • USB 3.0
  • No Blueray
  • No iPad

Sneak peek of OS X 10.7

Sure enough, Apple did announce a new version of OS X today. As expected the new release is called Lion. I got this one right. It was a gimme, but I'll take it.

New OS will have more user facing features

In the announcement today Apple talked about a few new things that they were adding to the OS X 10.7. These included Mission Control, Launchpad, and Full Screen apps. These are clearly user facing features but since I was extremely general with my prediction I'm only going to give myself a half a point.

New OS will have over-the-air syncing with portables

Apple didn't make any announcements about whether over-the-air syncing would be available. Even as I was writing that prediction it seemed a little far-fetched to me. That sort of announcement really only makes sense at an iOS/iTunes announcement, not a Mac event. I missed this one.

New OS will be seeded to developers shortly

Apple didn't make any announcements regarding when the OS would be going out to developers. Since it could be released any time I'm going to hold off on saying whether or not I got this one.

OS will be generally available around WWDC '11

According to Apple, OS X 10.7 is on track to be shipping during the summer of 2011. WWDC is typically in June which puts it in (the beginning) of summer. Since I was more specific than Apple, and these dates tend to slip I'll only give myself a half a point on this one.

New release of iWork

There was no announcement regarding a new release of iWork. I flat out missed this one.

New release of iLife

A new release of iLife was announced. I got it.

New MacBook, MacBook Pro and MacBook Air

This one's tricky. While a new MacBook Air was announced there was no mention of revving the MacBook and MacBook Pro line. I'm going to give myself 1/3 of a point for that one.

Minor speed improvements for new models

Sure enough, there were speed improvements for the MacBook Air line. +1 for me.

SSD becoming standard equipment

Again, SSDs are standard equipment on the MacBook Air. I got it.

USB 3.0

No USB 3.0. No points for me.

No Blueray

As expected, there was no Blueray announcement. But since the MacBook Air doesn't have an optical drive I'm not going to count this one for or against me.

No iPad

No new iPad was announced. +1 for me.

Conclusion

In total I made 13 predictions. Of those one is pending an outcome in the next few weeks and one I've rationalized away leaving me with a total of 11 predictions that I can grade myself on today. According to a completely impartial jury I got 6 and a 1/3 out of 11 right. That's better than half. Not bad for a first timer.

Monday, October 18, 2010

Predictions for Wednesday

Apple has a Mac press event coming up on the 20th of October. Usually, I don't do this but I thought I'd take a stab at some predictions for the event. So, without further ado, here's what I think we'll see.

Sneak Peek of Mac OS X 10.7

The invitation that was sent out to the press for the event includes a picture of a lion peeking out from behind an Apple logo. Given that all releases of Mac OS X are named after large cats it doesn't take a genius to put two and two together. Clearly a new version of the operating system will be previewed, and its name will be Lion.

The last release, Snow Leopard, was mostly about the plumbing. Lion will need to have more user facing features. I'm willing to bet we're going to see some better integration between the Mac and Apple's portable devices: iPad, iPhone and iPod. The new OS will probably include over-the-air syncing with mobile devices and some new APIs to support it. As for other features, I don't have a clue.

I don't think the new OS will be released at the event. Apple seeds a few releases to the developers before shipping it publicly. This will be a preview only, the developers will probably get their copies within a few weeks and the new OS will ship around WWDC '11 next year.

iWork and iLife

The last release of both iLife and iWork was in 2009. Usually Apple likes to release new versions of its productivity software at the beginning of the year, but seeing as the last release is almost 2 years old it could use an update. Plus, with Microsoft due to release Office 2010 soon it makes sense for Apple to release its competitive software around the same time, hopefully to knock the wind out of Microsoft's sails in the consumer market.

New MacBook, MacBook Pro and MacBook Air Portables

According to the MacRumors.com buyer's guide all of the portables have been out for about 6 months. In the case of the MacBook Air much longer than that. I'm guessing we'll see speed bumps across the board, SSDs becoming a standard component and USB 3.0. With Apple supporting high-def video through rentals and purchases in the iTunes Store I don't see Apple including a Blueray player.

No iPad

I don't think we're going to see an update to the iPad. iPad was first announced late January 2010 and didn't start shipping until March. That means the 1st generation iPad hasn't been shipping for a full calendar year yet. With the holiday season coming soon and a well oiled supply line on the device it doesn't make sense for Apple to announce a new one and canabalize its holiday sales.


This is the first time I've ever done a predictions entry, and usually I don't pay much attention to what's going on. So don't quote me!

Saturday, October 16, 2010

How To Deal With Customers

I was at a local computer store this afternoon and I overhead a conversation between who I believe to be the owner and a customer. I didn't hear the whole conversation since I walked in half way through, but the part that I did hear I found startling.

The customer was ranting and raving about how much he hated the computer that he had brought in. He was livid about how it constantly lost data, crashed and generally didn't do what he wanted. He kept saying that he was going to try a Mac because of all of the problems.

Instead of talking the man down gently and being generally agreeable the owner decided to get into a verbal fist-fight with the customer. For every knock the customer had against his computer the owner had something to say about it.

"It just turns itself off after an update!" "It doesn't just shut down, it give you 5 minutes to save what you're doing!"

"The screen doesn't work right." "These things work fine. If yours isn't working it's probably a faulty card or something."

The owner kept trying to give the customer reasons that he should stick with a Windows PC.

"The Mac has 1 trillionth the amount of software." "I don't care. It's not a toy, it's a tool. I don't need lots of software, I just need something that allows me to get my work done!"

The icing on the cake came towards the end of the conversation when the owner said, and I quote: "90% of the world can't be wrong."

In this case, I think the customer was angry when he walked in the door. He was looking for a fight. Clearly the owner doesn't have children. If he did he'd have realized what the customer was doing to him. Instead of fighting with the guy, he should have just agreed with all of his points and suggested that he do try a Mac. The customer had already made up his mind that he wanted to try one.
When the customer asked questions that he didn't know the answer to he should have picked up the phone and called one of the Mac stores in town. That would have diffused the situation and earned him some emotional currency. He could have even gone as far as to ask one of the stores if they do rentals or have a try-before-you-buy program. That customer didn't come in to buy anything, he came in for some help. So help him.

If the customer did ultimately decide to go with the Mac, he'd only have good things to say about the store. He'd refer business over to them if anyone asked and was in the PC market. In the age when brick and mortar stores are close to extinction any way that you can distinguish yourself from a faceless web site and earn some emotional currency is worth the price. Yes you might lose a sale, but you'll just have earned some in the future.

Monday, October 11, 2010

Nil Advice

Recently I wrote that one of the things I really like about Objective-C is how it handles nil-values when calling methods. It certainly makes for code that's easier to read however it does have a downside as mentioned by Daniel Jalkut of Red Sweater software. In Don't Coddle Your Code, Daniel writes:

It s also worth noting that LaMarche s defense of nil ing out instance variables hinges on the presumption that messaging nil is safe. True, messaging nil will not cause a crash. But is that safe? Not if it changes the behavior of your code in unpredictable ways.

He goes on to demonstrate his point with some contrived but applicable code:

if ([mDiplomat didReturnGestureOfPeace] == NO)
{
    [[NuclearWarehouse nuclearMissile] launch];
}

Daniel's point is this:

The biggest disservice you can do to your users is to allow them to run code that has unpredictable behavior. The whole point of programming is to make computers accomplish tasks in predictable ways.

I think he makes an excellent point. To paraphrase -- and I'm sure C++ developers will agree -- just because you can do something doesn't mean that you should. This language feature is a boon for those that understand how to use it effectively and design interfaces that work well with it.

Wednesday, October 6, 2010

Why FizzBuzz is a Great Interview Question

Interviewing can be really hard and stressful. You need to make a decision about how well someone will fit into your organization. That in and of itself is hard enough; combined with the fact that you aren't given anywhere near the amount of time you need to assess their skill level and personally makes it even more difficult.

The best way to assess skill level is to ask questions that give the candidate questions that allow them to demonstrate their knowledge. But what kind of questions should you ask? Given that 199 of out 200 applicants can barely code, it makes sense to ask a question to weed out the 199. FizzBuzz is just the type of question to do this.

FizzBuzz, if you aren't, is a question that asks the candidate to write a simple program. Typically it's proposed similar to the following:

Write a program that prints the numbers from 1 to 100. But for multiples of three print Fizz instead of the number and for the multiples of five print Buzz . For numbers which are multiples of both three and five print FizzBuzz .

This question is specifically targets problem solving skills; something that all good programmers need to have. It also has the advantaged of targeting the 3 most fundamental concepts in computation: sequence, selection, and iteration. That is, it has loops, conditionals and the sequence of them matters to the output.

The way in which the question is asked usually trips people up too. Implementing the program exactly as it's specified will end up working incorrectly. Why? Have a look at this JavaScript implementation:

for (var i=1; i<=100; i++) {
   if (i % 3 === 0 )
      print("Fizz");
   else if (i % 5 === 0)
      print("Buzz");
   else if (i % 3 === 0 && i % 5 === 0)
      print("FizzBuzz");
}

Anything strike you as odd? The last condition is in the wrong place. If the value is divisible by 3 or 5 the if/else construct would have been broken out of in the first 2 conditions.

Whether or not someone gets the correct answer doesn't really matter. What's really being tested is the candidate's ability to convert a problem description into the language of logic in a reasonable amount of time. What's reasonable? Accounting for nerves I'd say it shouldn't take longer than 10 minutes. A good programmer should be able to solve inside of 5.