Login

A Squeak Smalltalk Development Example

Stephan Wessels has put up a very large tutorial showing the complete test driven development of a game in Squeak. It covers quite a few things new Squeakers will want to know such as using SUnit to do test driven development, using Morphic to create Squeak widgets, using the debugger, and packaging the code with Monticello. It's a great tutorial and I'm sure will become a popular resource.

However, despite the awesome effort (which I do appreciate), I have some problems with it. As with many other Squeak tutorials, it makes the mistake of using a standard Squeak image as you'd find on Squeak.org. This only helps further propagate the impression among newbies that Squeak is ugly, old fashioned, and lacking in all the features they expect from a more modern IDE. What you see in the screenshots is not a Squeak I'd use. Plain black code, ugly fonts, no intellisense, no use of the Refactoring Browser, no Shout Workspace.

Most developers who use Squeak would have a plethora of extra tools and utilities installed that make developing a much nicer experience than what you see in this tutorial. Do yourself a favor and start your Squeaking with a real developer's image loaded with all the proper goodies like the SqueakDev image maintained by Damien Cassou.

Squeak.org still hasn't figured out that its core audience should be developers, not children. They don't seem to realize the base image they distribute actually scares away more people than it encourages to join the community. Though they do have a link to Damien's SqueakDev image, they don't encourage it like they do the base image, a mistake that leads new developers to open up Squeak for the first time, browser a tutorial or two, and toss it aside as a silly toy, never having seen the real power or beauty that is Smalltalk.

So all you developers out there using Squeak, please, stop showing people ugly images. Marketing matters, looks matter, and that stuff scares people away. Load up some decent fonts, setup the minimum required goodies like Shout, the Refactoring Browser, and ECompletion. And if you aren't using these goodies, you should be, and you shouldn't be making tutorials without them because it gives people a false impression of what Squeak is. Squeak is an awesome development environment that sadly doesn't come out of the box that way, you have to start with the right box or learn to build your own.

Squeak.org could learn a lot about marketing Squeak by looking at how rubyonrails.org markets Rails. If there's one thing Ruby does vastly better than Smalltalk, it's marketing. Smalltalk continues to languish not because of technical merits, but because of bad marketing. Beaten by Java, and now beaten by Ruby, by marketing alone.

Comments (automatically disabled after 1 year)

Boris Popov 6380 days ago

Amen, brother!

Dominikus 6380 days ago

I'm sorry, but I even couldn't figure out how to upload the above mentioned image in squeak. Any advise? It would be so nice to become a member of the smalltalk gang, but the barrier of entrance is in fact really really high.

D.

Ramon Leon 6380 days ago

You don't upload an image, it's your environment. Think of it like a Word document, Squeak is like Word, the image is your document. Personally, I just associate .image with the Squeak.exe so that double clicking any image opens it up in Squeak. I then name the image after the project I'm using it for, and I use a different image for each project. This forces me to continually share code among images using Monticello thus shaking out any dependency issues I may have and acting as a unit test for my packaging efforts.

Dominikus 6380 days ago

Thanks for the hint, Ramon. I finally gave up loading the image from within squeak, fired up the command shell and typed "Squeak.exe .image", which worked also.

D.

Ramon Leon 6380 days ago

Yes of course, since if you're within Squeak, you're already running in an image.

Piers Cawley 6380 days ago

I'm still stuck with the bitmapped fonts; whenever I load up a true type font in OS X, my method pane start to lose their marbles and I can sometimes end up with the insertion point before the last character I typed. Sticking with the default means it stays usable.

cdrick 6380 days ago

You'll certainly find I'll insist... but I wish we have a web based developer tools (actually more code browsers)! It would be great to "attract" people and geeks developers ;). Of course, once you know that the original (enven in morphic) ide is better and more responsive (whereas it could be discussed in the today situation). I'm having quite hard time playing with omnibrowser to add some goodies (MCZ view for instance as in DuoBrowser)... and I'm really convinced in seaside, it would be easier to experiment some exciting tools especially for viewing, browsing, inspecting code in a cool and attracting way. If nothing done by 2008, I'm promise I'll get into that as I'll have more free time.

Think of a cool and powerful code explorer (in the smalltalk sense...;) ) !

Ramon Leon 6380 days ago

@Piers, I'm curious, have you downloaded and run my image on your Mac? I'm still a windows user so I use Win32 native fonts in my images, but I think they still work on a Mac.

@cdrick, I still use the refactoring browser myself, for the same reasons. OmniBrowser is getting better, but it's not nearly as snappy as the standard browser and its subclasses. But I have faith the OmniBrowser is headed in the right direction and will eventually be the preferred browser.

Geert 6380 days ago

Rails didn't really rely on the marketing of Ruby but is rather just using Ruby. So, why not focus on marketing Seaside with an inviting Seaside image (better looking, no eToys etc ...) which is just based on Squeak? Compare www.rubyonrails.org with www.seaside.st

Ramon Leon 6380 days ago

I'm not saying Rails relied on the marketing of Ruby, I'm saying Rails has great marketing and Squeak can learn from this. Rails doesn't have to sell Ruby like Seaside has to sell Squeak Smalltalk because Ruby isn't that different from other languages, Squeak and Smalltalk are vastly different and worse, Squeak is quite different from other Smalltalks.

Ruby for example, isn't seen as a barrier to entry for Rails, but Squeak is a barrier to entry for Seaside. Seaside however needs much less marketing than Squeak, it's the reason many people even bother looking at Squeak to begin with. If there's any project going on that has a real chance of making Smalltalk more mainstream, it's Seaside.

Geert 6380 days ago

I reckon Seaside - not Squeak - needs the great marketing Rails has. The barrier as we have heard so many times before is the standard fugly, awful usability wise Squeak image. Hence my suggestion to create an inviting Seaside image (better looking, no eToys etc). I agree completely, Seaside IS the main reason people are interested, but they are not interested in Squeak, they are interested in Seaside. How about Seaside Smalltalk? :)

Ramon Leon 6380 days ago

Seaside Smalltalk, now that almost has a nice ring to it. In all honesty, I'm up in the air about such a fork. Forks tend to lose out on the cool new stuff going on in the main branch.

I think Squeak has made tremendous improvements since I began using it with 3.7. I'm really looking forward to 3.10 and 3.11 to see it slimmed down and made more modular and sexy, now's not the time to abandon those efforts.

Squeak rocks as is with nothing more than a little personal tuning and a good base image. As far as I'm concerned, Damiens images are "the" baseline. Who knows what the future holds, I think it's looking pretty bright.

Mel Riffe 6380 days ago

Hi Ramon,

Enjoy the blog!

I'm afraid I share your sentiment about the audience for Squeak. I started by career with DigiTalk's VSE (some 14 yrs ago), so imagine my surprise when I started Squeak.

I would like to setup my MacBook for Smalltalk/Seaside Development. I'm a recent Mac convert too. What are the steps I should follow?

Appreciative of any assistance, Mel Riffe

Ramon Leon 6380 days ago

Just download the basic Mac image and VM and then throw away the image and download Damien's Squeak Dev image. Then fire it up and follow the instructions within. Should get you up and going in no time.

If you want Seaside preinstalled, then download his Squeak Web image instead.

Mel Riffe 6380 days ago

Hey Ramon: You Rock!!

Geert 6380 days ago

Not a fan of a fork either but the standard Squeak image is not what Seaside developers want and it looks like thats not going to change anytime soon. The "Seaside Smalltalk" image would just be a customised, better looking, don't scare new people away Squeak image. Maybe even based on Pavel's MinimalMorphic image?

Rob Evans 6380 days ago

Well, once again you have set the world alight. Very insightful. I could not agree more.

Of course, you've done a great service to use with your screencasts. BTW, I think the value of screen castinging is something that the RoR community really understands. The Smaltalkers of the world ought to take notice.

Happy 4th of July!

Piers Cawley 6380 days ago

@Ramon: Not your image, no. It's the DevImage. I'm not sure what's causing the true type issue, but with Shout + Lucida Console it's very easy to type fast enough to cause confusion. Very annoying.

Damien Cassou 6380 days ago

Thank you Ramon for the advertisement :-).

About OmniBrowser, in the newest squeak-dev image, OmniBrowser has been greatly enhanced: you have multiple views (source, bytecode, prettyprint...), refactorings, less bugs... You can also run your tests pressing ALT+t on a method or a test class. It's getting better and better after each release.

@Piers: have you tried the FreeType Plus package on universe?

[...] des tests unitaires pour implémenter les objets de base au modèle graphique Morphic. Comme Ramon, je regrette juste que Stephan n’a pas utilisé une image développeur comme la version [...] ]]><

bio 6379 days ago

hi !

Thank you for your wonderful blog :)

You talk about the fonts, but how can we add new fonts in Squeak ?

Damien Cassou 6379 days ago

@bio: Use a squeak-dev image as suggested here. Then, in the Universe browser install the FreeType Plus package (http://wiki.squeak.org/squeak/5984). Please email me or the squeak-dev mailing list for more information.

Piers Cawley 6379 days ago

@Ramon: FreeType Plus is documented as being Windows and Linux only and I'm on OS X.

Damien Cassou 6379 days ago

@Piers, FreeType Plus works on MacOSX too.

Dirk 6379 days ago

FreeType plus cant be installed on MacOSX using Universe Browser. Hitting 'install selection' when having marked FreeType Plus | 0.4 selected is a noop. Nothing in the transcript either.

Btw.: whats the difference (and why are there so many different ways) to pull source into an image:

  • load code updates
  • Universe Browser
  • Monticello Browser
  • SqueakMap

Puzzled, Dirk

Ramon Leon 6379 days ago

Load updates is the old update stream, it's how code was distributed prior to Monticello.

Monticello is a version control system and is now the preferred mechanism for sharing and developing code, like CVS.

SqueakMap is a package manager where released code is published. It attempts to gather all code of any format, Monticello packages, fileIns, whatever, just published code. It has no awareness of how well these packages may or may not work together and no awareness of dependencies.

Universe Browser is a new package manager that understands dependencies and attempts to only include packages that are known to work together and only shows packages for particular versions of Squeak. Thus there's a 3.9 Universe, a 3.10 Universe, etc.

So... manage your code with Monticello and publish them to SqueakMap and the Universe.

Philippe Marschall 6379 days ago

We are aware of the suckiness of www.seaside.st (it's not even dogfood). If you are looking for truly minimal image for deployment: Seaside 2.8 will run on the kernel image. The full image with Seasie, Pier and Magritte is about 7 MB. Now compare that to your JEE appserver.

Mark Miller 6379 days ago

I appreciated that Wessels went through the trouble to create an up-to-date tutorial. I noticed a problem early on. When it came time to start explaining how to use the browser he doesn't do a good job. He just shows the menus, but doesn't explain how he got them to come up. So a beginner would get lost quickly. I was about ready to recommend his tutorial on my blog as well, but didn't for this reason.

David Mitchell 6379 days ago

@piers,

I had a similar problem with Universe Browser getting it to load FreeType.

Turned out the problem was I had highlighted 0.4, but I hadn't marked it (needed to do the equivalent of right clicking on the 0.4 text.

Have you usEd the universe browser for anything else? what you are describing sounds more like a UI problem with the universe browser than something wrong wwith freetype

Serge Stinckwich 6379 days ago

@Dirk : i could install FreeType plus with the Universe Browser on mac os X, but some of the fonts look strange in the font menu. @Ramon, Damien : having several methods (and some of them obsolete) is a bit disturbing for newcomers. Maybe Damien could remove the old update stream button in this squeak-dev distribution ?

Damien Cassou 6376 days ago

@Serge: are you talking about the 'load code updates' button in the Squeak flap on the left? If yes, it's not that old :-). It's currently being used to update your image to 3.10 or load the new fixes.

Manfred Schäfer] 6372 days ago

First: Thanks for the image. Second: You're right: I am a Java Developer for some years, looking around for new interesting stuff. Smalltalk looks quite promising. But when i saw Squeak the first time, i was a little bit cooled down. Thanks to your image, i'm feeling better now, thanks. The only thing I really miss is a decent GUI Kit. My focus is on web development, but i would nevertheless appreciate a nice GUI Kit: Please add this to your 'Attract the developer' list.

Ramon Leon 6371 days ago

Will do!

[...] Leon makes some good points about the “out of the box” Squeak UI and I agree that marketing is important. However, like most folk relatively new to Smalltalk/Squeak [...]

 6092 days ago

an even niceer development image to start from (derived from the one by Damien Cassou) is found at Ramon Leon's website at: http://onsmalltalk.com/my-squeak-image/ http://onsmalltalk.com/downloads/DevImage.zip being designed for cross-platform compatibility it doesn't include freetype, which is highly recommended for everyday usage on windows boxes. i guess once can always get rid of the dependency later, first making sure to reset all fonts to squeak bitmapped, but i'm not sure.

about me|good books|popular posts|atom|rss