Skip to main content

Code Retreat Cluj-Napoca - 19/05/2012

Sambata, 19.05.2012, a avut loc in Cluj-Napoca o nou sesiune de Code Retreat.Au fost aproape 9 ore de programare si fun, unde am avut parte din plin de TDD si pair programming.
Problema care am incercato sa o rezolvam de fiecare data a fost cea clasica, Game of Life (a lui Conway's). O problema simpla, care in varianta clasica nu pune nici un fel de probleme. Desii acesta a fost al doilea Code Retreat organizat, unde s-a rezolvat aceiasi problema, nu am simtit ca este ceva monoton. La fiecare runda am descoperit ceva nou, ceva care partenerul il facea diferit, de la TDD, la scurtaturi sau ceva legat de mediul de programare.
Cand incepi sa scrii teste, cel mai greu sa primul test, nu stii cum sa incepi sau mai bine zis cu ce. Care e primul test care trebui scris, a.i. sa fie consistent si nici sa nu te aberezi.
Asa cum se obisnuieste, ultima sesiune e destul mai speaciala, apar reguli mai ciudate. De data asta am ales ca sa fim intr-un mediu in care fiecare celula sa fie hexagonala (in loc de opt vecini sa aibe doar 6). Se obtine un fel de fagure, iar impreuna cu coechipierul meu din runda respectiva am reusit aproape sa terminam problema in aceasta runda. Din pacate nu a mai fost TDD, eram curiosi sa vedem daca am gasit algoritmul bun.
A fost o sambata destul de productiva. Mai jos gasiti doua poze de la acest eveniment.

Comments

  1. Apropos, o chestie legată de stilul de scris. Mare mare atenție la cratimă. Și la felul în care scrii. Este o recomandare negativă pentru tine faptul că scrii constant cu greșeli. :) Just a friendly warning.

    ReplyDelete
  2. As zice ca a fost interesant focus-ul pe TDD - desi, TDD-ul in ziua de azi e ca sexul la adolescenti - multi spun ca fac TDD, foarte putini developeri practica TDD cu adevarat, in proiecte reale (acelasi lucru se poate spune despre Scrum).

    ReplyDelete
    Replies
    1. TDD o fi ca sexul la adolescenți dar tot mi se pare masturbare intelectuală. Cînd zic asta mă refer chiar la TDD, adică Test Driven pur. No such thing. Pur și simplu e impractic să o faci.
      Cît despre Scrum, developerii ar vrea, da' nu-i lasă oamenii cu bani să-și facă de bani. Eventual, dacă se poate, sprinturi de o zi :D

      Delete
    2. [offtopic si fara legatura cu code retreat]
      Eu ma refeream un pic la altceva - daca s-ar folosi TDD macar pentru o parte din aplicatie, tot ar fi mare lucru - inca vad foarte multe proiecte unde nu exista unit teste, unde testele sunt adaugate la mult timp dupa ce un feature e terminat, proiecte la care exista mentalitatea ca un tester trebuie sa scrie integration tests (nici nu se stie ce e ala un unit test prepriuzis) - deci macar daca ar fi test-driven _development_, nu design, tot ar fi ceva..

      Legat de Scrum, problema in multe firme e ca multi developeri nici nu stiu ce e ala Scrum mai in detaliu, iar managerii zic ca fac scrum ca sa dea bine la marketing (multi high-level managers stiu despre scrum doar ceva de genul "chestia asta agile cu iteratii mai dese decat 4-5 luni si stand-up meetings").. :)

      La asta contribuie si multi 'evanghelisti' agile, care exemplifica totul cu probleme de jucarie care se preteaza la TDD, dar multi developeri raman in ceata cand e vorba sa dezvolte o aplicatie complexa in stilul asta.

      Delete
    3. din punctul meu de vedere nu exista tdd pur sau impur. exista doar tdd! dezvolti in maniera tdd sau nu. ca nu iti place sau ca nu iti iasa sau ca nu peste tot poti sa aplici e foarte diferit de "No such thing" sau "masturbare intelectuala" sau "Pur si simplu e impractic".

      Delete
    4. Vrei să-mi zici că tu practici TDD, adică scrii unit teste care să treacă prin toate branch-urile posibile ale tuturor funcțiilor?

      Delete
  3. Ma tem ca unii au promovat ideea de "TDD pur" in sensul de (technical) design al aplicatiei care ia forma doar in urma scrierii testelor, dupa refactoring, ceea ce e rar intalnit in aplicatii complexe - mai intotdeauna programatorul se gandeste un pic in avans la un oarecare technical design, chiar daca dupa aceea design-ul va evolua.

    ReplyDelete

Post a Comment

Popular posts from this blog

Windows Docker Containers can make WIN32 API calls, use COM and ASP.NET WebForms

After the last post , I received two interesting questions related to Docker and Windows. People were interested if we do Win32 API calls from a Docker container and if there is support for COM. WIN32 Support To test calls to WIN32 API, let’s try to populate SYSTEM_INFO class. [StructLayout(LayoutKind.Sequential)] public struct SYSTEM_INFO { public uint dwOemId; public uint dwPageSize; public uint lpMinimumApplicationAddress; public uint lpMaximumApplicationAddress; public uint dwActiveProcessorMask; public uint dwNumberOfProcessors; public uint dwProcessorType; public uint dwAllocationGranularity; public uint dwProcessorLevel; public uint dwProcessorRevision; } ... [DllImport("kernel32")] static extern void GetSystemInfo(ref SYSTEM_INFO pSI); ... SYSTEM_INFO pSI = new SYSTEM_INFO(

Azure AD and AWS Cognito side-by-side

In the last few weeks, I was involved in multiple opportunities on Microsoft Azure and Amazon, where we had to analyse AWS Cognito, Azure AD and other solutions that are available on the market. I decided to consolidate in one post all features and differences that I identified for both of them that we should need to take into account. Take into account that Azure AD is an identity and access management services well integrated with Microsoft stack. In comparison, AWS Cognito is just a user sign-up, sign-in and access control and nothing more. The focus is not on the main features, is more on small things that can make a difference when you want to decide where we want to store and manage our users.  This information might be useful in the future when we need to decide where we want to keep and manage our users.  Feature Azure AD (B2C, B2C) AWS Cognito Access token lifetime Default 1h – the value is configurable 1h – cannot be modified

What to do when you hit the throughput limits of Azure Storage (Blobs)

In this post we will talk about how we can detect when we hit a throughput limit of Azure Storage and what we can do in that moment. Context If we take a look on Scalability Targets of Azure Storage ( https://azure.microsoft.com/en-us/documentation/articles/storage-scalability-targets/ ) we will observe that the limits are prety high. But, based on our business logic we can end up at this limits. If you create a system that is hitted by a high number of device, you can hit easily the total number of requests rate that can be done on a Storage Account. This limits on Azure is 20.000 IOPS (entities or messages per second) where (and this is very important) the size of the request is 1KB. Normally, if you make a load tests where 20.000 clients will hit different blobs storages from the same Azure Storage Account, this limits can be reached. How we can detect this problem? From client, we can detect that this limits was reached based on the HTTP error code that is returned by HTTP