Random computing thoughts

There’s been a lot of excitement lately about different ways to get one web page to talk to another. To the uninitiated, this probably sounds incredibly weird, but it’s also a very powerful concept. This is accomplished using techniques with mysterious names like xmlrpc and REST. Unless you are an über-geek, the difference between the two doesn’t matter: suffice it to say, there are some pretty well-understood and standard ways of doing this. Sometimes a non-geek like me gets an idea for a way that xmlrpc (or REST, whatever) might be used, but I don’t have the technical chops to write the code. Now, this may be my naïveté (two umlauts and an accent in one post — that’s a record for me) speaking, but I suspect that it would be possible to write a generic universal xmlrpc processor that a non-geek could configure to send out/suck in data to suit. Perhaps even give it a pretty web interface for configuring. This would be pretty cool.

I’ve been teaching myself CSS, and have figured out how to do some pretty slick things with it. It’s very powerful. I can imagine ways to make it moreso, although this would probably drive the wonks at the W3C nuts.

A way for styles to alternate. The obvious use for this would be for alternating color bands in tables, but as long as its kept general, it could be used in all kinds of different ways. The syntax could get kind of hairy: I would propose defining each alternant as a separate style, and then gang them together under the catch-all style that will be alternated something like this:

.lightgrey {background-color: #CCC;}

.white {background-color: #FFF;}

tr:alternating {styles:.lightgrey .white;}

That would give you a table with alternating rows of light grey and white backgrounds. You might want to do it with three different backgrounds, or where you only alternated every second or third column. Simple — express it like this:

tr:alternating {styles:.lightgrey .lightgrey .white .white .yellow .yellow;}

Later:It seems they’re working on this for CSS3 the Nth child pseudo-selector

I’ve also been working with some very redundant CSS stylesheets, where there are many similar styles, the only difference being the style name and one number that could be generated algorithmically. If we could use mathematic expressions in the CSS, it would save a lot of redundancy and debugging. I imagine it might be possible to use Javascript or PHP to do this for me (if I were any good at coding either one), but the idea of rolling mathematical expressions into CSS strikes me as appealing.

[Later] How’d that get there? Right when I hit the “post” button for this entry, I noticed that the “URLs to ping” field in Movable Type contained “http://blog.mediacooperative.com/mt-tb.cgi/1293”. I tracked down mediacooperative.com, and it seems to be associated with Ben Hammersly, linked to at the top of the post in reference to getting web pages to talk to each other. I guess this is auto-trackback in action, somehow.