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

 



Forgot your password?
typodupeerror

Comment Re:If you wanted us to believe your Op-Ed... (Score 1) 547 547

Fortunately there's a setting which will turn this behaviour off and force emacs to always use spaces.

That's like saying "Fortunately, this handgun has a feature to always disable the safety and aim the barrel at your foot." Repeat after me: spaces are not indentation.

Comment Tabs FTW (Score 1) 547 547

This is why tabs and only tabs are the proper line indentation character. One tab = indent one level. Two tabs = indent two levels. Tab is the only line indent char. It's a semantic definition. No more confusion.

So, here's my problem with whitespace being syntactically significant ... everybody likes to see code with different levels of indent.

Not a problem. Everyone defines how much space to render for a tab in their own editor. Everyone wins.

The problem was his electric mode in emacs was thinking itself oh-so-clever, and instead of storing the *actual* number of tab indents or whitespace, it just stripped them in favor of a single tab that emacs would then know how to render later.

Misbehaving tools are bad. You correctly locked him out until he fixed it. Problem solved.

For any of us who have taken compiler classes, a context free grammar specifically ignores whitespace. That's how compilers have worked for a very long time, if the grammar productions for your language involve counting whitespace ... well, my compilers prof would have failed me. Instead of having a visible thing to define a block, oh, well, just indent a few more chars.

Tab = indent. Space = ignore. Problem solved.

You can't see what character whitespace actually is ... is that 8 spaces or a tab?

Beginning of line = tab = indent. Elsewhere = space = ignore. Problem solved.

I've seen someone debug a python program, and even though things were in the same column in the editor, some were tabs and some were spaces, which had the very bizarre effect of making it semantically different than it looked.

That man was an idiot. Run python -t. Tabs and spaces should never be mixed. Tab is the only proper, semantic line indent char. Problem solved.

I have several issues with whitespace defining block structure, but the ones you identified are trivial to fix. The real issues are:

  • communicating code through sources that collapse or mangle whitespace (html, some emails)
  • difficulty with quickly and efficiently changing block structure, e.g. to temporarily bypass a conditional or refactor functions

The second is properly addressed by better editing tools. The first is annoying, but not enough to outweigh the benefits in clarity and expressiveness from using python. It's really quite easy to adjust.

Comment iconoclasts (Score 1) 384 384

This thread is hilarious. So many self-righteous pricks missing the point. Before fascination there must be exposure.

If celebrity attention can get kids to consider programming for even five seconds, they've done their job well. You don't trot out Ritchie and Kernighan to inspire 8th graders. Justin Bieber has a thousand times the reach. Let kids know it's cool and the wonderment will follow.

This is why slashbots don't run marketing campaigns.

Comment Artist Rights and Wrongs (Score 2) 247 247

Attention artistic narcissists:

  • You have the right to create beautiful works of art that stir people's souls.
  • You have the right to keep your work private and only share it with those you want in the way you want.
  • You have the right to release your work to the public and try to profit commercially from it.
  • You DO NOT have the right to tell me how to experience your work. Once I have access to your album / song / painting / show, I can chop it up, listen to it backward, peer at it in a funhouse mirror, or feed it to my dog if I so desire.

In short, your right to swing your art ends at my nose. That is all.

Comment Re:Show us the evidence of evolution! (Score 1) 947 947

something that would really help: An up-to-date complete treatise of all the basic evidence that demonstrates the foundations of evolutionary theory.

Wrong tactic. A landslide of technical evidence will only bore and confuse your audience. What's needed is something simple. Like this:

Show them the bones. Teach kids a little anantomy. Give them casts of bones to examine. Show them how every mammal on earth shares certain features like hip bones and phalanges, even where they make no sense. Then show them primates, the grasping hands and similar skulls. Next show them how apes are different from monkeys and every other mammal - the rotating shoulder, supraorbital closure, lack of a tail, etc. Now show them human anatomy - how we share the basic simian body plan but our hips are wider and feet more rigid for upright walking. Show them the transitional forms: Australopithecus, H. ramidus, H. habilis, etc. At this point you barely need to say anything. The conclusion will smack them in the face like a cold wet fish.

It worked wonders for me. I went into my physical anthropology class a denier and came out a firm believer.

The tree of research must from time to time be refreshed with the blood of bean counters. -- Alan Kay

Working...