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?


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: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Optimizing QuickSort and staff

Posted in Premiul n00bel, Slagare internationale, Stand-up philosophy on February 3rd, 2011 by jos8cal

Frunzaream recent revista celor de la codexpert.ro. Cum ce revista? Pai si-au lansat revista! E scrisa de un bot. In fine!

Evenimentul lansarii a fost unul sters, ca sa nu mai zic de lipsa totala a fundamentului ideologic. Dat fiind ca sintem familiari cu curentul codexpertian, ne-am zis sa incropim noi doua trei rinduri despre necesitatea si misiunea acestui ziar in lume, si nu numai. Asadar:

Pentru noi, cei care am supravietuit prigoanei, raspunderea pentru idealurile miscarii codexpertiste este atit de mare incit de multe ori simtim ca este o povara care ne copleseste si, daca n-ar fi legatura tainica cu C++-ul, poate demult s-ar fi stins nadejdea in sufletele noastre.

Profesorii Ardelean, Cucu si Bancila ne-au invatat sa gindim. Dupa cum Capitanul Bjarne a despartit hotarele lumii vechi de lumea noua, cei trei au despartit lumea formelor sterpe de lumea cugetarii realiste.

Dar cugetatorii si-au sacrificat darul mintii pentru adincul omenesc.

De cind au luat la cunostinta de C++, limbaj atit de apropiat de conceptia lor de viata, nu s-au putut desparti de drumul lui. Si si-au inceput viata intr-o apoteoza de neinchipuita frumusete morala. Ziarul trebuie sa pastreze nealterat spiritul miscarii si sa-l exprime in linia de cugetare a celor trei.

Un ziar de lupta si de idei, dar fara verbalism si entuziasm usor!
Fiecare cuvint trebuie sa se nasca din adincurile sufletului si sa fie insotit de intreaga raspundere a celui care il scrie.

“Ziarul Codexpert” este o batalie si pornim la ea cu aceeasi incredere in Victorie!

Acum ca avem si sprijinul ideologic, putem porni la drum sa ne scaldam printre titlurile care ne sint supuse atentiei in ziar.

Gasim o optimizare de quicksort. Gasim la autor si justificarea ideologica pentru batutul din taste:

“The idea for doing this is that instead of each new recursion copying the same code and using up more memory, it reuses the same code.”

Deja vu. Zbucium. Silviu Ardelean nu este un om, este o modalitate de a vedea lumea.

Ridicam bezmetici capul si privim codul in ochi. 10 numere sint torturate si fortate sa se alinieze de la mic la mare, in numele unei noi ideologii optime, acest pleonasm minier. Luam codul si-l virim sub nas, linie cu linie. Tragem incet si simtim cum ne ia cu ameteala. Trebuie sa gasim o modalitate de a salva numerele din mina ideologiei mirsave! Pregatim siringa pe care sta scris Array.sort() si batem incet vena. Milioane de numere ne trec prin fata ochilor. Eminescu. Truda. Pierdem vena. Intepam de 10 ori si ne intindem pe spate cu ochii tintiti la tavan. Senzatia de timp dispare. Ceasul numara de la kilometrul zero, over and over:

Optimized QuickSort: 00:00:01.2692034
Array sort: 00:00:01.1664805
Optimized QuickSort: 00:00:01.2490031
Array sort: 00:00:01.1632019
Optimized QuickSort: 00:00:01.2463744
Array sort: 00:00:01.1634480
Optimized QuickSort: 00:00:01.2695249
Array sort: 00:00:01.1568251
Optimized QuickSort: 00:00:01.2440373
Array sort: 00:00:01.2517662
Optimized QuickSort: 00:00:01.2694608
Array sort: 00:00:01.1581570
Optimized QuickSort: 00:00:01.2646042
Array sort: 00:00:01.1657108
Optimized QuickSort: 00:00:01.2499172
Array sort: 00:00:01.1557011
Optimized QuickSort: 00:00:01.2406120
Array sort: 00:00:01.1544470
Optimized QuickSort: 00:00:01.2434693
Array sort: 00:00:01.1576033

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