Cele doua fete ale tirnacopului

Posted in Regula 0 on July 16th, 2011 by Mihnea

As vrea sa facem un exercitiu de imaginatie: inchipuiti-va Liceul de Informatica din Hunedoara intr-o dimineata de vara tirzie, la sfirsitul lui August 1999. E vacanta si liceul ar trebui sa fie pustiu, dar azi nu e, pentru ca a inceput a doua sesiune de bacalaureat. Alegeti o materie la intimplare – sa spunem informatica (merge si romana). Intrati cu ochiul mintii intr-una din salile de clasa si umpleti-va plaminii cu atmosfera de examen: susoteli, fituici, profesori care scriu rezolvarile pe tabla, elevi care se duc la celelalte sali sa vada daca acolo “s-a rezolvat subiectul 2”. Un singur om sta aplecat asupra foii sale, concentrat, superior, sclipitor, dar vizibil deranjat de forfota din jurul sau. Toti incearca sa copieze de la el, iar lui ii este din ce in ce mai greu sa ignore aceste agresiuni. Acest om este Silviu Ardelean.

Silviu se jura ca asa a fost. Saptamina trecuta a fost Sarbatoarea Bacalaureatului in Calendarul Datatorilor Cu Parerea si nu putea sa lipseasca tocmai el de la festivitati, asa ca a tinut sa-si proclame admiratia fata de camerele lui Funeriu si “adevarul, normalitatea, lucrurile frumoase, realitatea” pe care acestea le-au adus in viata romanilor. Noi am avea totusi niste obiectii…

La doar patru zile dupa ce l-a batut incurajator pe spate pe Funeriu, Silviu a decis ca a sosit timpul pentru a pune inca o data umarul la progresul programarologiei, asa ca a publicat un tratat despre functia _chkstk(). Articolul incepe in felul urmator:

A process starts with a fixed stack space. The top of a stack is pointed to by the ESP register (Extended Stack Pointer) and this is a decrementing pointer.

E ceva dubios aici, nu? Exprimarea curata, informatiile corecte, mentionarea cuvintului “registru” – toate acestea ii dau cititorului fidel un sentiment de alienare si-l fac sa verifice textul din address bar. Am intrat cumva din greseala pe o alta pagina? Nu, adresa e corecta, deci citim mai departe:

This is in contrast with the heap that can theoretically grow to a limit of 4 GB.

This is in contrast with“? Pe bune, dupa “electric power manufacture base on water“, “I’m acting into a C++ Romanian programming community” si “it depends on your’s algorithmic intellection, cleverness“? Ajuns aici am simtit nevoia sa-l intreb pe Google ce parere are despre alfabetizarea subita a lui Silviu, iar el mi-a raspuns fara sa pregete cu acest link de la codeguru. Pai ce facem Silviu? Iar copiem? Iar ne inspiram? Ce-ar fi sa punem niste camere d-alea de supraveghere si la calculatorul tau, pentru ca “rigoarea inpusă în această sesiune de examene să fie un nou început”? (“Inpusa”, mai gunoiule?)

Sigur, articolul nu e copy/paste in intregime. Putem determina unde incep contributiile originale ale minerului urmarind momentele in care fata gramaticii se intuneca brusc:

If you have an infinite recursion then you will gate same stack overflow error

I have started the study of _chkstk() function in the moment when I got few bugs with crashes with some similarly details.

I stopped to some trace function calls and I studied deeply.

Observam ca lucrarea minerului se incheie cu o lista de referinte, din care lipseste insa tocmai thread-ul de pe codeguru din care s-a inspirat. Deci:

Incheiem cu cuvintele directoarei liceului unde zice Silviu ca au copiat altii dupa el (si nu ne putem abtine sa ne intrebam cit de prosti erau aia):

Un mare filosof spunea că numai prin educaţie se poate asigura dominaţia minţii peste întuneric. Educaţia de care au avut parte atâtea generaţii care au trecut pragul acestei şcoli a însemnat colaborare, comunicare şi dialog, a asigurat elevilor libertatea să se întrebe şi să ne întrebe.

Sau, mai direct, cum cintau rapsozii aventurile lui Silviu in Piata Universitatii:

Minerul isi construieste singur cerul.
Minerul din mici lampase lucitoare isi face luna, stele, soare la fel ca si un vrajitor.
Minerul c-o mana poate s-atinga cerul
Si poate-n noapte-ntotdeauna s-aprinda stelele si luna.

Tags: , , , , , , , , , , , , , , ,

Purely Fabricated Interview Expert Pattern

Posted in Slagare internationale, Stand-up philosophy on February 21st, 2011 by Mihnea

Am aflat de la Andrei Ignat ca Scott Hanselman a publicat o noua lista de intrebari de interviu pentru programatori. Cred ca Hanselman asta e un fel de Ovidiu Cucu international, ca vad ca tot publica liste d-astea. Ca orice programator care se respecta, si eu sint constient ca pot deveni somer peste noapte, deci fac eforturi mari sa ma tin la curent cu ultimele evolutii in domeniul intrebarilor de interviu. Atasez mai jos raspunsurile mele la intrebarile lui, pentru cei 3 cititori din totalul nostru de 5 care nu sint membri pe programare.org. Scuzati limba lu’ Shakespeares, am zis sa nu break character.

What is SOLID?

YABA.

Why are patterns important?

Patterns are important because people who cannot program must be able to project importance by wielding pompous words.

Who are the Gang of Four? Why should you care?

The Gang of Four, also known as The Alpha Wankers, are four non-programmers who understood what power words are and applied the concept to programming. I care because Aurelian Popa told me that today it is more important to be “social” than to know how to program, and using pretentious jargon like “singleton” instead of “global variable” is a guaranteed way of improving one’s social status. They are not to be confused with the Wang-Zhang-Jiang-Yao group, whose name they borrowed in a spectacularly ill-advised stab at self-irony.

Explain the concept of Separation of Concerns and it’s pros and cons.

Separation of Concerns means that when you concern yourself too much with design patterns, you can stop being concerned about grammar. No man can understand the singleton pattern AND remember the basic rules of languages with immensely complex grammars such as English, so once you embrace the teachings of the Gang of Four, grammar becomes Somebody Else’s Concern. The first sign of this transcendence is putting an apostrophe in the possessive pronoun “its”.

Discuss the concept of YAGNI and explain something you did recently that adhered to this practice.

YAGNI is something YAGN, as it’s related to XP.

Are you still writing code? Do you love it?

No, I’m too busy calling my global variables singletons and speaking at conferences about it.

What do you do to stay abreast of the latest technologies and tools?

Hahaha you said breast!

How do you react to people criticizing your code/documents?

I punch them, fire them and/or write inflammatory posts about them on forums or blogs.

Whose blogs or podcasts do you follow? Do you blog or podcast?

Are blogs and podcasts design patterns? Never heard of them. Anyway, I like the color fuchsia, I am an open-minded person focused on self-improvement and my hobbies include hiking, music, reading and taxidermy. I hope this helps you determine if I’m a good programmer or not.

What is the last programming book you read?

I only ever read one, “Design Patterns”. I memorized every word. I don’t need to know anything else.

What’s so great about <cool web technology of the day>?

<generic answer>

How can you stop your DBA from making off with a list of your users’ passwords?

I didn’t know such sexual deviationism is so common among DBAs and anyway, why is that my problem instead of HR’s? Oh wait, you said “making off”, not “making out”. My bad.

What do you do when you get stuck with a problem you can’t solve?

The Design Patterns book is a complete list of solutions which are just waiting for problems. Unenlightened people approach programming the wrong way: they see problems and look for solutions. I use the sure-fire method of picking solutions from The Book and inventing problems for them. That way, I’m never stuck. Any feature or system which cannot be implemented in this way is ill-defined and not worth my concern in the first place. See also the “Separation of Concern” principle.

What’s the difference between a web server, web farm and web garden?

Wait, what? Web garden?

When do you know your code is ready for production?

When I have at least 157 design patterns in it.

What’s YAGNI? Is this list of questions an example?

Didn’t you ask this already?

Noile mele cuvinte favorite: Information Expert (a nu se confunda cu Code Expert), Pure Fabrication, Protected Variations.

LE (adica Later Edit, Ovidiu): hahahaha am aflat ce-i ala web garden. Redefinirea cuvintelor limbii engleze, in pula mea.

LLE: GoF au incercat sa si cinte la un moment dat. Punk, pentru ca si la muzica se pricep la fel de bine ca la programare. Iata-i aici prezentind pattern-ul “Old Grey Whistle Test”:

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,