Dios los cría…

There is a very famous phrase in Spanish that says: “Dios los cría y el viento los junta” that literally can be translated like: “God grows them and the wind put them together”. Look at the picture below, it was taken after an Architect Forum about Agile Methods organized by Microsoft Argentina during Febrary 2008.

foto-agile-af

In the picture there are 9 people that were speakers at the forum.  Nowadays five of them are working here at Southworks (me included).

Agile Open Bahía Blanca 09

Salimos desde la terminal de Retiro junto con JuanG el viernes por la noche. Arribamos a Bahía hacia las 8 de la mañana del sábado. En la terminal de Bahía nos encontramos con Esteban y Julian que venían desde Tandil y luego en compañía de Jerónimo (uno de los organizadores locales) nos dirigimos hacía la biblioteca central de la Universidad nacional del Sur.

El evento arrancó a las 9.30 y tuve el honor de facilitar la apertura. Fue una muy linda experiencia.

Hubo alrededor de 90 participantes y si bien durante el día hubo algunas deserciones como suele suceder, en el cierre hubo más de 70 personas. Hubo alrededor de 30 sesiones propuestas, algunas de las cuales fueron unificadas al momento de armar la grilla, quedando finalmente alrededor de 20 sesiones efectivas.

Durante la mañana participé de una sesión sobre los distintos roles dentro de los equipos ágiles y de ello estuve en una sesión interactiva facilitada por JuanG en la que trabajando con globos repasamos la importancia entender claramente criterios de aceptación de los productos que generamos. Ya por la tarde estuve en una sesión que titulada con algo similar a “Documentación en contexto ágil” resultó un poco controvertida cuando uno de los participantes comentó que en sus proyectos tenía analistas trabajando un sprint adelantado escribiendo user stories detalladas. A continuación estuve en un sesión en la que hablamos sobre los pasos y opciones para la adopción de agile en organizaciones que trabajaban en forma “cascadosa”.

En el último slot del día dicté un workshop sobre user stories del cual participaron alrededor de 25 personas. De aquí puede descargarse el slide deck con los puntos más importantes que repasamos durante la introducción teórica del workshop.

Luego del cierre (a cargo de JuanG) Victor “Ferruchi” nos llevo en un mini city tour que termino con una picada en un bar muy pintoresco a escasos metros del teatro munipal de la ciudad. Hacia la 9 nos transladamos a la casa de Ariel Trellini nos los huddleanos preparaban un asado. Finalmente pusimos fin a nuestra jornada degustando una copa de vino y un sandwinch de asado entre juegos de dardos y charlas geeks. A las 10.30 subimos al micro que nos trajo de vuelta hacia Baires.

Realmente quedé muy contento con el evento y debo admitir que superó mis expectativas: mucha gente, excelente organización y muy buen contenido en las sesiones.

http://www.box.net/shared/gtdn1ttsvo

7 habits of highly effective people

Continuing with the tradition when joining Southworks I ‘m going to say something about this book.

I first knew about this books a year a ago more or less,  a college shared with me a summary of it. Recently when I was in the process of joining Southwork MarianoS gave me the book and recommended me to read it. I decided to start reading it from the scratch and I must say that it was a good choice. The first part of the book was not part of the summary I read. The book like so much that I bought it. While reading the first pages it seems to me that it was a philosophical book, but I knew it wasn’t because I had read the summary of the habits. I’ve been always trying to organize my time in an effective manner and this book gave an interesting point of view.

I want to share a teaching I get from this excellent book:

Everything depends on the crystal you use to see, but the interesting part is that you can choose what crystal to use!

Cambios en Algo3

Desde hace ya un tiempo con el equipo de cátedra de algortimos 3 hemos estado trabajando en algunos cambios en la materia los cuales pensamos incorporar en el cuatrimestre que se encuentra próximo a comenzar. Entre los cambios se encuentran:

  • La lectura obligatoria de algunos artículos/capítulos/papers.
  • Un estudio más profundo del polimorfismo y conceptos afines
  • Un mayor foco en la resolución de ejercicios
  • Inclusión de más trabajos prácticos, incluyendo uno en Smalltalk

Cada uno de estos cambios tiene una justificación, la lectura de papers/artículos tiene que ver con que no se puede pasar por la facultad estudiando de los apuntes de clase, de vez en cuando hay que leer material y el material existente sobre OO es por demás abundante. El estudio del polimorfismo y conceptos relacionados son posiblemente los temas más importante de la materia y hasta el dia de hoy el tiempo dedicado a dichos temas nos parece insuficiente. La única forma de aprender a diseñar es ejercitando y es por que hemos decidido aumentar el foco en los ejercicios. Por último, si bien hasta ahora habia cierta libertad en la elección del lenguaje de programación la gran mayoria de los alumnos elegía trabajar con Java; con la inclusión de un trabajo en Smalltalk buscamos que los alumnos experimenten una implementación distinta del paradigma de objetos.

No estamos seguros de como resultará todo esto, pero estamos convencidos que permitirá a los alumnos tener un mejor entiendimiento de la orientación a objetos. En diciembre veremos si nuestro enfoque ha sido correcto.

Nuevo equipo

Por estos dias me encuentro poniendo a punto mi máquina. Resulta que mi querida Dell XPS 1330 tuvo un issue con la pantalla y el soporte técnico de Dell decidió -ante la imposibilidad de conseguir el repuesto(al parecer por problemas de aduana)- proveerme una nueva máquina (obviamente aún estaba en período de garantía). Mi nueva máquina es una Dell Studio XPS 1340. Curiosamente a pesar de ser una máquina de 64 bits, me vino con un sistema operativo de 32 bits (Vista Home Premium). Luego de encender la máquina y hacer un breve smoke test para verificar que todos los dispositvos funcionaban correctamente procedí a reemplazar el sistema operativo por un Windows 7 Ultimate de 64 bits. Aún no he terminado de instalar todos los drivers y utilitarios (son unos cuantos) y tal vez sea esta la causa de algunas “inestabilidades” menores que estoy experimentado.

Entre los puntos interesantes para destacar del equipo estan:

  • El sonido, realmente suena muy bien y el driver trae un software que permite ajustar varias configuraciones.
  • El teclado, es totalmente distinto al modelo anterior y me resulta extremadamente más cómodo. Es de color negro y tiene una luz debajo que resulta muy útil para trabajar en la oscuridad.

Esto es todo por ahora, con el paso del tiempo veremos que tal se desempeña este nuevo chiche.

Claim-based identity (part#2)

Before diving into the ws-* protocols I mentioned in part#1, is important to review two important concerns about exchanging messages over the net:

  1. How can I be sure that the message I get has not been read or modified along the way?
  2. How can I be sure about who sent a message?

Point (1) can be solved by signing the message and point (2) by encrypting it. In the following paragraphs I will explain this topcis in a simplify way

Note: the following concepts can be applied in several different ways to resolved the mentioned situations.

Message Signing

Let’s suppose that Endpoint A needs to send a message to Endpoint B.

Endpoint A starts by taking the message and applies it a hash function (typically MD5) (step1) and the result of that is encrypted using A’s private key (step 2) obtaining a signature for the message. After that message is ready to be sent along with its signature (step 3). When endpoint B gets the complete message, it starts by separating the message itself from the signature and applies the hash function to the message (step 4) obtaining a hashed message. At the same time B decrypt the signature using A’s public key (step 5) and as a result of the decryption is should get the hashed message. If the result is not same that are to possibilities: the message has been modify or it was sent by someone else other than A.

image

This way, endpoint B can be sure that the message was sent by A and that the message has not been altered.

Message encryption

Now supposed that A needs to send a confidential message to B.

To ensure the message to be read only be B, A encrypts the message using B’s public key (step 1) and then put it on the wire (step 2).  When B gets the message it can decrypt it using its own private key (step 3).

image

By combining these two techniques we can ensure the integrity and confidentially of the message, in other words: only the endpoint know about the data of the message (because is encrypted) and the receiver of the message can be sure about  the recipient and content of the message (because it is signed).

To be continue…

Claim-based identity (part#1)

During this week I ‘ve been working with federated identity a very interesting topic that every day sounds more and more. This post is the first part of a quickstart I plan to write to help beginners to understand the stack of protocols involved in the solution to this common problem and in particular to Microsoft’s solution for it: codename «Geneva».

Let’s start by getting familiar with some vocabulary:

  • Security token: it is a serialized set of claims that in most of the cases is digitally signed by an issuing authority.
  • Issuing authority: any entity you trust.
  • Security Token Service (STS): is a software component (exposed by an issuing authority) applications trust for authetication.
  • Relaying party (RP): is an aplication that trust in the STS.
  • Claim: information about the user contained in a security token and required by a application (RP app.). In some point claims are analogous to attributes in the enterprise directory world.
  • identity provider STS (IP STS): is an STS capable of authenticate users, determining user identity tipically by validating his credentials (username & password).
  • Relaying party STS (RP STS): is an STS that relies in others STS to authenticate users and has the ability to generate the claims required by the relaying party application.

What is Geneva?

It is a set of Microsoft tecnologies that implements the shared industry vision for an interoperable identity metasystem. It comprises 3 components:
  • Geneva server (ADFS)
  • Windows Cardspace Geneva (CardSpace)
  • Geneva framework (Windows Identity Foundation)
If you are thinking in implementing an identity solution you must take a look at Geneva. Good starting points are the Identity Training Kit and this white paper. Depending on what you plan to do it is possible you need to understand how the things work under Geneva’s hood, I will try to give you some ligth about it starting by some web services protocols.

WS-* protocols

WS-* is a set of interoperable protocols to solve common concenrs (like security and confidentiality) when building enterprise applications. When  working with Geneva some of this protocols are involved:
  • WS-Security: is a protocol that define some extension to SOAP that can be used when building secure Web services to implement message content integrity and confidentiality. (see ws-security specification)
  • WS-Trust: is an extension to WS-Security that defines methods for issuing, renewing, and validating security tokens and ways to establish assess the presence of, and broker trust relationships. It is used by STSs to expose endpoints. This video by Vittorio Bertocci explains this protocol in a very clear way, or you can also read the ws-trust specification.
  • WS-Policy: provides a flexible and extensible grammar for expressing the capabilities, requirements, and general characteristics of entities in an XML Web services-based system. In out context it is used is used by RP app/service to expose the required policy to be invoked. (see ws-policy specification)
  • SAML: is an XML-based standard for exchanging authentication and authorization data in the kind of tokens. Our tokens are expressed with SAML.
  • WS-Federation: is based on WS-Trust and provides some extentions interesting extension that amogn other things, define how to work with passive relaying parties like web browsers. This paper by Microsoft and IBM is a very good introduction to this protocol and the whole flow of messages in the authentication scenario.
If you prefer a single point of introduction instead of jumping among the provided links, I recommend you the book by Cabrera & Kurte called Web Services Architecture and Its specifications (ISBN: 978-0735621626) (watch out! it does not cover all the mentioned protocols but despite of that is a good starting point)

To be continue…

DDD: implementing object’s identity

One important thing to consider when implementing a domain-driven design is object identity.

In most languages, each object identity is determined by the memory address of the object, but if we are implementing a DDD then we shoud redefine object identity in terms of our domain. For example, let’s suppose we are working in a bank domain, and we have an Accout class, then you should define the identity of Account objects based on the account number.

When working with C#, there are four methods related to the identity of objects, all of them defined in the root class Object:

public virtual bool Equals(object obj);

public static bool Equals(object objA, object objB);

public virtual int GetHashCode();

public static bool ReferenceEquals(object objA, object objB);

Let’s analyze them one by one.

bool Equals(object obj)

By default this method will compare object’s memory address, but that is not correct when implementing a DDD. As mentioned before identity of our domain classes should be define in tern of domain concepts, so we should override this method. Continuing with the Account class example, this method should compare account number: same account number then same object.

public override bool Equals(object obj)

{

Account otherAccount = obj as Account;

if (otherAccount == null)

return false;

return this.Number.Equals(otherAccount.Number);

}

static bool Equals(object objA, object objB)

This method is static and just invokes Equals method of instance objA passing to it the objB as a parameter.

int GetHashCode()

This method is not directly related to object’s identity. It is used when a hash code is needed to represent the object, for example if we want to store the object in a hash-based struture like a hashtable. From msdn: » The default implementation of the GetHashCode method does not guarantee unique return values for different objects. Furthermore, the .NET Framework does not guarantee the default implementation of the GetHashCode method, and the value it returns will be the same between different versions of the .NET Framework. Consequently, the default implementation of this method must not be used as a unique object identifier for hashing purposes.»

When implementing a DDD we should override this method in our domain classes to return different values for not equal objects. In the Account class example we could use the account number as the hash code.

public override int  GetHashCode()

{

return this.Number;

}

static bool ReferenceEquals(object objA, object objB)

This method simply compares memory addresses, the same behaivour that Equals default implementation.

Well, this is it, I hope this post to clear enough.

If you want to see some tests running to validate this and make your own test you can download my code from here.

In future posts I will write about the relation of this with the equals operator (==) and the importance of equals method when working with persistence frameworks like NHibernate.

¡Soy speaker!

Si. E n la última semana me confirmaron como speaker en dos eventos: Codecamp y Agiles2009.

El Codecamp es un evento organizado por Microsoft que este año será llevado el 26 de septiembre en las instalaciones de la Universidad de Palermo y en el contexto del mismo estaré exponiendo sobre herramientas open source para desarrollo en la plataforma .net.

Por su parte Agiles 2009 es el evento anual de la Comunidad Latinoamericana de Metodologias ágiles que se realizará del 6 al 9 de octubre en Florianópolis (Brasil). En este caso voy a dictar un workshop sobre estimación y planificación.

Finalmente también voy a estar participando del Agile Open Bahia Blanca el 29 de agosto.

Bueno, me esperan unos meses bastante movidos. Nos vemos en algunos de estos eventos, bye!

First days

Well, this is my 4th day here and I feel very comfortable. The environment is much more quiet than what I was used to. During these days I been reading about ISO standards, learning about the organization and working with Entity Framework.

Yesterday while I was working with the Entity Data Model Designer I got an error and my Visual Studio stopped working «forever». As usual I tried reopening it, but no way. Then MatiasW suggested me to open the visual studio command line tool and run «devenv.exe /?» to see if any of the options provides a way to fixed the problem. After two or three shots I got it, «devenv /ResetSkipPkgs» solved my I issue. Now you know: if you have any trouble with Visual Studio, try with devenv options before reinstalling it.

That ‘s all folks!