Monday, December 12, 2005

Small Talk, Small Bricks

Yet Another CS assignment took me until four in the morning to complete. This time I was coding in Smalltalk, and thankfully, it was also the last one I had to do.

Let's talk a bit about Smalltalk, shall we? Its object oriented, and if we are to listen to its fans, it is the best kind of object oriented. The kind where everything in the language is an object, and you have to pass messages to those objects to make them do things. Seems simple enough, and it is, once you've written enough code. What isn't so logical is the seemingly random way in which punctuation (or a lack thereof) is used throughout the code. There you are, trying to understand what's in front of you, and Bang(literally) ! There's an exclamation mark, and you don't know why. Now there are two exlamations. Maybe Smalltalk just gets really excited. Actually, it is used to define the end of functions (or blocks of functions) in a class. Why a '!' of all things? No clue friends.

Then of course we have periods, no periods, parens and pound signs being used for what seems to be no reason at all. Sometimes you need a colon, sometimes you don't. If you are a good coder, you'll figure it all out. Smalltalk will finally make some sense. This is when you remember all the tutorials you looked up where feverish, adamant SmallTalk advocates sung its praises to the heavens, claiming that their language of choice is at the very top of the OOP mountain. Java? Its nothing compared to ST. C and C++? They never mention it! (coincidence? I think not) . If you were to listen to these Smalltalk fans, you'd think there was no reason to code in any other language. They're like die hard Mac fans (no offense) of the programming world. But they're wrong. Oh yes they are.

Smalltalk is an interesting language. It can do a lot of great things that C++ can't. But there are so many ridiculous aspects of the syntax that feel as if they're different for the sake of being so. Having code that reads more like english is great. Obfuscating it with so many oddities isn't. One thing I know about C is that no matter what you're writing, each piece of code generally looks the same, and it just makes sense. Perhaps that is why it is still so popular after so many years.



I also got to play with some old Lego Mindstorms kits for A.I. final project. It reminded me of why I used to love the little bricks when I was a kid; with enough pieces and a big imagination, there is little that you can't do. It also reminded me as to why Lego sales have been horrible in recent years; they forgot the spirit of the company. Legos are all about freedom. Sure you can build the set, but you can also take it apart and make your own. Hell, the instructions even included new ideas on the back cover! These days, however, Lego kits come with so many intricate and specific pieces that aren't meant to be used out of context. Rather than being construction sets, they've become fragile, expensive toys.

There was one more thing I wanted to comment on, and I will, but it will require a seperate post. Its just that big a deal.

No comments: