Blog

Power quest over the matrix

One of the most common company organization is the so called matrix organization. This organizational structure defines two dimensions of reporting for each worker. The first dimension organizes by function – programmers report to software chief that may report to cto and so on. Second dimension organizes by project, programmers report to lead programmer that may report to project leader and then project manager.So far so good. But it is not so simple, each worker has two authorities to report to. In my experience function leadership has always been weak when compared to project leadership. The first was usually confined in professional evaluation and growth, scouting of new technologies, project startup, resource allocation, planning estimation and supervision.
All this is important, but the project manager is far more powerful having a significant larger budget for the project completion. Pm is the one that directly manages the resources to accomplish the project goals that are the way a company makes money.
But what happens if the company has not enough resources for the projects? In this case it is awkward for a pm to manage resources competing with other pms. It is better to consider the function as a service provider to projects. That puts much more power in the hands of the function chief. This is not really efficient for two reasons – the throughput is limited by the lack of resources, and there is an extra passage in request and response. Nonetheless is possibly the best solution when single programmers work at the same time to more than one project.

Reading a quick summary – part 2

Software Creativity Robert Glass Software Creativity 2.0.
Quite an interesting reading. The author attempts to answer the recurring question whether writing software be a procedural task or a creative process. The question is very interesting and it is at the core of software engineering practices. If the answer is the first, then writing code can be automatized and programmers may be considered interchangeable. The topic is difficult and the author attempts to follow a pragmatic if not formal approach to give the answer. I liked the answer (yes it is a creative process, sorry to spoil, but I couldn’t resist), but I find the book somewhat weak in giving short and fit references to help programmers in dealing with management to get their points… not that management would care anyway.
James W. Grenning Test-Driven Development for Embedded System.
Firmware development tends to be one of those niche where the “NAH” (Not Applicable Here) defense is used for preventing proper software practices to be applied. Structured, Hardware independent, Object Oriented… in many circles are considered techniques unsuitable for embedded software. I am pretty convinced of the contrary, and this book really is a valuable allies. The book is about test driven development (that is, first write tests, then code) which is another “heresy” for bare metal programmers. I found very well presented, although sometimes a bit verbose (if you are an experienced programmer you may find yourself often skipping through some examples). If you are curious about unit test, and how to apply it to firmware then this book is a must read.
What you won’t find is how to unit test interrupt depending code (i.e. critical run and critical sections) and how to test multithreading code.
Umberto Eco Il Cimitero di Praga (The Cemetery of Prague).
I enjoyed reading Eco in the past (“Baudolino” and “Il pendolo di Focault“, “In nome della rosa“) although I found his book having two speeds – the first for the first half of the book quite modernly paced, the second, slow and hyper-detailed for the rest of the book. I had the impression the writer was more devoted in showing the result of his culture and his researches rather than telling the story. This is true to a lesser extent for this one.
The story is intriguing and I felt really at discomfort to read in first person the actions and the motivation of the main character (a late 1800 forger involved with European country intelligences) a selfish racist that has no hesitation in faking friendship and then killing those who trusted him. Nonetheless the book given big bytes of food for thoughts both about recent history and how intelligence works.
Alexander Stepanov, Paul McJones Elements of Programming.
The title is a clear declaration of intent – this is a text book, in the same shelf where you would look for elements of mathematical analysis, elements of algebra and so on. The book follows strictly the cliche, feeding theorems and lemmas to the reader. So it is not a light reading. By reading this book I finally discovered an application for those strangely named algebraic structures (Ring, Semi-Ring and so on). Basically when dealing with generic programming you need some mathematical tools to request the shape of the data types on which you may (or may not) instantiate the generic algorithm. The book is mostly about answering in a formal way to this need. Do you need to read this? I am quite doubtful, if you want to learn programming, this is not the book for you. If you are fluent with template metaprogramming, I guess you won’t find much for you in this book. If you are studying the theoretical connection between mathematics/algebra and meta programming, then maybe this is what you are looking for.

Reading a quick summary

It is elapsed some time from the last time I wrote a book review, but, in fact I keep on reading. I am pretty sure I will never get through all the backlog, so I decided to go the quick and easy way with a list and a brief description. Should you like to have more information about any book I read, feel free to ask.

James Rollins Artico (Ice Hunt).
Quite fresh and addictive adventure book. The setting is not so original, but I liked it. The main character is genuine and true.
James Rollins La mappa di pietra (Map of Bones).
Nice adventure book, not exceptional. If you like unlikely historical reconstruction, scientific nonsenses and fast paced adventure, then this may be for you.
James Rollins Il marchio di Giuda (Giuda’s Strain).
Adventure book, this belongs to the same series of “Map of Bones”. It shares the same kind of adventure and narration. It’s a page turner, but it left me quite unsatisfied.
Scarlett Thomas PopCo.
Unusual novel. It talks about a young lady who works for a toys corporation. This fictional corporation is described to be the size of Hasbro and Mattel. The book talks at length about the life in such company, how they deal with customers, and the contradictions of capitalism and occidental life-style. Oh, and it also talks about cryptography (that was the main reason I bought this). The book is pleasant, although slow at times, but it is able to give many points to think about.
Terry Pratchett Wintersmith.
Very good book by Terry in the Discworld series. This is the third of Tiffany Aching. Entertaining and witty.
Terry Pratchett Unseen Academicals.
Another Discworld novel, this time I didn’t much like it – it takes too much time to get the narration up to speed and lacks of the very part that makes Pratchett’s books so good. The story is about a Football (or Soccer if you happen to live the other side of the big pond) Discoworld version, with the stereotypical player and the equally stereotypical top model girlfriend.
Terry Pratchett Nation.
This time a Pratchett’s book not set in the Discworld universe but on an alternate history on a fictional Earth. I found this book very good. Although its intended readers are in the teen range I really enjoyed it. The author is clearly at his best, writing about differences, leadership, belief, faith and the hard task of growing up. Highly recommended.
Scott Rogers Level Up.
This is a great school book for game design. Or, to put it better, this is The Book if you want to learn and understand how to design videogames. In many parts it can be considered just common sense, although it is a highly organized and outstandingly well written common sense. If you want to be really picky, you may say that this book is not game genre specific so it may be too generic if you are very in a specific kind of games. I can’t wait to apply everything I learned.
Tom Demarco, Peter Hruschka, Tim Lister, Suzanne Robertson, James Robertson, Steve McMenamin Adrenaline Junkies and Template Zombies: Understanding Patterns of Project Behavior.
Demarco and Lister are two great project engineers, their “Peopleware” is one of the best book on project management. One of the first that collected evidences and put it straight – in software project people matters. I had high expectations for this book. Unfortunately it is somewhat less than I expected. It is a collection of 1-2 pages articles describing one pattern. Some pattern are good, some are evil and some can be both. I found the book somewhat lacking of structure and poor in references to facts and studies supporting the claims. Thinking better about it I don’t see who is the intended reader – the project manager either is peopleware “enlighted” or is not and for sure this is not the book you can throw at him to make him change. The programmer may nod for one or more pattern, but there is no clear way to make and propose changes it his/her company to improve practices.

Here we go. I have another burst of books I’ll report about in the next days.

Parlami d’amore

(Michel Quoist – dal testo “Parlami d’amore”)
“Ascoltatemi ancora,
si dice infatti che dalla bocca dei bambini viene la verità:
se sono un bambino, sfuggito dal carnaio notturno,
trattenuto da un filo d’amore lanciato da chissà dove.
Se sono un bambino caduto dal nido, abbandonato da padre e madre,
rapiti o mortalmente feriti alle sbarre della loro gabbia.
Se sono un bambino nudo, senza panni d’amore, o con panni imprestati,
ma col diritto di vivere, perché sono vivo.
E se nello stesso istante persone innamorate piangono davanti a una
culla vuota,
consumandosi nel desiderio di accarezzare un bambino.
Se sono ricchi d’amore che ritengono sprecato, e vogliono
gratuitamente donarlo,
perché cresca e fiorisca ciò che non hanno piantato.
Allora voglio che vengano silenziosamente a chiedermi
se io desidero adottarli come miei genitori del cuore.
Ma non voglio dei fanatici del bambino, come collezionisti d’arte
che cercano febbrilmente il pezzo raro che manca alla loro vetrina.
Non voglio clienti che hanno fatto l’ordinazione e, pagata la fattura,
reclamano il loro bebè prefabbricato.
Perché non sono fatto per salvare genitori dalle membra amputate,
ma loro sono stati fatti, misterioso percorso, magnifico progetto,
per salvare dei bambini dal cuore malato, forse anche condannato.
E sarà come addormentarci l’un l’altro.
Io berrò il latte di cui ignoravo il sapore,
ascolterò musiche sconosciute, imparerò nuove canzoni
sulle vostre dita, sulle vostre labbra genitori adottati,
decifrerò lentamente l’alfabeto della tenerezza.
E l’amore sconosciuto per me prenderà volto
alla luce dei vostri occhi.
Voi innesterete le vostre vite sulla mia crescita selvatica
e grazie a voi io rinascerò una seconda volta.
Così sarò ricco di quattro genitori,
due lo saranno della mia carne e due del mio cuore e della mia carne
cresciuta.
Voi non giudicherete i miei genitori sconosciuti,
li ringrazierete e mi aiuterete a rispettarli.
Perché dovrò riuscire lo so, ad amarli nell’ombra,
se un giorno vorrò poterli amare nella luce.
E se in una sera di tempesta, adolescente focoso, impacciato di me
stesso, io vi rimprovererò di avermi accolto,
non vi addolorate, ma amatemi ancor di più:
lo sapete, perché un innesto prenda ci vuole una ferita e, chiusa la
ferita, rimane la cicatrice.
Ma io sogno.
Io sogno perché non sono che un bambino in viaggio,
lontano dalla terra ferma,
la mia parola è muta e il mio canto senza musica.
Ciò che vi dico piano non potrò dirlo ad alta voce, se non il giorno
in cui, avendomi voi adottato,
mi avrete messo in cuore tanto amore e autentica libertà,
sulle mie labbra parole sufficienti,
perché possa dire: papà, mamma, io vi scelgo e vi adotto
allora saprete che il vostro amore è dono, e che è riuscito”

Strcpy blues

Where do you set the notch for a C programmer declaring “good C/C++” in his/her resume? It’s “developpa” hiring time again at the company I work for, so I am conducting some technical interviews with junior programmers to find the best candidate.
Before this point we had many internal discussion about having the candidate to perform some coding during the interview or not, to the point I got a reputation of being the Bad One – a sort of a Torquemada of the C Language.
In fact I fairly agree with many others that if you are looking for a programmer (i.e. someone who writes code for a living) you should see how he/she actually writes code. Some colleagues felt embarrassed in asking this to an experienced programmer or were afraid of intimidating excessively the candidate.
Then we had a couple of hires whose skill claims weren’t exactly matched by their real skills, therefore we eventually agreed on proposing the candidate to write a few lines of code then using those as a base for more profound questions.
With the best intentions of making the candidate at ease we asked to write the implementation of a short standard library function, say memcpy, strcpy or strcmp. In order to have a common base for evaluation I focused my demand on strcpy.
Such functions should be famous enough not to scare anyone and easy enough to implement so that further discussion (improvement, optimization, pitfalls…) could be tackled to know better the candidate’s attitudes.

Well, I was wrong.

The first problem my candidates encountered was well before the implementation, in fact they had trouble in the definition of a string in C. Most of them opted for a function signature employing an undefined type “String”, someone opted for a pair of square brackets at the right end of the name.
That sheds an unsettling light on the candidate’s knowledge both of the standard library and the C string concept.
Anyway I didn’t say anything and left candidates going on. For all of them it was clear that a loop was needed, but most of them panicked on the string length. As I expected from the string type, no one of them was sure about what a C string is. One said that he expected a string length somewhere. So I pointed them in the right direction stating that a C string is more a convention that a language type, consisting in a sequence of characters terminated by 0.
Most of the candidates were able to use the array notation with an assignment. Notably one candidate failed to write the assignment operator pretending that it was the double equal (he said this twice, he was pretty emotional, but I am afraid he’s really convinced).
No one of them attempted the pointer way with post-increment. I am not a fan of the pointer notation, sometimes it is clearer, sometimes is not. For simple cases like this the optimizer is able to convert the source into the most optimized version. But I expected that a candidate could go the pointer way in order to impress the interviewer. Anyway it wasn’t the case. Worse a candidate had a doubt whether he should dereference or not the pointer with the array notation.
Well, we were looking for a junior C programmer, but I didn’t expect such low score in the C knowledge. Maybe in their experience they hadn’t chance of using the string part of the C standard library, but I would say that pointers were quite stranger to most of them.
Given the technical interview I underwent in my career and the technical interview I read about in Internet forums, I would say that in other countries programmers (even junior) are better prepared, while in Italy it seldom occurs in interviews to require the candidate to write lines of code.
I quite agree that the knowledge of the specific language is not everything for evaluating a candidate, but I think it says a lot about his/her interests, will to learn and to work as a programmer. For these reasons I tried to be flexible, ignoring details of C syntax rather focusing on the problem solving abilities. But the lack of a starting point (the code implementation) seriously hampered my options.
Also I recall that when I left the school anyone in my university friends circle could craft a strcpy in a matter of minutes (I would add blindfolded, but that would be an exaggeration). So have the times changed? Or it is my memories going wild? Should I lower the notch or changing entirely the kind of interview questions?

From the management point of view (as they told me) a junior programmer is expected not to be fluent in a programming language and I expect that a junior has no experience of medium/large code base and software engineering can be just abstract rubbish (at best) to him/her. So I have been instructed to look for learning skill and passion. I found a hard time in formulating questions for evaluating the learning skill of a candidate (well I had some ideas about mazes, food and electrical shocks, but they told me that can’t be done with humans… even if they are junior programmers).

Per rinfrancar lo spirito… forse

Un po’ di satira…

Frattini sul vertice franco-tedesco: “Non sappiamo neanche di cosa hanno parlato“, e se fosse per questo che non ti hanno invitato?

Minetti: “Mai stata l’igienista dentale del premier“… questo lo avevamo già capito.

La cosa migliore sarebbe che il capo dello stato sciogliesse le camere… nell’acido.

Abbiamo i migliori politici che il denaro possa comprare (questa è di Twain, ma è troppo bella per non riportarla).

Gia che sono impegnato, segnalo questa iniziativa contro la legge sulla censura dei blog.

E infine faccio girare un messaggio che mi ha passato un collega, intitolato “Parabola Moderna”:


LA CRISI DEGLI ASINI
Un uomo in giacca e cravatta apparve un giorno in un villaggio.
In piedi su una cassetta della frutta, gridò a chi passava che avrebbe comprato a 100$ in contanti ogni asino che gli sarebbe stato offerto.
I contadini erano effettivamente un po’ sorpresi, ma il prezzo era alto e quelli che accettarono tornarono a casa con il portafoglio gonfio, felici come una pasqua.
L’uomo venne anche il giorno dopo e questa volta offrì 150$ per asino, e di nuovo tante persone gli vendettero i propri animali.
Il giorno seguente, offrì 300$ a quelli che non avevano ancora venduto gli ultimi asini del villaggio.
Vedendo che non ne rimaneva nessuno, annunciò che avrebbe comprato asini a 500$ la settimana successiva e se ne andò dal villaggio.
Il giorno dopo, affidò al suo socio il gregge che aveva appena acquistato e lo inviò nello stesso villaggio con l’ordine di vendere le bestie 400$ l’una.
Vedendo la possibilità di realizzare un utile di 100$, la settimana successiva tutti gli abitanti del villaggio acquistarono asini a quattro volte il prezzo al quale li avevano venduti e, per far ciò, si indebitarono con la banca.
Come era prevedibile, i due uomini d’affari andarono in vacanza in un paradiso fiscale con i soldi guadagnati e tutti gli abitanti del villaggio rimasero con asini senza valore e debiti fino a sopra i capelli.
Gli sfortunati provarono invano a vendere gli asini per rimborsare i prestiti. Il costo dell’asino era crollato. Gli animali furono sequestrati ed affittati ai loro precedenti proprietari dal banchiere.
Nonostante ciò il banchiere andò a piangere dal sindaco, spiegando che se non recuperava i propri fondi, sarebbe stato rovinato e avrebbe dovuto esigere il rimborso immediato di tutti i prestiti fatti al Comune.
Per evitare questo disastro, il sindaco, invece di dare i soldi agli abitanti del villaggio perché pagassero i propri debiti, diede i soldi al banchiere (che era, guarda caso, suo caro amico e primo assessore). Eppure quest’ultimo, dopo aver rimpinguato la tesoreria, non cancellò i debiti degli abitanti del villaggio nè quelli del Comune e così tutti continuarono a rimanere immersi nei debiti.
Vedendo il proprio disavanzo sul punto di essere declassato e preso alla gola dai tassi di interesse, il Comune chiese l’aiuto dei villaggi vicini, ma questi risposero che non avrebbero potuto aiutarlo in nessun modo poiché avevano vissuto la medesima disgrazia.
Su consiglio disinteressato del banchiere, tutti decisero di tagliare le spese: meno soldi per le scuole, per i servizi sociali, per le strade, per la sanità … Venne innalzata l’età di pensionamento e licenziati tanti dipendenti pubblici, abbassarono i salari e al contempo le tasse furono aumentate.
Dicevano che era inevitabile e promisero di moralizzare questo scandaloso commercio di asini.
Questa triste storia diventa più gustosa quando si scopre che il banchiere e i due truffatori sono fratelli e vivono insieme su un isola delle Bermuda, acquistata con il sudore della fronte. Noi li chiamiamo fratelli Mercato.
Molto generosamente, hanno promesso di finanziare la campagna elettorale del sindaco uscente.
Questa storia non è finita perché non sappiamo cosa fecero gli abitanti del villaggio.
E voi, cosa fareste al posto loro?…. Che cosa farete?
Se questa storia vi ricorda qualcosa, ritroviamoci tutti nelle strade delle nostre città e dei nostri villaggi

Sabato 15 ottobre 2011