infundibulum

Heehee

February 26th, 2006

If you are an anarchist or anti-authoritarian living in the southern United States, you are not alone! This page is dedicated to helping folks living in the southern U.S. to get organized and networked.

infoshop.org - Southern Anarchists Organizing Page

Wait, wait, I thought you were –

Oh forget it.

Javascript Array Oddness

February 26th, 2006

Weird thing about Javascript arrays:


d = [['a','1'],['b','2'],['c','3']]

for (i in d) { alert(i) }

Will pop up 0,1, and 2. That is, iterating through something returns the index of each of the elements of the array. If you want the elements themselves, you have to dereference them:


for (i in d) { alert(d[i]) }

This is nutty, as far as I can tell. I don’t know of any other programming language that does that. Why would you want to loop through the indexes of an array as the default? Python’s approach for example is what seems normal to me:


>>> d = [['a','1'],['b','2'],['c','3']]
>>> for q in d:
... print q
...
['a', '1']
['b', '2']
['c', '3']

If you want the indexes, of course, you can get them like this:


>>> for i in range(len(d)):
... print i
...
0
1
2

That is all.

From the Reprehensible Research Department

February 22nd, 2006

Research like this sucks:

Baumeister’s team used two separate procedures to investigate the effects of rejection. In the first, a group of strangers met, got to know each other, and then separated. Each individual was asked to list which two other people they would like to work with on a task. They were then told they had been chosen by none or all of the others.

New Scientist Breaking News - Rejection massively reduces IQ

Well, duh.

Aggression scores increased in the rejected groups. But the IQ scores also immediately dropped by about 25 per cent, and their analytical reasoning scores dropped by 30 per cent.

Immediately? Please allow me to repeat myself:

Well, duh.

This reminds me in a small way of the Stanford Prison Experiment, an experiment so hideous and despicable that it warrants Godwinization.

Argh!

Blowup quotes… on the web?

February 20th, 2006
Why do you put blowup quotes in articles… on the web?

Dear world of Web Design,

Why do you put blowup quotes in articles… on the web? Here’s one right here. Isn’t the point of blowup quotes to attract one’s attention when one is… you know… paging through a magazine?

On the web, you’re never sure if that stuff in the blowup quote is something which is in the main body of the text, or not. It’s confusing.

Still, I can at least whine about it in my blog.

I find it annoying. Please stop? Well, of course, no one is going to stop. I mean, you can’t stop anything on the intarweb.

Still, I can at least whine about it in my blog. I can even whine in giant blowup quotes!

Design is good but…

February 15th, 2006

There’s something sort of creepy about the way this discussion of CNN’s redesign talks around the content of the screens.

I know they probably just screen-grabbed whatever was on, and I also know that good design will help the network to tell stories that need to be told.

Even so, I find it pretty hard to think about design when there’s a picture of a kid with a bleeding forehead.

Update: CNNi Goes Clean. Argh. And a bigger picture. And not a single mention in the comments.

You know what the original social software is?

February 14th, 2006

Language.

title vs alt.

February 14th, 2006
me: i really doln't understand the difference between alt & title
gurumyfriend: title is for the tooltips, alt is for when someone doesn't load the pix
me: ok it validates now :)
me: but why is alt required & not title
gurumyfriend: well, alt is more important
gurumyfriend: if you surf non-graphically, you want to know what the pic _is_
gurumyfriend: and you could for ex. have an image with
gurumyfriend: alt="mother polar bear licking her cub"
gurumyfriend: and title="how cute!"

I won’t be able to forget that, methinks.

Um.

February 13th, 2006

U.S. concludes ‘Cyber Storm’ mock attacks

Oh, lovely.

Oh yeah, that’s what a bookstore website looks like

February 9th, 2006

a search on alibris.

Like everyone else I tend to head off to Amazon.com to look for books. But when I ended up at alibris.com just now, I was momentarily shocked—it’s so simple and clean.

Well, come to think of it, no it isn’t—it’s just a run-of-the-mill web site: and like Amazon, it’s not just books any more. There are big tabs up top for movies and music, for instance.

I guess the bottom line is, Amazon is just a mindboggling morass of information. I think that part of the reason that people think of Amazon as “useful” is simply that it’s been around so long.

Case in point: a while back Amazon quietly added tags to their site: visitors could add labels to anything on the site. The web crowd took the fact that Amazon was using tags as a validation. But then soon after they were quietly removed. The web crowd was sad.

But who the hell even noticed? I certainly wouldn’t have seen them without reading an article about them.

That’s why Amazon isn’t just a “web site” any more. It’s an institution. Other websites write articles about Amazon.

But still, Alibris is pretty.

I feel kind of guilty not buying anything from them.

Heresy

February 6th, 2006

Sometimes, I must admit that Microsoft’s stuff is easier to understand than the W3C’s. For instance:

DOM extension - getElementsByTagNames

In this description of useful function by JS guru PPK, we see that IE supports a function called “sourceIndex.”

The first element in the page (<html>) has sourceIndex 0, the second (<head>) has sourceIndex 1, etc.

If you ask me, that’s pretty easy to understand.

Now compare the WC3’s Level 3 Dom function:

compareDocumentPosition is a Level 3 Core method that compares the document position of two nodes and returns a bitmask:

  • 1: Position disconnected
  • 2: Precedes
  • 4: Follows
  • 8: Contains
  • 16: Is contained by

If, for instance, a tag is contained by and follows another tag, compareDocumentPosition returns 16 + 4 = 20.

We’re only interested in compareDocumentPosition’s values 2 or 4: precedes or follows. Therefore we do a bitwise AND 6 (& 6) so that the result is 2 or 4 (of course it can’t be 6: a node cannot both precede and follow another node).

Yes, it gives you a lot more information, and so it’s more useful in the long run. But just looking at the description is enough to make my poor eyes glaze over.

And as long as I’m being heretical, I always thought Microsoft’s (clearly incorrect) interpretation of the CSS box model made more intuitive sense.

Now I shall go and say my ablutions.