<Glazblog/> <Glazblog/>

RSS feed

My stuff
Home No Comment Archives Ol'Stuff Glazoucam
Folks
Yves Lafon Karl Dubost David Hyatt Tristan Nitot Tantek Çelik Totalement crétin
News
Le Monde IHT The Register CNN Euronews
Small Screen Rendering
Try it! (Gecko only)
Bookmark it !
PDAize !
My photo of the day
20021028
Friday, June 06, 2003
Tristan Nitot à poil dans Google

Source: Emmanuel Clément

Composer++, class assignment to elements

I have posted a new win32 build of Composer++ with full support of class assignment to arbitrary elements. Linux and Mac builds coming. Screenshot:

Thursday, June 05, 2003
Emmanuelle Beart Nue

Non, toujours pas d'Emmanuelle Beart nue sur ce site mais je suis désormais 3ème sur Google!!!

Update: wow, je suis 1er maintenant sur Google en cherchant Emmanuelle Beart nue :-)

document.getElementsByClass(), the XPath way

Dylan Schiemann sent me a mail to tell about a fourth very clean (I mean fully DOM compliant) way of implementing document.getElementsByClass() in JavaScript... It uses XPath. XPath being an invention of the devil, reinventing the wheel long after the birth of CSS Selectors, I could not think about it myself;-) Really worth giving it a glance. Thanks Dylan. Btw, your blog archive misses permalinks... Just a local copy of his code:

document.getElementByClassName = function(needle) {
  var xpathResult = document.evaluate('//*[@class = needle]', document, null, 0, null);
  var outArray = new Array();
  while ((outArray[outArray.length] = xpathResult.iterateNext())) {
  }
  return outArray;
}
Macroprogrammation

Visit Rebecca's blog, find her may-09 post, and remember she works for Macromedia :-)

Wednesday, June 04, 2003
document.getElementsByClass()

Three ways to do that. The very ugly and very expensive one, should work in all browsers :

document.getElementsByClass() = function (needle)
{
  var         my_array = document.getElementsByTagName("*");
  var         retvalue = new Array();
  var        i;
  var        j;

  for (i = 0, j = 0; i < my_array.length; i++)
  {
    var c = " " + my_array[i].className + " ";
    if (c.indexOf(" " + needle + " ") != -1)
      retvalue[j++] = my_array[i];
  }
  return retvalue;
}

A bit better and less expensive, even IE should be able to grok it modulo light changes:

document.getElementsByClass() = function (needle)
{
  function _GetElementsByClass(outArray, seed, needle)
  {
    while (seed) {
      if (seed.nodeType == Node.ELEMENT_NODE) {
        if (seed.hasAttribute("class")) {
          var c = " " + seed.className + " ";
          if (c.indexOf(" " + needle + " ") != -1)
            outArray.push(seed);
        }
        _GetElementsByClass(outArray, seed.firstChild, needle)
      }
      seed = seed.nextSibling;
    }
  }

  var outArray = new Array();
  _GetElementsByClass(outArray, document.documentElement, needle);
  return outArray;
}
The one I really prefer, but of course Gecko-based browsers are the only one to deal with it...
document.getElementsByClass = function(needle) {
  function acceptNode(node)
  {
    if (node.hasAttribute("class")) {
      var c = " " + c.className + " ";
       if (c.indexOf(" " + needle + " ") != -1)
         return NodeFilter.FILTER_ACCEPT;
    }
    return NodeFilter.FILTER_SKIP;
  }

  var treeWalker = document.createTreeWalker(document.documentElement,
                                             NodeFilter.SHOW_ELEMENT,
                                             acceptNode,
                                             true);
  var outArray = new Array();
  if (treeWalker) {
    var node = treeWalker.nextNode();
    while (node) {
      outArray.push(node);
      node = treeWalker.nextNode();
    }
  }
  return outArray;
}

We could also use a regexp instead of the IndexOf call and the leading and trailing spaces trick. Enjoy.

There is one journalist at C|Net

Yes, at least one. Finally an article that deserves the name of "article". Not the best one ever, but still worth a read.

Tuesday, June 03, 2003
The power of IM bots
glazou2000: are you able to do something more interesting than what I can retrieve from the Web?
SmarterChild: I dunno. I don't think so.
glazou2000: are you able to provide me with information more valuable than what I can retrieve from the Web?
SmarterChild: Yeah, maybe.
glazou2000: are you useful?
SmarterChild: Not at the moment.
P2P @ AOL

Doomed too... Welcome to the Klub, Nullsoft...

What's in a deal

Let's take together a closer look at the two recent major news that broke our world:

  1. AOL-Time Warner and Microsoft signed a deal together. AOL-TW gets $750,000,000 in cash from MSFT and the right to use MSIE for 7 more years, AOL-TW drops the case against MSFT.

  2. Microsoft announced that MSIE 6SP1 is tha last standalone version of Internet Explorer.

If the deal can be easily understood from AOL-TW top management's point of view - for these guys, it's only about money after all - it's completely mad in terms of long run strategy, in terms of technological evolution of the product, and in terms of competition.
  1. AOL will continue embedding the IE layout engine, just like MSN does. But we will probably always be behind MSN in terms of embedded layout engine. When a new Windows system is purchased, the user has, according to the deal, the choice between MSN and AOL. Ok. But what happens when the user wants to upgrade the browser ? A few possibilities here:

    1. Upgrade Windows and feel your wallet hurt,
    2. Upgrade an MSN subscription,
    3. Upgrade an AOL subscription.

    It is clear that 1 and 2 will imply an upgraded browser layout engine but what about 3? An upgrade of the AOL client will hardly be able to upgrade the layout engine since, for development roadmap reasons, we will probably always be one cycle late.

  2. The AOL client is going to have to deal with two sets of systems: MSIE6SP1 or below, longhorn or above. It means that the feature set provided by the AOL client will be different for our customers depending on the OS!!! What is the expected OS turnrate of our customers when longhorn is going to ship?

  3. We are more dependant than ever on the feature set of a competitor. What's the point being a member of the World Wide Web Consortium if all we do is embed the competitor's engine? How can we control what Microsoft is proposing and implementing in its layout engine? There is only one answer to that: that's not a competitor any longer.. It's a possible buyer, and that's a world of difference.

  4. We are more than ever dependant on the good will of Microsoft to implement (or not) the technical add-ons we need. Oh, it won't be free of charge, of course. A part of the cash we got can be immediately reserved for contracting deals with MSFT...

  5. Some rumors, true or not, (see first comment below this article) say that the new version of MSN for Windows is faster and smaller than the standalone Internet Explorer. Anyway. I seriously wonder if MSN both on Mac and Windows is not going to be based on Tasman. This could explain a lot of things, including why only new versions of Windows are going to take advantage of it, and why my friend Tantek Çelik was so preoccupied/upset some time ago. The model of World Wide Web that Microsoft is preparing for us, based on the work he did, is a model I don't like at all. It's a model where the publishers are going to be FORCED to use the highest common denominator and not a model raising the bar above the lowest common multiple. Why?

    1. because the Internet, as a market, is more mature than it used to be. Kids know how to configure a computer, access the Internet and the Web without MSN or AOL. The early adapters have nothing to do with closed models like MSN's or AOL's. That's why AOL-TW's Road Runner division is so successful in front of AOL...

    2. because we spend a lot of time at work, really a lot. Big companies are not upgrading systems as fast as individuals do with their personal computer. It means that the installed base of IE6SP1 is going to last for at least 4 to 6 more years. It means that companies are going to have to deal with a mix of IE6SP1 and new versions. And of course, they will develop their web sites for both. So they'll stick to IE6SP1 feature set. Did I say feature set? Ooops, sorry, bug set. This implies that we are NOT going to be able to implement/release new services for out customers. Or only what IE6 is able to do.

    3. seriously, are you going to upgrade your OS (and pay for that) just to get a new version of the browser? I can already hear the hot discussions in Mr Smith's kitchen: "Oh, darling, MSN12.1 implements white-space-treatment, let's upgrade to Windows 2007, that's only $199"... Nah...

  6. The impact on Netscape division and employees is, of course, tremendous. A lot of us have just no interest in working on MSHTML, that's not the work we dream of. So these people will probably accept a temporary reassignment, just to get a paycheck and see if their feelings were right or not. And they'll leave. And AOL is going to lose its best think tank. But again, the top management is too far away from us to see it. "Frankly, it's worked very well". Bwahahaha.

  7. In the long run, Instant Messaging interoperability (part of the deal) will make AOL users move to MSN Instant Messenger. That one is more powerful, more sexy, better done. Even Yahoo! IM is better done than AIM.

My conclusions go then far beyond what all the so-called journalists wrote on the subject. Netscape engineers think that Netscape was sacrified last week. This is only partly true... AOL was sacrified last week. It now seems clear to me that the TW part of AOL-TW who gained all the power during last Board Meeting sees the AOL part of AOL-TW as a dead weight. If there is any opportunity to make some money with it, at the risk of jeopardizing its future, that opportunity should be taken. AOL can't be sold for the moment, but still brings in cash, a lot of cash. All occasions to cover the costs are taken, whatever is the future, period. That's a very short term view. I don't say it's a bad strategy. But even a very short term view should think about the future. A think tank like Netscape is worth preserving it. Because innovation is where WE are. At some point, the board will consider Steve Case's idea of a spin-off or a sale. Oh come on, that's obvious. Can we compare the money generated by Matrix Reloaded and AOL8?... That day, Netscape can weigh in the balance, not because of the name or the product, but because of the brains. Making everything possible to make these people leave is counter-productive.

Microsoft played very well this game, as usual, even if I am not sure that the battle is won for them. In particular, the highest common denominator problem exposed above will hit them hardly. Information providers will have to decide between features and customers. Of course, they'll choose customers. MSFT has only one option here: an MSN client allowing both subscriptions to specific content/services and free access to the Web (I can already see the ads and the "click here to accept" section saying that you agree to receive ads for free access, and so on).

An important side-effect of this lowest common denominator hits the W3C, in my humble opinion. I firmly belive it is great time for W3C to open membership to OSS organizations like Mozilla.org. The status of Invited Expert that OSS contributors have in many groups is not enough in this new world. The annual fee could be non null but symbolic, like $50. One important condition to membership should be the existence of a "board of drivers", like in Mozilla.org. An invited expert to a Group, recommended by that board, could then officially represent the organization as a Member in the Group. The AC-Rep of the Organization would represent its org just like other AC-Reps represent a company and vote on its behalf. Representatives of an OSS org should be able to miss more conf calls than other members since they'll will probably have to pay phone calls to W3C on their own budget. Oh well. A few conditions and constraints are easy to write I guess.

B2C = business to consumer. B2B = business to business. B2R = back to reality... Go Opera! You're right. That's really a very bork bork bork world.

Sunday, June 01, 2003
Morons ?

Morons !

A sec, oui merci. Non, pas de gravier, ça suffira comme ça. Encore merci Bill. De rien Dick.

Note to the three american journalists who called me at home in France during the week-end asking for an interview about MSFT/AOL: I am _not_ giving interviews.

If you can read french, read the excellent article Liberation published saturday about Netscape.

Visit counter This page is powered by Blogger. Isn't yours?