Slashdot is powered by your submissions, so send in your scoop


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

Comment No! They should sell co-singles. (Score 1) 409

Listening to Pink Floyd singles is the exact wrong way to do it, literally. The proper way to listen to certain Pink Floyd albums is in their entirety except for one track. For example, when I listen to Dark Side of the Moon, I always skip "Money" if I'm paying attention. That song totally kills the vibe—not the fault of Waters et al. so much as having had to hear that song so many times in the company of assholes. Perhaps they could sell a deluxe edition of that album, in two volumes available for separate purchase: Volume I, Tracks 1–4, 6–9 and Volume II, Frat-Party Mixtape (a combination of "Money" and other bonus tracks).

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.

Slashdot Top Deals

Old programmers never die, they just become managers.