Monday, March 31, 2008

What a weekend of writing...

It's almost 2am. I started writing at lunch, and I stopped a while ago. I just can't do it anymore for today. The fundamentals book draft is now 68 pages long. I am getting closer and closer to finishing chapter 2. I am really happy with it so far, as it has given me an opportunity to write about topics I really care about in detail. Hopefully in a few days I will begin chapter 3.

Sunday, March 30, 2008

Hashing coming to a Smalltalk Solutions conference near you!

The presentation "Quality Measurements for Hash Functions" has been accepted at Smalltalk Solutions 2008. It had a great reception at Smalltalks 2007 in Spanish, so I hope it will be enjoyed in English too.

See you in Reno!

Update: the English abstract that was used for this presentation at Smalltalks 2007 is here.

Hash book makes it to Amazon

Oh, look... a new copy of Hashing in Smalltalk: Theory and Practice at Amazon...

Go get it!

Saturday, March 29, 2008

Atencion Smalltalkers en Argentina

Buenas. Aprendi Smalltalk en 1996 estudiando matematica en la UBA. A pesar de que me fui en el 2000, recuerdo bien de donde sali y tambien soy conciente de la situacion en la que se vive por esos lados.

Algo que me pasa con los libros que escribi es que, a pesar de que siento que estan en un precio razonable para un mercado que se mueve en monedas como el dolar o el euro, se muy bien lo que es comprar libros alla. Incluso durante la convertibilidad, me acuerdo que los libros de Knuth por ejemplo estaban bien salados. Otro que me costo carisimo (incluso en dolares) fue uno de compresion de texto.

La realidad es que los salarios alla, particularmente los de quienes estudian, no tienen el poder adquisitivo que (aun) hay en otros paises. Siendo que me forme alla, me parece mal que entre el precio de los libros en monedas fuertes mas el shipping, resulta que mis libros salen una pequeña fortuna en pesos.

Por lo tanto, estoy planeando hacer algo al respecto. De hecho, aparentemente existe un proceso por el cual los libros pueden aparecer alla con un descuento significativo. Esto es en parte gracias a eliminar toda clase de intermediarios poniendo mas tiempo de mi parte, y en parte por decision propia acerca de mi bolsillo.

El mecanismo esta en etapa de debugging, asi que aun hay que ver que sucede. Si todo funciona bien, en aproximadamente un mes podria estar disponible en general.

Por supuesto la definicion de barato no esta exenta de contradicciones o apreciaciones subjetivas, asi que quiza para algunos el precio final siga siendo demasiado. Sin embargo, creo que la reduccion del costo es suficiente como para que los libros sean accesibles.


It's a bird... it's a plane... it's Smalltalks 2008!

So my friend, here is a brief advisory: Smalltalks 2007 was not just one of a kind. In fact, this year's Smalltalks conference in Buenos Aires is ramping up. Start preparing those papers for when the call for participation comes out!

More fundamentals

In another burst of work, 6 pages full of text got written in about 90 minutes tonight. The fundamentals book got to 48 pages, and it's growing quite fast. I will be writing some more in a bit, so it's very likely that it will reach 50 pages soon.

Wednesday, March 26, 2008

Writing progress

As it turns out, I feel enthusiastic about the fundamentals book and thus it's the one that is getting most of the attention these days. I just wrote 7 high quality pages in about 2 hours with a perceived difficulty comparable to that of writing an informal email to a friend. I am happy I didn't lose the practice.

Here's a bit more about the fundamentals book. Right now, it is planned to have 8 chapters. The introduction and chapter 1 are done, and I am currently writing chapter 2. Everything still needs at least one more round of polishing. The draft is 42 pages long.

More to come...

Monday, March 24, 2008

First comment about the books

For some reason I went to check on the books at Lulu, and I found somebody left the following anonymous comment.

It has been a long time since I've learned so much from a book.

His revelation on how to avoid ifTrue:ifFalse: is superb. I've also instantly adopted his use of SUnit for domain object validation. Very, very good

I am very happy that the writing effort has met this kind of appraisal, and that the material is useful as judged by actual readers. Thank you so very much, anonymous reviewer. I really appreciate you taking the time to share how the book was received.

Saturday, March 22, 2008

Smalltalks 2007 - Morphic 3 presentation video

This was super cool. Enjoy the presentation!

Parts 1, 2, 3 and 4, in Spanish.

Here we go again

After I finished the mentoring course book and the hash book, I relaxed a bit and stopped writing. In fact, I've been forgetting what I wrote in those books. Moreover, I've been drawn to reading them as a reader, and more often than not I've been quite (and gladly) surprised by what I read.

For a while, I didn't feel the need to write more. But now it is back, and another book has been added to my to do list. This one is called

Fundamentals of Smalltalk Programming Technique

and it is, in a way, a precursor to the mentoring course book. Hopefully it will be written comparatively quickly... we will see.

Wednesday, March 19, 2008

ColorSync color profile issues

Every so often I noticed that Mac OS X would stop calibrating my monitors right, and that the color profile would be stuck on a generic one. Any attempt to change it would be met by the sound indicating the operation was not allowed. I looked around in the forums, and while I saw several people complain about this problem, I found no answer to it.

Rebooting fixes the issue, and a while ago I also noticed logging off fixes the issue. Then I thought perhaps it had to do with the fact that I have more than one user logged in at the same time. So I did an experiment.

I copied the good color profiles for the monitors (they are in /Library/ColorSync/Profiles/Displays), and assigned a set to each user. I logged off all the users, logged them back in, and voila: no more ColorSync issues.

So here's the bug: ColorSync somehow locks color profile files when a user logs in, and therefore they become unavailable for other users. If other users attempt to use the locked profiles, then ColorSync defaults every user to a "default" so to speak profile, and therefore the displays are uncalibrated for everyone.

I have a feeling there should be a repository of calibration profiles from which ColorSync makes working copies in terms of checking them out as in from a source code repository. While there is the issue of exactly what to do when checking in changes when other users are using the profiles, I still think defaulting all users to a default profile when they try to share a single, properly calibrated profile for the monitors in question is something that could be improved.

Monday, March 17, 2008

Life after Buddy Rich

So I've been studying Buddy Rich's videos, watching them over and over, figuring out exactly what he does and paying attention to every detail. There is much more than what may seem evident at first sight.

And yesterday I saw a live band... and the drummer...

What to say. It's not that he was bad. He wasn't bad. He kept proper tempo, he seemed reasonably skilled for the difficulty of the music. But see that's the problem of becoming familiar with what really accomplished artists can do. While it's great because you become aware of the often subtle details that discriminate the good from the outstanding, the "average" stuff just doesn't cut it anymore precisely because now you can distinguish differences that to you didn't exist before.

A perfect example of this was one time when I made my mom listen to a song I liked, and all of a sudden she asked "the composer is playing the keyboards, right?".

What the... how did she know? Well, she went, since composers usually are not very accomplished players, when they play chords the attack speed of their fingers is not the same across the whole hand. As a result, you can hear individual notes sounding differently or ever so slightly out of synch when they shouldn't. The signs were there, and once you realized that, the conclusion was very likely to be true.

And... darn it... now that I am aware of that, I pick up on such things even if I don't want to. It's as if somebody came over and opened an eye you had always kept closed. You cannot close it back again. It doesn't work like that.

The good side of all this, however, is that although you set the bar higher and higher each time, you also become much more appreciative of excellent work, precisely because you realize more fully the enormous amount of skill, time and effort that goes into accomplishing it. So, while I do not listen to that CD anymore, I do listen to Claudio Arrau play Chopin instead. And, quite frankly, I'd rather skip the former and keep the latter.

A new unimportant accomplishment

On the frivolous accomplishment front, I managed to score 85 goals against the hardest level of Football Champ, with 3 minute games and plenty of significant highscores already recorded in the game.

It may not be immediately clear that 85 is absolutely beyond ridiculous. To give an idea, when I play to do beautiful things (as opposed to scoring the boring, "easy" ways over and over), scoring about 55 in the conditions above is what I'd consider par. As the goal count goes higher, however, things get increasingly harder. When the score gets to 60, it means things went quite well. By 65, it's one of those games in which everything goes my way. Reaching 70 happens only every so often, and anything of that nature can usually be labelled as insane. I've only scored over 80 a few times. And, until recently, never 85.

There are extra difficulty factors thrown in. While still going for nice plays, in one of the first four "easy" games I got mis-synchronized with the machine and scored only 8 or so, and therefore the scoring average for the 6 remaining games is over 12. Oh and by the way, I got to play against England in the 6th game, which is extra hard on top of all of the above.

Nevertheless, I could have scored a few more goals. A couple joystick misses here, a few seconds of not being fully concentrated over there, and a handful of miscalculations of the pixel precise alignment variety thrown in... the usual stuff. The thing is that in most coins, I play like that for a while only. What hardly ever happens is that I manage to be fully concentrated into executing at that level for about an hour. Oh well, perhaps next time I am inspired I'll get to 90.

PS: in case anybody familiar with the game finds this hard to believe, I make recordings of every coin I play.

Sunday, March 16, 2008

Not for me, not for you

You know how it goes... every so often you find somebody whose skill and talent is so beyond anything you could have imagined that it amazes you to no end. For some reason I decided to look up drum solos, and I discovered the life and art of Bernard "Buddy" Rich.


Beyond anything that I could have imagined falls short. He used to get almost 1000 beats per minute, which translates to 8 interlaced beats per second per hand. And not just something boring or uneventful, no no no... rather, full detail at that speed. Don't believe that's possible? Check out the links below, and prepare for your jaw dropping to the floor.

A fantastic solo played in his mid sixties, part 1 and part 2...

At the Hague, age 61...

Playing through a heart attack that nearly killed him... (with some explanation)

Another solo from 1970, even faster... (complete version)

Playing upside down...

There are also youtube videos that play him at half speed, and even then it's amazingly fast and yet precise.

I can't help thinking about what this guy used to do in terms of the pattern of perception, and then it's even more amazing. And... well, it's also incredibly unfair that a life dedicated to making such performances possible is compressed down to video clips just a bare handful of minutes long. So, congratulations to you, Buddy Rich. To you, and the endless hours, days, months and years that you spent perfecting your technique so you could put it to the service of communication through music for us to enjoy after you are gone. Cheers!

PS: do you realize that, even with NTSC's almost 60 frames (fields) per second, there are less than 4 frames (fields) available to record each beat at 16 beats per second?

PS2: here's a video of Buddy explaining why he uses the traditional grip.

Saturday, March 15, 2008

Books now available

I just got the new printing proofs. Everything looks fine, and thus the books are available again.

Since the last post on the subject, I received two more reports of the side notes having been printed partly off the page. I also received positive confirmation of copies being printed as intended. This confirms that this issue is one of tolerances. The updated page layout allows a larger printing alignment miss, and therefore the occasional printing problem should be fixed.

Friday, March 14, 2008

Notes on style

On occasion I have heard that a single style of programming with which everybody complies is a good thing because then code is easier to read and a number of other warm, fuzzy advantages. To that effect, in Opera Anecdotes by Ethan Morden, one finds the following.

A lesson from Sardou

We have already seen Alberto Franchetti expressing doubts about the musical possibilities in Sardou's La Tosca, even when Verdi gave it his recommendation. Oddly, after having taken the libretto away from Franchetti (through their publisher Ricordi, who played on Franchetti's doubts), Puccini himself suffered doubts.

He revealed them to Sardou in Paris. Perhaps a Frenchman should set it, perhaps Tosca is too forceful to suit Puccini's kind of heroine, perhaps Franchetti's fear of it is a warning that others should fear.

Sardou couldn't have disagreed more. Tosca was not a Frenchman - it is a Roman work, and needs italian canto. Moreover, there is no such thing as a "kind of heroine" --- women in love are all the same. As for Franchetti, the very fact that someone else had shown interest in Tosca proves its viability.

Still Puccini hesitated. Even if Tosca is right for opera, is it right for Puccini? Sardou is tense, direct, violent, but Puccini's music is gentle, delicate. Puccini writes in a different style.

"There are no styles, Monsieur Puccini," Sardou thundered. "There is only talent!"

In other words, Monsieur Puccini, forget about style. Everybody has their own, get over it and just do what you are talented at. After all, what are listeners going to say? That Monsieur Puccini's music is bad because he did not write an opera in the style of Joseph Haydn or anybody else whose style we arbitrarily choose as the golden standard?

No. Instead, while we can have our likes or dislikes, I think it's better to recognize that even if we were ultimate composers, we will never compose like Ravel, or Schubert, or Mozart. They are unique and irreplaceable.

Oh but when it comes to code my friend, we do not always have that attitude. Why do we seek to convince ourselves that our subjective style is superior to that of all other developers? Why do we assume it is our duty to behave like art critics who, more often than not, are not creative artists themselves? Why don't we account for the fact that others may have made choices differently than us because they had their own set of unique experiences and decisions to make?

In my opinion, discussing things like style in terms of better/worse wastes time and distracts us from what we really have to do. As long as the problem is not truly beyond subjective judgment, such as having 100 line methods or being tightly coupled in ways that demonstrably make stuff fragile, the best thing to do is to let the work of others be.

Does this mean that we should complain about everybody else's style because it's not ours, only doing so secretly because it's more polite? No, not really. A better answer than that can be found in what happens in truly restrictive development environments. In fact, it is extremely likely that most of the developers told to use a particular style end up using a style which is not their own.

But why should anybody be put into the uncomfortable situation of not being able to do things one thinks are best? Since no style is best, then imposing any particular one is tantamount to accepting a certain degree of uniform badness. Why? Isn't just doing our work hard enough in the first place? And who says what is best? On what grounds?

Instead of all that mess, it's much better to just train yourself into reading any style just as fast as you read your own. There are two huge benefits to this. First, one keeps the mind flexible because of the clearer exposure to how different people think about things. If the first reaction is not rejection on grounds as silly as blocks not being indented "right", it will be easier to learn new things. Second, one does not spend time talking to coworkers about topics as transcendental as whether they put that final period at the end of the method or not --- or even worse: whether you happen to like it or not.

So my friend, on to the bigger fish to fry now.

Monday, March 10, 2008

Margin notes in books

Update 1: the books have been updated at Lulu, and they now carry the date March 11, 2008. The problem described below should be fixed now.

Update 2: I just have a feeling I should make sure the changes I introduced result in proper proofs too. I do not anticipate there should be any problem, but I want to be 100% certain. The books will become available again in a few days.

Update 3: the proofs arrived and everything is fine. The books are available again as of 3/15.

It has just come to my attention that at least one of the physical prints of the books has an issue with side margins. In particular, the first letters of the graffitis appear to have gone beyond the even page edge and are thus not visible.

This is something that was not observed at all in the proof copies of the books. In fact, I was gladly surprised with the quality of the print in terms of page alignment, with all graffitis landing on the same spot regardless of whether they were on page 1 or page 400. I saw this as a clear sign of the age of the computer having come into effect. However, it is now clear that more wiggle room makes computers happier.

So... while it may be an issue for only some of you (I have exactly one report of this), it is definitely something that will not last for long. I will update the books later tonight so that there is more space between the graffiti and the edge of the page. Hopefully this will account for different fudge factors at different printing sites.

I will post again as soon as the books are updated.

For those having books: in the introduction there is a special email address to send feedback to. If you have seen the graffiti printing issue, please let me know so I can characterize it better.

Thursday, March 06, 2008

Software... PC vs Mac

So here I am... I need to make PDF files out of a mixture of text and slides. I have PPT slides I could use, but no PC software that can turn the PPT into a PDF. I go to Acrobat to take a look... perhaps they have a freebie PDF printer.

Wrong. Acrobat 8 standard is $300.

Darn! And that still doesn't fix the problem (and potential nightmare) of having to combine Word and PPT into the same PDF...

So how about iWork for the Mac? Well it comes with Pages (Word), Keynote (PPT), and now Numbers (Excel)... which all may be seen as "simplified" compared to their Microsoft counterparts... and still, for what I need them, they look fantastically prettier than whatever I could do on a PC with a modest amount of effort.

Furthermore... I'd be making the PDF file on the Mac, but later I will need the PPT to use on my PC laptop. Then what? Well, iWork exports PPT and Flash already, so that's pretty good. And if need be, it can even make a DVD with the presentation slides.

Fine. That means I can use iWork to do all that I need to do, and probably even more.

How much is this total package solution? $80.

Really... $80 for the whole thing, or $300 just for Acrobat. Hmmm, let me think...

Interesting times

These are stressful, yet interesting times. In connection with another stressful event, I made the following comment a while back.

Under stress, the inner self flourishes.

And, given these past few months, I think it's completely true. For example, something I've noticed is that store owners get less customers now. What do some of them do? Treat customers letting the stress show. Now, my friend, do you return to places where you are treated stressfully? I don't think so. And this just makes the problem worse, doesn't it?

This is a time when top performance, always necessary, is more than just mandatory. It becomes critical. Interesting times indeed...

So what could be made of Microsoft's behavior towards Yahoo in this light? Or what could be seen in SCO's newest business plan? And how should the unfortunately all too common emotionally violent disagreements in couples due to unresolved tension be interpreted?

After all is said, what defines the true character of a person is what is done. And it is my opinion that we get to see more of the real person when stress prohibits the expenditure of energy in putting up façades to deceive others.

Interesting times, no?

Tuesday, March 04, 2008

Unexpected behavior

Do the following and see what happens:

  1. Create a subclass of nil called Test.
  2. Implement doesNotUnderstand: as ^self.
  3. Evaluate Test new ifTrue: [4] ifFalse: [5].
Did it work? Why, exactly?

Monday, March 03, 2008

Support for books

To those that have purchased the books I just published: thank you so very much for your support! I am amazed and humbled by the amount of generous interest. Thank you thank you thank you!!!

Sunday, March 02, 2008

TV as an addiction

Bill Kerr just posted on the characteristics of addiction, and he highlighted a list of 5 criteria that appear to be necessary for addiction to develop. Let's apply them to TV and see what happens.

  • Availability of the addictive substance: sure, TV is everywhere.
  • Money to acquire the substance: or credit cards, or whatever else.
  • Time to use the substance: without creative hobbies being fostered by our current education, there is plenty of this.
  • Example of use of the substance in the immediate environment: look around. Even TV shows us how to abuse the TV.
  • A permissive ideology in relation to the use of the substance: this one really hurts. Not only this is ok... it is also fine to die because of playing video games in front of a screen. Much worse things than this have also become acceptable as well, and we still do not react.
So, ready to kick the habit my friend? It's much easier than it seems: just stop that cable subscription. As to what to do with the spare time... I am sure there's plenty of things waiting to be done.