1.03.05

,

Parce qu'il faut bien <span class="strike">finir</span> commencer

Il paraîtrait que les avis de recherche se lancent un peu partout : je serais soi-disant en voie de disparition, pour ne pas dire mort au champ d’honneur, certainement perdu sur quelque sentier sinueux. J’ai beau regarder, je dois dire que je n’y vois goutte, alors dans ces cas-là, on fait ce qu’on a à faire et on ferme les yeux.

C’est parfois dur de se rendre compte qu’on a trahi son livre préféré. On regarde sa bibliothèque, on se dit : mais pourtant, il était là et non, pas de doute, il a préféré foutre le camp plutôt que de vous voir profaner ses lignes. Le mien est parti sans que je le voie. Sur la pointe des pieds, probablement une nuit, alors que je cuvais sans autre forme de procès l’excès d’-ols de tout poil ; pour tout dire, il a dû se faire la malle il y a quelques années déjà et je ne l’ai remarqué que ce soir. Pensez donc, avec toutes ces débilités qui trônent sur mes étagères, du angliche en veux-tu en voilà pour faire joli, il a eu vite fait de vomir dans son coin pour finalement se tirer sans crier gare.

Il a peut-être dû se rendre compte aussi que je ne prenais plus autant soin de lui ; que je ne le mentionnais plus nulle part. D’ailleurs, il a dû réaliser que je n’écrivais plus. Je crois que c’est la pire des crasses que je pouvais lui faire. Je ne peux pas lui en vouloir, d‘être parti. Il a sans doute voulu voguer vers des horizons autrement plus attrayants et autrement plus respectueux. Autrement plus oniriques…

Pour le coup, j’aurais bien ri avec lui des quelques mots que j’ai pu apprendre au cours des derniers mois :


fonctionnel
Le sacro-saint mot autour duquel le monde tourne ; tout ce qui n’est pas fonctionnel n’est que déjection destinée à nuire aux esprits bienveillants et aux têtes pensantes jusqu’au-boutistes des projets chantants. Mot blablatesque qui ne veut dire guère plus que l’espace qu’il prend dans une phrase fumeuse. Voire.

structurant
Tout ce qui n’est pas structurant peut être rangé au rayon « accessoire », à côté des matières fécales livrées pour pas cher.

consolidation
Là, je cherche encore la définition. Un de ces mots qui sonnent doux à mon oreille mais dont je ne parviens pas à saisir le côté tangible.

Il en aurait souri, lui aussi, de ces mots pleins de syllabes. Je suis sûr qu’il aurait même joué avec et qu’il m’aurait demandé de le suivre dans ses élucubrations. Alors, pour la peine, il faudrait bien que je me punisse un peu, et c’est pour ça que je vais sans doute m’acheter une nouvelle vie. Il paraît qu’il y en a pas cher, dans d’autres contrées. Avec un peu de chance, le livre reviendra de lui-même et on se réconciliera autour d’une Guinness et d’une assiette de chips bien arrosées de vinaigre.

En attendant, je lui ai ouvert une petite section ici même, au vu et au su de tous. Si ça se trouve, il me lit tout de même un petit peu et si ça se trouve, il sera un peu moins fâché avec moi. Si ça se trouve. Rendez-vous compte le sacrifice énorme : écrire en français alors que tout le bouzin est configuré pour du bon anglais de chez Ellen – pour ne pas dire s’exclure de soi-même des lignes de conduite implacable que je m‘étais fixé autrefois – c’est que je dois l’aimer un peu, ce bouquin. Une chose est sûre, je l’ai trahi, je l’ai laissé tombé (ah, pour un peu, je me cracherai sur la tombe, si je pouvais), et il n’y a rien de plus dur que de s’en rendre compte…

Allez, promis, livre, j’ai même jeté le Houellebecq.

 
---

About CAPTCHAs...

Yes, they even have a name… CAPTCHAs… You probably have met them yourself, those twisted, haunted pictures of letters and figures you have to read and type in to make sure you are really human, not some random bot browsing the site and trying to submit anything that might do harm (such as spam). Sometimes they really reach the limits of readability…

Speakup (that is, Armin) has recently released an interesting article about them:

With the advent of the evil spambot (…) has prompted more and more web sites to require entering verification codes at the end of a form. Basically, verification of your belonging to the human race.

Comments [1]

 
---

New Agreement Threatens Samba

Microsoft have decided to provide the European users with a “degraded” version of their OS (that is, a version without Windows Media Player) after being convicted in Europe. They have also been asked to provide competitors with documentation about servers to ensure inter-operability.

Well, righteo, say Microsoft. They have therefore decided to set up the “Work Group Server Protocol Program” (WSPP) to allow the competitors to have access to their documentation. However, competitors will have to pay royalties to do so. The WSPP agreement is clearly incompatible with GPL and would mean that, for example, a fee would have to be paid to Microsoft for any instance of Samba.

I don’t think one should be surprised by Microsoft’s move. It is actually a smart way to conform to the European Court of Justice decision without giving to much away. But it is certainly bad news for the Open Source community: Samba is an excellent tool, developed by passionate people with a sharing spirit (in every sense: that is the very nature of the product itself). I am sure they will always refuse to distribute Samba other than in a free way… Let’s hope the FSF actions will succeed.

 
---

ezSQL Version 2 available...

…and can be downloaded on jvmultimedia.com.

 
---

JAG version 4.0

JAG version 4.0 has just been released. This program which generates from persistence to presentation layers now supports EJB3 and works with JBoss 4.0.

This is a fairly easy-to-use piece of software based upon Log4j, Ant and XDoclet and the generated pages are pretty simple and tableless. The presentation can be produced either with Hibernate or Struts.

 
---

TeX is Still Around!

Once upon a time, I was really into TeX: I used to spend all my free time (and more…) visiting newsgroups, testing, writing and translating documents, and now, I have totally left all that behind – unfortunately.

And now I am so out of touch that it is by reading Simon Willison’s Weblog that I learn that Wikipedia runs TeX for formulae. Simon is a WikiLover, and I guess there are hundreds of thousands other out there, including myself: you can spend so much time on this site when you have nothing to do at work! But, I didn’t know that…

Unfortunately, the rendering as PNGs is almost as dodgy as it was when using latex2html, partly because the figures are made so big. The way of writing systems of equations (alternative way) is also messy, mixing TeX and <math> markup. And the use of mbox is recommanded whereas it would make more sense to find a way to insert HTML right there – even though positioning could be a nightmare. Good news is that they have included packages such as those provided by the AMS: thanks to that, almost any formula can be written. That’s so WikiCool!

 
---

Building Letters: Tsunami Edition

I received my Building Letters package last week (or maybe the week before). I didn’t have the time to have a proper look to it, but actually, it is not really about the fonts…

Building Letters are calling for entries in order to create a special edition “to get funds to help survivors, the fishermen in North Tamil and Southern Sinhala get back on there feet, and able to make a living again to support their families, and provide food for their communities”. This action, in association with SOTA, is called Font Aid III. No matter what they get by January 14th, I guess it’s worth getting ready to purchase it.

 
---

Coaches to Beauvais Airport

33% fare increase on coach from Beauvais to Paris: the ticket costs now 13€ instead of 10€ (in cash, please). You also have to show up 3h15 before take off, instead of 3h. That’s beginning to be ridiculous considering that more and more people use this service – not to mention that I have been yelled at once: I had handed my ticket to the driver who tore it and then tried to enter the bus with a bag (first yell), and I finally presented a torn ticket after putting by bag in the boot (second yell). And imagine it’s the first contact that tourists have with France when arriving…

The website allows you to buy a ticket online, but you have to add an extra 2€ to the price (it used to be for Credit Card costs but it is now for « file costs »; you are aware of that extra 2€ only when submitting your form and it is non-refundable) and it doesn’t seem to be working very well (my Firefox keeps telling me that POSTDATA has expired from cache, blabla) when you click from the link above. Some HTML code is apparent. I really don’t feel confident about buying tickets from their site…

As a customer (I have been using these coaches for 5 years, now!), I don’t feel treated with any respect at all (33% increase, with cash; the website is not even updated properly everywhere and shows obvious flaws that no one cares to fix). The feeling I have is that some company (I couldn’t find who operates that service) just take customers for idiots who just have to pay because there is no other way to get there. That is a real shame.

Comments [1]

 
---

Happy New Year!

Those things you learn when you want to wish “Happy New Year”, but like no one…

 
---

TextMining.org

Ryan Ackley, whose name appears in Word-related POI classes, has written a library to extract text from Word documents. According to him, textmining.org has several advantages compared to POI:

  • The textmining.org library is optimized for extracting text. POI is not.
  • The textmining.org libraries supports extracting text from Word 6/95. POI does not.
  • The textmining.org libraries do not extract deleted text that is still in the document for the purposes of revision marking. POI does not handle this.

The question is, now: did he document textmining.org as well as the POI classes?

Update: POI stands for Poor Obfuscation Implementation. Certainly didn’t find it on the site.

 
---

“Pious Words are not Enough”

Don’t go to the sales; dig deep into your pockets to prove that you really care about the world’s poor

Alice Miles’ article in today’s Times Online deserves to be read again and again. And her words, I hope, won’t be dead letters.

She also writes:



And what to do about the horror in South Asia? In the end that disaster, too, will be about poverty. Once the bodies have been buried and the grieving can lift their heads from their children’s graves, these people will need money, and lots of it. Money could not have prevented the tragedy, but it can certainly help to heal it.

The West will get bored first – yes, even of this. By the end of January, nobody will be talking much about the earthquake (with the exception of those forced to cancel winter holidays in Thailand and Sri Lanka)


 
---

Today’s Rule-of-Thumb

You may have understood it: this morning’s comment was somehow related to an earlier comment I made. Tonight’s post is therefore going to illustrate what I was going to say this morning…

Here is the code I received from web designers. Well, not really, this is a highly-simplified sample:

  • I used the “original” MM function which had been modified in the original code to take into accounts timeouts;
  • I rewrote the menus with lists rather than tables;
  • I removed timeouts as well as sub(sub)menus;
  • I changed design and colours for the sake of the designers’ anonymity.

In that example, the appearance of submenus is triggered by moving the mouse onto the corresponding menu item. Two problems arise immediately by looking (a) at the JavaScript code and (b) at the CSS code. Every menu item has a onmouseover event which hides the other submenus and opens the current submenu. It means that, for everything single menu item I am going to add (for example the item number 3 on the sample), I will have to add such an event to the newly-created item, and modify all the other so that the new submenu is hidden when going onto another menu item. In that example, there is also a style associated to every submenu which, amongst other things, place it in an absolute manner.

Now, think dynamic. Before starting, I don’t know whether I am dealing with 3 or with 50 items in my menu. I only know I am dealing with a collection which might (or might not) have submenus. It means that I will have to code on the server-side (a) the client-side which is going to deal with the menus and (b) the relevant CSS style. It is always been something awful to me, and not only because it is ugly but also because the resulting code is just a nightmare to maintain. And that’s a real pain in the arse to code such a thing, to be honnest.

The first obvious thing to do is to replace the ids used in the submenus by classes – which will then be used to close the whole lot.


<ul class=“nav2”>
<li class=“menu” id=“menu1”>My Sweet Home</li>
<li class=“menu” id=“menu2”>My Ugly Kids</li>
<li class=“menu” id=“menu3”>Linux Rulez</li>
</ul>

<div id=“submenu1” class=“submenu” style=“position: absolute; top: 120px; left: 20px;”>
<ul>
<li>Lots of things</li>
<li>Some more</li>
</ul>
</div>

<div id=“submenu2” class=“submenu” style=“position: absolute; top: 120px; left: 191px;”>
<ul>
<li>Beetle Juice</li>
<li>The Gimp</li>
</ul>
</div>

Why did I put the position as in-line styles? Simply because this will be very simple to compute server-side. Then, you have to add a getElementsByClass function to be able to find all the elements bearing the same class name – and hide them. I found the getElementsByClass function on Daniel Glazman’s blog (just think of removing the parenthesis after the getElementByClass in his code).


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

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; }

This function must be called in a function which hides every element of a particular class:

function hideClass(className) {
	var listeEle = document.getElementsByClass(className);
	for (i = 0; i &lt; listeEle.length; i++) {
		var ele = listeEle[i];
		if (ele.style) ele = ele.style;
		ele.visibility = "hidden";
	}
}

Now, the aim is to hide everything and to show the proper submenu; for that, yet another function:

function hideAndShow(idToShow, classToHide) {
	hideClass(classToHide);
	// And for the fun of reusing code:
	MM_showHideLayers(idToShow, '', 'show');
}

For the moment, nothing too tough. Now, the real big deal is to handle the events without linking to the elements. That way, it is going to be much easier to integrate with dynamic code: the JavaScript on one side, the loops to display the menus on another one. For that purpose, I just referred to my favourite article on the matter on Sitepoint.

function attachObjectEvent(objet, fonction, event) {
	//setup initialisation function
	if(typeof objet.addEventListener != ‘undefined’) {
		objet.addEventListener(event, fonction, false);
	}
	//.. win/ie
	else if(typeof window.attachEvent != ‘undefined’) {
		objet.attachEvent(‘on’ + event, fonction);
	}
}

function initMenus() { var menuList = getElementsByClass(“menu”); for (i = 0; i < menuList.length; i++) { var ele = menuList[i]; attachObjectEvent(ele, new Function(“evt”, “hideAndShow(‘sub” + ele.id + “,‘submenu’);”), “mouseover”); }
}

attachObjectEvent(window, initMenus, “load”);

The HTML code can be simplified as follows:


<ul class=“nav”>
<li class=“menu” id=“menu1”>My Sweet Home</li>
<li class=“menu” id=“menu2”>My Ugly Kids</li>
<li class=“menu” id=“menu3”>Linux Rulez</li>
</ul>

<div id=“submenu1” class=“submenu” style=“position: absolute; top: 52px; left: 20px;”>
<ul>
<li>Lots of things</li>
<li>Some more</li>
</ul>
</div>

<div id=“submenu2” class=“submenu” style=“position: absolute; top: 52px; left: 191px;”>
<ul>
<li>Beetle Juice</li>
<li>The Gimp</li>
</ul>
</div>

Developer, just imagine how easy your task has become! You insert your loop (with a foreach or a &lt;logic:iterate&gt; or whatever) and that’s it. You can have a look at the “final” code here.

Now, I know there are lots of improvements to be made to this example – I am not even sure (cough) this works properly on every browser since I kind of quickly modified Aaron’s code, not taking into account the test window vs. document – but that is a start.

You must also have realised that this method requires many more lines of code. It is partly due to the fact that the example is pretty straightforward. In a much more complicated (real-life) one, the number of JavaScript lines added is counter-balanced by the amount of styles removed. It also looks very expensive time-wise; it is, but imbricating client and server code often ends up in massive time loss, both in development and maintenance. And once the key functions have been defined, such as getElementsByClass and attachObjectEvent, it all goes much faster…

Feel free to comment, improve, etc. I am a developer who does not want to think too much when it comes to integrating HTML.

 
---

Today’s Rule-of-Thumb

“If you end up coding some client-side code in your server-side code, you probably have written a very bad client-side code.”

I have discovered a truly remarkable proof which this blog is too small to contain. For the moment.

 
---

Bart Blubaugh Portfolio

Always read the fine prints… One of my fave is to read the ones on Typographica – the “Unseen”. You always discover something interesting. And tonight I came across Bart Blubaugh’s Owyhee. It is “not intended to be a display face” but it would be good for a “phone directory”… Still nice.

 
---

The Beeb How-To on Secure Communication

David Blunkett was forced to resign after several comprimising emails were uncovered by an inquiry set up by himself. This Beeb article tries to analyse other ways to send sensitive information to someone.

  • emails: too dangerous. Everybody knows now that sending an email is like sending a postcard to a friend. “[People] know that their corporate e-mail systems trap all of the information they send”, according to an expert. Well, apparently, they are not quite aware yet since people still get caught from time to time.
  • instant messaging: mouarf. They “allow users to have “real-time” conversations with no record”. But it is not that great, apparently, because “There is software available which stores instant messenger conversations”. Yes, indeed. That would be the instant messaging systems themselves, wouldn’t it?
  • encryption systems: “You can get software that allows you to encrypt e-mails by passing specific keys between yourself and whoever you’re communicating with”. Okay, let’s imagine that we’re talking about a public key, here. your recipient can share with whoever he or she wants. The problem? “Generally there are quite a few restrictions on what people can download and install on their PCs. I doubt whether Mr Blunkett, for example, would simply be able to install encryption software on his desktop computer”. Bizarre. You would think that someone with a position as critical as Home Secretary should be allowed to make use of encryption systems: terrorists (I am thinking about the IRA, for instance, which had the gathering of intelligence on potential targets down to an art) would be somewhat happy to gather private information about ministers. Maybe Santa should bring him another laptop and a USB key.
  • Webmail, such as Yahoo! or Hotmail: mouarf. By checking the connection logs, the account would be very easy to trace and the webmail hosting company could have been asked to hand the content of the inbox to justice.
  • Phone and SMS: how many burglars, terrorists, etc. have been arrested because they had foolishly used their own cell-phones?

So the only sensible way of protecting communication (encryption) has been dismissed as being awkward or impossible. And as long as people think so, people like Mr Blunkett will get caught…

 
---

← Older Newer →