Dave's Tech Shop

if your tech is broken, bring it in for repairs

My Links

Post Categories

Archives

Blog Stats

IntelliSense is dictating the way we program

I read Charles Petzold's article titled Does Visual Studio Rot the Mind? a while back and I thought it was interesting, but I was too busy to really think deeply about many of his points.

Then, this weekend I attended the excellent Jacksonville Code Camp 2006. Three-hundred people registered for this! Jim Wooley gave a very interesting presentation on LINQ (Language enhancements in VB 9 and C# 3, The Search for the missing LINQ). Jim is a great presenter. Check him out if you have the opportunity.

When I last used C# 3.0, it did not have Intellisense. The latest CTP now offers nearly complete support for Intellisense. Jim gave some code examples and I was surprised to see the extent to which Intellisense is dictating the way languages are designed! Petzold was more right than I had imagined. Not only is Intellisense dictating the way we program, it is dictating the way Anders Hejlsberg is crafting new versions of C#.

Let me quote a couple short paragraphs from Charles Petzold's article to set the stage for my take on how Intellisense has infiltrated some of the world's most creative brains.

And yet, IntelliSense is also dictating the way we program.

For example, for many years programmers have debated whether it’s best to code in a top-down manner, where you basically start with the overall structure of the program and then eventually code the more detailed routines at the bottom; or, alternatively, the bottom-up approach, where you start with the low-level functions and then proceed upwards. [...]

Well, the debate is now over. In order to get IntelliSense to work correctly, bottom-up programming is best. [...]

But the implication here is staggering. To get IntelliSense to work right, not only must you code in a bottom-up structure, but within each method or property, you must also write you code linearly from beginning to end — just as if you were using that old DOS line editor, EDLIN. You must define all variables before you use them. No more skipping around in your code.

It’s not that IntelliSense is teaching us to program like a machine; it’s just that IntelliSense would be much happier if we did. [...]

And I think it’s making us dumber. [...]

So I don’t think IntelliSense is helping us become better programmers. The real objective is for us to become faster programmers, which also means that it’s cheapening our labor. [...]

Near the conclusion of his section on Intellisense, Charles says, "Of course, I could always just turn it off." He also admits that turning it off is not easy to do (because Intellisense is addictive). I enjoyed Charles' article, but I never even thought about turning Intellisense off. However, deep down I knew Charles' points had validity and therefore, I never completely forgot about them even though I continued to happily rely upon Intellisense every day.

However, Jim's presentation at the Jacksonville Code Camp 2006 made all this take on a new urgency for me.Take a look at this VB code from one of Jim's examples. Select-from-where has become from-where-select now!

Dim results = From c In System.Enum.GetNames(GetType(ConsoleColor)) _
     Where c.StartsWith("Dark") _
     Select c

Following this example, Jim mentioned that because the new CLR languages will use a from-where-select syntax, he would like to see T-SQL modified to use this same syntax. He had some good reasons for his suggestion, but I was floored to see the extent to which Intellisense could be shaping the future of all languages, even those not closely tied to the CLR.

In VB 9 and C#3.0 it will no longer be possible to turn off the influence of Intellisense. The new CLR languages themselves are addicted to Intellisense. They are shaped by Intellisense. We cannot escape from Intellisense and if Charles is right, that means we have lost some of our freedom, power and creativity as developers.

What is the counter point to this? Are there other aspects of programming in .NET that more than offset the dumbing-down effect Charles describes?

Are we .NET developers becoming a separate class of citizens from other developers? I have a friend who works at LLNL on a project where he writes and optimizes parallel processing code for the world's fastest supercomputer. We had lunch together a couple weeks ago and we discussed working on a C# project together. He doesn't understand much about Visual Studio or .NET yet. At the time of the conversation, I remarked on how different our programming worlds were. I was thinking he would somehow be better off if he knew Visual Studio and C#. Now, as I reflect on where C# and Intellisense are taking me, I'm wondering if it is the direction I want to go.

Print | posted on Tuesday, August 29, 2006 12:15 PM

Feedback

# re: IntelliSense is dictating the way we program 8/29/2006 8:49 PM Jim Wooley

Dave, Thanks for the kind words. I can see your point regarding intellisense to an extent. As I pointed out in my presentation, the changed ordering of from..select was only partly dictated by intellisense needs. There are also issues of scoping where the object type needs to be known before it can be used. C# has always been this way as you declare the type before the method/field name ("string foo" as compared to "foo as string"). If we really wanted intellisense to dictate the way we code, intellicrack (Coderush) would be a manitory to all toolkits.

As for presentations, if you missed the Jacksonville presentation, i have a webcast of the Atlanta code camp's version and am presenting in Atlanta again on 9/5/06. I'd love to see anyone in the area come on out and see what this stuff is all about.

# re: IntelliSense is dictating the way we program 8/29/2006 9:39 PM Dave

@Jim: I want to add that I really appreciate the way you use so much live code in your presentations. You keep things moving fast and you hold everyone's attention.

I am a fan of CodeRush to an extent. (I don't use it right now simply because it slows down my IDE too much.) With CR, for example, inserting a block of code (a snippet) dictates less about my approach to coding than the situation I highlight above, where, as Charles describes it, Intellisense dictates a bottom up style of programming. I can get value out of CR without it dictating my coding style to the same degree. Maybe that's because CR has broader functionality and I just use what I need.

In regard to LINQ, is my memory correct about the early versions of LINQ? I used it before it had any intellisense and I seem to remember that the current from-where-select syntax had not been implemented this way at that time.

I'm looking forward to seeing your future presentations in Jax or Orlando. Do come back!

# re: IntelliSense is dictating the way we program 8/30/2006 10:13 AM Jim Wooley

Dave, Intellisense in LINQ has been evolving and is still not complete. It is much better with the MAY CTP, but there are a number of things missing still. The VB implementation seems more complete than the C# one does, so if you use C# you may have missed out on some of the joy ;)

As for from..select vs. select..from, C# 3.0 has always (at least since the public announcement at PDC'05) used the from..select syntax. VB 9 started with select..from, but switched back to from..select as of the May CTP. Personally, I prefer the latter syntax as it better reflects the order in which the operations are applied. The order does matter as it applies to variable scope on the extension methods.

Title  
Name  
Url
Comments