Tuesday, December 31, 2013

Books I read (2013)

- Matemàtica discreta. UOC. (2nd time)

- The New York Trilogy, Paul Auster

- The Great Gatsby, F. Scott Fitzgerald
- Event-Driven Programming: Introduction, Tutorial, History; Stephen Pherg
- JavaScript Enlightenment, Cody Lindley

- El camino a un mejor programador, Esteban Manchado, Joaquín Caraballo and Yeray Darias
- The Mists of Avalon, Marion Zimmer Bradley

- La Tumba (Grave Peril), Jim Butcher
- Implementation Patterns, Kent Beck
- User Stories Applied, Mike Cohn

- Implementation Patterns, Kent Beck (2nd time)

- Chapters 1-6 of Object-Oriented Analysis and Design With applications 2nd edition, Grady Booch

- Test-Driven Development By Example, Kent Beck (2nd time)
- Victus, Albert Sánchez Piñol
- El cuerpo humano (Il corpo umano), Paolo Giordano

- Part 1 of Test Driven, Practical TDD and Acceptance TDD for Java Developers, Lasse Koskela

- Liquidación final (Περαίωσι), Petros Márkaris

- Con el agua al cuello (Ληξιπρόθεσμα δάνεια), Petros Márkaris
- Specification By Example, Gojko Adzic

- Los desorientados (Les désorientés), Amin Maalouf
- The Clean Coder: A Code of Conduct for Professional Programmers, Robert C. Martin
- Effective Unit Testing, A Guide for Java Developers, Lasse Koskela

Thursday, December 26, 2013

MOOCs: Programming Languages in Coursera

Two weeks ago I finished this great Coursera course by Dan Grossman from the University of Washington:

In this course we learned many of the basic concepts behind programming languages, with a strong emphasis on the techniques and benefits of functional programming.
We used three programming languages, ML, Racket, and Ruby, in order to learn learn key issues in designing and using programming languages, such as modularity and the complementary benefits of static and dynamic typing.

Dan did a great work on the videos to explain very clearly some hard concepts such as pattern matching, thunks, promises, streams, currying or partial applications. The challenging set of weekly assignments helped me a lot to digest the materials.

This course was at the same time a challenge and a great experience. As one of the course mates said on the forum:
"This course opens your mind... It's exciting! (And annoying sometimes haha)".
I can't agree more. This course was tough and challenging. Some weeks I even thought I wouldn't be able to finish the assignment. You had only two submissions per assignment and only one timed opportunity per exam. It's been probably the toughest course I've taken so far in Coursera, but at the same time it's also been the most rewarding one.

I'm very proud and happy to have been able to complete it and I've learned a lot about functional programming and a bit about object oriented programming. I think it's made me a better programmer.

To finish, I'd like to thank Dan, his team and Coursera for making this great course possible.

Friday, December 13, 2013

MOOCs: Introduction to Systematic Program Design - Part 1 in Coursera

Last month I finished this great Coursera course by Professor Gregor Kiczales from the The University of British Columbia:
This course is a 10 week introduction that presents a design method that enables you to approach the design of complex programs systematically. I saw a previous version of the course and felt curiousity about it.
Their method shows how to model the information in a problem domain, how to structure program data to mirror that information and how to further structure the data to lead to a well organized program. It also teaches how to distinguish those parts of a program that are naturally data driven, from those that should use an alternative algorithmic approach. The method also uses a first test approach to unit-testing.

The course goes slowly and Professor Kiczales explains all concepts very well. Moreover, their design methodology with its design recipes and templates helps to make explicit many of the unconscious design decisions experienced programers often do. For that reason I think it's a great introduction to programming.
In my case, having some previous programming experience, I found that applying the method systematically for most of the small programs done during the course was a bit overkilling. However, in the end, it paid off when we started working with generative recursion to produce fractals and with bactracking searches. Following the recipes of their method proved to be really useful.

Another reason to do this course was the languages it uses: several teaching languages that are subsets of Racket (a Lispy language). This makes this course a gentle introduction to the basics of functional programming.
It gave me the chance to practice a lot with recursion, immutability and higher order functions, and it also helped me to get into the "Lisp cycles":
It was a great course. I think that Professor Kiczales and his team did a really great work and I'd like to thank them and Coursera for giving us this opportunity.

I'm looking forward to start the second part.

Friday, November 1, 2013

Articles and Posts read

El Parlamento Europeo otorga a la PAH el Premio Ciudadano Europeo 2013
Aprendiendo a construir catedrales
Un heroico Nadal vence a un irreductible Djokovic

Learning and software craftsmanship
All models are wrong…
Fix your Pebbles
On Simplexity
Selected TDD Resources To Start
Roman Numerals Kata with Commentary
A fundamental design move
The birthday greetings kata
Code Smell Of The Week series
Open-Closed Principle in SOLID Object Orientation Rules Challenged
Straw Man TDD
Los "malos olores" del código
SOLID by example
Refactoring is Sloppy
SOLID Code for SOLID Reasons
Why shorter methods are better
The abuse of refactoring
Ports and Adapters With No Domain Model
Mi carrera de desarrollador de software: ¿hacia dónde la enfoco?
TDD tetris tutorial
Hexagonal architecture in JavaScript
The Liskov Substitution Principle Demystified
GitHub is the new resume, and you don’t have to be a God of Programming for it to work
The Pragmatics of TDD
The Mind-killer
Is Design Dead?
Classic TDD or "London School"?
My relationship with SOLID - Starting with S
How much will you be worth in five years? Your Personal Technology Roadmap
Growing software from examples
PatternCraft series
Guiding Software Development with Design Challenges
Functional Programming Patterns in Four Popular Javascript Libraries
Practices Versus Etudes
Book Club: Hexagonal Architecture (Alistair Cockburn)
State vs. Interaction Based Testing Example
"Tell, Don’t Ask" Object Oriented Design
¿Está pasando España de comprar desarrollo software a Asia o Latinoamérica a ser el país que se lo vende?
Patterns as a source of freedom
Thelonius Monk teaches Software Design
A good name is about an idea, not an implementation
Naming From the Outside In
A brief tour of RDD in 2004 de Rebeca Wirfs Brock
Serendipity and False Pride

Spain and Europe
Thoreau, apóstol del 15-M... de 1845
"Decepciona ver tanto potencial científico en España que no se pueda desarrollar"
Temporeros castigados en la pensión por las uvas de Francia
Un 22% de trabajadores alemanes perciben sueldos mínimos
España, eclipse solar
Estrasburgo pide dación en pago o renegociación para familias en quiebra
Así se rascan el bolsillo para invertir en Ciencia y Salud miles de ciudadanos anónimos

Saturday, October 26, 2013

Interesting Talk: "Rules"

I've just watched this great talk by Sandi Metz the author of Practical Object-Oriented Design in Ruby: An Agile Primer (in my readings backlog):
She talks about a set of rules to follow in order to create good OO code.

Sunday, October 20, 2013

Interesting Talk: "L'arte perduta di pensare ad oggetti"

Yesterday I watched this great talk by Matteo Vaccari:
He talks about some OO knowledge that existed when XP arose and that has been forgotten by new generations of programmers.

Interesting Talk: "Treating objects like people"

Yesterday I watched this very interesting talk by Matt Wynne:
He talks about good OO pogramming practices and about how they have used them to refactor Cucumber.

Saturday, October 12, 2013

Software Craftsmanship Barcelona 2013

Software Craftsmanship Barcelona 2013 fue un evento que se celebró los días 28 y 29 de Septiembre.

Nuestro objetivo era atraer a desarrolladores de software que sienten pasión por su trabajo y darles un lugar en el que pudieran conectar unos con otros y compartir conocimientos. Creíamos que este evento podría ser un catalizador para que surgieran nuevas comunidades de práctica inspiradas por los valores del movimiento Software Craftsmanship.

Con un equipo de sólo 5 personas, Jaume Jornet, Beatriz Martín, José E. Rodríguez, José Carlos Gil y yo (Manuel Rivero), con mucho entusiasmo y unas gotas de inconsciencia, organizamos este evento en poco más de un mes.
No hubieramos podido hacerlo solos. Sin la colaboración de Netmind, que nos proporcionó el espacio en que se celebró el evento, y Venca, que también nos ayudó económicamente y con la cartelería, papelería, etc, todo hubiera sido mucho más difícil. Agile Barcelona en la que colaboramos todos los organizadores también nos prestó una ayuda muy valiosa.
También nos gustaría darle las gracias a todas las personas que contribuyeron al evento preparando charlas y talleres: Miguel San Román, José Armesto, Xavier Gómez y Xavier Gost, y, cómo no, a nuestro entorno más cercano: familia y amigos, por apoyarnos a pesar del tiempo que la organización de este evento les robó, y también por, en algunos casos, ayudarnos a montar, desmontar, limpiar, recibir a los asistentes, etc.
Personalmente también quiero agradecer a todos los compañeros de la organización por haberme dejado participar en esta locura. He disfrutado y aprendido mucho con todos. Gracias!

En los días previos al evento, nos preocupaba que estuviera a la altura de las expectativas de los asistentes, especialmente sabiendo que algunos de ellos venían desde bastante lejos. Estabamos un poco nerviosos, pero una vez se puso en marcha empezó la magia.

Personalmente, tuve tanto trabajo que no fue hasta el final del último día cuando llegué a casa que empecé a asimilar lo que había pasado. Las sensaciones durante y después del evento fueron muy buenas, y recibimos mucho feedback positivo. Mi sensación es que la gente se lo pasó muy bien, conocieron a otros apasionados por el software y aprendieron algunas cosas nuevas. Para muchos fue una inyección de energía. Estamos muy satisfechos con la experiencia.

¿Qué pasará a partir de aquí? No lo sabemos, aún es muy pronto para decirlo.
En principio, es muy posible que haya una SCBCN 2014, porque hemos tenido muy buenas sensaciones y pensamos que después de romper el hielo este año, en la siguiente edición, será un poco más sencillo encontrar más colaboradores para organizar el evento.
Además, empiezan a surgir pequeñas iniciativas en Barcelona para compartir conocimientos y aprender unos de otros.
Generar un tejido de aprendizaje colaborativo y pequeños grupos de práctica descentralizados es para mi mucho más importante que el hecho de que haya una nueva edición de SCBCN o no.

Thursday, October 3, 2013

MOOCs: Microeconomics Principles in Coursera

This last September I studied this great Coursera course by Dr. José J. Vázquez-Cognet from the University of Illinois Urbana-Champaign:
I've just received my grades:
This course provided an introduction to functions of individual decision-makers within the larger economic system. The nature and functions of product markets, theory of the firm under varying conditions of competition and monopoly, and role of government in promoting efficiency in the economy.

It was a great course. I think that Dr. Vázquez did a great work in finding very interesting and familiar examples to ilustrate topics covered in the course, especially the videos and interviews with different local businesses. I learned very interesting things and it has helped me to understand the present world a bit better.

Thanks to Coursera and José J. Vázquez-Cognet for this course.

Saturday, September 21, 2013

MOOCs: Solved 8 Puzzle assignment

I've just solved the fourth assignment from Princeton's Algorithms I course in Coursera.

This time we had to write a program to solve the 8-puzzle problem (and its natural generalizations) using the A* search algorithm.

Although I didn't understand well the problem description the first time I read it, in the end, this has been the easiest assignment so far.
I used TDD to code the Board class but only tested afterwards the Solver class.

These were the assessment tests result:
Compilation:  PASSED
Style:        FAILED
Findbugs:     No potential bugs found.
API:          PASSED

Correctness:  24/24 tests passed
Memory:       8/8 tests passed
Timing:       17/17 tests passed

Raw score: 100.00% [Correctness: 65%, Memory: 10%, Timing: 25%, Style: 0%]
I was a bit tired so I decided not to fix the style.

Tuesday, September 17, 2013

MOOCs: Solved Collinear Points assignment

Last Sunday I finished the third assignment from Princeton's Algorithms I course in Coursera.

The problem consisted in drawing every (maximal) line segment that connected a subset of 4 or more of the points given a set of N distinct points in a plane.

First, we had to write a brute force algorithm with order of growth N4 in the worst case that used space proportional to N. And then, we had to write a faster algorithm with order of growth N2log(N) using also space proportional to N.

This time I used TDD only for the Point class. For the Fast and Brute algorithms I wrote some unit tests afterwards that compared the program results for given inputs provided in the course site with the expected outputs.

When I submitted my solution, I started having a very frustrating problem in the Fast tests.
Although my solution seemed to be working with the provided inout files, (even with the rs1423.txt example that I'll show you later), the assessment tests were crashing after a test with random segments. This crash aborted the tests so I was getting a message saying that:
Total: 0/18 tests passed: 
Test aborted. Ran out of time or crashed before completion
Since the inputs that were making it fail were random, I couldn't get them to debug my program. I checked the code many times but I couldn't find any bug that could be causing that problem.

After asking in the course forums, I found out that it was a failure in the grading system which was overloaded by thousands of people submitting their assignments on Sunday night.

After a couple of hours, I submitted my solution again and these were the assesment tests results:
Compilation:  PASSED
Style:        PASSED
Findbugs:     No potential bugs found.
API:          PASSED

Correctness:  36/36 tests passed
Memory:       1/1 tests passed
Timing:       17/17 tests passed

Raw score: 100.00% [Correctness: 65%, Memory: 10%, Timing: 25%, Style: 0%]

I had spent a lot of time chasing a ghost bug but, in the end, at least it was over.
I made a mental note to myself: "don't try to submit when the grading system is too busy".

To finish, I'd like to show the picture that my program produces when it's fed with the rs1423.txt file:

It's Robert Sedgewick, the course professor.

Thursday, September 12, 2013

Articles and Posts read

Career Resilience: The Four Patterns that Should Guide All Your Career Moves

Learning and software craftsmanship
SOLID principles and TDD
Classic TDD or "London School"?
On class-oriented
Vaughn Vernon on Advanced Architecture Styles with DDD
Ports And Adapters Architecture
Hexagonal Architecture
Software developers are a model for career resilience
The General Problem
Thoughts on test-driven development
Seams: Some thoughts
Patterns to Isolate Code in Continuous Delivery
What makes a programmer

A Comparison of Angular, Backbone, CanJS and Ember
Introduction to WebSockets
Javascript hoisting explained

How I do C++ Testing

Functional Programming
Functors, Applicatives, And Monads In Pictures

The other side of "academic freedom"
La huella del tsunami de Gran Canaria, en el Maipés de Agaete

Spain and Europe
Jóvenes a la espera
Spain's science policy needs a U-turn
Grecia amenaza con cobrar a Berlín daños de guerra por la invasión nazi
¿Cómo se sostiene un país con seis millones de parados?
El muro de los 50
España es la más corrupta de la UE tras Grecia e Italia

MOOCs: A Brief History of Humankind in Coursera

I'm following Dr. Yuval N. Harari's "A Brief History of Humankind" course on Coursera.

It's a very interesting course which surveys the entire length of human history, from the evolution of various human species in the Stone Age up to the political and technological revolutions of the twenty-first century.

You can still enroll if you're interested.

Sunday, September 8, 2013

Interesting Panel: "Commenting TDD, where did it all go wrong"

This week I watched this great panel commenting Ian Copper's talk TDD, where did it all go wrong:
After watching Ian Cooper's talk a month ago, we started to try to bring together some of the more experienced members of Aprendices to form a panel in which they could debate about the ideas in the talk.

In the end a group of Spanish experienced TDD-practitioners joined the panel to share their experiences in TDD, BDD, design and many other things.

Thank you very much from here to all of them: Luis Artola, Miguel Angel Fernández, Enrique Amodeo, Guillermo Pascual, Javier Acero, Ricardo Borillo and Eduardo Ferro.
Also many thanks to Jaume Jornet for kindly taking the moderator role.

Interesting Panel: "¿Cómo usamos git en nuestro día a día?"

Last month Pepe Doval and some other Aprendices members held a very interesting hang out where they talked about the way they use Git:
This was the first Hang Out that arose from the Aprendices community.

I'd like to personally thank Pepe Doval, Raúl Tierno, David Vílchez, Nicolás Cortés, Gabriel Moral and Carlos García for taking part in it.

Interesting Talk: "What is BDD and why should I care?"

I've just watched this interesting talk by Matt Wynne:

Interesting Talk: "It's not your test framework, it's you"

I've just watched this interesting talk by Robbie Clutton and Matt Parker:
We've found many of the advices to make BDD sustainable that they give in this talk, in the book we're currently reading in Aprendices Reading Club: Gojko Adzic's Specification By Example.

Saturday, September 7, 2013

MOOCs: Model Thinking in Coursera

This summer I studied this great Coursera course by professor Scott E. Page from the University of Michigan:

I've just received my grades:

This course provided an introduction on how to think using models. Specific topics included, among others, decision-making, tipping points, economic models, crowd dynamics, Markov processes, game theory and predictive thinking.

It was a great course. The topics were very interesting and I liked very much the way the lecturer approached them. I learned very interesting things.

Thanks to Coursera and Scott E. Page for this course.

MOOCs: Solved Randomized Queues and Deques assignment

I finished this afternoon the second assignment from Princeton's Algorithms I course in Coursera.
This time we had to develop two generic data types: a Randomized Queue and a Deque.

These were the assesment tests results:
Compilation:  PASSED
Style:        PASSED
Findbugs:     No potential bugs found.
API:          PASSED

Correctness:  32/32 tests passed
Memory:       47/47 tests passed
Timing:       24/24 tests passed

Raw score: 100.00% [Correctness: 65%, Memory: 10%, Timing: 25%, Style: 0%]

As in every assignment of this course, the APIs were already fixed by the professors and there were several memory and time constraints for each operation of both generic data types.

I'm using TDD to get to my solutions and, even though, having the APIs predefined kills the fun in the programming by intention part of TDD, I've still found this technique very useful.

Developing the Deque with TDD was very smooth.
I started driving my code with just the pre-defined idea of using a linked list to meet the memory and time requirements. For me, it was nice to see how far the tests could take without even have to create a linked list inside the Deque. Later on I got to a test that drove me to realize that I needed a double-linked list instead.
Having said that, I must admit that I wasn't able to find a way to put that double-linked list in place using baby steps. So I just cheated and did a big change to make the new test pass while keeping the previous tests in green.

A couple of days later, I started developing the Randomized Queue and, in this case, TDD wasn't smooth at all.
I think that the culprit was the fact that we were forced to use a static method of the provided stdlib library to generate random numbers. The fixed APIs plus the static random numbers generation made it very difficult to test the Randomized Queue.
My way around was feeding the queue with integers in ascending order, then using the random number generation function with a given seed to know which of them will be dequeued, and finally resetting the random number generation function with the same seed before calling dequeue several times. This is hardly TDD and the resulting tests were very ugly.

Another thing that I didn't TDD was the resizing of the array implemented inside the Randomized Queue. I just put it there and used the tests to know eveything was still working. Now, I realized that I could have made the array public for a while in order to develop that feature using TDD, and deleted the test once it was working and made the array private again. Well, I'll try this approach next time.

That's all. I'm still enjoying the course and I'm looking forward to start the new assignment: Collinear Points.

Sunday, September 1, 2013

CAS 2013: Algunas charlas que me gustaría que se hicieran

Estas son tres conferencias que me gustaría que al final se hicieran este año en la CAS2013, pero que no tienen muchos votos y quizás no salgan.
Considero que pueden ser muy interesantes y sería una pena que no consiguiesen votos suficientes:
Si van a ir a la CAS2013 y les interesa alguna, no dejen de votarla por favor.

PS: Vaya, parece que mi preocupación era infundada.
Resulta que las charlas de la CAS2013 no se elegía por votación.

MOOCs: Solved "backwash" problem in Percolation assignment

I've just finished the first assignment from Princeton's Algorithms I course in Coursera.

This first assignment was to write a program to estimate the value of the percolation threshold via Monte Carlo simulation.

I thought that the solution I coded last weekend was fine because it was correctly computing the percolation thresholds for many different grid sizes.
However, when I tested it today using the provided PercolationVisualizer class, I realized that it was suffering from the "backwash" problem.

The problem was also detected by the automatic assessment tests:
Compilation:  PASSED
Style:        PASSED
Findbugs:     No potential bugs found.
API:          PASSED

Correctness:  16/20 tests passed
Memory:       8/8 tests passed
Timing:       9/9 tests passed

Raw score: 87.00% [Correctness: 65%, Memory: 10%, Timing: 25%, Style: 0%]
There were four tests checking the backwash problem.

It took me a couple of hours but, in the end, I managed to fix it by using two WeightedQuickUnionUF objects instead of one.

This was the final result of the automatic assessment tests:
Assessment Summary
Compilation:  PASSED
Style:        PASSED
Findbugs:     No potential bugs found.
API:          PASSED

Correctness:  20/20 tests passed
Memory:       8/8 tests passed
Timing:       9/9 tests passed

Raw score: 100.00% [Correctness: 65%, Memory: 10%, Timing: 25%, Style: 0%]

I'm enjoying this course very much!

Friday, August 30, 2013

Books I read (January - August 2013)

- Matemàtica discreta. UOC. (2nd time)

- The New York Trilogy, Paul Auster

- The Great Gatsby, F. Scott Fitzgerald
- Event-Driven Programming: Introduction, Tutorial, History, Stephen Pherg
- JavaScript Enlightenment, Cody Lindley

- El camino a un mejor programador, E. Manchado, J. Caraballo y Y. Darias
- The Mists of Avalon, Marion Zimmer Bradley

- La Tumba (Grave Peril), Jim Butcher
- Implementation Patterns, Kent Beck
- User Stories Applied, Mike Cohn

- Implementation Patterns, Kent Beck (2nd time)

- Chapters 1-6 of Object-Oriented Analysis and Design With applications 2nd edition, Grady Booch

- Test-Driven Development By Example, Kent Beck (2nd time)
- Victus, Albert Sánchez Piñol
- El cuerpo humano (Il corpo umano), Paolo Giordano

Friday, August 23, 2013

Interesting talk: "Challenging requirements"

I've just watched this great talk by Gojko Adzic, the author of the Specification by Example book that I'm currently reading:
Thanks to Guillermo Pascual for recommending it in the Aprendices community.

Some talk highlights:
Refuse solutions to unknown problems:
understand what the real problem is and solve that.
Refuse suggestions to use a particular technology:
you know IT better than they do (if not, why have they hired you?).
Don't rush into solving the first problem they give you:
keep asking "why" (or "how would this be useful") until you get to the money.
Know your stakeholders:
who is going to use this and why?
Don't start with stories!:
Start with a very high level example of how people will use the system.
Great products come from understanding the real problem and whose problem it is.

Monday, August 5, 2013

Interesting talk: "TDD, where did it all go wrong"

I've recently watched this interesting talk by Ian Cooper:
He talks about ways of avoiding common problems that arise when TDD is not practised well.

Tuesday, July 23, 2013

A Double Dispatch example in C++ using Igloo

To practice I've coded an example of the Double Dispatch implementation pattern I read about first in Rebecca Wirfs-Brock's Object Design: Roles, Responsibilities, and Collaborations and later in Kent Beck's Implementation Patterns.

I used the pattern to implement the rules of the Rock-paper-scissors hand game.

I drove the code using TDD.
Having a "dense day", I painted myself into a corner, but I finally managed to refactor my way to a solution.

I used the Igloo C++ BDD framework, which the more I use, the more I like.

I put the resulting code in this repository. I committed after each new test was made to pass and after each refactoring, so you can follow all the process (including my silly initial mistakes).

Saturday, July 20, 2013

Articles and Posts read

"Somos naturaleza. Poner al dinero como bien supremo nos conduce a la catástrofe"
Operating the Bombe: Jean Valentine's story

Everything old is new again
Why Innovators Get Better With Age

Learning and software craftsmanship
Case Studies on Benefits of TDD
El camino a un mejor programador
Bad Advice: “Stop Working So Hard”
Kent Beck on Implementation Patterns
SOLID principles and TDD
Effective Learning for Developers
Review: Structure and Interpretation of Computer Programs - 2nd Edition by Abelson and Sussman
Orden y Concierto
The Quiet Revolution in Programming
14 lessons after five years of professional programming
Evaluating new frameworks, libraries and technologies
Classic Software Testing Mistakes
About Kent Beck’s Stepping Stone strategy
Protected variation: the importance of being closed
On the Criteria To Be Used in Decomposing Systems into Modules

Why Are There So Many C++ Testing Frameworks?
C/C++ Scientific Programming Libraries and Tools
C plus plus Behaviour Driven Development tools
Learning Modern C++: An Interview with Barbara Moo
Ten C++11 Features Every C++ Developer Should Use

Which Java web framework to choose? The client- vs server-centric story

Entrepreneurship and Management
16 ways to torture developers
Avoiding Innovation Debt

Spain and Europe
El bipartidismo no toca fondo
Monarquía o república
El sistema electoral y el bipartidismo cimentan la corrupción en España
La pobreza infantil no es inevitable
Viñeta de El Roto del 3 de abril de 2013
El fondo de las pensiones ya tiene el 97% del dinero invertido en deuda española

Sunday, July 7, 2013

Interesting Talk: "Practice"

I've recently watched this video where Corey Haines shares his thoughts on the value of deliberate practice for programmers:

Interesting Talk: "Connascence Examined"

I've recently watched this interesting talk by Jim Weirich on a topic he mentioned in the recent Understanding Coupling and Cohesion discussion:

Interesting Conversation: "Corey Haines and J. B. Rainsberger on Move Specificity Towards the Tests"

I've recently watched this interesting talk between Corey Haines and J. B. Rainsberger about a technique used in TDD:

Interesting Panel: "Understanding Coupling and Cohesion"

I've recently watched this awesome discussion about Coupling and Cohesion:

The participants are Corey Haines, Curtis Cooley, Dale Emery, J. B. Rainsberger, Jim Weirich, Kent Beck, Nat Pryce and Ron Jeffries.

Interesting Talk: "Mi dominio es mío y no lo comparto..."

I've recently warched this gret talk by Javier Acero about DDD and architecture patterns:

Interesting Conversation: "Corey Haines and J. B. Rainsberger on Primitive Obsession and Value Objects"

I've recently watched this interesting conversation between Corey Haines and J. B. Rainsberger about Primitive Obsession and Value Objects:

Interesting Conversation: "Corey Haines and J. B. Rainsberger on Test-Driven and Test-First"

I've recently watched this interesting conversation between J. B. Rainsberger and Corey Haines about Test-Driven Development and Test-First Programming:

Thursday, June 27, 2013

Articles and Posts Read

La gigantesca hazaña de un humilde abogado
Why I Hacked Donkey Kong for My Daughter
How to be invincible
Interview with Sacha Chua
Every Day Can Be A Starting Point: Make a New Beginning

Innovative Minds Don’t Think Alike
El valor de los bitcoins se dispara un 57% en una semana

Learning and software craftsmanship
Motivated to learn?
Top down, bottom up
Towards mastery: deliberative practice, flow and personality traits
The Open-Closed Principle, in review
Trust and the tiranny of choice
Some things I've learnt about programming
Growing Object-Oriented Software, Guided by Tests by Steve Freeman and Nat Pryce, Review
Some myths of 'Textbook-TDD', and why they are wrong
Developing instinct
Which Unit Test is correct? They both test the same thing in different ways
Testing on the Toilet: Testing State vs. Testing Interactions
A Test of Knowledge
Effective Steps to reduce technical debt: An agile approach
State vs Interaction Based Testing
Basic principles that will help you write better code
Why shorter methods are better
Virtual Panel: Code-to-Test Ratios, TDD and BDD
Why your IoC container could be a pain for you, young Padawan
Personality vs experience
What kind of a software engineer do you want to be known as?
Expertise, the Death of Fun, and What to Do About It
Event-Driven Programming: Introduction, Tutorial, History
Protected variation: the importance of being closed
On the Criteria To Be Used in Decomposing Systems into Modules

blaze-lib, A high performance C++ math library
The Biggest Changes in C++11 (and Why You Should Care)
More C++ Idioms
C/C++ Scientific Programming Libraries and Tools
C++ Programming WikiBook
Functional Programming in C++

Strategy Design Pattern in Javascript
Separating from the DOM, a JavaScript Story: XI to Eye
BDD applied to JavaScript RIAs
JavaScript Unit Tests: Jasmine vs Mocha

Python Koans
The pony I really want: a good signals tutorial

Agile and Lean
Agile Teams Are Neglecting Design
11 Agile Myths and 2 Truths

Entrepreneurship and Management
Sorry Google; you can Keep it to yourself
A note on working hours and working at home
Engineers Suck at Finding the Right Jobs
Great Employees Are Not Replaceable
Guiding newbie toward productivity
Titles are Toxic

El mayor proyecto neurocientífico de la historia

Portraits by Hong Yi

Spain and Europe
Tres millones de personas en pobreza extrema
La protesta llama a su puerta
Mascota para los JJOO 2020 rechazada
Arte en Berlín: ¿el fin de una era?
Más desigualdad, más miseria
Una crisis de novela
Chávez y Yeltsin
Los miniempleos son una amenaza para las mujeres en Alemania

Tuesday, June 18, 2013

MOOCs: "Becoming Human: Anthropology (BeHuman)" on Open2Study

I've just finalized this great Open2Study course by professor Greg Downey from Macquarie University:
It's been a great experience. The topics are very interesting, even mind blowing, and the lecturer is just great. I've enjoyed and learned a lot.


Sunday, June 16, 2013

Kata: "Gilded Rose" in Java

Today I've practiced with the Gilded Rose refactoring kata in Java.
I had to put a test harness in place before being able to start refactoring.

Here it's the code, committed after each small refactoring step.

Update: I revisited the kata a year after. Here you can find an improved new version.

Saturday, June 15, 2013

Resources for TDD beginners

I've just found this great link with selected resources to start learning TDD in Matteo Vaccaris's blog:

Interesting Talk: "Refactoring Fat Models with Patterns"

I've just watched this interesting talk by Bryan Helmkamp:

Notes to myself: "Kent Beck's Theory of Programming"

  • Communication.
  • Simplicity.
  • Flexibility.

  • Local Consequences.
  • Minimize Repetition.
  • Logic and Data Together.
  • Symmetry.
  • Declarative Expression.
  • Rate of Change.

Interesting Interview: "Brian Foote on the State of OOP, Refactoring, Code Quality"

I've just watched this interview with Brian Foote:
I't a very interesting vision from the perspective of a thirty something years career.

Sunday, June 9, 2013

Kata: "Prime Factors" in JavaScript

Some months ago, I did the Prime Factors kata in JavaScript.

Here is the code with all the baby steps so that you can follow the process.

Carlos Blé wrote an interesting post about this kata in his blog that I think it's worth reading.

Learning Test Driven Development (TDD) through katas

I'm trying to improve my TDD skills, so I'm working through the katas included in this post by Todd Sedano:

Encapsulating collections

I'm working on a protein energy landscape exploration program written in C++.

In the program each explorer can react to its environment in several ways: stopping the simulation, changing its search parameters or jumping to a more favorable spot.
An explorer knows about its environment through its sensors and then evaluates a series of conditions to know what to do next. There are conditions for each kind of action to happen.

Our code was suffering from a case of primitive obsession in the form of using raw STL collections for the conditions and sensors. That meant that there was a bunch of code that dealt with those concepts that was spread all over the place, particularly in the explorer's creation code.

On Friday I tried to improve the code applying the Encapsulate Collection refactoring.
I combined this refactoring with the use of the factory method pattern.

I'm happy with the results. Now the collection-handling code that was spread all over, has been attracted by the newly generated collections-like classes (ExitConditions, JumpingConditions and Sensors). Moreover, I've been able to give that functionality proper names to improve its readability and also to remove a bunch of getters that were bothering me and a class that didn't make sense anymore.

Regarding the refactoring process, it was pretty easy to introduce ExitConditions and JumpingConditions in tiny steps staying in green most of the time.

The real challenge was to introduce Sensors because the sensors related code was being used in many places, mainly for building conditions and reporting sensor values.
I tried to refactor it in tiny steps but got to a point where I got stucked. So I decided to plow ahead (I always had the possibility of using SVN to go back to where I started) and see. Well, three hours were gone before I could run the tests again...

While in the end all tests were green, I'm not proud of how I did it. I spent too much time in red and it could have easily gone badly.

Even though I'm sure I need more practice with this refactoring technique, I think it's always going to be very difficult to apply it when the problem has already spread too much.

In that case, I think that I have two options: a reactive one, learning more powerful large scale refactoring techniques like Mikado method; or, better a preemptive one, not letting the problem spread by applying the Encapsulate Collection refactoring more often.

As Xavi Gost said once:
Encapsulate in objects your collections you must.
A couple of days after writing this post I realized that I could merge JumpingConditions and ExitConditions classes in just one: Conditions.
This has simplified the code further.

Kata: "StringCalculator" in C++ using Igloo

Today I've worked in the StringCalculator kata in C++.
It's been perfect to start using Igloo, the BDD framework I talked about in my last post.

Here it's the code. It's incomplete. I still have to do the steps 7, 8 and 9 that deal with multiple delimiters and delimiters of any length.

Playing with Igloo, a BDD framework for C++

Today I've been playing with Igloo which is a BDD framework for C++.

I like it. The specs are very readable and, as it is implemented as a set of header files, it's really easy to use in your project. Its documentation is also ok.

Its author, Joakim Karlsson, has done several screencast where you can see him using Igloo. You might also have a look at Igloo's source code.

Saturday, June 8, 2013

Friday, June 7, 2013

Interesting Talk: "How To Approach Refactoring"

I've just watched this great talk by Venkat Subramaniam:
where he gives sensible advice on how to get quality code through refactoring.

Interesting Talk: "Fractal TDD: Using tests to drive system design" (2nd)

I've just revisited this great Steve Freeman's talk:
I'm also revisiting his book in the light of what I've practiced in the last 9 months and what I've learned in the BeCode Agile Development course. I hope this time I'll understand it a bit better.

Sunday, May 26, 2013

Kata: "Birthday Greetings"

@CoGaNic and I have done the Birthday Greetings kata.
This kata is a simple refactoring exercise by Matteo Vaccari that is meant to teach something about dependency inversion and dependency injection. You can download the kata initial code from here.

We refactored it to decouple the domain objects from the file system and email sending code using the ports and adapters architecture as the exercise suggested. You can see the refactoring result on GitHub.

We think there's still room for improvement in the adapters code, but we are satisfied with how we manage to eliminate the initial coupling between domain objects and the infrastructure classes used to read files and send emails. Now the domain objects don't know anything about them.

All in all, it's been a great exercise. We've thought about dependency inversion and dependency injection (this great article by Brett L. Suchert helped us a lot: DIP in the wild) and clarified many doubts we had about the ports and adapters architecture, also known as, hexagonal architecture.

PS: Some time ago I posted some useful links about the ports and adapters architecture.


I revisited the kata some time after this post, recorded a screencast to document the refactoring process and wrote a new post about it.
Check it here.

Tuesday, May 7, 2013

Interesting Talk: "Clean Architecture"

I've just watched this interesting talk by Robert Martin about software architecture:
He explains how to protect your business or domain objects from details like the framework, the user interface or the persistence infrastructure, so that domain objects become again the center of your system.
He also talks about how good architectures help to defer tool decisions until late in the development.

Interesting Talk: "The Insufficiency of Good Design"

I've just watched this interesting talk by Sarah Mei about the importance of team communication patterns in software development:

Monday, May 6, 2013

Interesting Talk: "What is OO really?"

I've just watched this interesting talk by Robert Martin that busts some myths about OO:
Some of its contents appear in this other talk, but using a slightly different perspective. There are also some different examples and anecdotes.

Sunday, April 28, 2013

Books I read (January - April 2013)

- Matemàtica discreta. UOC. (2nd time)

- The New York Trilogy, Paul Auster

- The Great Gatsby, F. Scott Fitzgerald
- Event-Driven Programming: Introduction, Tutorial, History, Stephen Pherg
- JavaScript Enlightenment, Cody Lindley

- El camino a un mejor programador, E. Manchado, J. Caraballo y Y. Darias
- The Mists of Avalon, Marion Zimmer Bradley

Thursday, April 25, 2013

Interesting Talk: "Automated Testing Patterns and Smells"

I've just watched this interesting talk by Gerard Meszaros:
He's the author of the XUnit Test Patterns, Refactoring Test Code book.
He talks about test smells, how to refactor them and about test patterns.

I think that this other talk, Listening to test smells, might be a great complement for this talk.

Saturday, April 20, 2013

Interesting Interview: "Kent Beck on Implementation Patterns"

I've just watched (for the third time) this amazing interview with Kent Beck:
The interview starts as the classical book presentation interview but then Beck goes really much deeper and reflects about the relationship between patterns and XP, problems when adopting agile, learning and the very meaning of programming.
His honesty and humbleness are amazing.
Hats off to Mr. Beck!

PS: Tomorrow we'll be debating this video at the Valencia Agile Development Course.

Sunday, April 14, 2013

Articles and Posts read

The seven habits of highly effective mediocre people

Learning and software craftsmanship
Beyond the Buzz, Where Are MOOCs Really Going?
YAGNI and Professional Code
SOLID by example
Los "malos olores" del código
The Power of Value Objects
Faulkner teaches how to study
TDD Is Not An Algorithm Generator!
How to learn a new programming language
Thelonious Monk teaches software design
Student wisdom on monad tutorials
Thoughts on how to design
GitHub is the new resume, and you don’t have to be a God of Programming for it to work
Prefactoring re-coined
Mikado Method examples and exercises
Refactorización de test
Desarrollo de software. Antipatrón. Síndrome de la última versión
Redirect After Post
misguided attempts to develop overspecialized skills
Refactoring is Sloppy
Don't rely on unit tests alone
Refactoring and the Ubiquitous Language
A Taxonomy for "Bad Code Smells"
Refactoring towards "better" code
Back to Basics
Hoping to leave class-oriented programming
El futuro de los sistemas de aprendizaje social: las comunidades de innovación
How do you tell a non-technical person that they can’t understand?

JsBooks: The best free JavaScript resources
TDD en Javascript: I parte

Get to Know C++11 Scoped and Based Enum Types
Estructura del código fuente en C++

Python Code Quality

Agile and Lean
Doing it right or doing it over?
Heuristics for Building the Right Thing
Alistair Cockburn. Los proyectos de desarrollo de software. Queda mucho que aprender.

Los matemáticos polacos, Alan Turing y el secreto de la máquina Enigma

Software Development in Spain
¿Quieres estar muy sobre la media de los profesionales de tu sector? Déjame que te cuente un secreto

Entrepreneurship and Management
Twitter’s Surprising Solution to the Patent Problem: Let Employees Control Them
Why I run my business like an open source project
Why I cheer when my employees leave
Intraversion at Work

Spain and Europe
Ferrol se vuelca con el naval en una gran protesta ciudadana
Crisis y sistema
Un ‘apartheid’ gitano cerca de París
Doctores en plagios
La pesadilla portuguesa en Europa
La desnazificación de Alemania

Wednesday, April 10, 2013

Interesting Talk: "Integration Tests Are a Scam"

I've just watched this great talk by J.B. Rainsberger:
It was recommended to me by Miguel Angel Fernández one of the teachers in the Agile Development course I'm attending.

It's a really enlightening talk. If you haven't seen it yet, I recommend you to do it.