Catch up on stories from the past week (and beyond) at the Slashdot story archive


Forgot your password?

Comment Re:LISP a bad choice as a starter language. (Score 2, Informative) 330

I agree that Python is a better beginning language than Lisp, but I think the book is pitched more as an introduction to Lisp (and functional programming) than as an introduction to programming. That said, I'd like to say a few words in defense of Lisp as a first language.

In my experience (having taught a number of courses that involve coding), beginning programmers love to write bad code. The path of least resistance for them is to write monolithic blocks of code with one-character variable names and zero documentation, and to perform tasks in a remarkably contrived way that reflects a resistance to thinking ahead, somehow managing to do in cubic time what the "obvious" (to me) approach would do in linear time. Python tolerates this--it's such an awesome language that it is often easy to get something done even in the presence of terrible habits and lazy thinking (e.g., its readability makes monolithic code manageable).

Lisp does not make it so easy to get away with being a bad programmer. Writing monolithic functions, for instance, is relatively hard work in Lisp; the programmer who attempts this is punished with parentheses, and soon finds that the path of least resistance involves many relatively short functions with well-defined purposes. In other words, Lisp requires a level of care and forethought that other languages don't. Pedagogically, this is a virtue (though it comes with the heavy drawback that beginners can easily get discouraged).

There are exceptions, certainly. For instance, the easiest way to compute the nth Fibonacci number in Lisp is naive recursion, resulting in exponential runtime. Less naive recursion allows linear time, but a beginner would have trouble with that. (And a mathematically inclined programmer can compute it in constant time, if you assume arithmetic operations take constant time.)

In my view, the only *bad choice* of a starting language is one that causes brain damage, such as BASIC. Python tolerates brain damage (since it accommodates almost any programming style), but is safe under proper supervision. Lisp avoids brain damage.

Comment Re:Only scratching the surface (Score 1) 359

To those saying that a+b+c != c+b+a is about noncommutativity rather than nonassociativity: if you look carefully, this is about nonassociativity. The left expression (typically) parses as (a+b)+c; the right expression parses as (c+b)+a. In the presence of commutativity, which we do have with f.p. arithmetic, this is saying (a+b)+c != a+(b+c), which is nonassociativity.

Comment Re:Judges are ignorant, film at 11 (Score 1) 848

Autoconfiguration of network interfaces makes computers easier to use, not harder, but autoconfiguration requires the computer to be able to figure out on its own whether or not it's okay to access a network. If we say, "What appears to your computer to be open is not really open," then we prevent computers from figuring out permissions on their own, and require human intervention. More human intervention makes computers harder to use. This isn't a huge issue now, when so much use of hotspots involves explicitly sitting in front of your computer and being conscious that you're using that hotspot, but as software improves and computers act more independently on our behalf (e.g., delivering email messages for us that we wrote when we were not near a hotspot), the requirement of human intervention becomes a bigger obstacle to usability.

As for the store owner who wants to restrict access to customers, she can have a sign that says, "Wireless access for customers only," and settle for the fact that most people will obey this, and maybe an occasional computer in the backpack of a passerby will connect and deliver an enqueued email message. If she wants something more stringent, then she can put up a sign that says, "Wireless access for customers only. Password: coffee." That won't keep dishonest people out, but neither did the outright open access, and it doesn't interfere with the idea that what appears to the computer to be open really is open--an idea that makes computers easier to use. If she wants something more stringent than that, then she should be prepared to be a nerd or find herself one.

The law may very well say that just because an access point is open doesn't mean you're allowed to use it. But laws like this ultimately make computers harder to use, by requiring human intervention in situations where a computer would otherwise be able to sort things out on its own, and thereby making the computer harder to use.

Slashdot Top Deals

Life would be so much easier if we could just look at the source code. -- Dave Olson