Saturday, October 4, 2008

Smalltalk and FreeCAD/Croquet

I’m writing this article not only to fulfill the requirements of the Squeak Organization but also to remind myself how pleasant it is to be programming in Smalltalk. I have always liked computers and always did want to learn programming but never had the opportunity to do it right. There was always the complication factor and other obstacles such as the scarce availability of resources to me but the emergence of the internet age change that. I got serious with programming while doing my pre-u course in college. As with almost everyone else, I started with C and over the years, I did C++, VHDL and Java. Nothing really came out of it until I did my final year project with my mentor Dr. A.S. Koh. I was introduced to the world of Smalltalk and I had a goal which was to create a full fledge CAD system in Croquet and the journey begins.

In my short year of experience with Smalltalk, I find that it has really helped simplify a lot of things that were cumbersome or complicated in the other languages I have learned. The point that Smalltalk is purely object-oriented already makes it’s code more reusable and implementation a lot simpler. For my project, I use the Squeak implementation of Smalltalk and being open source, Squeak has a lot of good and usable classes already incorporated. I just had to work with them to get what I need.

Another thing I like about Smalltalk is the ability to just pass objects around without the need to stick to strict rules for types and all. This has made my working with Smalltalk very easy and reduces the time needed for debugging. I would not even want to think how to do the same things I have done in Squeak in the other languages I have learned. It would be a total mess and I might not have achieved this much in the same time frame.

Besides that, working with the Squeak tools such as the inspector, explorer, class browser, etc.. has been a great experience. It somehow gives me a feeling that the classes and objects actually have some sort of physical form that I can dig in to and understand properly. It saved me a lot of time considering the fact that I did not need to draw diagrams and charts to figure out the structure and flow of my project. It can be done there and then. Speaking of that, the late-binding characteristic of Smalltalk gave me the edge in debugging and testing.
Since this is a short write-up of what Smalltalk did for me, I just highlighted the most important points that came to my mind. Of course, the advantages of Smalltalk is not only limited to the few that I have mentioned. If you are reading this and new to Smalltalk, I would very much like to encourage you to try it out yourself and hopefully, you will feel the same way I do for this beautiful and versatile language.


daliot said...

Smalltalk is my favorite language for those things you said in your post. But I feel Croquet is less Smalltalkish for it being hard to debug when message sends are happening between islands. #futureSend:

Inspector & explorer interislandly seems hard.

I respect you more for working on FreeCAD regardless of the difficulties of Croquet.

daliot said...
This comment has been removed by the author.