So, as a beginner, I have noted the many things people have told me about Squeak, but one thing is really bugging me, and I can't break free of it. In my experience programming is a linear task, not object-based, so how do I program using Squeak which uses "active objects"? I don't understand.
-- Nathan Lane Home, http://www.nathandelane.com Mirror, http://nathandelane.awardspace.com _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
On Mon, Apr 7, 2008 at 3:01 PM, Nathan Lane <[hidden email]> wrote:
So, as a beginner, I have noted the many things people have told me about Squeak, but one thing is really bugging me, and I can't break free of it. In my experience programming is a linear task, not object-based, so how do I program using Squeak which uses "active objects"? I don't understand. Can you give me an example of a linear task you already 'know" how to program? We have struggled with this as well, and the only way to move forward, I'm afraid, is to pick something and make it work! It would be a nice discussion thread, though, because there is not usually a lot of discussion around the best way to build your domain model. Most questions are "How do make ???? work?" Rob _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Nathan Lane
Welcome Nathan,
What you experienced is (very) common... To program in smalltalk (except gnu smalltalk maybe) you need: - to learn the syntax (this is quick) - then learn to navigate in the code (this was long for me) ---use browser(s) ---find code examples (sender, implementors), find some fonctions (you have to guess the name, hopefully smalltalkers often use explicit name - so you can search messages/method containing words), ---use the debugger (probably the better way to look how the code behave, nothing to guess, just follow the flow...) By the way, have you seen the free book "squeak by example" ? This should be explained (http://www.squeakbyexample.org/) hth, Cédrick _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Rob Rothwell
>
> Can you give me an example of a linear task you already 'know" how to > program? > I think he mean scrolling down a file of 2000 lines of code ;) I was (sort of) used to that. Now I won't go back ! :) _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Nathan Lane
On Mon, Apr 7, 2008 at 12:01 PM, Nathan Lane <[hidden email]> wrote:
So, as a beginner, I have noted the many things people have told me about Squeak, but one thing is really bugging me, and I can't break free of it. In my experience programming is a linear task, not object-based, so how do I program using Squeak which uses "active objects"? I don't understand. I've seen this happen a lot when I see new programmers. They'll write single method programs that simply make library calls or implement (inline) all the functionality they need. My brother took a "learn to program" course in college (in C yuk!) and all his programming assignments looked like this. I *tried* to teach him to look for patterns and to remove dupplication but he never got the hang of it. Writing functions that could be reused was a difficult thing for him to comprehend.
I find that a lot of new programmers learn to program in a procedural style and then continue to apply that style with other languages they use even if they should use a different style. I think that working through an example to show how to think about objects would be very helpful for beginners. I would recommend David West's book, Object Thinking, but a lot of people didn't like the book. I really enjoyed the book but perhaps there are better ways to teach how to think about objects...
--
Edwin _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
You guys are hitting most of my problems. Here's the way I design a new project. First, naturally I find a problem, brainstorm the general solution to the problem, then I work on two separate pieces, the underlying functionality and the user interface, be it text-based or graphical or whatever. After that I will likely compile my first partial version, and test it to see if what I get is what I expected. If not, I'll review the compile/runtime error messages (stack traces) and attempt to remedy the problem. The are other instances in which I have taken on test-based programming, which involves designing the solution, writing unit tests, then writing the code for the unit tests, refactoring, writing more tests, and repeating the process until the solution is complete. I don't understand how these sorts of processes are accomplished in the object-based system called squeak. I understand that there is still source code...to some extent, or maybe always. And I understand the SmallTalk (Squeak) is a managed environment, i.e. it has a runtime environment that handles types, garbage collection, etc.
I've started reading that PDF book, and I can't say that I've learned much yet. I'm also not looking for a short cut or anything. It is simply that up until I encountered Squeak (the past 18 years) I have never dealt with a visual environment that deals with development in the way that Squeak seems to. The only thing that I have ever seen that even compares (in my mind) to Squeak is Sun's Lively Kernel, an even newer innovation than Squeak. So my background is in C/C++, Java, Ruby, C#.Net, Visual Basic (6/.Net), Python, Perl, (X)HTML/CSS/Javascript/XML, PHP, and ASP.Net. How do I take what I know of those programming languages, Agile development process and such, and go forward in learning how to use Squeak? I've heard several people state that they'll "never go back to" those languages. But I'm very certain that like each of those languages, Squeak has it's place in the circle of code, and is useful for some tasks, while other languages are useful for other tasks. So where do I start then? Do I keep going in that free PDF book, Squeak By Example? Does anybody see my difficulty the way I do? Nathan On Mon, Apr 7, 2008 at 1:23 PM, Edwin Castro <[hidden email]> wrote:
-- Nathan Lane Home, http://www.nathandelane.com Mirror, http://nathandelane.awardspace.com _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
I just realized that I need to clarify something else, I don't have difficulty "thinking in objects", I can do that just fine, as Java and C# have both taught me this extensively. I just don't understand how to use Squeak objects to develop a useful program.
On Mon, Apr 7, 2008 at 2:11 PM, Nathan Lane <[hidden email]> wrote: You guys are hitting most of my problems. Here's the way I design a new project. First, naturally I find a problem, brainstorm the general solution to the problem, then I work on two separate pieces, the underlying functionality and the user interface, be it text-based or graphical or whatever. After that I will likely compile my first partial version, and test it to see if what I get is what I expected. If not, I'll review the compile/runtime error messages (stack traces) and attempt to remedy the problem. The are other instances in which I have taken on test-based programming, which involves designing the solution, writing unit tests, then writing the code for the unit tests, refactoring, writing more tests, and repeating the process until the solution is complete. I don't understand how these sorts of processes are accomplished in the object-based system called squeak. I understand that there is still source code...to some extent, or maybe always. And I understand the SmallTalk (Squeak) is a managed environment, i.e. it has a runtime environment that handles types, garbage collection, etc. -- Nathan Lane Home, http://www.nathandelane.com Mirror, http://nathandelane.awardspace.com _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Hi Nathan -
On Mon, Apr 7, 2008 at 9:13 PM, Nathan Lane <[hidden email]> wrote: > I just realized that I need to clarify something else, I don't have > difficulty "thinking in objects", I can do that just fine, as Java and C# > have both taught me this extensively. I just don't understand how to use > Squeak objects to develop a useful program. It sounds like this development tutorial would be very useful to you: http://squeak.preeminent.org/tut2007/html/ I'm new to the Smalltalk development model too, and I've found this tutorial (along with Squeak By Example) fantastically helpful. -- Archie _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Nathan Lane
>... After that I will likely compile my first partial version, and
> test it to see if what I get is what I expected. If not, I'll review the > compile/runtime error messages (stack traces) and attempt to remedy the > problem. In squeak you'll use the debugger for that. This is something I love now. no compile time anymore with breakpoints and friends... > The are other instances in which I have taken on test-based > programming, which involves designing the solution, writing unit tests, then Smalltalk is full of objects... that's the difficulty, no main program as you may be used. No C-like programming. To code you create classes by subclassing Object or a proper one. In squeak by example, there is a quinto game. Did you reach that point ? Also, you could try this tutorial http://www.swa.hpi.uni-potsdam.de/seaside/tutorial. It doesn't use morph (the native squeak UI) but seaside, a web app framework. You'll see how to do a to-do app, store code etc... > writing the code for the unit tests, refactoring, writing more tests, and > repeating the process until the solution is complete. I don't understand how > these sorts of processes are accomplished in the object-based system called > squeak. If I understood correctly, SUnit was invented in Smalltalk. Same, you subclass TestCase... etc... Open TestRunner in the open menu > I understand that there is still source code...to some extent, or > maybe always. And I understand the SmallTalk (Squeak) is a managed > environment, i.e. it has a runtime environment that handles types, garbage > collection, etc. it's more than management IMO. Sources code is the image file (+ source file). This is different of source code because once you open open an image, objects are just resumed and lives ! You can inspect/explore them, modify them, etc... without stopping/recompiling (each time you save a method, it's compiled transparently) > > > > I've started reading that PDF book, and I can't say that I've learned much > yet. I'm also not looking for a short cut or anything. It is simply that up > until I encountered Squeak (the past 18 years) I have never dealt with a > visual environment that deals with development in the way that Squeak seems > to. The only thing that I have ever seen that even compares (in my mind) to > Squeak is Sun's Lively Kernel, an even newer innovation than Squeak. Funny, one of the guy who do that is actually one of the creator of smalltalk :) > background is in C/C++, Java, Ruby, C#.Net, Visual Basic (6/.Net), Python, > Perl, (X)HTML/CSS/Javascript/XML, PHP, and ASP.Net. How do I take what I > know of those programming languages, Agile development process and such, and > go forward in learning how to use Squeak? I guess this will take another dimension ;) > > > > Does anybody see my difficulty the way I do? I thinks lots of people actually do, but it's hard to explain. Image development (a la smalltalk) is fondamentally different. My first impression (especially in squeak) was: "where do I start ?" :) I just hope I didn't say too many mistakes ;) See you, Cédrick ps: you should have a look here too: http://onsmalltalk.com, This is an excellent blog... sure you'll like it. http://onsmalltalk.com/programming/smalltalk/smalltalk-in-action/ http://onsmalltalk.com/programming/smalltalk/a-squeak-smalltalk-development-example/ http://onsmalltalk.com/programming/smalltalk/on-the-smalltalk-browser/ there are plenty actually... look at the tag "programming" http://onsmalltalk.com/category/programming/page/6/ > > > > Nathan > > _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Nathan Lane
Nathan Lane schrieb:
> I just realized that I need to clarify something else, I don't have > difficulty "thinking in objects", I can do that just fine, as Java and > C# have both taught me this extensively. I just don't understand how to > use Squeak objects to develop a useful program. > There are subtle differences between C++, C# and Java objects and Smalltalk objects. Take a copy of Kent Beck's "Smalltalk - Best Practice Patterns" in order to make familiar with good Smalltalk style. This will give you some hints. Smalltalk is a dynamically typed language that makes it different from the C family of languages you already know. And it has an image with "living" objects which makes it different to other dynamic languages like Ruby. This, together with its orthogonality and its tools, make Smalltalk a totally new and advanced system. Alas it takes some time to find this out and many don't realise it all. For me it took some time to accept that such an "old" language is far superior to all "new" languages. Andreas _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Thanks for all of that. It helps to understand where other developers who have used other languages have gone to get help using SmallTalk themselves. As far as dynamically typed languages, probably JavaScript and VisualBasic Script are the two most dynamic I can think of, and I am well versed in JavaScript, and fairly well versed in VisualBasic script. Of course I also mentioned Python and Perl, which while not totally dynamically typed, they are somewhat - I'm thinking now that PHP is also dynamically typed. Anyway, from reading about SmallTalk previous to downloading Squeak I understand that the object base is similar to, though slightly more advanced than Ruby, and since it's dynamically typed, a lot of programming overhead goes away. I will continue reading in Squeak By Example and this tutorial http://squeak.preeminent.org/tut2007/html/ which seem to be putting me in the right direction.
Can anybody answer me this? This Squeak run on top of a SmallTalk runtime environment? Or is is the SmallTalk runtime environment? On Mon, Apr 7, 2008 at 2:52 PM, Andreas Wacknitz <[hidden email]> wrote: Nathan Lane schrieb: -- Nathan Lane Home, http://www.nathandelane.com Mirror, http://nathandelane.awardspace.com _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
> As far as dynamically typed languages, probably JavaScript and VisualBasic
> Script are the two most dynamic I can think of, and I am well versed in > JavaScript, and fairly well versed in VisualBasic script. I think this is not really comparable. > from reading about SmallTalk previous to downloading Squeak I understand Just, it's written Smaltalk ;) > Can anybody answer me this? This Squeak run on top of a SmallTalk runtime > environment? Or is is the SmallTalk runtime environment? *is* squeak is a descendant of Smalltalk-80, a free version... http://en.wikipedia.org/wiki/Squeak Cédrick _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Nathan Lane
Maybe give the original smalltalk-80 blue book a try. There's a scan that is available at the squeak.org documentation page. The book is a marvel of technical exposition. It has quite a bit more code than squeak by example (not just toy code), and an excellent, comprehensive description of ALL the object classes in smalltalk-80. Believe it or not, it's a very readable language description. I think you'll find (or rather, I've found) that Smalltalk is a very subtly but systematically different language than, say, Java, where the OOP concept is only halfway expressed. OOP does not mean 'inheritance, encapsulation, polymorphism', or anything like that: it's live objects exchanging messages, and everything's an object down to the VM. Simpler ideas and stronger metaphors allow you to produce better results faster and more intuitively; this is why Smalltalk's a great language for prototyping, even if the finished product has to be in some other language. You'll catch on after a while; just keep at it. ----- Original Message ---- From: Nathan Lane <[hidden email]> To: A friendly place to get answers to even the most basic questions about Squeak. <[hidden email]> Sent: Monday, April 7, 2008 4:13:21 PM Subject: Re: [Newbies] Misunderstanding Squeak I just realized that I need to clarify something else, I don't have difficulty "thinking in objects", I can do that just fine, as Java and C# have both taught me this extensively. I just don't understand how to use Squeak objects to develop a useful program. On Mon, Apr 7, 2008 at 2:11 PM, Nathan Lane <[hidden email]> wrote: You guys are hitting most of my problems. Here's the way I design a new project. First, naturally I find a problem, brainstorm the general solution to the problem, then I work on two separate pieces, the underlying functionality and the user interface, be it text-based or graphical or whatever. After that I will likely compile my first partial version, and test it to see if what I get is what I expected. If not, I'll review the compile/runtime error messages (stack traces) and attempt to remedy the problem. The are other instances in which I have taken on test-based programming, which involves designing the solution, writing unit tests, then writing the code for the unit tests, refactoring, writing more tests, and repeating the process until the solution is complete. I don't understand how these sorts of processes are accomplished in the object-based system called squeak. I understand that there is still source code...to some extent, or maybe always. And I understand the SmallTalk (Squeak) is a managed environment, i.e. it has a runtime environment that handles types, garbage collection, etc. -- Nathan Lane Home, http://www.nathandelane.com Mirror, http://nathandelane.awardspace.com You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost. _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Nathan Lane
> Can anybody answer me this? This Squeak run on top of a SmallTalk runtime
> environment? Or is is the SmallTalk runtime environment? Squeak is a Smalltalk (note the lowercase t), a direct descendant of Smalltalk 80. Look at Squeak 1.1 and compare it to the Smalltalk 80 as described in the blue book. Some of the objects in the Squeak image were present in that image from the 1980s (though I think they've been converted a couple of times). _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Nathan Lane
On Mon, Apr 07, 2008 at 03:00:25PM -0600, Nathan Lane wrote:
> > Can anybody answer me this? This Squeak run on top of a SmallTalk runtime > environment? Or is is the SmallTalk runtime environment? Yes, and yes. The classic "Back to the Future" paper will give some perspective: http://users.ipa.net/~dwighth/squeak/oopsla_squeak.html Dave _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
I found this book, now updated for Squeak, to be very helpful in explicating the object paradigm of smalltalk.
http://www.amazon.com/Squeak-Quick-ObjectLand-Gene-Korienek/dp/0201731142/ref=sr_1_2?ie=UTF8&s=books&qid=1207621370&sr=8-2 It might seem a wee bit juvenile ,but it was still pretty enlightening. Everyone says that smalltalk (aka Squeak) is all about objects sending messages to objects - for me , I find that a helpful notion. -Russ On Mon, Apr 7, 2008 at 9:20 PM, David T. Lewis <[hidden email]> wrote:
_______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Free forum by Nabble | Edit this page |