Skip to content


One side of the coin

We evolved.
When reading we apply two different kind of reading.
The first one is evaluative, a quick reading skim the content and decide if it worth a second, deeper reading.

SEM guys told us that bold have to catch the user, so they have to shape a summary and stop the user on the page.
My analogical teacher told me that bold have to create a visual anchor for the text paragraph which is also semantic relevant.
This 2 things seem the same, but they are not, a pro writer can recognize immediately when a text is optimized to stop user from another written for a deep reading, a passive reader instead probably can’t rationalize the difference but feel it like an after-taste.

At this time we are forced to a choice. A text must be optimized for a way or for the other.
We have only one <strong> tag and we have to face this.

We know, both type of reading are useful to our meaning, wichever it is, divulgative or marketing. Having to choose beween wich one is the right is not only fool (we drop on thing gor another of the very same value), but also force us to choose amateurishly which kid of reading is fitting our text.
I told amateurishly because this choose lay on variables knowables only by supposing how the reader will use the text, so che article effectiveness is out of us control.

We have 2 solutions, go on with our editor sensitivity or don’t comprimise and make the two bold totally different.

The problem is that following this way a great extend of the article will be bold and as everyone knows “all matter, none matter” and we don’t like this at all.
What can help is that this two kind of reading aren’t happening at the same time, the SEM bold make his work in the first second on a page, just the time to browse the page to the end and decide if the content is worth to a deeper reading, after that bSEM is collateral.

This consideration tell us that the first type of bold don’t have to be fixed on the text, but it can disappear after the text evaluation.

With a bit of javascript and some css we can get a new tools which can works something like this:

  • highlighting of every “SEM” tag on the page
  • computation of highlighting duration (for now 1 second per tag)
  • “SEM” highlighting disappear after no mouse activity for the

The we isn’t a “one man show” and also this simple idea is extremely interdisciplinary, lots of contributes on this idea come from

dplastino who explained where and when put bold for both types of reading

Claudio Vandi who revised the entire idea in a UX perspective.

Diego (formaldeide) Ricci is the first who noted that <span class=”something”> don’t have the same strength of <strong> for the search engine.

Posted in development, good idea. Tagged with , , .

Forbidden to designer!

Be careful your designer can discover that you can embed almost every font in web pages.

I’m talking about sIFR (3rd release), the most famous, and a couple of other system like the most recent: Typekit.

Usually we can use only the few and abused web-safe fonts (verdana anyone?), and this happens becouse the browser can render only the fonts installed on the computer.

This is an ugly world and there are some luky people who can taste Helvetica and poor people who deserve Arial.
You can make the poor people life a little less bitter for short chunk of text (typically title) replacing the html text with a little flash or a pic.

sIFR design take the path to make javascript substitute the chosen element (and his child) with a flash movie of (almost) the same size.
sIFR3 is quite easy to add, the history is only 4 steps long:

  1. get the .swf file: open the .fla file which come with the package, delete the text, set the desired font and publish the movie
  2. add sifr.css to the page
  3. add also sifr.js and sifr-config.js to the page:


  4. Edit sifr-config.js putting the right .swf file, when activate substitution and some fancy parameters (color, background and other css-like thing).
    a minimal sifr-config.js:

    var strangeFont = { src: "/path/to/strangefont.swf" } //path is relative to the page which load the move.
    sIFR.activate(strangeFont); // you can have only one "activate", the syntax sIFR.activate(font1,font2,font3,...,fontN) is permitted.
    sIFR.replace(strangeFont, {selector: 'h1'}); // .className for classes #idValue for ids (like in jQuery)

Ok, with this 4 steps you have the desired font on the page, but the layout is broken.
You can fix it knowing that sIFR.replace() accept a css-likesyntax:
sIFR.replace(strangeFont, {selector:'h1', css:['.sIFR-root{color:#ff0000; font-size:10px}']}
The code above give to every <h1> on the page a red color and a 10 pixel font size.
Warning is mandatory that the color code be 6 digits long. Flash can’t recognize 3 digits code like css.

Some other things to know:

  • you can use transparent:true in sIFR.replace()
  • you can add every style you need in sIFR.replace().
    So you can write css['sIFR-root{...}','.class{...}'] paying attention that all the selector be sons of the element you wanna substitute. This sistem isn’t perfect so use it a headache risk.
    To achieve this result is far more better use more sIFR.replace() starting with the most detailed selector ending with the most general.
    sIFR.replace('ul#main li.selected');
    sIFR.replace('ul#main li');
    sIFR.replace('li.selected');
    sIFR.replace('li');
  • sIFR know the size of the flash movie get the width and height of the object to be substituted, so if the sIFR js is executed before the rendering of the css (Safari load css and js at the same time) this can make your page looks weird. To verify this problem try to resize the browser window, if your page stop to look weird this is the problem.
    To solve this issue you have to apply some hack to postpone the js loading
  • Avoid link replacing! sIFR cannot replace directly the <a> tags, so you have to apply sIFR to a father element. The results usually aren’t worth it.

sIFR is a really good script based on a clever idea, but i don’t like it.
I love typography, but text replacing isn’t a solution it’s an hack and as every hack did not achieve perfect results.

There are lots of embedding fonts technique around ther, but I’ve never tried them neither put on a live webpage.
I’m not tring Cufon ’cause you cannont select the replaced text (it’s a pic) and this is awkward for your user.

What is Typekit?
The bradcolbow.com summary is good, I think that this can be worth a try, we’ll see.

Posted in development. Tagged with , .

mysql cli: import csv file

LOAD DATA LOCAL INFILE 'path-to-file/file.csv' INTO TABLE table FIELD TERMINATED BY ',' OPTIONALLY ENCLOSED BY """" LINES TERMINATED BY '\n' (field1, field2, field3, .... );

obviously you have to change the field terminator (FIELD TERMINATED BY) and text delimitation (OPTIONALLY ENCLOSED BY).
Maybe (file created in a Windows environment) you have to add also \r to the EOL (LINES TERMINATED BY ‘\r\n’)

Posted in development, system administration. Tagged with , .

Don’t take me SEOriously

I’got a prophecy: In 10 years the SEO as a profession will be gone.
The Search Engine Optimization is the hard war to make your site appear in a list of link ordered by complex and half-hidden parameters, something like witchcraft.

By the way SEO is a working mojo.
In the hand of a good SEO a site grow in reputation and value in a ordered list of link, this means that a good SEO is essential to create and maintain websites.

The search engin attention to a site is based on several parametes, incoming link, outgoing link, text indicization etc etc etc etc (ad libitum), the most common parameters are well explained in search engine guidelines, for the others exist a lots of trick that the good SEO learn by experience.

The most obvious trick is that the site will be really good, that is rich of fresh content useful for the users.

And this is why SEO is a temporary work:
The trickbag of a SEO will make the diffence only until the search enginereturns out link list.
When the search engine will return semantic based result reputation will be based only on quality content.

At that time the pro you’ll need to “enhance your investment return” will be an old fashioned guy who choose the most interesting news he has on his desk, in one word: editor.

At the very end SEO is really needed in this historical time of the web, but he is strongly tied up to the present search engine technology.
The search engine technology is now ready for an evolution (semanthic web anyone?)

Definitely SEO profession will develop step by step with search engine, but i bet it will be so similar to an editor that we cannot distinguis each other.

Posted in brainy smurf, good idea.

Hey jQuery, does this element exists?

if you call $(parameters) to check if an element exists you’ll be disappointed by a “yeah sure” answer.
I told disappointed ’cause you’ll always get the “yeah sure” answer in every case.
That’s because a call to $(parameters) means:
hey jQuery give me an instance of the class jQuery. Far more better if it contains parameters“.

Obviously this is really different from:
hey you, jQuery, transform parameters in a jQuery object and return it“.

If you have this code:
<div><p>Lorem ipsum bla bla bla</p></div>

and apply the jQuery:
var tmp = $(’span’);

the test
if (tmp) {//stuffs}
will be always true ’cause tmp is jQuery instance (accordingly to js structure an object is an array) of length 0.

You can make the test work with something like:
if ($tmp.length>0) {//better stuffs}

Obviously there are a lot of way to reach this point.
At the very beginning I was making a check on the tag attribute ($(tmp).attr()), but the method written before is more compact and works every time (I suppose).

Posted in development. Tagged with , , .