Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
Discussion 3 - James "Ben" Mitchell
Part One - Question One ("In detail, describe a problem that you experienced in Squeak. ...")
The learning curve in general for Squeak was long for me, but one thing that took a particular amount of getting used to was using a period to end an expression. I'd been advised by students who had already taken the course, "Remember! ALL LINES IN SQUEAK END IN A PERIOD!" Still, it didn't really "hit home" until after I'd missed a few periods and totally broken a method. Because the period is such a small, easy-to-miss character on the screen, they aren't very conspicuous, so it's hard to tell where one is and where one isn't, and they don't catch your eye to remind you to use one from line to line.
That was a problem from day one, and it continues up to today. I was working on a method and using a construct like:
(valueA valueB) ifTrue: [self doSomething]
valueA := valueA + 2.
I forgot the period at the end of line one and was greeted by the friendly (okay, okay, not friendly – frustrating, and very slow to draw) error message box letting me know that the compiler was rather confused.
With C-derived languages, the semicolon is easy to notice and easy to remember. In Squeak, the period is so small and out of the way that I just forget to use it – or accidentally use a semicolon instead. That's been the biggest hurdle to free and easy Squeak programming for me so far. I've gotten better, but the only way I'll really be able to overcome it is with time.
Part Two - Read Other Posts and Pick a Good One
Reading through Peter Kinnaird's Discussion 3 was interesting, because I encountered a "double updating" problem when working on my own TimerWidget. Thinking about Peter's post for a moment, I have to wonder if the variable holding the time in his project was "static" (which I believe corresponds to "class" in Squeak – that particular feature has never been clear to me). If it were, there would be one instance for all instances of the class, and that could cause the confusing updates that he was seeing. I'd be curious to see what the code was that caused the double updates, but that would be my first guess.
Links to this Page