By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,508 Members | 1,856 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,508 IT Pros & Developers. It's quick & easy.

Intellisense and the psychology of typing

P: n/a
Yesterday I typed in some C++ code that called a function with two
ints. Intellisense (auto-complete) helpfully told me that the first
formal parameter was called "frontLight" and the second "ringLight". It
occurred to me that I'm getting some semantic help here on top of the
obvious type safety. It seems to me that the existance of this kind of
support is tied to the static typing nature of C++.

I've always been interested in the psychology behind those heated
"static" vs. "dynamic" (quotes to avoid another lengthy discussion
about manifest, latent, explicit, ...) typing debates. So I googled
"Intellisense static dynamic typing" and tried to get a view of the
collective mental landscape of this subject. It appears that the
threads that talk about Intellisense soon run dry. I'm wondering if
this is because:

1) Intellisense is really just another crutch that does more harm than
good? There were a few hardcore defenders of this position but not
many.

2) Intellisense is really useful but hard to implement well in IDEs for
dynamic languages? Can anyone comment on the status of
Intellisense-like tools for dynamic-language IDEs?

3) Users of dynamic languages are always developing/debugging running
programs where the current type of a variable is known and hence
Intellisense is possible again? My own limited experience with dynamic
languages (Ruby) is limited to edit-run cycles.

Any opinions?

Thanks,
Andrew

Jul 19 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
my opinion is that if you find it useful, use it. if you don't then
don't... either way, its up to you to decide what's useful and what's
not. don't ask us. Try it out yourself.

Jul 19 '05 #2

P: n/a
On 5/26/2005 12:31, an*************@hp.com wrote:
1) Intellisense is really just another crutch that does more harm than
good?
To me I found the intellisense in VS for C++ was somewhat helpful in my
earliest stage of learning where I had to look up how many args a function
had. After a while, I found it more convenient to just keep the VS
language and std lib docs open in another window. IOW, it started getting
in the way. Maybe at times it can save some keystrokes but I kept finding
a pattern of start typing something...down arrow...down arrow...down
arrow...down arrow...tab...type args. Even worse is the situation were
start typing something...downWhoops hit left arrow...hit end...hit
backspace...type last letter....down arrow...etc...tab...etc...

How egregious!? No thank you; I already use variable names like "myData"
instead of "mD" so extra keystrokes are not that big of a deal :)

Still I think calling it a crutch might be a bit extreme. Is a book or
documentation a crutch too?
2) Intellisense is really useful but hard to implement well in IDEs for
dynamic languages?


Maybe for some people and yes. There was some recent discussion in this
very NG about this WRT vim et al.

Cheers,

~Jason

--

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Jul 19 '05 #3

P: n/a
Intellisense does improve programmer productivity as
you do not have to keep opening header files to refer
to the interfaces. In VC++ the intellisense display
also shows the function header comment, so you have
full access to the information about the interface.

Deepa
--
EventStudio 2.5 - http://www.EventHelix.com/EventStudio
Model in Plain Text; Generate Sequence Diagrams in PDF/Word

Jul 19 '05 #4

P: n/a
Well, there are two distinct features of IntelliSense as you know it.
One is auto-completion and the other is contextual help.

Auto-completion is included almost all beefy Python IDE's.

Contextual help is included even in IDLE, where if you begin typing a
function call, its docstring pops up around where you are typing.
Since many functions have dynamic arguments, I think this really is the
best solution, since the implementor of the function knows what would
be the most helpful to show. Open the interactive IDLE prompt and type
max(, iter(, help(, for example -- although most of those are pretty
minimal.

Jul 19 '05 #5

P: n/a
<an*************@hp.com> wrote>
1) Intellisense is really just another crutch that does more harm than
good? There were a few hardcore defenders of this position but not
many. I'm primarily a VB programmer, but I also do Java and web stuff as well.
Whenever I look at a new IDE the FIRST thing I look at is whether
Intellisense-like functionality is present. If it is not, I discard it from
further consideration. The reason has nothing to do with static vs dynamic
typing. It has to do with the fact that I spend a considerably amount of
time thinking about how I'm going to solve the problem at hand. Filling my
head with API specs that I have to look up is just a pain. And frankly if I
have to type 'boolean' instead of 'boo<tab>' I get real cranky real fast.
2) Intellisense is really useful but hard to implement well in IDEs for
dynamic languages? Can anyone comment on the status of
Intellisense-like tools for dynamic-language IDEs? It might be and probably is. But I say if dynamic typers want the
flexibility they think they are getting then they should have to deal with
ALL of the consequences.
3) Users of dynamic languages are always developing/debugging running
programs where the current type of a variable is known and hence
Intellisense is possible again? My own limited experience with dynamic
languages (Ruby) is limited to edit-run cycles.


I can't speak to that only to say that, how in the world can an object that
accepts anything reasonable be expected to protect itself from misuse or
provide reliable services given a set of parameters?
Jul 19 '05 #6

P: n/a
"James D Carroll" <ja***********@hotmail.com> wrote in message
news:Td********************@speakeasy.net...
if I have to type 'boolean' instead of 'boo<tab>' I get real cranky real

fast.

Why? Is your programming speed really limited by the difference
between typing "lean" and hitting <tab>? If typing speed is
the limitation - go get some touch-typing courses.
Jul 19 '05 #7

P: n/a
I have rapidly skimmed over the few responses here. Auto completion is
definitly possible in dynamic languages: Common Lisp has it with its
Emacs mode, SLIME.

If you're in a slime buffer, you type (get-un then press C-c Tab and
Emacs will auto-complete with (get-universal-time), if there are many
choices, they will be displayed in a split window, if the function
takes parameters, those will appear in the mini-buffer, like so:

(with-open-file (stream sb-impl::filespec &rest sb-impl::options) &body
body)

SLIME is also not the only place where a dynamic language has
auto-completion, check out Ecomplete in Squeak or the auto-complete
package in Visual Works Smalltalk. It can be done, maybe not as easily
as in a statically typed language, but it definitly can be done.

Jul 19 '05 #8

P: n/a
On 26 May 2005 09:31:12 -0700, an*************@hp.com wrote:
Yesterday I typed in some C++ code that called a function with two
ints. Intellisense (auto-complete) helpfully told me that the first
formal parameter was called "frontLight" and the second "ringLight". It
occurred to me that I'm getting some semantic help here on top of the
obvious type safety. It seems to me that the existance of this kind of
support is tied to the static typing nature of C++.

I've always been interested in the psychology behind those heated
"static" vs. "dynamic" (quotes to avoid another lengthy discussion
about manifest, latent, explicit, ...) typing debates. So I googled
"Intellisense static dynamic typing" and tried to get a view of the
collective mental landscape of this subject. It appears that the
threads that talk about Intellisense soon run dry. I'm wondering if
this is because:

1) Intellisense is really just another crutch that does more harm than
good? There were a few hardcore defenders of this position but not
many.

2) Intellisense is really useful but hard to implement well in IDEs for
dynamic languages? Can anyone comment on the status of
Intellisense-like tools for dynamic-language IDEs?

3) Users of dynamic languages are always developing/debugging running
programs where the current type of a variable is known and hence
Intellisense is possible again? My own limited experience with dynamic
languages (Ruby) is limited to edit-run cycles.

Any opinions?


Static typing is a strong enabler of certain intelisense functions;
but not all, nor even most. A good IDE for a dynamically typed
language can make quite a few inferences to decide how to suggest
intellisense. That said, statically typed languages will always have
better intellisense than dynamically typed languages.

Indeed, one of the reasons that I have not switched to Ruby as my
standard language is the wonderful tools available with "IntelliJ" for
Java and "ReSharper" for C#.
-----
Robert C. Martin (Uncle Bob) | email: un******@objectmentor.com
Object Mentor Inc. | blog: www.butunclebob.com
The Agile Transition Experts | web: www.objectmentor.com
800-338-6716
"The aim of science is not to open the door to infinite wisdom,
but to set a limit to infinite error."
-- Bertolt Brecht, Life of Galileo
Jul 19 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.