Registered: Feb, 2002
Re: Are Programmers People? And If So, What to Do About It?
Posted: Apr 16, 2003 1:35 PM
(Whoops! Forgot to do a Preview and mismatched my formatting tags. I've been petitioning Bill for a "delete my last post" feature, to no avail.)
John O'Hanley wrote:
> ...I would add, "Programmers are just as stupid as everyone
> else." That is, the intellectual effort required to use an
> API should be roughly equivalent to that required to
> understand a cooking recipe.
Maybe I'm just stupid, but I am really annoyed by APIs that require me to stop my flow of thought and waste my time and intellectual effort trying to figure out unnecessary intricacies. Let's say you want to get the CRC of a file. Do you prefer an API that has a simple interface including a GetCrc( Stream stream ), or do you prefer one that requires you to create a CRC table object, initialize it, convert your stream to a series of int arrays where only the lower 16 bits are meaningful, add a Crc update event listener, etc., etc.? Like Laird, I remember a time when it was cool to be acquainted Byzantine details (particularly when others didn't and you could lord it over them) of the language, API, or system, but now I am less interested in those things and more interested in tools (including the language) that get out of the way as much as possible and let me think more about the problem I'm really trying to solve.
Guido van Rossum wrote:
> > e.g. Guido is known to suggest that Python improves
> > productivity because it takes less keystrokes to implement
> > the same thing.
> I never say that; I don't care much about reducing keystrokes.
> I care about code size for a different reason: reading shorter
> code makes for easier understanding -- up to > some point, and
> that's the point where I stop.
Beat me to the punch! I was going to say exactly that one of the nicest things about Python is its pithiness per page. This is in great contrast to Java, where a high-res monitor and the Page Up/Down keys are always necessary.
> Good IDEs (i.e. IDEA, and sometimes eclipse) reduce the
> cost in terms of keystrokes by automating things. In fact,
> various features of these tools are only possible because
> the language has static typing - so something which may
> appear to be a cost to the language, can be a gain if the
> right tools are available.
I agree that tools like IDEA make Java programming a lot more fun and productive. Even Microsoft's Visual Studio, operating on the languages they invented (VB, C#, managed C++) pales in comparison to many of IDEA's cool features (they need to have a look at IDEA and then do some "innovating").
That Python is dynamically typed by no means implies that it is immune to cool features like those of IDEA. Python has excellent reflection facilities, like Java, which tools can leverage. For example, in IDLE (the default "Python Shell" that comes with Python), you get the now-common parameter tool tips when you begin to type a method. Even better, when you dynamically load a COM automation object (of which the Python environment has no prior knowledge, of course) and call one of its methods, you get tool those tips! Doing something similar in Visual Studio is not dynamic (you have to build an "interop assembly") and doesn't give you any more information. I haven't used any COM or CORBA libraries in Java, but I would be pretty impressed if IDEA could dynamically show method parameter lists when using them.