Thursday, May 31, 2007

Presentations at UNLP last Monday

I was invited to do three presentations at UNLP last Monday. We had a blast --- full rooms, lots of very interesting questions, and a lot of interest as well. I truly hope that the material was useful to those that attended, and the feedback coming from the hosts and organizers indicate that indeed it was. What a great experience!

The visit to UNLP also seems to offer confirmation that extending SUnit a la SUnit VM, with Validation and Benchmarks being examples of extensions, is a useful way to attack problems related to testing. It was almost astonishing to have Andres Fortier get back to me after the last talk and tell me that SUnit Benchmarks was exactly what he needed. We exchanged a number of extremely interesting ideas on the subject, like integration of SUnit Benchmarks and Store.

Interaction is great. Perhaps in our daily jobs we tend to not see it as often, but it is such a powerful mechanism to get from where we are to the next level. I even feel like writing "participation or stagnation --- pick one and only one".

This brings on the fact that I feel a more urgent need to do some tasks related to SUnit Very Much and SUnit Extensions that I had been pushing back for a while... more to come on that department :).

Friday, May 25, 2007

New versions of SUnit VM and SUnit Extensions available!

The SUnit and its Extensions talk spurred SUnit Very Much and SUnit Extensions being ported over to Squeak. The people who are working on this found a couple small problems which have now been fixed.

  • A prerequisite package, ComplexConditions, was missing. Now it is published in the Public Repository, and prerequisites for packages have been updated accordingly.
  • TestResult>>exceptionsToTrap was working by sort of miracle as a composite handler was built with an exception and some integers instead of all exceptions. Silly bug of my own making, sorry! It is now fixed, and a fix compatible with Squeak was chosen so that future ports are easier.

Update: apparently there will be a Dolphin port as well!

Thursday, May 24, 2007


Oh, by the way... farmaceutical labs seem to be reducing their investments in antibiotics because it only takes about 4 years for bacteria to become resistant to them. Therefore, they are investing more in illnesses that do not "suffer" from resistence issues such as Parkinson's or Alzheimer's, and of course into chronic treatment because these provide recurrent sources of revenue.

Somehow, however, this all seems wrong. Not because somebody gets paid for their work on health, nono. Rather, because some of us swiftly rationalize that into "well if you don't have money then too bad stay sick or die because of something stupid". When we do that, we truly value a human life as worth less than some sugar coated pills.

Can we stop this nonsense now, please?

Invitation for this Monday, May 28th!

This coming Monday, May 28th, I will be giving three presentations at UNLP's Facultad de Informatica in La Plata. I am very grateful for the invitation which was generously offered to make this possible --- thank you guys so much! I am sure it will be a great day. The text of the original invitation is below. See you there!

From Esteban Robles Luna:

El lunes 28 de Mayo Andrés Valloud dará tres charlas en la Facultad de Informática de la UNLP:

Lunes 28 de Mayo, 11:00 hs. Un Patrón de Percepción
Lugar: Sala de Posgrado (edificio ex-liceo, 50 y 115, primer piso).

Lunes 28 de Mayo, 15:00 hs. Writing Truly Efficient Smalltalk
Lugar: Sala de Posgrado (edificio ex-liceo, 50 y 115, primer piso).

Lunes 28 de Mayo, 18:00 hs. Heavy Validation.
Lugar: Sala de Conferencias (edificio ex-liceo, 50 y 115, planta baja, al lado de la fotocopiadora).

La entrada es libre y gratuita.

Talks at UBA and UTN

I haven't had much chance to comments on the talks I was invited to give at UBA and UTN until now. Cincom's visit to Argentina has been quite busy, with every single day having appointments even last Saturday. Tomorrow is a holiday here, so now there's a chance to take a moment and reflect on the presentations.

The presentation at UBA regarding SUnit and its extensions last Friday went very well. The room was full with about 30-35 people, and the audience asked really pointed questions and seemed to truly enjoy the material. I really like it when that happens! In addition, the frameworks are being ported over to Squeak. What else could I ask for? It makes me happy that what I did is helpful for others.

Yesterday's presentation at UTN was also very nice. The talk was scheduled in the aula magna, a very large room with a 2nd story balcony and ceiling room to spare --- I'd say it's about 30 feet from the floor. It was also the first time I've given a presentation with a microphone. There were about 40 people, and at the end of A Pattern of Perception many people came over asking for the code. It was really great :).

Today's presentation at UBA also went well. This series of talks is particular in that there's food before the talk, which was very nice. It was also A Pattern of Perception, although the format was different because we had a stricter time limit than at UTN. The attendance was about 20 people, and there were interesting questions regarding how to deal with attractors that have unwanted properties which slip inadvertently.

More of the same, please!

Wednesday, May 23, 2007

Invitation for this Thursday, May 24th!

This coming Thursday, May 24th, I will be giving a presentation called "A Pattern of Perception" at UBA. This is a talk I first gave back in December of 2006, and then at SDSU in February of 2007. It was very well received, so I hope you enjoy it as well.

The time is May 24th at 3:30pm. The location is Room 10 of Building No. 1 at UBA's Ciudad Universitaria. See you there!

Monday, May 21, 2007

Invitation for this Wednesday, May 23rd!

This Wednesday at 7pm I will be giving the presentation "A Pattern of Perception" at UTN (Universidad Tecnologica Nacional). The talk will be given as part of the cycle Seminarios Athena. The address in Buenos Aires is Medrano 951, in the aula magna.

See you there!

Wednesday, May 16, 2007

Invitation for this Friday, May 18th!

I am now in Buenos Aires. It's really nice to see the city and enjoy the things I like about it once more.

One of those things will be UBA, the college where I studied. We were invited to give a talk in the context of an object-oriented programming class this Friday at 7pm. Since UBA is a public university (which besides being very good is also free), anybody that is interested can go.

The location is the No. 1 building of Ciudad Universitaria, room 7. The talk will be about SUnit and how to extend it to match specific purposes --- both in general and in particular, since concrete examples such as SUnit Based Validation and SUnit Benchmarks will be shown.

I am sure it will be a lot of fun, see you there!

Monday, May 14, 2007

Almost at the airport

I am preparing for Cincom's trip to Argentina. How exciting the possibilities, how filled our agenda for the time we will spend in Buenos Aires. See you there soon!

Wednesday, May 09, 2007

Writing again

The last four months have been very busy for me. I could not work on the book at all! However, this has finally changed. I rewrote much of the last pages I had written so that they are more clear, and in the process the draft gained another page. Now it stands at 267 pages. So much to write about... I need to hurry up, otherwise I won't be done by August 1st!

Monday, May 07, 2007

Hash Analysis Tool

I just published a tool that automates hash quality checking. It's in the public repository, and the package is called Hash Analysis Tool. Enjoy!

Sunday, May 06, 2007

STS 2007 Coding Contest Goodies!

Now that the contest is over, I can release the contest files as requested by popular demand. To get them, you need to log into the FTP server below:

In there you will find the qualifiers and finals game servers as follows:
  • Windows .exe file distributions packed with UPX --- aren't they small and shiny? :)
  • Zipped image files and zipped VMs for linux, Mac OS X and Windows.
In addition, the files in the FTP include the instructions for the qualifiers and finals, as well as the original source code for the contest. The package also includes the reference solution I wrote to make sure the servers worked properly. While it is not perfect (for example it does not do any Register X traffic optimizations or delayed slot spilling), it's reasonably decent and quite capable of achieving good scores.


PS: During Cincom's trip to Argentina, the FTP server will not be available.

Saturday, May 05, 2007

SUnit Based Validation now available!

As you may already know, I participated in a Smalltalk Solutions presentation. Most of the talk was given by Leandro Caniglia of Caesar Systems, and it was about the consequences of using a framework I wrote as an extension of SUnit. The framework is SUnit Based Validation.

After the presentation, some people asked for a reference implementation. I am happy to announce that it is now available in the public Store repository.

SUnit Based Validation, as well as SUnit Benchmarks, work on a refactored implementation of SUnit 3.x. Since this SUnit has been used in VM projects, I called it SUnit Very Much (for lack of a better pun, sorry!). SUnit Very Much is meant to be backwards compatible with existing test cases, and as such it should run tests you already have.

The extensions that work on the latest version of the SUnit Very Much bundle are in a bundle called SUnit Extensions. These include a simple test runner, a reference implementation of SUnit Based Validation, and the latest development version of SUnit Benchmarks.

SUnit Benchmarks? Well, yes. Ok I'll spill a teaser. How do you like this in a test selector?...

      itTakesLessThan: anInteger
      messageSendsToEvaluate: aBlock


Friday, May 04, 2007

Practical consequences of Laws of Form

For those of you that have not read Laws of Form, the first axiom (of two) in the book states that

Calling a name once is the same as calling a name twice.

As with some ideas that have profound implications, the consequences of holding the above assertion true are far reaching and unexpected. One of them is the existence of the equivocation, or changing the meaning of a word during an argument or proof. If we allow this to happen, then we violate the axiom above, and this causes the whole chain of deductions to fall apart. How many times have you seen bugs in programs caused by, say, one variable being used for more than one thing? Or a value being interpreted in more than one way?

The second axiom (of two) in the book states that

Crossing a distinction, and then crossing it again, is the same as doing nothing.

And again, this seemingly simplistic statement carries with it the cause of many bugs in software. A possible everyday life interpretation of this could be that, for example, renting a car and then turning around and selling it would cause problems. But I am sure you have seen this happen in code as well: you call a function, but the answer does not go back to the sender because the stack is trashed. Mayhem typically ensues.

Funny things these axioms, eh?

Many statements shown true with one proof

Since I like economy of thought, I will prove the following statements true in a very simple way.

  • You can really do it if you put yourself to it.
  • Life is too short to do everything you want to do.
  • Life is too short to do everything you want to do as well as possible.
So my friend, you get to choose. What is it going to be? A life of everyday things, or something special instead? I cherish those that go through, as Rilke used to say, the boredom of patience to produce a single golden success.

But where's the proof, right? Well, since I mentioned Rilke, he once asked Rodin how were artists supposed to live. Rodin turned around energetically and simply answered "working!". QED.

Bonus video: could you have any more fun?

Wednesday, May 02, 2007

Regarding isKindOf: and respondsTo:

I was going over some code earlier this afternoon, and I thought it was slow for no good reason. I found that Jun3DPoint checks that arguments to messages it receives are of the same kind as the receiver. But since point operations depend on this to decide whether to coerce or not, this means that if you subclass Jun3DPoint and try to perform mixed 3D point arithmetic, you will get coercion every single time even when it's not necessary.

But why would sending isKindOf: like that be a problem? Because in fact, Jun3DPoint reimplemented "sub isKindOf: super" in the wrong order (i.e., super class inheritsFrom: sub class), so the arithmetic got confused further in the presence of multiple classes.

To summarize, the cascade of isKindOf: and respondsTo: that occurred caused severe slowdowns due to performing lots and lots of unnecessary work.

So... respondsTo: is particularly expensive compared to what should typically happen instead: a polymorphic message send. And isKindOf: is particularly expensive compared to what should typically happen instead: an == comparison of species. So I simply deleted Jun3DPoint>>isKindOf: (so it would resort to the one in Object which is correct anyway), implemented species, and replaced a single occurrence of isKindOf: with a send of species, and guess what --- the execution time was cut in half! I have a feeling that even better results could be achieved with a bit more work.

Nothing like a bit of optimization to end the day :).

Now... regarding the Time Profiler...

Smalltalk Solutions 2007 is over

I am sitting at a Starbucks, going over these last days at Smalltalk Solutions. The contest, the GLASS announcement, the presentation I participated in today regarding SUnit Based Validation, and of course the conversations with the extremely clever people I shared time with during the conference.

So much to do, so many projects to bring to life, and so little time to accomplish them all! I wish the day had more than 24 hours. I feel as if I had a 10 year workload. Well... better get to it or otherwise I won't get done anytime soon :).

Stay tuned --- the news are on the way!

Tuesday, May 01, 2007

Coding Contest wrap up

You may have already heard the podcast James posted yesterday. I think it sums up the contest quite well, so I will just add a few bits here that didn't make it to the recording.

An additional complication for the contest finals was that, while in the qualifier round participants had to match symbols exactly (e.g. "Balloon" and "Balloon", or "RightArrow" vs "RightArrow"), the symbols for the finals were rotated in four ways (i.e.: "BalloonStraightUp", "BalloonRotatedRight", "BalloonUpsideDown" and "BalloonRotatedLeft"). The idea was that since one of the computer's registers was faulty, players would have to debug the computer and would thus be directly exposed to rotated symbols. But in the real memory game you can match rotated cards, and so could the computer even though it was not advertised. This was designed to throw an additional monkey wrench into the finalists' players --- in particular, into the part of their program that parses the computer output. In fact, the reference solution I wrote dealt with that by taking out any trailing occurrences of the four rotation suffixes from non-nil register contents.

In my experience, both through participating in last year's contest as well as organizing this year's one, what wins them in this format (qualifiers followed by blitz round) is the ability of participants' programs to withstand change under extreme circumstances. Smalltalk truly shines when it comes to dealing with this kind of situation, and so it will when your business application needs to react quickly. I saw this first hand with Kapital at JP Morgan. This huge application lives in an environment where things change very quickly and lack of flexibility is quantified directly in terms that could not be more clear to understand. I remember the experience fondly, and I wish I could share specifics about the amazing amounts of change Kapital can take without even blinking. It is beyond cool.

Back to more practical matters, the source code for this year's contest, as well as the source code for the reference solution and sample game servers, will be made available after the conference.

Thank you for a great contest everyone!