Wednesday, November 15. 2006Smalltalk -- Language of the godsTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Nice entry!
I think is true, coding correctly requires more effort and thought. It's more about the artist in us than the plain company programmer, that ask for this seek of perfection in what we do. Perfection make our code beautiful. It also makes it cleaner, more manteinable, more extendable, etc. I don't know if this seek of perfection really pays off in terms of long term productivity. I mean, not everything needs to be extendable or easy to mantein; maybe we won't ever need to change it. But the artist in us, feels sad and empty when we don't follow this dream of perfection. As always it tends to be a matter of equilibrium.
Hi Oscar,
I've written a 60,000 word blog with 26 screen shots that can help a person get up on Smalltalk basics (in Squeak) and how to create a basic page in Seaside (the web framework). You can go right to the Hello World, but then I think you'll need to go back a step or two. Perhaps this could be of use to you. http://www.seasideparasol.com/blog.html Chris Cunnington Toronto
Regarding code sharing, you should check out Monticello, by the way. It does all the merging, etc., that CVS/SVN do, only at the level of Smalltalk methods instead of raw textual operations.
Regarding code updates on a headless server, it's just a matter of putting a little loop somewhere that repeatedly lists a directory and files in any new patches it sees. Regarding images, you are right that they should not be used, e.g., to hold long-term persistent data. I am not sure where people get the idea that they should be; it is a very nice mechanism, but it does not do everything for you. Oh, and regarding the regular expression comment from your last post, you should be sure to open and peruse SqueakMap. There are better regex packages that just are not (for some reason) in the standard image. On your broad comment, I disagree that Smalltalk folks want to require commitment, etc., from its users. On the contrary, it is a very playful environment, where you can play with anything you can see. You just described this yourself, so I do not see how you conclude that it is demanding some sort of perfection. The things I see you running into trouble with are mostly not things that make you a better programmer. It does nothing for you to waste time figuring out how to work with a headless server. Anyway, thanks for posting your notes. If there is one thing I wish people who develop Smalltalk environments would heed from it, it is that the little "couch-potato programmer" things matter.
I programmed for 7 years in Smalltalk and before that did not understand OOP or how to write good OO code, but Smalltalk and its tools forced me to learn how to do that. Now that I am programming in Java, I am realizing my code is not that great. However, then came along IntelliJ which is a great IDE with Refactoring and excellent live programming tips. What I would really like to see, now that the Java world has realized the benefits of refactoring, is a Refactoring Browser like the Smalltalk one that came in most environments created for Smalltak. I really think it was the Smalltalk code browser that forced you to code in methods and keep them concise and organized that made for better code. Also the browser made for excellent source navigation. IntelliJ does not work off the Smalltalk image model, but rather it parses code from files in realtime and creates a naviagational and refactoring environment that you would find in Smalltalk.
So does anyone know of a ST like code browser for Java or Eclipse?
I don't know much about Smalltalk, but being mostly a Python guy myself, I find similarities between the two languages and communities as far as appreciation of elegance, clarity and code beauty goes. My impression though, strengthened somewhat from your post, is the totally different approach they take with respect to "outsiders". Smalltalk reminds me of a snobbish, purist, society, living in its little utopian island, the Holy Image, indifferent or even contemptuous about the real imperfect world. Python OTOH deals with the ugliness by trying to assimilate it and wrap it in a nice-looking wrapping paper. Hence the different VM implementations - CPython, Jython, IronPython - and the dozen or so ways to extend and embed in C/C++/Fortran/what-have-you.
I understand that this metaphor might be totally simplistic and subjective, but I just wanted to share it and know your (and others') take on it.
George,
I find the folks in the Smalltalk community to be among the most warm, welcoming, and inviting folks around. Some of the greatest contributors (including Avi Bryant) are around to answer the most newby questions. That's been my very positive experience with Smalltalk.
From what I've heard from others who have worked with Squeak more than I have, a criticism that could be leveled at it is "purist". Avi Bryant once said it best, that some don't like its approach of trying to be THE environment people work in. He wasn't phased by this though. Squeak functions a lot like its own operating system. Looking at it at the technical level, the Java JVM is not much different. It also takes a "one language to rule them all" approach, even though there have been efforts to graft other languages onto it.
Like the JVM, Squeak has some abilities to interface with other technologies. It can communicate with servers using network protocols, and it has what's called FFI--Foreign Functionality Interface. This allows Squeak to interface with other technologies that are platform-specific, kind of like JNI in Java. From what I have heard FFI is limited by the fact that it's not multithreaded. If two or more processes in a Squeak instance try to access a resource through FFI, it has to be done sequentially. Not so efficient when trying to use this with websites. There have been efforts made to interface Squeak with other development technologies. I know of one, called the Squeak-.Net Bridge, which I believe uses sockets to connect Squeak with the .Net runtime. I think interfacing Squeak with some C++ code would be straightforward using FFI. But C++ calling Squeak code? I dunno how that would work. If Smalltalk seems "snobbish", etc., the community itself is not, from my experience. They have their preference, of course, but I haven't met anyone in it yet who is condescending or stand-offish.
In response to the blog post, I have a friend who kind of laughed in my face recently when I told him I was researching Squeak. He's always been about learning the marketable languages for his next job. He's very practical that way. He's never been about thoroughly learning the language to get the most out of out the way I have. He learns just enough to do the job at hand.
I on the other hand strive for elegance. I believe in using the best tools and techniques for a job. I'm always striving to learn about them so I can use them. I hate doing a half-assed job, though I have pulled some of these off when I've had to in less than ideal situations. The first thing out of my friend's mouth when I met him recently was that he did a lookup of jobs using Squeak (in the U.S.) and didn't find that many. This is true. It'd almost be a miracle to find a want ad for someone with Squeak/Seaside skills here. I understand full well the practical skills needed for finding programming work. What he totally missed though is I didn't start researching this in hopes of finding a job through a want ad. I started into it really out of admiration for Smalltalk. I began the journey earlier with Lisp, really out of an effort to improve my programming skills. In a way I feel like I've gone back to school, even though I'm not paying tuition anywhere. I'm doing this to learn. If by some happenstance I find a job using Squeak or some other Smalltalk implementation, I'll be the happier for it, but I'm not holding my breath for that at this point. Smalltalk jobs exist in the U.S., but they're relatively rare and are not entry level from what I've seen. If nothing else, I'll dabble in Squeak for the enjoyment of it on my own time, while I program for money in something else. I have had thoughts of trying to find an economical way to set up a Seaside web site though. At this point there are no commercial Seaside server providers, so I've been looking for a provider that allows some administrative latitude so I can set it up myself. Another option is to just get a fixed IP, set up my own box and be done with it. I'd prefer to avoid that hassle though.
The Internet Company (http://theinternetco.net/) provide web hosting with GNU Smalltalk and Squeak available.
For a Smalltalk that feels up-to-date, check out Dolphin. Community edition free download. Apps look like normal Windows apps, and if you buy the commercial edition you can generate exes.
|
David PollakCalendar
QuicksearchCategoriesBlog Administration |
|||||||||||||||||||||||||||||||||||||||||||||||||