Smalltalks 2009 conference
November 21st, 2009
During 19, 20 and 21 of November took place in Buenos Aires the 3 rd Argentine Smalltalk Conference. Among many international visitors there were Dan Ingalls (one of Smalltalk’s creators) and Stephane Ducasse (author of the famous book: Squeak By Example, and creator of Pharo).![]()
The conference’s opening was in charge of Hernan Wilkinson, and inmediatly after him, Ducasse gave his session titled: I have a dream…. let’s make it come true. It was a really interesting session where Ducasse shared the vision that lead him to start Pharo project. Other interesting session were James Foster’s Introduction to Gemstone, Smalltalk in the pocket by Esteban Lorenzano (who talk about building applications for the iPhone) and 40 years of Fun with computers by Dan Ingalls. This last session was a review of the main projects Dan participated during his life. He finishes the session showing us his current work at Sun Microsystem developing the Lively Kernel (something VERY interesting I will be writting in short.)
My session was on Friday 20 th and I shared the stage with Carlos Fontela (my Senior Faculty). There were about 50 people!! a number over our expectations. We talked about our experience at FIUBA, teaching object-oriented programming using Smalltalk, Java and agile practices. The slide deck used in the session is available here. And if you want to know more about our sesion I will be writting some more details in my Spanish blog.
Enjoy it!
Object creation review
October 26th, 2009
When working with OO languages we use constructors to instantiate our objects. Constructors should always return a valid instance ready to use, you don’t need to perform any additional task before using the instance. In some occasions an object need some collaborators to perform its work and in that cases you will need to provide a constructor that takes this collaborators as parameters.
The syntax of constructors may vary depending on the language, in C++like languages (Java, C# and others) constructors take the same name of the class. In cases like Object Pascal (the language behind Delphi) you use the keyword constructor to declare constructors. And finally we have Smalltalk-like cases, where you constructors are simply class methods, no special name , no keyword, just call them as you like.
One practice I like when defining constructor is to give them some semantic, this is a very common practice for those who work with Smalltalk but it is not so common for those working with C++ like languages. Many times when I work with C# or Java, I find classes that provide several constructors with different parameters, but is not so clear how this constructors work, of course al of them return a valid instance, but do they perform any additional task? is there any particular property in the create instance? Let’s see an example to illustrate it. Let’s define a person class with first name (mandatory) and last name (optional).
In C# we could have something like this:
public class Person
{
public Person (string firstName) {…}
public Person (string firstName, string lastName) {…}
}
And to use it:
Person aPerson = new Person("John");
Person anotherPerson = new Person("John", "Foo");
In Smalltalk this could be:
Object subclass Person
Person class>>withFirstName: aFirstName.
Person class>>withFirstName: aFirstName andLastName: aLastName.
And we use it this way:
aPerson := Person withFirstName: 'John'.
anotherPerson := Person withFirstName: 'John' andLastName: 'Foo'.
As I said, this practice is very common in Smalltalk, but it can be used with C++like languages, in fact it is recommended by Kent Beck in his book Implementation Patters that is focused on Java. Let’s refactor the C# person class to use this pattern.
public class Person
{
public static Person WithFirstName(string firstName) {...}
public static Person WithFirstNameAndLastName(string firstName, string lastName) {...}
}
( I know, Smalltalk’s ability of merging method name and parameters provides a great user experience that is impossible to emulate with C++ like languages. )
How to replace contents of several files
October 19th, 2009
During the last couple of days I had to replace some words in several text files so I decided to write a Power Shell script to perform this task. Below is the code snippet I used:
$files = get-childitem *.txt
foreach ($file in $files)
{
$content = Get-Content -path $file
$content | foreach {$_ -replace "oldText","newText" } | Set-Content $file
}
Enjoy it!
Agiles 2009, some highlights
October 13th, 2009
During last week, Shaggy, MartinS and I, went to Brazil to attend this conference organized by the Latin-American Conference on Agile Development Methodologies. The three of us were speakers. Ariel presentation was “Agile PMO†(you can find more information in his post after the conference). MartinS talk about “High maturity agile practiceâ€, a very interesting topic for those with experience in agile methods.
I was on charge of a workshop about planning and estimation and I am very pleased with the results, I wrote some more details about this workshop on my Spanish blog.
The keynote speakers were Brain Marick (signer of the agile manifesto), Daina Larsen (president of the Agile Alliance) and Roy Singham (founder and CEO of Thoughtworks). Other important speaker where Joshua Kerievsky (author of Refactoring to Patterns).
The conference were excellent and I could enjoyed it much more than the previous year.
At the end of the conference while of conference committee was doing the retrospective with Diana some friends and I have a talk with Brian Marick. I asked him what were in his opinion the skills a tester should meet to work in an agile team. He answered that there are 3 required skills:
- Be able to understand the business.
- Be able to automate tests, what in most cases requires some programming skills.
- Have a good capacity of doing exploratory testing. In some point this ability could be even more important the 2.
Finally the committee announced that the candidate city for the next conference (agiles 2010) is Lima, Peru.
Here we are (from left to rigth): me, Shaggy and MartinS.
Shaggy recorded our session, so as soon as they be available I will add a reference to them.
Developing Cmdlets for Power Shell
October 2nd, 2009
During the last week I have been working with Iaco in a project about this topic. I found it quite interesting I had some experience in shell scripts but on Linux platform but Power Shell (in honor to its name) seems to be more powerful.
First of all I must say that there are some difference between PS2 and the previous versions, of course that there is backward compatibility, but you must know that PS2 comes with some features that could make your life as a developer much more easy. One of that features is the Windows Power Shell Integrated Scripting Environment, a tool that among other things allow to debug you scripts. Here are some useful resources that helped me:
- If you don’t know anything about Power Shell you can start with this Getting Started Guide.
- Then you can follow with this post by David Aiken were you will find info enough to create your first Cmdlets and also a Visual Studio Project Template to do it.
- Here you will find info about cmdlets concepts like development guidelines, verbs and parameters.
- But before developing your customs cmdlet review this community project to see if what you need already exists.
- Finally an interesting resource to look at is the Power Shell Team Blog
I hope this help you.
After CodeCamp Baires 09
September 29th, 2009
Last Saturday I attended to this important event at Universidad de Palermo where I was speaker together with other 6 southies : (MatiasW, Mr. Salias, Ejadib, BetoO, JohnnyH and DiegoP). I am not sure about how many people attended to the event, but I can say that all the session I went were full.
All the speakers were asked to record their sessions, so I think Microsoft will publish them in the next weeks.
Meanwhile, If you want to know about what I spoke, the slide deck I used for the in my presentation is available to download here.
Dios los cría…
August 31st, 2009
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.
In the picture there are 9 people that were speakers at the forum. Nowadays five of them are working here at Southworks (me included).
7 habits of highly effective people
August 25th, 2009
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!
Claim-based identity (part#2)
August 18th, 2009
Before diving into the ws-* protocols I mentioned in part#1, is important to review two important concerns about exchanging messages over the net:
- How can I be sure that the message I get has not been read or modified along the way?
- 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.
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).
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)
August 17th, 2009
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?
- Geneva server (ADFS)
- Windows Cardspace Geneva (CardSpace)
- Geneva framework (Windows Identity Foundation)
WS-* protocols
- 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.
NicoPaez’s south blog