I am getting some additional writing help, which is very much appreciated. The introduction has been basically rewritten, and the result is vastly superior. This makes me happy. In addition, I also finished section 5.2.2 in chapter 5. Writing about Conway's Game of Life was quite enjoyable. The draft is now 298 pages long. The book estimate is still at about 450 pages... although I am beginning to suspect that figure will come under pressure soon.
Monday, March 23, 2009
Thursday, March 19, 2009
I have been listening to www.scenemusic.eu lately, and I ran across an incredibly beautiful song by Radix called "I realize". I already liked Tournesol a lot... this is great stuff!
The lyrics are from a poem by Kim Ault, they are read by Melissa Tan, and they go like this.
- If I could gather all the stars and hold them in my hand,
the colors I would then possess would not be half as grand
as those which I have seen when I look deep into your eyes,
or come across when I have kissed your lips, I realize.
If I could ponder all the truths men sought since time began,
they would not teach me more than if I were to touch your hand
For truth to no one you have touched appears as simple lies
And nothing could be truer than your touch, I realize.
If I were given lasting life as only God could do,
I'd shun it all and turn away, if I could live with you.
For even God has never known the immesurable size
Of the love that is within your heart, I realize.
Posted by Andrés at 11:59
Sunday, March 15, 2009
Thursday, March 12, 2009
Everything is going well with the first volume of the Fundamentals book. I am quite happy, writing about the Game of Life and the various applications of polymorphism. I think it's great (and original) material. The draft is now 278 pages, and it is growing quickly. More to come...
Update: 288 pages by Saturday.
Posted by Andrés at 22:46
Wednesday, March 11, 2009
Monday, March 09, 2009
I just found this article about Scratch, which is written in Squeak. Some impressions...
More mass publicity, please :). We should also keep in mind that if the goal of Scratch is for everybody to write computer programs, well... Smalltalk was designed for that to begin with.
Posted by Andrés at 23:05
Saturday, March 07, 2009
So I decided to tackle exercise 3.30 from the Mentoring Course book, which calls for determining whether it is possible to implement Conway's Game of Life without using small integers to run the calculations, and to do so efficiently when compared to an implementation that does use small integers.
Well, I just did. Neither implementations are optimized at all. And yet, the one that uses small integers is (by a few percent) the one that runs slower.
Polymorphism... all polymorphism...
Posted by Andrés at 18:59
James makes the point that design decisions usually have an effect time span that is usually longer than the tenures of the people that make the decisions in the first place. There are two sides, basically: ship it now, or get the design right.
Of course, neither is perfect. To me, what seems to work better stems from accepting you will never get the design right. That is basically a utopia that will just not happen.
That does not mean no thought should be spent on design either. The critical observation is what do you do when you know your design is not perfect. The goal becomes reaching v5.0 and keeping your sanity, not just v1.0 and 50% hair loss.
It is then that you design for flexibility. In practical terms that means design principles such as no isKindOf:, no respondsTo:, no switch statements, no hot methods that every addition to the image wants to modify in incompatible manners, no implementing functionality in a way that paints you in a corner from where you cannot back out, no unloadable code, no writing code in the first person, and using classes to explicitly express what is implicitly meant by a web of ifTrue:ifFalse:.
If the implementation of a piece of functionality needs to be mostly reimplemented due to a small change in requirements, then it was not designed with flexibility in mind and it just represents latent homework for the future --- either a maintenance nightmare or a rewrite from scratch.
With practice, however, the techniques you need to avoid this homework end up costing you less time than a more traditional approach would take you in the first place. This is not magic, it is just a matter of identifying and eliminating deleterious side effects.
Finally, this is also a reason why I think the Fundamentals books are important.
Posted by Andrés at 11:48