«Because of the nature of Moore's law, anything that an extremely clever graphics programmer can do at one point can be replicated by a merely competent programmer some number of years later» - John Carmack, referring to people like me!

Monday, 8 February 2010

Un canale Facebook (ufficiale) per l'Università di Milano-Bicocca

Da sempre la redazione di unimib.it vede i social networks come un fenomeno importante e rivoluzionario nell'ambito del worldwide web, una notevole opportunità per coinvolgere in prima persona i destinatari del nostro lavoro. Abbiamo già introdotto youtube qualche tempo fa, ora è il momento della rete più imponente al mondo.

Facebook, dall'alto delle sue centinaia di milioni di adepti, è da noi tenuto in grandissima considerazione. Migliaia delle persone che animano l'ateneo (studenti e personale, ma anche docenti) lo sfruttano quotidianamente per tenere contatti, comunicare e informarsi. Noi vogliamo partecipare a questo mare di informazioni, cercando di instaurare un dialogo efficace nell'ottica di una reciproca collaborazione e sviluppo.

Nel canale convoglieremo tutto quello che di interessante ci passi tra le mani, tipo eventi di natura trasversale, bandi appetitosi in scadenza, le notizie legate al mondo Bicocca e così via. Confidiamo, in cuor nostro, che la community contribuisca dal suo lato, portando links, note, filmati e qualunque cosa possa far vivere e prosperare quell'angolino di cyberspazio.






Nella prima giornata gli iscritti sono circa 70, senza alcuna reclamizzazione e solo in virtù del passaparola. Speriamo avvenga una sottoscrizione di massa e... che si inneschi un bel chiacchiericcio! :)

Friday, 22 January 2010

Inline-block and Internet Explorer

I use to collaborate with the press office of the University. In particular, I was asked to develop a sort of enhanced, multidimensional, collaborative "address book" that they use as a database of journalists.

During the development process they often changed requirements, with the result that the project grown way too much. In order to keep the user experience pleasant I did my effort to allow high interactivity to the operators, giving them a very intuitive interface. I do think that one of the best interfaces for contacts collection and relationships definition remains the Facebook's one. In particular, I love the way it displays collection of items as set of icons, in a web 2.0 fashioned way.

To obtain this kind of representation, I used HTML lists and set items' display property as inline-block. Bad idea: Internet Explorer (even the 8!!) does not understand it. Well, the last release (that is supposed to be CSS 2.1 compliant) actually understands it, but only if the object is natively an inline, which is weird.

So, here comes the workaround:

display: inline-block; 
zoom: 1;
*display: inline;   

This fixes everything.


Monday, 18 January 2010

Deleting stuff with javascript

Would you like to clean house with js without messing around with hidden stuff? Piece of cake:

document.getElementById("thing_to_delete").parentNode.removeChild(document.getElementById("thing_to_delete"));

Yes, it's kinda weird, just like referring to myself as "the son of my father", but it actualy works.

Friday, 18 December 2009

A couple of nice MySQL tricks

Do you want to transfer records from one table to another, specifying source and destination columns? Piece of cake:

INSERT INTO destination ( col1 , col2 )
SELECT col3, col4 FROM source


And what if you wish to collapse a subquery in your query results? More complex, but can be easily done with GROUP_CONCAT:

SELECT stuff.., GROUP_CONCAT( column_to_sum_up ) AS newname
FROM main_source
LEFT JOIN other_table_containing_things_to_collapse ON condition
GROUP BY column_in_main_source_that_explains_collapse

Monday, 9 November 2009

Chiarezza, innanzitutto

error LNK2005: "class std::map,class std::allocator >,class Proiettile *,struct std::less,class std::allocator > >,class std::allocator,class std::allocator > const ,class Proiettile *> > > MappaProiettili" (?MappaProiettili@@3V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVProiettile@@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVProiettile@@@std@@@2@@std@@A) già definito in PLT.obj

Cosa stai cercando di dirmi, caro Visual Studio? O_o"