From denker at iam.unibe.ch Tue Oct 2 10:55:59 2007 From: denker at iam.unibe.ch (Marcus Denker) Date: Tue, 2 Oct 2007 10:55:59 +0200 Subject: [Sbe-discussion] SBE discussion list Message-ID: <3BF70BD1-A1F7-46BD-BAC0-4D3ADC100949@iam.unibe.ch> Hi, The sbe-discussion list is now set up. I have subscribed everyone from the sbe list and the two others interested (Matthew Fulmer and Eric Gillespie) Marcus -- Marcus Denker -- denker at iam.unibe.ch http://www.iam.unibe.ch/~denker From brickviking at gmail.com Wed Oct 3 20:44:58 2007 From: brickviking at gmail.com (viking) Date: Thu, 04 Oct 2007 07:44:58 +1300 Subject: [Sbe-discussion] Re: SBE discussion list References: <3BF70BD1-A1F7-46BD-BAC0-4D3ADC100949@iam.unibe.ch> Message-ID: Marcus Denker writes: > Hi, > > The sbe-discussion list is now set up. I have subscribed everyone > from the sbe list > and the two others interested (Matthew Fulmer and Eric Gillespie) > > Marcus Ah, I see. I thought there would be WAY more people interested. Regards, The Viking From denker at iam.unibe.ch Wed Oct 3 20:49:31 2007 From: denker at iam.unibe.ch (Marcus Denker) Date: Wed, 3 Oct 2007 20:49:31 +0200 Subject: [Sbe-discussion] Re: SBE discussion list In-Reply-To: References: <3BF70BD1-A1F7-46BD-BAC0-4D3ADC100949@iam.unibe.ch> Message-ID: <07C0493C-46E5-43A6-8D27-21FB28A07FB8@iam.unibe.ch> On 03.10.2007, at 20:44, viking wrote: > Marcus Denker writes: > >> Hi, >> >> The sbe-discussion list is now set up. I have subscribed everyone >> from the sbe list >> and the two others interested (Matthew Fulmer and Eric Gillespie) >> >> Marcus > > Ah, I see. I thought there would be WAY more people interested. > Maybe there are... we need to annouce the list to now ;-) Marcus -- Marcus Denker -- denker at iam.unibe.ch http://www.iam.unibe.ch/~denker From oscar at iam.unibe.ch Thu Oct 4 10:04:27 2007 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Thu, 4 Oct 2007 10:04:27 +0200 Subject: [sbe-discussion] Re: [Sbe-discussion] Re: SBE discussion list In-Reply-To: <07C0493C-46E5-43A6-8D27-21FB28A07FB8@iam.unibe.ch> References: <3BF70BD1-A1F7-46BD-BAC0-4D3ADC100949@iam.unibe.ch> <07C0493C-46E5-43A6-8D27-21FB28A07FB8@iam.unibe.ch> Message-ID: <3596E14C-F7AE-42C5-9A2A-ABA0CB855A44@iam.unibe.ch> I added a link to the list on the SBE home page. Marcus, perhaps you could send a message to the newbies list? Oscar On Oct 3, 2007, at 20:49, Marcus Denker wrote: > > On 03.10.2007, at 20:44, viking wrote: > >> Marcus Denker writes: >> >>> Hi, >>> >>> The sbe-discussion list is now set up. I have subscribed everyone >>> from the sbe list >>> and the two others interested (Matthew Fulmer and Eric Gillespie) >>> >>> Marcus >> >> Ah, I see. I thought there would be WAY more people interested. >> > > Maybe there are... we need to annouce the list to now ;-) > > > Marcus > -- > Marcus Denker -- denker at iam.unibe.ch > http://www.iam.unibe.ch/~denker > > > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From denker at iam.unibe.ch Thu Oct 4 10:14:47 2007 From: denker at iam.unibe.ch (Marcus Denker) Date: Thu, 4 Oct 2007 10:14:47 +0200 Subject: [sbe-discussion] Re: [Sbe-discussion] Re: SBE discussion list In-Reply-To: <3596E14C-F7AE-42C5-9A2A-ABA0CB855A44@iam.unibe.ch> References: <3BF70BD1-A1F7-46BD-BAC0-4D3ADC100949@iam.unibe.ch> <07C0493C-46E5-43A6-8D27-21FB28A07FB8@iam.unibe.ch> <3596E14C-F7AE-42C5-9A2A-ABA0CB855A44@iam.unibe.ch> Message-ID: <17A0FAB3-0E4A-4EB1-9433-5A86FD3C1D5E@iam.unibe.ch> On 04.10.2007, at 10:04, Oscar Nierstrasz wrote: > > I added a link to the list on the SBE home page. > > Marcus, perhaps you could send a message to the newbies list? > Ok, I will do that. > Oscar > > On Oct 3, 2007, at 20:49, Marcus Denker wrote: > >> >> On 03.10.2007, at 20:44, viking wrote: >> >>> Marcus Denker writes: >>> >>>> Hi, >>>> >>>> The sbe-discussion list is now set up. I have subscribed everyone >>>> from the sbe list >>>> and the two others interested (Matthew Fulmer and Eric Gillespie) >>>> >>>> Marcus >>> >>> Ah, I see. I thought there would be WAY more people interested. >>> >> >> Maybe there are... we need to annouce the list to now ;-) >> >> >> Marcus >> -- >> Marcus Denker -- denker at iam.unibe.ch >> http://www.iam.unibe.ch/~denker >> >> >> >> _______________________________________________ >> Sbe-discussion mailing list >> Sbe-discussion at iam.unibe.ch >> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion Marcus -- Marcus Denker -- denker at iam.unibe.ch http://www.iam.unibe.ch/~denker From serge.stinckwich at gmail.com Thu Oct 11 09:58:39 2007 From: serge.stinckwich at gmail.com (Serge Stinckwich) Date: Thu, 11 Oct 2007 09:58:39 +0200 Subject: [sbe-discussion] Typo in 2.6 Message-ID: Hi all, In ? 2.6, there is a typo : (Do this by clicking twice on the name of the already-selected class category, or by displaying the definition of SBECell again (by clicking the instance button.) A parenthesis is open and never closed ... And why we need to click twice on the name of the category ? I propose to rewrote the sentence like : Do this by clicking on the name of the already-selected class category, or by displaying the definition of SBECell again (by clicking the instance button.) -- Serge Stinckwich http://doesnotunderstand.free.fr/ From alexandre at bergel.eu Thu Oct 11 10:05:54 2007 From: alexandre at bergel.eu (Alexandre Bergel) Date: Thu, 11 Oct 2007 10:05:54 +0200 Subject: [sbe-discussion] Re: Typo in 2.6 In-Reply-To: References: Message-ID: I am fixing this now. Alexandre On 11 Oct 2007, at 09:58, Serge Stinckwich wrote: > Hi all, > > In ? 2.6, there is a typo : > > (Do this by clicking twice on the name of the already-selected class > category, or by displaying the definition of SBECell again (by > clicking > the instance button.) > > A parenthesis is open and never closed ... > And why we need to click twice on the name of the category ? > > I propose to rewrote the sentence like : > > Do this by clicking on the name of the already-selected class > category, or by displaying the definition of SBECell again (by > clicking > the instance button.) > > -- Serge Stinckwich > http://doesnotunderstand.free.fr/ > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. From alexandre at bergel.eu Thu Oct 11 10:10:35 2007 From: alexandre at bergel.eu (Alexandre Bergel) Date: Thu, 11 Oct 2007 10:10:35 +0200 Subject: [sbe-discussion] Re: Typo in 2.6 In-Reply-To: References: Message-ID: I have removed the first '('. It does not seem to be necessary. Cheers, Alexandre On 11 Oct 2007, at 09:58, Serge Stinckwich wrote: > Hi all, > > In ? 2.6, there is a typo : > > (Do this by clicking twice on the name of the already-selected class > category, or by displaying the definition of SBECell again (by > clicking > the instance button.) > > A parenthesis is open and never closed ... > And why we need to click twice on the name of the category ? > > I propose to rewrote the sentence like : > > Do this by clicking on the name of the already-selected class > category, or by displaying the definition of SBECell again (by > clicking > the instance button.) > > -- Serge Stinckwich > http://doesnotunderstand.free.fr/ > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. From black at cs.pdx.edu Thu Oct 11 10:14:44 2007 From: black at cs.pdx.edu (Andrew P. Black) Date: Thu, 11 Oct 2007 01:14:44 -0700 Subject: [sbe-discussion] Re: Typo in 2.6 In-Reply-To: References: Message-ID: IIRC, you have to click once to de-select the category, and a second time to re-select it. This text was correct at the time that it was written; before anyone changes it, make sure that you are describing the behavior of the same version of the image that the rest of the chapter uses! Saying "click" when you mean "click twice" is just the sort of thing that really confuses newcomers. The missing parenthesis is of course a typo. Andrew On 11 Oct 2007, at 0:58, Serge Stinckwich wrote: > And why we need to click twice on the name of the category ? Professor Andrew P. Black Department of Computer Science Portland State University +1 503 725 2411 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/sbe-discussion/attachments/20071011/66a3d89a/attachment-0001.html From serge.stinckwich at gmail.com Thu Oct 11 11:57:59 2007 From: serge.stinckwich at gmail.com (Serge Stinckwich) Date: Thu, 11 Oct 2007 11:57:59 +0200 Subject: [sbe-discussion] Re: Typo in 2.6 In-Reply-To: References: Message-ID: 2007/10/11, Andrew P. Black : > IIRC, you have to click once to de-select the category, and a second time to > re-select it. > > This text was correct at the time that it was written; before anyone changes > it, make sure that you are describing the behavior of the same version of > the image that the rest of the chapter uses! Saying "click" when you mean > "click twice" is just the sort of thing that really confuses newcomers. I think it's a very usual problem when you have multiple writers in a document ;-) BTW, we are currently working with some other guys, on the french version of SBE. We will report the typos we found on the list. -- Serge Stinckwich http://doesnotunderstand.free.fr/ From mike at mjr104.co.uk Thu Oct 11 22:13:32 2007 From: mike at mjr104.co.uk (Michael Roberts) Date: Thu, 11 Oct 2007 21:13:32 +0100 Subject: [sbe-discussion] How to discuss/offer corrections? Message-ID: Hi, I am enjoying reading through a hard-copy of the book on my commute. I was wondering what the list-etiquette was for suggesting corrections? I have spotted a typo on one page and I was going to check the current repository first before mentioning it. How would you like to receive corrections? I could provide a unix diff perhaps? Or just reference page x etc? Also is it ok to query some of the content? I appreciate that an enormous amount of work has gone into the book so I only want to help. thanks, Mike From oscar at iam.unibe.ch Thu Oct 11 22:18:04 2007 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Thu, 11 Oct 2007 22:18:04 +0200 Subject: [sbe-discussion] Re: How to discuss/offer corrections? In-Reply-To: References: Message-ID: <5A1BCB69-1F2B-4BB3-AFFC-25250C133080@iam.unibe.ch> Hi Mike! Nice to hear from you. Please check the errata file to see if your error has already been dealt with. https://www.iam.unibe.ch/scg/svn_repos/SqueakByExample/Book/errata.txt For the moment there is only one version of the book, so just tell us the page number and the problem (or, better yet, the fix). Someone will update the latex and log the correction in the errata file. What do you mean by "query"? You mean you want to ask us questions? Sure. All feedback is welcome. Cheers, Oscar On Oct 11, 2007, at 22:13, Michael Roberts wrote: > Hi, > > I am enjoying reading through a hard-copy of the book on my commute. > I was wondering what the list-etiquette was for suggesting > corrections? I have spotted a typo on one page and I was going to > check the current repository first before mentioning it. How would > you like to receive corrections? I could provide a unix diff > perhaps? Or just reference page x etc? > > Also is it ok to query some of the content? I appreciate that an > enormous amount of work has gone into the book so I only want to help. > > thanks, > > Mike > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From mike at mjr104.co.uk Thu Oct 11 22:27:32 2007 From: mike at mjr104.co.uk (Michael Roberts) Date: Thu, 11 Oct 2007 21:27:32 +0100 Subject: [sbe-discussion] Re: How to discuss/offer corrections? In-Reply-To: <5A1BCB69-1F2B-4BB3-AFFC-25250C133080@iam.unibe.ch> References: <5A1BCB69-1F2B-4BB3-AFFC-25250C133080@iam.unibe.ch> Message-ID: Ok great! page 86 in the section on class instance variables (which is very nice btw) "However, any subclass would have its own count variable, so subclass instances would would be counted separately." becomes "However, any subclass would have its own count variable, so subclass instances would be counted separately." On the query yes I would like to ask some questions / offer feedback. I will do that in a separate email. cheers, Mike On 11 Oct 2007, at 21:18, Oscar Nierstrasz wrote: > > Hi Mike! > > Nice to hear from you. > > Please check the errata file to see if your error has already been > dealt with. > > https://www.iam.unibe.ch/scg/svn_repos/SqueakByExample/Book/errata.txt > > For the moment there is only one version of the book, so just tell us > the page number and the problem (or, better yet, the fix). Someone > will update the latex and log the correction in the errata file. > > What do you mean by "query"? You mean you want to ask us questions? > Sure. All feedback is welcome. > > Cheers, Oscar > > On Oct 11, 2007, at 22:13, Michael Roberts wrote: > >> Hi, >> >> I am enjoying reading through a hard-copy of the book on my commute. >> I was wondering what the list-etiquette was for suggesting >> corrections? I have spotted a typo on one page and I was going to >> check the current repository first before mentioning it. How would >> you like to receive corrections? I could provide a unix diff >> perhaps? Or just reference page x etc? >> >> Also is it ok to query some of the content? I appreciate that an >> enormous amount of work has gone into the book so I only want to >> help. >> >> thanks, >> >> Mike >> _______________________________________________ >> Sbe-discussion mailing list >> Sbe-discussion at iam.unibe.ch >> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > From mike at mjr104.co.uk Thu Oct 11 22:39:32 2007 From: mike at mjr104.co.uk (Michael Roberts) Date: Thu, 11 Oct 2007 21:39:32 +0100 Subject: [sbe-discussion] "The instance side and the Class side" page 84 Message-ID: <7268CE08-D736-461D-9A2F-A83BBBBE85B4@mjr104.co.uk> At the bottom of page 84 " For this reason, the browser helps you to browse both class and meta- class as if they were a single thing with two "sides": the "" and the "", as shown in Figure 5.1. " I was wondering if we were missing "instance" and "class" inside the empty double quotes? thanks, Mike From mike at mjr104.co.uk Thu Oct 11 22:52:31 2007 From: mike at mjr104.co.uk (Michael Roberts) Date: Thu, 11 Oct 2007 21:52:31 +0100 Subject: [sbe-discussion] Parentheses or not? page 74 Message-ID: <324EBE18-99A6-4E6C-9680-E20A677D3A48@mjr104.co.uk> I have read this page two or three times and I think I realise that it has been written with a fairly strict sense of grammar. Specifically the pattern " The characters [, ], and (, ) delimit " I have to say that when I first read this, I though to myself the characters $[ $, $] $, If I can use the Smalltalk representation to indicate how I parsed the sentence. Its repeated in the box at the bottom of the page. In a way I am learning something new from this book and also dangerous with my existing knowledge so I am not necessarily the correct demographic. As a piece of feedback I did find it very hard to read and imagined that the authors would have already decided to not do "The characters [ ] and ( ) delimit..". I was just interested in the motivation. thanks, Mike From Martial.Boniou at ifrance.com Thu Oct 11 23:39:22 2007 From: Martial.Boniou at ifrance.com (Martial Boniou) Date: Thu, 11 Oct 2007 23:39:22 +0200 Subject: [sbe-discussion] Re: "The instance side and the Class side" page 84 In-Reply-To: <7268CE08-D736-461D-9A2F-A83BBBBE85B4@mjr104.co.uk> References: <7268CE08-D736-461D-9A2F-A83BBBBE85B4@mjr104.co.uk> Message-ID: <20071011213922.GA1249@cendre> Hi to all SBE writers, I localized the mistake by translating the chapter in french, there was a call of \index{}{} in the chapter Model.tex but it is \subindex command. Thanks Michael, -- Martial Michael Roberts a ?crit : | At the bottom of page 84 | | " | For this reason, the browser helps you to browse both class and meta- | class as if they were a single thing with two "sides": the "" and | the "", as shown in Figure 5.1. | " | | I was wondering if we were missing "instance" and "class" inside the | empty double quotes? | | thanks, | | Mike | _______________________________________________ | Sbe-discussion mailing list | Sbe-discussion at iam.unibe.ch | https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From gregory.hinton at gmail.com Fri Oct 12 01:59:48 2007 From: gregory.hinton at gmail.com (Gregory Hinton) Date: Thu, 11 Oct 2007 16:59:48 -0700 Subject: [sbe-discussion] Re: "The instance side and the Class side" page 84 In-Reply-To: <20071011213922.GA1249@cendre> References: <7268CE08-D736-461D-9A2F-A83BBBBE85B4@mjr104.co.uk> <20071011213922.GA1249@cendre> Message-ID: <3A899F4E-119E-43A3-8768-C5FDEBEFEBED@gmail.com> On Oct 11, 2007, at 2:39 PM, Martial Boniou wrote: > I localized the mistake by translating the chapter in french, there > was > a call of \index{}{} in the chapter Model.tex but it is \subindex > command. Will everything I write be error-free if I convert it from English to French? I'm willing to try anything -- even learn an exotic new language -- if you can guarantee the results! ;) All kidding aside, I just received a printed copy of the book and wanted to say how marvelous it is. I ordered it from lulu.com partly because I was fascinated with the concept of "print-on-demand" and wanted to see if the results would be any good. Honestly, I was expecting something fairly amateurish but the print- and manufacturing- quality are excellent! And it only took a week to receive it, which is better in many cases than ordering a "mainstream" book from amazon.com. I'm about halfway through it now and have noticed a few minor typos here and there, but all-in-all it's very well written and I've learned a lot. Great job! Thank you. From alexandre at bergel.eu Fri Oct 12 09:32:58 2007 From: alexandre at bergel.eu (Alexandre Bergel) Date: Fri, 12 Oct 2007 09:32:58 +0200 Subject: [sbe-discussion] Re: How to discuss/offer corrections? In-Reply-To: References: <5A1BCB69-1F2B-4BB3-AFFC-25250C133080@iam.unibe.ch> Message-ID: <4AC9FB67-0AE4-408F-9E59-E7ADED7C9519@bergel.eu> > "However, any subclass would have its own count variable, so subclass > instances would would be counted separately." > becomes > "However, any subclass would have its own count variable, so subclass > instances would be counted separately." It has already been fixed in the .tex it seems. Alexandre > > On 11 Oct 2007, at 21:18, Oscar Nierstrasz wrote: > >> >> Hi Mike! >> >> Nice to hear from you. >> >> Please check the errata file to see if your error has already been >> dealt with. >> >> https://www.iam.unibe.ch/scg/svn_repos/SqueakByExample/Book/ >> errata.txt >> >> For the moment there is only one version of the book, so just tell us >> the page number and the problem (or, better yet, the fix). Someone >> will update the latex and log the correction in the errata file. >> >> What do you mean by "query"? You mean you want to ask us questions? >> Sure. All feedback is welcome. >> >> Cheers, Oscar >> >> On Oct 11, 2007, at 22:13, Michael Roberts wrote: >> >>> Hi, >>> >>> I am enjoying reading through a hard-copy of the book on my commute. >>> I was wondering what the list-etiquette was for suggesting >>> corrections? I have spotted a typo on one page and I was going to >>> check the current repository first before mentioning it. How would >>> you like to receive corrections? I could provide a unix diff >>> perhaps? Or just reference page x etc? >>> >>> Also is it ok to query some of the content? I appreciate that an >>> enormous amount of work has gone into the book so I only want to >>> help. >>> >>> thanks, >>> >>> Mike >>> _______________________________________________ >>> Sbe-discussion mailing list >>> Sbe-discussion at iam.unibe.ch >>> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion >> >> _______________________________________________ >> Sbe-discussion mailing list >> Sbe-discussion at iam.unibe.ch >> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion >> > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. From oscar at iam.unibe.ch Fri Oct 12 11:51:56 2007 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Fri, 12 Oct 2007 11:51:56 +0200 Subject: [sbe-discussion] Re: How to discuss/offer corrections? In-Reply-To: <4AC9FB67-0AE4-408F-9E59-E7ADED7C9519@bergel.eu> References: <5A1BCB69-1F2B-4BB3-AFFC-25250C133080@iam.unibe.ch> <4AC9FB67-0AE4-408F-9E59-E7ADED7C9519@bergel.eu> Message-ID: OK, I have logged it. I guess we should log all corrections, then. Oscar On Oct 12, 2007, at 9:32, Alexandre Bergel wrote: >> "However, any subclass would have its own count variable, so subclass >> instances would would be counted separately." >> becomes >> "However, any subclass would have its own count variable, so subclass >> instances would be counted separately." > > It has already been fixed in the .tex it seems. > > Alexandre > >> >> On 11 Oct 2007, at 21:18, Oscar Nierstrasz wrote: >> >>> >>> Hi Mike! >>> >>> Nice to hear from you. >>> >>> Please check the errata file to see if your error has already been >>> dealt with. >>> >>> https://www.iam.unibe.ch/scg/svn_repos/SqueakByExample/Book/ >>> errata.txt >>> >>> For the moment there is only one version of the book, so just >>> tell us >>> the page number and the problem (or, better yet, the fix). Someone >>> will update the latex and log the correction in the errata file. >>> >>> What do you mean by "query"? You mean you want to ask us questions? >>> Sure. All feedback is welcome. >>> >>> Cheers, Oscar >>> >>> On Oct 11, 2007, at 22:13, Michael Roberts wrote: >>> >>>> Hi, >>>> >>>> I am enjoying reading through a hard-copy of the book on my >>>> commute. >>>> I was wondering what the list-etiquette was for suggesting >>>> corrections? I have spotted a typo on one page and I was going to >>>> check the current repository first before mentioning it. How would >>>> you like to receive corrections? I could provide a unix diff >>>> perhaps? Or just reference page x etc? >>>> >>>> Also is it ok to query some of the content? I appreciate that an >>>> enormous amount of work has gone into the book so I only want to >>>> help. >>>> >>>> thanks, >>>> >>>> Mike >>>> _______________________________________________ >>>> Sbe-discussion mailing list >>>> Sbe-discussion at iam.unibe.ch >>>> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion >>> >>> _______________________________________________ >>> Sbe-discussion mailing list >>> Sbe-discussion at iam.unibe.ch >>> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion >>> >> >> _______________________________________________ >> Sbe-discussion mailing list >> Sbe-discussion at iam.unibe.ch >> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion >> > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From oscar at iam.unibe.ch Fri Oct 12 11:57:32 2007 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Fri, 12 Oct 2007 11:57:32 +0200 Subject: [sbe-discussion] Re: "The instance side and the Class side" page 84 In-Reply-To: <20071011213922.GA1249@cendre> References: <7268CE08-D736-461D-9A2F-A83BBBBE85B4@mjr104.co.uk> <20071011213922.GA1249@cendre> Message-ID: Thanks. I fixed it and logged it. oscar On Oct 11, 2007, at 23:39, Martial Boniou wrote: > Hi to all SBE writers, > > I localized the mistake by translating the chapter in french, there > was > a call of \index{}{} in the chapter Model.tex but it is \subindex > command. > > Thanks Michael, > > -- > Martial > > Michael Roberts a ?crit : > | At the bottom of page 84 > | > | " > | For this reason, the browser helps you to browse both class and > meta- > | class as if they were a single thing with two "sides": the "" and > | the "", as shown in Figure 5.1. > | " > | > | I was wondering if we were missing "instance" and "class" inside the > | empty double quotes? > | > | thanks, > | > | Mike > | _______________________________________________ > | Sbe-discussion mailing list > | Sbe-discussion at iam.unibe.ch > | https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > From oscar at iam.unibe.ch Fri Oct 12 12:01:36 2007 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Fri, 12 Oct 2007 12:01:36 +0200 Subject: [sbe-discussion] Re: "The instance side and the Class side" page 84 In-Reply-To: <3A899F4E-119E-43A3-8768-C5FDEBEFEBED@gmail.com> References: <7268CE08-D736-461D-9A2F-A83BBBBE85B4@mjr104.co.uk> <20071011213922.GA1249@cendre> <3A899F4E-119E-43A3-8768-C5FDEBEFEBED@gmail.com> Message-ID: <42DA0855-D982-489E-8EE8-00A7DBFE591E@iam.unibe.ch> Yes, we are very pleased with the results too. We were able to finalize the book and have the printed copy in our hands ten days later. We can easily update it too. With a regular publisher, the book would be *much* more expensive, and would take at least six months after our final version before we would get a copy. We can also produce a second edition with help from the community within the year. Finally, the book being open source means that we could easily agree to a French translation without any bureaucratic fuss. This definitely seems the way to go, at least for books like this with a fairly well-defined audience. oscar On Oct 12, 2007, at 1:59, Gregory Hinton wrote: > All kidding aside, I just received a printed copy of the book and > wanted to say how marvelous it is. I ordered it from lulu.com partly > because I was fascinated with the concept of "print-on-demand" and > wanted to see if the results would be any good. Honestly, I was > expecting something fairly amateurish but the print- and > manufacturing- quality are excellent! And it only took a week to > receive it, which is better in many cases than ordering a > "mainstream" book from amazon.com. From stephane.ducasse at free.fr Fri Oct 12 08:16:54 2007 From: stephane.ducasse at free.fr (stephane ducasse) Date: Fri, 12 Oct 2007 08:16:54 +0200 Subject: [sbe-discussion] Re: Parentheses or not? page 74 In-Reply-To: <324EBE18-99A6-4E6C-9680-E20A677D3A48@mjr104.co.uk> References: <324EBE18-99A6-4E6C-9680-E20A677D3A48@mjr104.co.uk> Message-ID: <793A1387-4089-4E5C-91BA-4B927DC195EB@free.fr> On 11 oct. 07, at 22:52, Michael Roberts wrote: > I have read this page two or three times and I think I realise that > it has been written with a fairly strict sense of grammar. > > Specifically the pattern > > " > The characters [, ], and (, ) delimit > " > > I have to say that when I first read this, I though to myself the > characters $[ $, $] $, If I can use the Smalltalk representation to > indicate how I parsed the sentence. Its repeated in the box at the > bottom of the page. In a way I am learning something new from this > book and also dangerous with my existing knowledge so I am not > necessarily the correct demographic. > > As a piece of feedback I did find it very hard to read and imagined > that the authors would have already decided to not do "The characters > [ ] and ( ) delimit..". I was just interested in the motivation. The problem was to explain really how messages are assembled especially keyword-based ones. Because foo: stef sincerly: (true finally: stef isCrazy) foo: stef sincerly: [true finally: stef isCrazy] contain two kw messages while foo: stef sincerly: true finally: stef isCrazy ony one kw message > > thanks, > > Mike > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > From mike at mjr104.co.uk Fri Oct 12 21:40:32 2007 From: mike at mjr104.co.uk (Michael Roberts) Date: Fri, 12 Oct 2007 20:40:32 +0100 Subject: [sbe-discussion] Re: Parentheses or not? page 74 In-Reply-To: <793A1387-4089-4E5C-91BA-4B927DC195EB@free.fr> References: <324EBE18-99A6-4E6C-9680-E20A677D3A48@mjr104.co.uk> <793A1387-4089-4E5C-91BA-4B927DC195EB@free.fr> Message-ID: On 12 Oct 2007, at 07:16, stephane ducasse wrote: > > The problem was to explain really how messages are assembled > especially keyword-based ones. > Because > > foo: stef sincerly: (true finally: stef isCrazy) > foo: stef sincerly: [true finally: stef isCrazy] > > contain two kw messages > while > foo: stef sincerly: true finally: stef isCrazy > ony one kw message Hi stef, yes I completely agree. The section does explain that and I understand the motivation. My question was specifically the use of the comma and its effect on the visual flow of the paragraph. Anyway it is not a problem. thanks, Mike From jonathan.hankins at gmail.com Sun Oct 14 17:40:31 2007 From: jonathan.hankins at gmail.com (Jonathan Hankins) Date: Sun, 14 Oct 2007 10:40:31 -0500 Subject: [sbe-discussion] Inconsistent use of hyphens in "SBE-Quinto" name Message-ID: <22750540710140840m58141469k2ef4b108f77ec0c2@mail.gmail.com> Hey, I'm really enjoying working through the book. On p. 30, you create a system category called "SBE-Quinto" (one dash) but subsequently, it is referred to both as "SBE-Quinto" and "SBE--Quinto" (two dashes) in various places. Thanks! -Jonathan Hankins From oscar at iam.unibe.ch Sun Oct 14 22:40:25 2007 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Sun, 14 Oct 2007 22:40:25 +0200 Subject: [sbe-discussion] Re: Inconsistent use of hyphens in "SBE-Quinto" name In-Reply-To: <22750540710140840m58141469k2ef4b108f77ec0c2@mail.gmail.com> References: <22750540710140840m58141469k2ef4b108f77ec0c2@mail.gmail.com> Message-ID: <79BACAEA-E01D-41C5-844F-16319835FEF5@iam.unibe.ch> Bizarre. If you look in the LaTeX source you will find only "SBE-Quinto". It appears that the listings package is translating "-" to "--" (so it will appear as an en-dash rather than a hyphen). This makes the formatted text look better, but makes "SBE-Quinto" appear as "SBE-- Quinto" when you search the PDF. This transformation occurs whenever "SBE-Quinto" occurs within a listings macro. Thanks for pointing this out. Not much we can do about it though. Oscar On Oct 14, 2007, at 17:40, Jonathan Hankins wrote: > Hey, > > I'm really enjoying working through the book. > > On p. 30, you create a system category called "SBE-Quinto" (one dash) > but subsequently, it is referred to both as "SBE-Quinto" and > "SBE--Quinto" (two dashes) in various places. > > Thanks! > > -Jonathan Hankins > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From mathieusuen at yahoo.fr Sun Oct 14 23:39:39 2007 From: mathieusuen at yahoo.fr (Mathieu Suen) Date: Sun, 14 Oct 2007 23:39:39 +0200 Subject: [sbe-discussion] Script for sync 2 Mac Message-ID: <1A104179-3624-45D8-B5A1-2DA507B4EE94@yahoo.fr> Hi, I will get get a new mac from my work and I would like to leave it at work. I would like to know if there is some script to sync the 2 mac. If you use it, is it a efficient way to work? Thanks Mth ___________________________________________________________________________ Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. http://fr.mail.yahoo.com From barry_davis10 at hotmail.com Mon Oct 15 18:43:02 2007 From: barry_davis10 at hotmail.com (Barry Davis) Date: Mon, 15 Oct 2007 18:43:02 +0200 Subject: [sbe-discussion] page 94 / getter setter confusion / page 84 also Message-ID: hi i have a question about a line on page 94: _________________________________________________________________ http://www.live.com/?mkt=nl-nl Live.nl From barry_davis10 at hotmail.com Mon Oct 15 18:43:37 2007 From: barry_davis10 at hotmail.com (Barry Davis) Date: Mon, 15 Oct 2007 18:43:37 +0200 Subject: [sbe-discussion] page 94 / getter setter confusion / page 84 also Message-ID: hi i have a question about a line on page 94: _________________________________________________________________ De mooiste afbeeldingen van Angelina Jolie vind je met Live Search http://search.live.com/images/results.aspx?q=angelina%20jolie&FORM=QBIR From barry_davis10 at hotmail.com Mon Oct 15 18:51:38 2007 From: barry_davis10 at hotmail.com (Barry Davis) Date: Mon, 15 Oct 2007 18:51:38 +0200 Subject: [sbe-discussion] page 94 / getter setter confusion .. again Message-ID: hi i have a question about a line on page 94: "Of course providing setter and getter methods for all the instance variables of an object does is not good object oriented style." i am quite confused by this line, because i do this and can't find information how to get/set a instance variable without a method" till know i follow the next rule: "always access instance variables using two methods only, a get and set pair. All other methods that need to access the instance variable shoud send one of thes two messages to self." but according to page 94 (and also page 84) this is bad object oriented style. question can anybody explain what is the appropriate way / rule how somebody should set/get instance variables. (without methods??) thanks in advance, Barry _________________________________________________________________ Nooit meer offline met Windows Live Messenger op je mobiele telefoon http://www.getlivemobile.nl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/sbe-discussion/attachments/20071015/903c0935/attachment.html From damien.cassou at gmail.com Tue Oct 16 06:57:04 2007 From: damien.cassou at gmail.com (Damien Cassou) Date: Tue, 16 Oct 2007 06:57:04 +0200 Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again In-Reply-To: References: Message-ID: <6ac749c10710152157x51721760q7397713a5208d3b8@mail.gmail.com> Hi Barry, in fact, using getter and setter is the only way to access the instance variables of your object from another object. You can always access your instance variable from your object using its name. What is bad object-oriented style, is to always provide access to your instance variables for the outside. The object should not reveal its internal details. For example, if you have a class PhoneBook which represents a collection of persons, you should not give access to the internal collection. If you do it, you give the user the possibility to bypass your class and to modify the collection directly; this may be a problem if your PhoneBook caches data, update an underlying database... Is that clearer? 2007/10/15, Barry Davis : > > hi i have a question about a line on page 94: > > "Of course providing setter and getter methods for all the instance > variables of an object does is not good object oriented style." > > i am quite confused by this line, because i do this and can't find > information how to get/set a instance variable without a method" > > till know i follow the next rule: > "always access instance variables using two methods only, a get and set > pair. All other methods that need to access the instance variable shoud send > one of thes two messages to self." > > but according to page 94 (and also page 84) this is bad object oriented > style. > > question can anybody explain what is the appropriate way / rule how > somebody should set/get instance variables. (without methods??) > > thanks in advance, > > Barry > > ________________________________ > Pas je zoekresultaten aan op JOUW wensen met Live.nl! Live.nl > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > -- Damien Cassou From barry_davis10 at hotmail.com Tue Oct 16 20:03:56 2007 From: barry_davis10 at hotmail.com (Barry Davis) Date: Tue, 16 Oct 2007 20:03:56 +0200 Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again In-Reply-To: <6ac749c10710152157x51721760q7397713a5208d3b8@mail.gmail.com> References: <6ac749c10710152157x51721760q7397713a5208d3b8@mail.gmail.com> Message-ID: Thanks Damien, for your explanation I now understand Instance variables are used to store data and attributes of instances. They cannot be accessed directly from ***outside*** an object. Instead, an access method must be used [for outside use]. To fully understand this concept i'm now looking for a little example wich explains both concepts to me, so i can see it. Can you explain this concept with the SimpleCounter example, like http://www.iam.unibe.ch/~ducasse/Videos/SqueakH-264Mov/120-TestingSimpleCounter.mov Perhaps this example could be added to the book because i understand this is quite important? Thanks, Barry > Date: Tue, 16 Oct 2007 06:57:04 +0200> From: damien.cassou at gmail.com> To: sbe-discussion at iam.unibe.ch> Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again> > Hi Barry,> > in fact, using getter and setter is the only way to access the> instance variables of your object from another object. You can always> access your instance variable from your object using its name.> > What is bad object-oriented style, is to always provide access to your> instance variables for the outside. The object should not reveal its> internal details. For example, if you have a class PhoneBook which> represents a collection of persons, you should not give access to the> internal collection. If you do it, you give the user the possibility> to bypass your class and to modify the collection directly; this may> be a problem if your PhoneBook caches data, update an underlying> database...> > Is that clearer?> > 2007/10/15, Barry Davis :> >> > hi i have a question about a line on page 94:> >> > "Of course providing setter and getter methods for all the instance> > variables of an object does is not good object oriented style."> >> > i am quite confused by this line, because i do this and can't find> > information how to get/set a instance variable without a method"> >> > till know i follow the next rule:> > "always access instance variables using two methods only, a get and set> > pair. All other methods that need to access the instance variable shoud send> > one of thes two messages to self."> >> > but according to page 94 (and also page 84) this is bad object oriented> > style.> >> > question can anybody explain what is the appropriate way / rule how> > somebody should set/get instance variables. (without methods??)> >> > thanks in advance,> >> > Barry> >> > ________________________________> > Pas je zoekresultaten aan op JOUW wensen met Live.nl! Live.nl> > _______________________________________________> > Sbe-discussion mailing list> > Sbe-discussion at iam.unibe.ch> > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion> >> >> > > -- > Damien Cassou> _______________________________________________> Sbe-discussion mailing list> Sbe-discussion at iam.unibe.ch> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion _________________________________________________________________ Live.nl: je eigen persoonlijk startpagina met nieuws en feeds die JIJ belangrijk vindt! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/sbe-discussion/attachments/20071016/50d36ab3/attachment.html From barry_davis10 at hotmail.com Tue Oct 16 20:30:26 2007 From: barry_davis10 at hotmail.com (Barry Davis) Date: Tue, 16 Oct 2007 20:30:26 +0200 Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again In-Reply-To: References: <6ac749c10710152157x51721760q7397713a5208d3b8@mail.gmail.com> Message-ID: The right url of the SimpleCounter example is actually http://www.iam.unibe.ch/~ducasse/Videos/SqueakH-264Mov/103-AddingGetterAccessor.mov Actually i'm still not sure how i could get/set the instance variable directly from using it's name, is this possible in the SimpleCounter example?? Barry From: barry_davis10 at hotmail.comTo: sbe-discussion at iam.unibe.chDate: Tue, 16 Oct 2007 20:03:56 +0200Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again Thanks Damien, for your explanation I now understand Instance variables are used to store data and attributes of instances. They cannot be accessed directly from ***outside*** an object. Instead, an access method must be used [for outside use]. To fully understand this concept i'm now looking for a little example wich explains both concepts to me, so i can see it. Can you explain this concept with the SimpleCounter example, like http://www.iam.unibe.ch/~ducasse/Videos/SqueakH-264Mov/120-TestingSimpleCounter.mov Perhaps this example could be added to the book because i understand this is quite important? Thanks, Barry > Date: Tue, 16 Oct 2007 06:57:04 +0200> From: damien.cassou at gmail.com> To: sbe-discussion at iam.unibe.ch> Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again> > Hi Barry,> > in fact, using getter and setter is the only way to access the> instance variables of your object from another object. You can always> access your instance variable from your object using its name.> > What is bad object-oriented style, is to always provide access to your> instance variables for the outside. The object should not reveal its> internal details. For example, if you have a class PhoneBook which> represents a collection of persons, you should not give access to the> internal collection. If you do it, you give the user the possibility> to bypass your class and to modify the collection directly; this may> be a problem if your PhoneBook caches data, update an underlying> database...> > Is that clearer?> > 2007/10/15, Barry Davis :> >> > hi i have a question about a line on page 94:> >> > "Of course providing setter and getter methods for all the instance> > variables of an object does is not good object oriented style."> >> > i am quite confused by this line, because i do this and can't find> > information how to get/set a instance variable without a method"> >> > till know i follow the next rule:> > "always access instance variables using two methods only, a get and set> > pair. All other methods that need to access the instance variable shoud send> > one of thes two messages to self."> >> > but according to page 94 (and also page 84) this is bad object oriented> > style.> >> > question can anybody explain what is the appropriate way / rule how> > somebody should set/get instance variables. (without methods??)> >> > thanks in advance,> >> > Barry> >> > ________________________________> > Pas je zoekresultaten aan op JOUW wensen met Live.nl! Live.nl> > _______________________________________________> > Sbe-discussion mailing list> > Sbe-discussion at iam.unibe.ch> > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion> >> >> > > -- > Damien Cassou> _______________________________________________> Sbe-discussion mailing list> Sbe-discussion at iam.unibe.ch> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion Publiceer JOUW leven online met Windows Live Spaces: weblog, foto, video en muziek! Het is gratis! Het is gratis! _________________________________________________________________ Live.nl: je eigen persoonlijk startpagina met nieuws en feeds die JIJ belangrijk vindt! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/sbe-discussion/attachments/20071016/bf9c747e/attachment-0001.html From damien.cassou at gmail.com Wed Oct 17 12:48:18 2007 From: damien.cassou at gmail.com (Damien Cassou) Date: Wed, 17 Oct 2007 12:48:18 +0200 Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again In-Reply-To: References: <6ac749c10710152157x51721760q7397713a5208d3b8@mail.gmail.com> Message-ID: <6ac749c10710170348o48ce30b4ve492b0f686ca04ac@mail.gmail.com> Hi Barry, in SimpleCounter, you have an instance variable named value and a read accessor (getter) named #value. There are only two ways of modifying the value from the outside: using #increase or #decrease. From outside, you can't assign 3 to the counter for example. You have to use #increase 3 times. I SimpleCounter had provided a #value: method to modify the value of the counter directly, it wouldn't had been a counter anymore; this is because adding the method #value: let any user put any value directly in the counter. Then, the counter is not a counter anymore. Is that clearer? 2007/10/16, Barry Davis : > > Thanks Damien, for your explanation > > I now understand Instance variables are used to store data and attributes > of instances. They cannot be accessed directly from ***outside*** an object. > Instead, an access method must be used [for outside use]. > > To fully understand this concept i'm now looking for a little example wich > explains both concepts to me, so i can see it. > > Can you explain this concept with the SimpleCounter example, like > http://www.iam.unibe.ch/~ducasse/Videos/SqueakH-264Mov/120-TestingSimpleCounter.mov > > Perhaps this example could be added to the book because i understand this > is quite important? > > Thanks, > > Barry > > > > > Date: Tue, 16 Oct 2007 06:57:04 +0200 > > From: damien.cassou at gmail.com > > To: sbe-discussion at iam.unibe.ch > > Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again > > > > > Hi Barry, > > > > in fact, using getter and setter is the only way to access the > > instance variables of your object from another object. You can always > > access your instance variable from your object using its name. > > > > What is bad object-oriented style, is to always provide access to your > > instance variables for the outside. The object should not reveal its > > internal details. For example, if you have a class PhoneBook which > > represents a collection of persons, you should not give access to the > > internal collection. If you do it, you give the user the possibility > > to bypass your class and to modify the collection directly; this may > > be a problem if your PhoneBook caches data, update an underlying > > database... > > > > Is that clearer? > > > > 2007/10/15, Barry Davis : > > > > > > hi i have a question about a line on page 94: > > > > > > "Of course providing setter and getter methods for all the instance > > > variables of an object does is not good object oriented style." > > > > > > i am quite confused by this line, because i do this and can't find > > > information how to get/set a instance variable without a method" > > > > > > till know i follow the next rule: > > > "always access instance variables using two methods only, a get and set > > > pair. All other methods that need to access the instance variable shoud > send > > > one of thes two messages to self." > > > > > > but according to page 94 (and also page 84) this is bad object oriented > > > style. > > > > > > question can anybody explain what is the appropriate way / rule how > > > somebody should set/get instance variables. (without methods??) > > > > > > thanks in advance, > > > > > > Barry > > > > > > ________________________________ > > > Pas je zoekresultaten aan op JOUW wensen met Live.nl! Live.nl > > > _______________________________________________ > > > Sbe-discussion mailing list > > > Sbe-discussion at iam.unibe.ch > > > > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > > > > > > > > > > > -- > > Damien Cassou > > _______________________________________________ > > Sbe-discussion mailing list > > Sbe-discussion at iam.unibe.ch > > > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > > ________________________________ > Publiceer JOUW leven online met Windows Live Spaces: weblog, foto, video en > muziek! Het is gratis! Het is gratis! > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > -- Damien Cassou From barry_davis10 at hotmail.com Wed Oct 17 19:45:53 2007 From: barry_davis10 at hotmail.com (Barry Davis) Date: Wed, 17 Oct 2007 19:45:53 +0200 Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again In-Reply-To: <6ac749c10710170348o48ce30b4ve492b0f686ca04ac@mail.gmail.com> References: <6ac749c10710152157x51721760q7397713a5208d3b8@mail.gmail.com> <6ac749c10710170348o48ce30b4ve492b0f686ca04ac@mail.gmail.com> Message-ID: Thanks Damien, I understand the sentence in the book now almost! "Of course providing setter and getter methods for all the instancevariables of an object does is not good object oriented style." a) I was wondering in wich case a getter method would not be ok? I understand now a setter method could be "dangerous" b) I was wondering how " you can always access your instance variable from your object using its name. " i searched half the internet how to do this, but i don't know what to type in my workspace to make this work. How could i for example direct access the value of SimpleCounter? Thanks in avance for learning me this important concept, Much appreciated!! Barry You can always> > access your instance variable from your object using its name. > Date: Wed, 17 Oct 2007 12:48:18 +0200> From: damien.cassou at gmail.com> To: sbe-discussion at iam.unibe.ch> Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again> > Hi Barry,> > in SimpleCounter, you have an instance variable named value and a read> accessor (getter) named #value. There are only two ways of modifying> the value from the outside: using #increase or #decrease. From> outside, you can't assign 3 to the counter for example. You have to> use #increase 3 times.> > I SimpleCounter had provided a #value: method to modify the value of> the counter directly, it wouldn't had been a counter anymore; this is> because adding the method #value: let any user put any value directly> in the counter. Then, the counter is not a counter anymore.> > Is that clearer?> > 2007/10/16, Barry Davis :> >> > Thanks Damien, for your explanation> >> > I now understand Instance variables are used to store data and attributes> > of instances. They cannot be accessed directly from ***outside*** an object.> > Instead, an access method must be used [for outside use].> >> > To fully understand this concept i'm now looking for a little example wich> > explains both concepts to me, so i can see it.> >> > Can you explain this concept with the SimpleCounter example, like> > http://www.iam.unibe.ch/~ducasse/Videos/SqueakH-264Mov/120-TestingSimpleCounter.mov> >> > Perhaps this example could be added to the book because i understand this> > is quite important?> >> > Thanks,> >> > Barry> >> >> >> > > Date: Tue, 16 Oct 2007 06:57:04 +0200> > > From: damien.cassou at gmail.com> > > To: sbe-discussion at iam.unibe.ch> > > Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again> >> > >> > > Hi Barry,> > >> > > in fact, using getter and setter is the only way to access the> > > instance variables of your object from another object. You can always> > > access your instance variable from your object using its name.> > >> > > What is bad object-oriented style, is to always provide access to your> > > instance variables for the outside. The object should not reveal its> > > internal details. For example, if you have a class PhoneBook which> > > represents a collection of persons, you should not give access to the> > > internal collection. If you do it, you give the user the possibility> > > to bypass your class and to modify the collection directly; this may> > > be a problem if your PhoneBook caches data, update an underlying> > > database...> > >> > > Is that clearer?> > >> > > 2007/10/15, Barry Davis :> > > >> > > > hi i have a question about a line on page 94:> > > >> > > > "Of course providing setter and getter methods for all the instance> > > > variables of an object does is not good object oriented style."> > > >> > > > i am quite confused by this line, because i do this and can't find> > > > information how to get/set a instance variable without a method"> > > >> > > > till know i follow the next rule:> > > > "always access instance variables using two methods only, a get and set> > > > pair. All other methods that need to access the instance variable shoud> > send> > > > one of thes two messages to self."> > > >> > > > but according to page 94 (and also page 84) this is bad object oriented> > > > style.> > > >> > > > question can anybody explain what is the appropriate way / rule how> > > > somebody should set/get instance variables. (without methods??)> > > >> > > > thanks in advance,> > > >> > > > Barry> > > >> > > > ________________________________> > > > Pas je zoekresultaten aan op JOUW wensen met Live.nl! Live.nl> > > > _______________________________________________> > > > Sbe-discussion mailing list> > > > Sbe-discussion at iam.unibe.ch> > > >> > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion> > > >> > > >> > >> > >> > > --> > > Damien Cassou> > > _______________________________________________> > > Sbe-discussion mailing list> > > Sbe-discussion at iam.unibe.ch> > >> > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion> >> >> > ________________________________> > Publiceer JOUW leven online met Windows Live Spaces: weblog, foto, video en> > muziek! Het is gratis! Het is gratis!> > _______________________________________________> > Sbe-discussion mailing list> > Sbe-discussion at iam.unibe.ch> > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion> >> >> > > -- > Damien Cassou> _______________________________________________> Sbe-discussion mailing list> Sbe-discussion at iam.unibe.ch> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion _________________________________________________________________ De mooiste afbeeldingen van Angelina Jolie vind je met Live Search http://search.live.com/images/results.aspx?q=angelina%20jolie&FORM=QBIR -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/sbe-discussion/attachments/20071017/a2d01df0/attachment.html From barry_davis10 at hotmail.com Wed Oct 17 20:05:49 2007 From: barry_davis10 at hotmail.com (Barry Davis) Date: Wed, 17 Oct 2007 20:05:49 +0200 Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again In-Reply-To: References: <6ac749c10710152157x51721760q7397713a5208d3b8@mail.gmail.com> <6ac749c10710170348o48ce30b4ve492b0f686ca04ac@mail.gmail.com> Message-ID: To make my problem clearer i'm trying in workspace the follow code: \\\\\\\\\\\\\\\\ x := Counter new. ?? ?? how can i set the value directy, i.e. without a set method?? \\\\\\\\\\\\\\\\\\ is this possible? From: barry_davis10 at hotmail.comTo: sbe-discussion at iam.unibe.chDate: Wed, 17 Oct 2007 19:45:53 +0200Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again Thanks Damien, I understand the sentence in the book now almost! "Of course providing setter and getter methods for all the instancevariables of an object does is not good object oriented style." a) I was wondering in wich case a getter method would not be ok? I understand now a setter method could be "dangerous" b) I was wondering how " you can always access your instance variable from your object using its name. " i searched half the internet how to do this, but i don't know what to type in my workspace to make this work. How could i for example direct access the value of SimpleCounter? Thanks in avance for learning me this important concept, Much appreciated!! Barry You can always> > access your instance variable from your object using its name. > Date: Wed, 17 Oct 2007 12:48:18 +0200> From: damien.cassou at gmail.com> To: sbe-discussion at iam.unibe.ch> Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again> > Hi Barry,> > in SimpleCounter, you have an instance variable named value and a read> accessor (getter) named #value. There are only two ways of modifying> the value from the outside: using #increase or #decrease. From> outside, you can't assign 3 to the counter for example. You have to> use #increase 3 times.> > I SimpleCounter had provided a #value: method to modify the value of> the counter directly, it wouldn't had been a counter anymore; this is> because adding the method #value: let any user put any value directly> in the counter. Then, the counter is not a counter anymore.> > Is that clearer?> > 2007/10/16, Barry Davis :> >> > Thanks Damien, for your explanation> >> > I now understand Instance variables are used to store data and attributes> > of instances. They cannot be accessed directly from ***outside*** an object.> > Instead, an access method must be used [for outside use].> >> > To fully understand this concept i'm now looking for a little example wich> > explains both concepts to me, so i can see it.> >> > Can you explain this concept with the SimpleCounter example, like> > http://www.iam.unibe.ch/~ducasse/Videos/SqueakH-264Mov/120-TestingSimpleCounter.mov> >> > Perhaps this example could be added to the book because i understand this> > is quite important?> >> > Thanks,> >> > Barry> >> >> >> > > Date: Tue, 16 Oct 2007 06:57:04 +0200> > > From: damien.cassou at gmail.com> > > To: sbe-discussion at iam.unibe.ch> > > Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again> >> > >> > > Hi Barry,> > >> > > in fact, using getter and setter is the only way to access the> > > instance variables of your object from another object. You can always> > > access your instance variable from your object using its name.> > >> > > What is bad object-oriented style, is to always provide access to your> > > instance variables for the outside. The object should not reveal its> > > internal details. For example, if you have a class PhoneBook which> > > represents a collection of persons, you should not give access to the> > > internal collection. If you do it, you give the user the possibility> > > to bypass your class and to modify the collection directly; this may> > > be a problem if your PhoneBook caches data, update an underlying> > > database...> > >> > > Is that clearer?> > >> > > 2007/10/15, Barry Davis :> > > >> > > > hi i have a question about a line on page 94:> > > >> > > > "Of course providing setter and getter methods for all the instance> > > > variables of an object does is not good object oriented style."> > > >> > > > i am quite confused by this line, because i do this and can't find> > > > information how to get/set a instance variable without a method"> > > >> > > > till know i follow the next rule:> > > > "always access instance variables using two methods only, a get and set> > > > pair. All other methods that need to access the instance variable shoud> > send> > > > one of thes two messages to self."> > > >> > > > but according to page 94 (and also page 84) this is bad object oriented> > > > style.> > > >> > > > question can anybody explain what is the appropriate way / rule how> > > > somebody should set/get instance variables. (without methods??)> > > >> > > > thanks in advance,> > > >> > > > Barry> > > >> > > > ________________________________> > > > Pas je zoekresultaten aan op JOUW wensen met Live.nl! Live.nl> > > > _______________________________________________> > > > Sbe-discussion mailing list> > > > Sbe-discussion at iam.unibe.ch> > > >> > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion> > > >> > > >> > >> > >> > > --> > > Damien Cassou> > > _______________________________________________> > > Sbe-discussion mailing list> > > Sbe-discussion at iam.unibe.ch> > >> > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion> >> >> > ________________________________> > Publiceer JOUW leven online met Windows Live Spaces: weblog, foto, video en> > muziek! Het is gratis! Het is gratis!> > _______________________________________________> > Sbe-discussion mailing list> > Sbe-discussion at iam.unibe.ch> > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion> >> >> > > -- > Damien Cassou> _______________________________________________> Sbe-discussion mailing list> Sbe-discussion at iam.unibe.ch> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion Windows Live Mail: Nu 2gb aan opslag - dat zijn maar liefst 1000 foto's - en nog steeds gratis! Windows Live Mail _________________________________________________________________ De mooiste afbeeldingen van Angelina Jolie vind je met Live Search http://search.live.com/images/results.aspx?q=angelina%20jolie&FORM=QBIR -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/sbe-discussion/attachments/20071017/b2ab5ec4/attachment-0001.html From oscar at iam.unibe.ch Wed Oct 17 20:15:39 2007 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Wed, 17 Oct 2007 20:15:39 +0200 Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again In-Reply-To: References: <6ac749c10710152157x51721760q7397713a5208d3b8@mail.gmail.com> <6ac749c10710170348o48ce30b4ve492b0f686ca04ac@mail.gmail.com> Message-ID: Hi Barry, With an object inspector you can access all the "private" instance variables of your object. This suggests that the inspector has a "back door" to access private state. There are quite a few reflective features of Smalltalk, and we are planning to add a chapter on this for the next edition. To access the value variable of the counter, use the method Object>>#instVarNamed: To modify it, you can use Object>>#instVarNamed:put: x := Counter new. x increment. x value --> 1 x instVarNamed: 'value' --> 1 x instVarNamed: 'value' put: 10. x value --> 10 But these method should be avoided for ordinary programs. They are absolutely essential for implementing Inspectors and Debuggers, but you don't want to break encapsulation of ordinary objects in ordinary programs. Oscar On Oct 17, 2007, at 19:45, Barry Davis wrote: > Thanks Damien, > > I understand the sentence in the book now almost! > > "Of course providing setter and getter methods for all the instance > variables of an object does is not good object oriented style." > > a) I was wondering in wich case a getter method would not be ok? I > understand now a setter method could be "dangerous" > > b) I was wondering how " you can always access your instance > variable from your object using its name. " i searched half the > internet how to do this, but i don't know what to type in my > workspace to make this work. How could i for example direct access > the value of SimpleCounter? > > > Thanks in avance for learning me this important concept, > > Much appreciated!! > > Barry > > > > > > > > You can always > > > access your instance variable from your object using its name. > > > > > > > > Date: Wed, 17 Oct 2007 12:48:18 +0200 > > From: damien.cassou at gmail.com > > To: sbe-discussion at iam.unibe.ch > > Subject: [sbe-discussion] Re: page 94 / getter setter > confusion .. again > > > > Hi Barry, > > > > in SimpleCounter, you have an instance variable named value and a > read > > accessor (getter) named #value. There are only two ways of modifying > > the value from the outside: using #increase or #decrease. From > > outside, you can't assign 3 to the counter for example. You have to > > use #increase 3 times. > > > > I SimpleCounter had provided a #value: method to modify the value of > > the counter directly, it wouldn't had been a counter anymore; > this is > > because adding the method #value: let any user put any value > directly > > in the counter. Then, the counter is not a counter anymore. > > > > Is that clearer? > > > > 2007/10/16, Barry Davis : > > > > > > Thanks Damien, for your explanation > > > > > > I now understand Instance variables are used to store data and > attributes > > > of instances. They cannot be accessed directly from > ***outside*** an object. > > > Instead, an access method must be used [for outside use]. > > > > > > To fully understand this concept i'm now looking for a little > example wich > > > explains both concepts to me, so i can see it. > > > > > > Can you explain this concept with the SimpleCounter example, like > > > http://www.iam.unibe.ch/~ducasse/Videos/SqueakH-264Mov/120- > TestingSimpleCounter.mov > > > > > > Perhaps this example could be added to the book because i > understand this > > > is quite important? > > > > > > Thanks, > > > > > > Barry > > > > > > > > > > > > > Date: Tue, 16 Oct 2007 06:57:04 +0200 > > > > From: damien.cassou at gmail.com > > > > To: sbe-discussion at iam.unibe.ch > > > > Subject: [sbe-discussion] Re: page 94 / getter setter > confusion .. again > > > > > > > > > > > Hi Barry, > > > > > > > > in fact, using getter and setter is the only way to access the > > > > instance variables of your object from another object. You > can always > > > > access your instance variable from your object using its name. > > > > > > > > What is bad object-oriented style, is to always provide > access to your > > > > instance variables for the outside. The object should not > reveal its > > > > internal details. For example, if you have a class PhoneBook > which > > > > represents a collection of persons, you should not give > access to the > > > > internal collection. If you do it, you give the user the > possibility > > > > to bypass your class and to modify the collection directly; > this may > > > > be a problem if your PhoneBook caches data, update an underlying > > > > database... > > > > > > > > Is that clearer? > > > > > > > > 2007/10/15, Barry Davis : > > > > > > > > > > hi i have a question about a line on page 94: > > > > > > > > > > "Of course providing setter and getter methods for all the > instance > > > > > variables of an object does is not good object oriented > style." > > > > > > > > > > i am quite confused by this line, because i do this and > can't find > > > > > information how to get/set a instance variable without a > method" > > > > > > > > > > till know i follow the next rule: > > > > > "always access instance variables using two methods only, a > get and set > > > > > pair. All other methods that need to access the instance > variable shoud > > > send > > > > > one of thes two messages to self." > > > > > > > > > > but according to page 94 (and also page 84) this is bad > object oriented > > > > > style. > > > > > > > > > > question can anybody explain what is the appropriate way / > rule how > > > > > somebody should set/get instance variables. (without > methods??) > > > > > > > > > > thanks in advance, > > > > > > > > > > Barry > > > > > > > > > > ________________________________ > > > > > Pas je zoekresultaten aan op JOUW wensen met Live.nl! Live.nl > > > > > _______________________________________________ > > > > > Sbe-discussion mailing list > > > > > Sbe-discussion at iam.unibe.ch > > > > > > > > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > > > > > > > > > > > > > > > > > > > > > -- > > > > Damien Cassou > > > > _______________________________________________ > > > > Sbe-discussion mailing list > > > > Sbe-discussion at iam.unibe.ch > > > > > > > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > > > > > > > > ________________________________ > > > Publiceer JOUW leven online met Windows Live Spaces: weblog, > foto, video en > > > muziek! Het is gratis! Het is gratis! > > > _______________________________________________ > > > Sbe-discussion mailing list > > > Sbe-discussion at iam.unibe.ch > > > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > > > > > > > > > > > -- > > Damien Cassou > > _______________________________________________ > > Sbe-discussion mailing list > > Sbe-discussion at iam.unibe.ch > > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > > Windows Live Mail: Nu 2gb aan opslag - dat zijn maar liefst 1000 > foto's - en nog steeds gratis! Windows Live Mail > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From xs4hkr at gmail.com Wed Oct 17 20:33:20 2007 From: xs4hkr at gmail.com (Has van der Krieken) Date: Wed, 17 Oct 2007 20:33:20 +0200 Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again In-Reply-To: References: <6ac749c10710152157x51721760q7397713a5208d3b8@mail.gmail.com> <6ac749c10710170348o48ce30b4ve492b0f686ca04ac@mail.gmail.com> Message-ID: <1e86bb070710171133w4b20cf8fs208a6d42a3d8ffe8@mail.gmail.com> Hi all, Suppose I have defined a class TestClass. Object subclass: #TestClass instanceVariableNames: 'thing' classVariableNames: '' poolDictionaries: '' category: 'Test' Then I can access the instance variable thing by using a dot. test := TestClass new. test.thing := 'thingy'. When inspect/print test.thing, I get 'thingy'. Is the use of the dot standard Smalltalk or a Squeak feature? Regards, Has. On 10/17/07, Oscar Nierstrasz wrote: > > Hi Barry, > > With an object inspector you can access all the "private" instance > variables of your object. > > This suggests that the inspector has a "back door" to access private > state. > > There are quite a few reflective features of Smalltalk, and we are > planning to add a chapter on this for the next edition. > > To access the value variable of the counter, use the method > Object>>#instVarNamed: > To modify it, you can use Object>>#instVarNamed:put: > > > x := Counter new. > x increment. > x value --> 1 > x instVarNamed: 'value' --> 1 > x instVarNamed: 'value' put: 10. > x value --> 10 > > > But these method should be avoided for ordinary programs. They are > absolutely essential for implementing Inspectors and Debuggers, but > you don't want to break encapsulation of ordinary objects in ordinary > programs. > > Oscar > > On Oct 17, 2007, at 19:45, Barry Davis wrote: > > > Thanks Damien, > > > > I understand the sentence in the book now almost! > > > > "Of course providing setter and getter methods for all the instance > > variables of an object does is not good object oriented style." > > > > a) I was wondering in wich case a getter method would not be ok? I > > understand now a setter method could be "dangerous" > > > > b) I was wondering how " you can always access your instance > > variable from your object using its name. " i searched half the > > internet how to do this, but i don't know what to type in my > > workspace to make this work. How could i for example direct access > > the value of SimpleCounter? > > > > > > Thanks in avance for learning me this important concept, > > > > Much appreciated!! > > > > Barry > > > > > > > > > > > > > > > > You can always > > > > access your instance variable from your object using its name. > > > > > > > > > > > > > > > Date: Wed, 17 Oct 2007 12:48:18 +0200 > > > From: damien.cassou at gmail.com > > > To: sbe-discussion at iam.unibe.ch > > > Subject: [sbe-discussion] Re: page 94 / getter setter > > confusion .. again > > > > > > Hi Barry, > > > > > > in SimpleCounter, you have an instance variable named value and a > > read > > > accessor (getter) named #value. There are only two ways of modifying > > > the value from the outside: using #increase or #decrease. From > > > outside, you can't assign 3 to the counter for example. You have to > > > use #increase 3 times. > > > > > > I SimpleCounter had provided a #value: method to modify the value of > > > the counter directly, it wouldn't had been a counter anymore; > > this is > > > because adding the method #value: let any user put any value > > directly > > > in the counter. Then, the counter is not a counter anymore. > > > > > > Is that clearer? > > > > > > 2007/10/16, Barry Davis : > > > > > > > > Thanks Damien, for your explanation > > > > > > > > I now understand Instance variables are used to store data and > > attributes > > > > of instances. They cannot be accessed directly from > > ***outside*** an object. > > > > Instead, an access method must be used [for outside use]. > > > > > > > > To fully understand this concept i'm now looking for a little > > example wich > > > > explains both concepts to me, so i can see it. > > > > > > > > Can you explain this concept with the SimpleCounter example, like > > > > http://www.iam.unibe.ch/~ducasse/Videos/SqueakH-264Mov/120- > > TestingSimpleCounter.mov > > > > > > > > Perhaps this example could be added to the book because i > > understand this > > > > is quite important? > > > > > > > > Thanks, > > > > > > > > Barry > > > > > > > > > > > > > > > > > Date: Tue, 16 Oct 2007 06:57:04 +0200 > > > > > From: damien.cassou at gmail.com > > > > > To: sbe-discussion at iam.unibe.ch > > > > > Subject: [sbe-discussion] Re: page 94 / getter setter > > confusion .. again > > > > > > > > > > > > > > Hi Barry, > > > > > > > > > > in fact, using getter and setter is the only way to access the > > > > > instance variables of your object from another object. You > > can always > > > > > access your instance variable from your object using its name. > > > > > > > > > > What is bad object-oriented style, is to always provide > > access to your > > > > > instance variables for the outside. The object should not > > reveal its > > > > > internal details. For example, if you have a class PhoneBook > > which > > > > > represents a collection of persons, you should not give > > access to the > > > > > internal collection. If you do it, you give the user the > > possibility > > > > > to bypass your class and to modify the collection directly; > > this may > > > > > be a problem if your PhoneBook caches data, update an underlying > > > > > database... > > > > > > > > > > Is that clearer? > > > > > > > > > > 2007/10/15, Barry Davis : > > > > > > > > > > > > hi i have a question about a line on page 94: > > > > > > > > > > > > "Of course providing setter and getter methods for all the > > instance > > > > > > variables of an object does is not good object oriented > > style." > > > > > > > > > > > > i am quite confused by this line, because i do this and > > can't find > > > > > > information how to get/set a instance variable without a > > method" > > > > > > > > > > > > till know i follow the next rule: > > > > > > "always access instance variables using two methods only, a > > get and set > > > > > > pair. All other methods that need to access the instance > > variable shoud > > > > send > > > > > > one of thes two messages to self." > > > > > > > > > > > > but according to page 94 (and also page 84) this is bad > > object oriented > > > > > > style. > > > > > > > > > > > > question can anybody explain what is the appropriate way / > > rule how > > > > > > somebody should set/get instance variables. (without > > methods??) > > > > > > > > > > > > thanks in advance, > > > > > > > > > > > > Barry > > > > > > > > > > > > ________________________________ > > > > > > Pas je zoekresultaten aan op JOUW wensen met Live.nl! Live.nl > > > > > > _______________________________________________ > > > > > > Sbe-discussion mailing list > > > > > > Sbe-discussion at iam.unibe.ch > > > > > > > > > > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Damien Cassou > > > > > _______________________________________________ > > > > > Sbe-discussion mailing list > > > > > Sbe-discussion at iam.unibe.ch > > > > > > > > > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > > > > > > > > > > > ________________________________ > > > > Publiceer JOUW leven online met Windows Live Spaces: weblog, > > foto, video en > > > > muziek! Het is gratis! Het is gratis! > > > > _______________________________________________ > > > > Sbe-discussion mailing list > > > > Sbe-discussion at iam.unibe.ch > > > > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > > > > > > > > > > > > > > > > -- > > > Damien Cassou > > > _______________________________________________ > > > Sbe-discussion mailing list > > > Sbe-discussion at iam.unibe.ch > > > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > > > > > Windows Live Mail: Nu 2gb aan opslag - dat zijn maar liefst 1000 > > foto's - en nog steeds gratis! Windows Live Mail > > _______________________________________________ > > Sbe-discussion mailing list > > Sbe-discussion at iam.unibe.ch > > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > From oscar at iam.unibe.ch Wed Oct 17 20:38:34 2007 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Wed, 17 Oct 2007 20:38:34 +0200 Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again In-Reply-To: <1e86bb070710171133w4b20cf8fs208a6d42a3d8ffe8@mail.gmail.com> References: <6ac749c10710152157x51721760q7397713a5208d3b8@mail.gmail.com> <6ac749c10710170348o48ce30b4ve492b0f686ca04ac@mail.gmail.com> <1e86bb070710171133w4b20cf8fs208a6d42a3d8ffe8@mail.gmail.com> Message-ID: <0B259A64-D29F-49D4-85FB-DC79DC7486AA@iam.unibe.ch> Haha! Very cute! "." is the statement separator in Smalltalk. What you wrote can be rewritten as: test := TestClass new. test. thing := 'thingy'. So you have only defined a variable in your Workspace called "thing", but have not touched your TestClass instance. Nice puzzler. oscar On Oct 17, 2007, at 20:33, Has van der Krieken wrote: > Hi all, > > Suppose I have defined a class TestClass. > > Object subclass: #TestClass > instanceVariableNames: 'thing' > classVariableNames: '' > poolDictionaries: '' > category: 'Test' > > Then I can access the instance variable thing by using a dot. > > test := TestClass new. > test.thing := 'thingy'. > > When inspect/print test.thing, I get 'thingy'. > Is the use of the dot standard Smalltalk or a Squeak feature? > > Regards, Has. > > > On 10/17/07, Oscar Nierstrasz wrote: >> >> Hi Barry, >> >> With an object inspector you can access all the "private" instance >> variables of your object. >> >> This suggests that the inspector has a "back door" to access private >> state. >> >> There are quite a few reflective features of Smalltalk, and we are >> planning to add a chapter on this for the next edition. >> >> To access the value variable of the counter, use the method >> Object>>#instVarNamed: >> To modify it, you can use Object>>#instVarNamed:put: >> >> >> x := Counter new. >> x increment. >> x value --> 1 >> x instVarNamed: 'value' --> 1 >> x instVarNamed: 'value' put: 10. >> x value --> 10 >> >> >> But these method should be avoided for ordinary programs. They are >> absolutely essential for implementing Inspectors and Debuggers, but >> you don't want to break encapsulation of ordinary objects in ordinary >> programs. >> >> Oscar >> >> On Oct 17, 2007, at 19:45, Barry Davis wrote: >> >>> Thanks Damien, >>> >>> I understand the sentence in the book now almost! >>> >>> "Of course providing setter and getter methods for all the instance >>> variables of an object does is not good object oriented style." >>> >>> a) I was wondering in wich case a getter method would not be ok? I >>> understand now a setter method could be "dangerous" >>> >>> b) I was wondering how " you can always access your instance >>> variable from your object using its name. " i searched half the >>> internet how to do this, but i don't know what to type in my >>> workspace to make this work. How could i for example direct access >>> the value of SimpleCounter? >>> >>> >>> Thanks in avance for learning me this important concept, >>> >>> Much appreciated!! >>> >>> Barry >>> >>> >>> >>> >>> >>> >>> >>> You can always >>>>> access your instance variable from your object using its name. >>> >>> >>> >>> >>> >>> >>>> Date: Wed, 17 Oct 2007 12:48:18 +0200 >>>> From: damien.cassou at gmail.com >>>> To: sbe-discussion at iam.unibe.ch >>>> Subject: [sbe-discussion] Re: page 94 / getter setter >>> confusion .. again >>>> >>>> Hi Barry, >>>> >>>> in SimpleCounter, you have an instance variable named value and a >>> read >>>> accessor (getter) named #value. There are only two ways of >>>> modifying >>>> the value from the outside: using #increase or #decrease. From >>>> outside, you can't assign 3 to the counter for example. You have to >>>> use #increase 3 times. >>>> >>>> I SimpleCounter had provided a #value: method to modify the >>>> value of >>>> the counter directly, it wouldn't had been a counter anymore; >>> this is >>>> because adding the method #value: let any user put any value >>> directly >>>> in the counter. Then, the counter is not a counter anymore. >>>> >>>> Is that clearer? >>>> >>>> 2007/10/16, Barry Davis : >>>>> >>>>> Thanks Damien, for your explanation >>>>> >>>>> I now understand Instance variables are used to store data and >>> attributes >>>>> of instances. They cannot be accessed directly from >>> ***outside*** an object. >>>>> Instead, an access method must be used [for outside use]. >>>>> >>>>> To fully understand this concept i'm now looking for a little >>> example wich >>>>> explains both concepts to me, so i can see it. >>>>> >>>>> Can you explain this concept with the SimpleCounter example, like >>>>> http://www.iam.unibe.ch/~ducasse/Videos/SqueakH-264Mov/120- >>> TestingSimpleCounter.mov >>>>> >>>>> Perhaps this example could be added to the book because i >>> understand this >>>>> is quite important? >>>>> >>>>> Thanks, >>>>> >>>>> Barry >>>>> >>>>> >>>>> >>>>>> Date: Tue, 16 Oct 2007 06:57:04 +0200 >>>>>> From: damien.cassou at gmail.com >>>>>> To: sbe-discussion at iam.unibe.ch >>>>>> Subject: [sbe-discussion] Re: page 94 / getter setter >>> confusion .. again >>>>> >>>>>> >>>>>> Hi Barry, >>>>>> >>>>>> in fact, using getter and setter is the only way to access the >>>>>> instance variables of your object from another object. You >>> can always >>>>>> access your instance variable from your object using its name. >>>>>> >>>>>> What is bad object-oriented style, is to always provide >>> access to your >>>>>> instance variables for the outside. The object should not >>> reveal its >>>>>> internal details. For example, if you have a class PhoneBook >>> which >>>>>> represents a collection of persons, you should not give >>> access to the >>>>>> internal collection. If you do it, you give the user the >>> possibility >>>>>> to bypass your class and to modify the collection directly; >>> this may >>>>>> be a problem if your PhoneBook caches data, update an underlying >>>>>> database... >>>>>> >>>>>> Is that clearer? >>>>>> >>>>>> 2007/10/15, Barry Davis : >>>>>>> >>>>>>> hi i have a question about a line on page 94: >>>>>>> >>>>>>> "Of course providing setter and getter methods for all the >>> instance >>>>>>> variables of an object does is not good object oriented >>> style." >>>>>>> >>>>>>> i am quite confused by this line, because i do this and >>> can't find >>>>>>> information how to get/set a instance variable without a >>> method" >>>>>>> >>>>>>> till know i follow the next rule: >>>>>>> "always access instance variables using two methods only, a >>> get and set >>>>>>> pair. All other methods that need to access the instance >>> variable shoud >>>>> send >>>>>>> one of thes two messages to self." >>>>>>> >>>>>>> but according to page 94 (and also page 84) this is bad >>> object oriented >>>>>>> style. >>>>>>> >>>>>>> question can anybody explain what is the appropriate way / >>> rule how >>>>>>> somebody should set/get instance variables. (without >>> methods??) >>>>>>> >>>>>>> thanks in advance, >>>>>>> >>>>>>> Barry >>>>>>> >>>>>>> ________________________________ >>>>>>> Pas je zoekresultaten aan op JOUW wensen met Live.nl! Live.nl >>>>>>> _______________________________________________ >>>>>>> Sbe-discussion mailing list >>>>>>> Sbe-discussion at iam.unibe.ch >>>>>>> >>>>> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Damien Cassou >>>>>> _______________________________________________ >>>>>> Sbe-discussion mailing list >>>>>> Sbe-discussion at iam.unibe.ch >>>>>> >>>>> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion >>>>> >>>>> >>>>> ________________________________ >>>>> Publiceer JOUW leven online met Windows Live Spaces: weblog, >>> foto, video en >>>>> muziek! Het is gratis! Het is gratis! >>>>> _______________________________________________ >>>>> Sbe-discussion mailing list >>>>> Sbe-discussion at iam.unibe.ch >>>>> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion >>>>> >>>>> >>>> >>>> >>>> -- >>>> Damien Cassou >>>> _______________________________________________ >>>> Sbe-discussion mailing list >>>> Sbe-discussion at iam.unibe.ch >>>> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion >>> >>> >>> Windows Live Mail: Nu 2gb aan opslag - dat zijn maar liefst 1000 >>> foto's - en nog steeds gratis! Windows Live Mail >>> _______________________________________________ >>> Sbe-discussion mailing list >>> Sbe-discussion at iam.unibe.ch >>> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion >> >> _______________________________________________ >> Sbe-discussion mailing list >> Sbe-discussion at iam.unibe.ch >> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion >> > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From xs4hkr at gmail.com Wed Oct 17 20:43:31 2007 From: xs4hkr at gmail.com (Has van der Krieken) Date: Wed, 17 Oct 2007 20:43:31 +0200 Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again In-Reply-To: <0B259A64-D29F-49D4-85FB-DC79DC7486AA@iam.unibe.ch> References: <6ac749c10710152157x51721760q7397713a5208d3b8@mail.gmail.com> <6ac749c10710170348o48ce30b4ve492b0f686ca04ac@mail.gmail.com> <1e86bb070710171133w4b20cf8fs208a6d42a3d8ffe8@mail.gmail.com> <0B259A64-D29F-49D4-85FB-DC79DC7486AA@iam.unibe.ch> Message-ID: <1e86bb070710171143v7db0729u7e29cc7762a98cff@mail.gmail.com> Hi Oscar, I see the light :) Thanks, Has. On 10/17/07, Oscar Nierstrasz wrote: > > Haha! Very cute! > > "." is the statement separator in Smalltalk. > > What you wrote can be rewritten as: > > test := TestClass new. > test. > thing := 'thingy'. > > So you have only defined a variable in your Workspace called "thing", > but have not touched your TestClass instance. > > Nice puzzler. > > oscar > > On Oct 17, 2007, at 20:33, Has van der Krieken wrote: > > > Hi all, > > > > Suppose I have defined a class TestClass. > > > > Object subclass: #TestClass > > instanceVariableNames: 'thing' > > classVariableNames: '' > > poolDictionaries: '' > > category: 'Test' > > > > Then I can access the instance variable thing by using a dot. > > > > test := TestClass new. > > test.thing := 'thingy'. > > > > When inspect/print test.thing, I get 'thingy'. > > Is the use of the dot standard Smalltalk or a Squeak feature? > > > > Regards, Has. > > > > > > On 10/17/07, Oscar Nierstrasz wrote: > >> > >> Hi Barry, > >> > >> With an object inspector you can access all the "private" instance > >> variables of your object. > >> > >> This suggests that the inspector has a "back door" to access private > >> state. > >> > >> There are quite a few reflective features of Smalltalk, and we are > >> planning to add a chapter on this for the next edition. > >> > >> To access the value variable of the counter, use the method > >> Object>>#instVarNamed: > >> To modify it, you can use Object>>#instVarNamed:put: > >> > >> > >> x := Counter new. > >> x increment. > >> x value --> 1 > >> x instVarNamed: 'value' --> 1 > >> x instVarNamed: 'value' put: 10. > >> x value --> 10 > >> > >> > >> But these method should be avoided for ordinary programs. They are > >> absolutely essential for implementing Inspectors and Debuggers, but > >> you don't want to break encapsulation of ordinary objects in ordinary > >> programs. > >> > >> Oscar > >> > >> On Oct 17, 2007, at 19:45, Barry Davis wrote: > >> > >>> Thanks Damien, > >>> > >>> I understand the sentence in the book now almost! > >>> > >>> "Of course providing setter and getter methods for all the instance > >>> variables of an object does is not good object oriented style." > >>> > >>> a) I was wondering in wich case a getter method would not be ok? I > >>> understand now a setter method could be "dangerous" > >>> > >>> b) I was wondering how " you can always access your instance > >>> variable from your object using its name. " i searched half the > >>> internet how to do this, but i don't know what to type in my > >>> workspace to make this work. How could i for example direct access > >>> the value of SimpleCounter? > >>> > >>> > >>> Thanks in avance for learning me this important concept, > >>> > >>> Much appreciated!! > >>> > >>> Barry > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> You can always > >>>>> access your instance variable from your object using its name. > >>> > >>> > >>> > >>> > >>> > >>> > >>>> Date: Wed, 17 Oct 2007 12:48:18 +0200 > >>>> From: damien.cassou at gmail.com > >>>> To: sbe-discussion at iam.unibe.ch > >>>> Subject: [sbe-discussion] Re: page 94 / getter setter > >>> confusion .. again > >>>> > >>>> Hi Barry, > >>>> > >>>> in SimpleCounter, you have an instance variable named value and a > >>> read > >>>> accessor (getter) named #value. There are only two ways of > >>>> modifying > >>>> the value from the outside: using #increase or #decrease. From > >>>> outside, you can't assign 3 to the counter for example. You have to > >>>> use #increase 3 times. > >>>> > >>>> I SimpleCounter had provided a #value: method to modify the > >>>> value of > >>>> the counter directly, it wouldn't had been a counter anymore; > >>> this is > >>>> because adding the method #value: let any user put any value > >>> directly > >>>> in the counter. Then, the counter is not a counter anymore. > >>>> > >>>> Is that clearer? > >>>> > >>>> 2007/10/16, Barry Davis : > >>>>> > >>>>> Thanks Damien, for your explanation > >>>>> > >>>>> I now understand Instance variables are used to store data and > >>> attributes > >>>>> of instances. They cannot be accessed directly from > >>> ***outside*** an object. > >>>>> Instead, an access method must be used [for outside use]. > >>>>> > >>>>> To fully understand this concept i'm now looking for a little > >>> example wich > >>>>> explains both concepts to me, so i can see it. > >>>>> > >>>>> Can you explain this concept with the SimpleCounter example, like > >>>>> http://www.iam.unibe.ch/~ducasse/Videos/SqueakH-264Mov/120- > >>> TestingSimpleCounter.mov > >>>>> > >>>>> Perhaps this example could be added to the book because i > >>> understand this > >>>>> is quite important? > >>>>> > >>>>> Thanks, > >>>>> > >>>>> Barry > >>>>> > >>>>> > >>>>> > >>>>>> Date: Tue, 16 Oct 2007 06:57:04 +0200 > >>>>>> From: damien.cassou at gmail.com > >>>>>> To: sbe-discussion at iam.unibe.ch > >>>>>> Subject: [sbe-discussion] Re: page 94 / getter setter > >>> confusion .. again > >>>>> > >>>>>> > >>>>>> Hi Barry, > >>>>>> > >>>>>> in fact, using getter and setter is the only way to access the > >>>>>> instance variables of your object from another object. You > >>> can always > >>>>>> access your instance variable from your object using its name. > >>>>>> > >>>>>> What is bad object-oriented style, is to always provide > >>> access to your > >>>>>> instance variables for the outside. The object should not > >>> reveal its > >>>>>> internal details. For example, if you have a class PhoneBook > >>> which > >>>>>> represents a collection of persons, you should not give > >>> access to the > >>>>>> internal collection. If you do it, you give the user the > >>> possibility > >>>>>> to bypass your class and to modify the collection directly; > >>> this may > >>>>>> be a problem if your PhoneBook caches data, update an underlying > >>>>>> database... > >>>>>> > >>>>>> Is that clearer? > >>>>>> > >>>>>> 2007/10/15, Barry Davis : > >>>>>>> > >>>>>>> hi i have a question about a line on page 94: > >>>>>>> > >>>>>>> "Of course providing setter and getter methods for all the > >>> instance > >>>>>>> variables of an object does is not good object oriented > >>> style." > >>>>>>> > >>>>>>> i am quite confused by this line, because i do this and > >>> can't find > >>>>>>> information how to get/set a instance variable without a > >>> method" > >>>>>>> > >>>>>>> till know i follow the next rule: > >>>>>>> "always access instance variables using two methods only, a > >>> get and set > >>>>>>> pair. All other methods that need to access the instance > >>> variable shoud > >>>>> send > >>>>>>> one of thes two messages to self." > >>>>>>> > >>>>>>> but according to page 94 (and also page 84) this is bad > >>> object oriented > >>>>>>> style. > >>>>>>> > >>>>>>> question can anybody explain what is the appropriate way / > >>> rule how > >>>>>>> somebody should set/get instance variables. (without > >>> methods??) > >>>>>>> > >>>>>>> thanks in advance, > >>>>>>> > >>>>>>> Barry > >>>>>>> > >>>>>>> ________________________________ > >>>>>>> Pas je zoekresultaten aan op JOUW wensen met Live.nl! Live.nl > >>>>>>> _______________________________________________ > >>>>>>> Sbe-discussion mailing list > >>>>>>> Sbe-discussion at iam.unibe.ch > >>>>>>> > >>>>> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > >>>>>>> > >>>>>>> > >>>>>> > >>>>>> > >>>>>> -- > >>>>>> Damien Cassou > >>>>>> _______________________________________________ > >>>>>> Sbe-discussion mailing list > >>>>>> Sbe-discussion at iam.unibe.ch > >>>>>> > >>>>> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > >>>>> > >>>>> > >>>>> ________________________________ > >>>>> Publiceer JOUW leven online met Windows Live Spaces: weblog, > >>> foto, video en > >>>>> muziek! Het is gratis! Het is gratis! > >>>>> _______________________________________________ > >>>>> Sbe-discussion mailing list > >>>>> Sbe-discussion at iam.unibe.ch > >>>>> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > >>>>> > >>>>> > >>>> > >>>> > >>>> -- > >>>> Damien Cassou > >>>> _______________________________________________ > >>>> Sbe-discussion mailing list > >>>> Sbe-discussion at iam.unibe.ch > >>>> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > >>> > >>> > >>> Windows Live Mail: Nu 2gb aan opslag - dat zijn maar liefst 1000 > >>> foto's - en nog steeds gratis! Windows Live Mail > >>> _______________________________________________ > >>> Sbe-discussion mailing list > >>> Sbe-discussion at iam.unibe.ch > >>> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > >> > >> _______________________________________________ > >> Sbe-discussion mailing list > >> Sbe-discussion at iam.unibe.ch > >> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > >> > > _______________________________________________ > > Sbe-discussion mailing list > > Sbe-discussion at iam.unibe.ch > > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > From denker at iam.unibe.ch Wed Oct 17 20:48:51 2007 From: denker at iam.unibe.ch (Marcus Denker) Date: Wed, 17 Oct 2007 20:48:51 +0200 Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again In-Reply-To: <1e86bb070710171133w4b20cf8fs208a6d42a3d8ffe8@mail.gmail.com> References: <6ac749c10710152157x51721760q7397713a5208d3b8@mail.gmail.com> <6ac749c10710170348o48ce30b4ve492b0f686ca04ac@mail.gmail.com> <1e86bb070710171133w4b20cf8fs208a6d42a3d8ffe8@mail.gmail.com> Message-ID: <45803665-6988-450A-A627-B4B50B92B245@iam.unibe.ch> On 17.10.2007, at 20:33, Has van der Krieken wrote: > Hi all, > > Suppose I have defined a class TestClass. > > Object subclass: #TestClass > instanceVariableNames: 'thing' > classVariableNames: '' > poolDictionaries: '' > category: 'Test' > > Then I can access the instance variable thing by using a dot. > > test := TestClass new. > test.thing := 'thingy'. > > When inspect/print test.thing, I get 'thingy'. try to inspect just "test". the line test.thing := 'thingy'. is parsed and evaluated like this in the workspace: test. thing := 'thingy'. so you have a variable named thing now, inspecting test.thing will evalute two expressions (test and thing) and inspect the later. > Is the use of the dot standard Smalltalk or a Squeak feature? > No. There have been experimental systems based on Smalltalk that support dotted-path things, e.g. ThingLab did it, I think. And some of the Croquet people seem to like it, but I think it's not in Croquet right now. Marcus -- Marcus Denker -- denker at iam.unibe.ch http://www.iam.unibe.ch/~denker From denker at iam.unibe.ch Wed Oct 17 20:59:50 2007 From: denker at iam.unibe.ch (Marcus Denker) Date: Wed, 17 Oct 2007 20:59:50 +0200 Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again In-Reply-To: References: Message-ID: On 15.10.2007, at 18:51, Barry Davis wrote: > hi i have a question about a line on page 94: > > "Of course providing setter and getter methods for all the instance > variables of an object does is not good object oriented style." > vs. > > > "always access instance variables using two methods only, a get and > set pair. All other methods that need to access the instance > variable shoud send one of thes two messages to self." > There are two philosophies in Smalltalk: "always use accessors" vs. "state hiding" The "state hiding" aproach says that you should only have accessors if they are part of the external API that is used by others. Good idea. the "always use accessors" say that you never now if a variable will stay a variable forever (the value might be computed in the future), or if one plans to use lazy initialization or maybe sime caching. Thus: just use an accessor whenever you access a variable, even from the inside of the class. Good idea. Two good ideas, but you can't do both at the same time.... (we should discuss that in the book a bit deeper, I guess) Marcus -- Marcus Denker -- denker at iam.unibe.ch http://www.iam.unibe.ch/~denker From barry_davis10 at hotmail.com Wed Oct 17 21:55:18 2007 From: barry_davis10 at hotmail.com (Barry Davis) Date: Wed, 17 Oct 2007 21:55:18 +0200 Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again In-Reply-To: References: Message-ID: Hi things are getting clearer and clearer. Can anybody confirm: a) when Damien said "you can always access your instance variable from your object using its name" he is pointing to the "instVarNamed:put:" message? a2) if positive, are there more "instVar" messages? a3) if negative, what do smalltalkers mean with accessing a instance variable [directly] by using its name? b) I was wondering in wich case a getter method would not be ok? Damien already explained setters can be dangerous, can the same apply to a getter (read only??) Thanks, Barry x instVarNamed: 'count' put: 10.> From: denker at iam.unibe.ch> Date: Wed, 17 Oct 2007 20:59:50 +0200> To: sbe-discussion at iam.unibe.ch> Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again> > > On 15.10.2007, at 18:51, Barry Davis wrote:> > > hi i have a question about a line on page 94:> >> > "Of course providing setter and getter methods for all the instance > > variables of an object does is not good object oriented style."> >> > vs.> > >> >> > "always access instance variables using two methods only, a get and > > set pair. All other methods that need to access the instance > > variable shoud send one of thes two messages to self."> >> > There are two philosophies in Smalltalk: "always use accessors" vs. > "state hiding"> > The "state hiding" aproach says that you should only have accessors > if they are part of the external API that> is used by others. Good idea.> > the "always use accessors" say that you never now if a variable will > stay a variable forever (the value might> be computed in the future), or if one plans to use lazy > initialization or maybe sime caching. Thus: just use> an accessor whenever you access a variable, even from the inside of > the class. Good idea.> > Two good ideas, but you can't do both at the same time....> > (we should discuss that in the book a bit deeper, I guess)> > Marcus> --> Marcus Denker -- denker at iam.unibe.ch> http://www.iam.unibe.ch/~denker> > > > _______________________________________________> Sbe-discussion mailing list> Sbe-discussion at iam.unibe.ch> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion _________________________________________________________________ Live.nl: je eigen persoonlijk startpagina met nieuws en feeds die JIJ belangrijk vindt! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/sbe-discussion/attachments/20071017/144da2c0/attachment-0001.html From oscar at iam.unibe.ch Wed Oct 17 22:05:14 2007 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Wed, 17 Oct 2007 22:05:14 +0200 Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again In-Reply-To: References: Message-ID: <0D233D0D-CA16-46DE-AF69-3746DC8B7FC6@iam.unibe.ch> Getter methods can be surprisingly evil too! Basically you are leaking out a reference to your private state. If the reference returned by a getter is mutable, then leaking out your state means that you lose control and anything can happen. The solution is to return a copy. (Send the massage #copy to the object -- this often works; sometimes you will need to implement copy to get the right behavior.) Note that the same problem occurs in Java and C++. Just by declaring a variable "private" doesn't mean that you can't leak state. The moment you return a reference to a "private" instance variable, external clients can do anything they like with your supposedly private state. oscar On Oct 17, 2007, at 21:55, Barry Davis wrote: > b) I was wondering in wich case a getter method would not be ok? > Damien already explained setters can be dangerous, can the same > apply to a getter (read only??) From black at cs.pdx.edu Wed Oct 17 22:19:17 2007 From: black at cs.pdx.edu (Andrew P. Black) Date: Wed, 17 Oct 2007 13:19:17 -0700 Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again In-Reply-To: References: Message-ID: <23DDF98B-C515-41A2-A889-04A5AA37D7D3@cs.pdx.edu> > > the "always use accessors" say that you never now if a variable will > stay a variable forever (the value might > be computed in the future), or if one plans to use lazy > initialization or maybe sime caching. Thus: just use > an accessor whenever you access a variable, even from the inside of > the class. Good idea. > > Two good ideas, but you can't do both at the same time.... > > (we should discuss that in the book a bit deeper, I guess) > Kent Beck has a good discussion of both sides in "Best Practice Patterns". It would be worth a deeper discussion in teh book, as this discussion here ahs clearly shown. Andrew From oscar at iam.unibe.ch Wed Oct 17 22:21:59 2007 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Wed, 17 Oct 2007 22:21:59 +0200 Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again In-Reply-To: <23DDF98B-C515-41A2-A889-04A5AA37D7D3@cs.pdx.edu> References: <23DDF98B-C515-41A2-A889-04A5AA37D7D3@cs.pdx.edu> Message-ID: <14F4B3C5-55F4-4388-8A35-B06044BE1F69@iam.unibe.ch> I agree. I just gave the "Idioms" lecture today, which is largely based on his book. I would like to add a chapter on this stuff for the second edition. Will try to start this ASAP. (I already added it to the TODO file.) Oscar On Oct 17, 2007, at 22:19, Andrew P. Black wrote: >> >> the "always use accessors" say that you never now if a variable will >> stay a variable forever (the value might >> be computed in the future), or if one plans to use lazy >> initialization or maybe sime caching. Thus: just use >> an accessor whenever you access a variable, even from the inside of >> the class. Good idea. >> >> Two good ideas, but you can't do both at the same time.... >> >> (we should discuss that in the book a bit deeper, I guess) >> > > Kent Beck has a good discussion of both sides in "Best Practice > Patterns". > It would be worth a deeper discussion in teh book, as this discussion > here ahs clearly shown. > > Andrew > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From black at cs.pdx.edu Wed Oct 17 22:29:43 2007 From: black at cs.pdx.edu (Andrew P. Black) Date: Wed, 17 Oct 2007 13:29:43 -0700 Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again In-Reply-To: References: Message-ID: On 17 Oct 2007, at 12:55, Barry Davis wrote: > Can anybody confirm: > > a) when Damien said "you can always access your instance variable > from your object using its name" he is pointing to the > "instVarNamed:put:" message? No. > a2) if positive, are there more "instVar" messages? There are some others, but, as Oscar said, they are intended for "power users" wrting debuggers etc and not for routine programming. > a3) if negative, what do Smalltalkers mean with accessing a > instance variable [directly] by using its name? I think that he meant: you can always access an instance variable using its name when you are writing code for a method of the object itself. > b) I was wondering in wich case a getter method would not be ok? > Damien already explained setters can be dangerous, can the same > apply to a getter (read only??) > Oscar answered this: you might provide access to a private object. The bigger question that comes before all of these detail is: what is your object *for*. That is, what abstraction does it represent? One you know taht, you can figure out what messages it should understand. Only then can you decide on its internal representation, ie.e, its instance variables. Then, you MAY find that some of the messages correspond to the instance variables, or, you might not. Suppose that you have an object that represent a bikeRide. It might respond to messages like distanceInKilometers and distanceInMiles. You might decide to store the distance internally in furlongs. You would then write two methods distanceInKilometers and distanceInMiles to do the appropriate multiplication. It would be a mistake to provide direct access to the instance variable. OK, this is a silly example, but you should begin to get the idea of what encapsulation is about. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/sbe-discussion/attachments/20071017/7b62ee8b/attachment.html From ramon.leon at allresnet.com Thu Oct 18 01:14:24 2007 From: ramon.leon at allresnet.com (Ramon Leon) Date: Wed, 17 Oct 2007 16:14:24 -0700 Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again In-Reply-To: References: Message-ID: <003b01c81113$75135070$f000a8c0@hq.allresnet.com> > b) I was wondering in which case a getter method would > not be ok? > Damien already explained setters can be dangerous, > can the same apply to a getter (read only??) The reason getters are bad is that they *often* expose the state of an object. Objects are not about state, they're about behavior and it's behavior you want to expose. If you expose state at all, even read only state, or a copy of the state, you still give the outside world the ability to look at your state and make decisions about it *outside* the context of your object. In general, this negates the benefit of having the object in the first place, which is to encapsulate that state and behavior (i.e. decisions about that state) into an object. Exposing state encourages clients of your object to write procedural code and make decisions about your object rather than writing object oriented code and simply giving commands to you object. Consider this procedural code and how inflexible and hard to extend it would be if it were scattered all over a program... aPerson pay < someAmount ifTrue: [Transcript show: aPerson name, ' (employee)'] ifFalse: [Transcript show: aPerson name, ' (manager)'] vs more object oriented code... aPerson printOn: Transcript Which can print on any stream, and allows the Person to make all the decisions about how to print (less coupled to client code), no state was exposed, only behavior. "aPerson pay < someAmount" <-- that's a decision made based upon the state of the object, in most cases, this code belongs inside the object itself. Exposing state often leads to accidental misuse and often creates duplicate code outside of the class. Encapsulating state makes you write the code in the class, and that makes you trip over previously written code and find out someone already wrote what you needed. You end up having these happy little collisions that eliminate duplicate code by *preventing* it. The most valid common reason for violating encapsulation is when the state is what you're after, like serializing an object to a database, or user interface. Ramon Leon http://onsmalltalk.com From barry_davis10 at hotmail.com Thu Oct 18 21:08:59 2007 From: barry_davis10 at hotmail.com (Barry Davis) Date: Thu, 18 Oct 2007 21:08:59 +0200 Subject: [sbe-discussion] Re: page 94 / getter setter confusion .. again In-Reply-To: References: Message-ID: Thanks all for answering my question! Barry (now progressing to chapter six) From: black at cs.pdx.eduDate: Wed, 17 Oct 2007 13:29:43 -0700To: sbe-discussion at iam.unibe.chSubject: [sbe-discussion] Re: page 94 / getter setter confusion .. again On 17 Oct 2007, at 12:55, Barry Davis wrote: Can anybody confirm: a) when Damien said "you can always access your instance variable from your object using its name" he is pointing to the "instVarNamed:put:" message? No. a2) if positive, are there more "instVar" messages? There are some others, but, as Oscar said, they are intended for "power users" wrting debuggers etc and not for routine programming. a3) if negative, what do Smalltalkers mean with accessing a instance variable [directly] by using its name? I think that he meant: you can always access an instance variable using its name when you are writing code for a method of the object itself. b) I was wondering in wich case a getter method would not be ok? Damien already explained setters can be dangerous, can the same apply to a getter (read only??) Oscar answered this: you might provide access to a private object. The bigger question that comes before all of these detail is: what is your object *for*. That is, what abstraction does it represent? One you know taht, you can figure out what messages it should understand. Only then can you decide on its internal representation, ie.e, its instance variables. Then, you MAY find that some of the messages correspond to the instance variables, or, you might not. Suppose that you have an object that represent a bikeRide. It might respond to messages like distanceInKilometers and distanceInMiles. You might decide to store the distance internally in furlongs. You would then write two methods distanceInKilometers and distanceInMiles to do the appropriate multiplication. It would be a mistake to provide direct access to the instance variable. OK, this is a silly example, but you should begin to get the idea of what encapsulation is about. _________________________________________________________________ Probeer Live.nl Probeer Live.nl: zoekmachine van de makers van MSN! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/sbe-discussion/attachments/20071018/738f84f1/attachment-0001.html From jonathan.hankins at gmail.com Mon Oct 22 16:56:01 2007 From: jonathan.hankins at gmail.com (Jonathan Hankins) Date: Mon, 22 Oct 2007 09:56:01 -0500 Subject: [sbe-discussion] Couple of errors Message-ID: <22750540710220756w1627e279q91760d7c78a24a68@mail.gmail.com> Checked these in the Tex source in SVN. Model.tex, p. 88, "use using" Model.tex, p. 84, after "as if they were a single thing with two "sides"", the two sets of double quotes are empty in the PDF (i.e., ``''). In the Tex, they are "``\subind{system browser}{instance side}'' and the ``\subind{system browser}{class side}''" Thanks, -Jonathan Hankins From oscar at iam.unibe.ch Mon Oct 22 20:16:05 2007 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Mon, 22 Oct 2007 20:16:05 +0200 Subject: [sbe-discussion] Re: Couple of errors In-Reply-To: <22750540710220756w1627e279q91760d7c78a24a68@mail.gmail.com> References: <22750540710220756w1627e279q91760d7c78a24a68@mail.gmail.com> Message-ID: Thanks Jonathan! BTW, errata are also logged on-line: https://www.iam.unibe.ch/scg/svn_repos/SqueakByExample/Book/errata.txt The mistake on p 88 was new. The other one was fixed already, but is not in the on-line PDF yet. We should be issuing a new version soon with all these corrections integrated. Please let us know if you find any more glitches! Cheers, Oscar On Oct 22, 2007, at 16:56, Jonathan Hankins wrote: > Checked these in the Tex source in SVN. > > Model.tex, p. 88, "use using" > > Model.tex, p. 84, after "as if they were a single thing with two > "sides"", the two sets of double quotes are empty in the PDF (i.e., > ``''). In the Tex, they are "``\subind{system browser}{instance > side}'' and the ``\subind{system browser}{class side}''" > > Thanks, > > -Jonathan Hankins > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From mike at mjr104.co.uk Mon Oct 22 21:41:51 2007 From: mike at mjr104.co.uk (Michael Roberts) Date: Mon, 22 Oct 2007 20:41:51 +0100 Subject: [sbe-discussion] Small formatting space, Page 186 Message-ID: "All Number objects support various.... others which generate Duration s, such as hour..." I think the space between Duration and s should be removed? thanks, Mike From serge.stinckwich at gmail.com Tue Oct 23 10:04:57 2007 From: serge.stinckwich at gmail.com (Serge Stinckwich) Date: Tue, 23 Oct 2007 10:04:57 +0200 Subject: [sbe-discussion] A very small typo Message-ID: Sometimes in method caption (and also in figure caption), there is a dot at the end of the sentence, sometimes not ... -- Serge Stinckwich http://doesnotunerstand.free.fr/ From oscar at iam.unibe.ch Tue Oct 23 22:43:12 2007 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Tue, 23 Oct 2007 22:43:12 +0200 Subject: [sbe-discussion] Re: A very small typo In-Reply-To: References: Message-ID: <18E0FCFF-38BC-47A0-821E-1D4B966B51C5@iam.unibe.ch> Ah well, as you know, in Squeak a dot is a statement separator, not a terminator, so you can leave it off at the end. ;-) Oscar On Oct 23, 2007, at 10:04, Serge Stinckwich wrote: > Sometimes in method caption (and also in figure caption), there is a > dot at the end of the sentence, sometimes not ... > > -- > Serge Stinckwich > http://doesnotunerstand.free.fr/ > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From Martial.Boniou at ifrance.com Wed Oct 24 12:01:59 2007 From: Martial.Boniou at ifrance.com (Martial Boniou) Date: Wed, 24 Oct 2007 12:01:59 +0200 Subject: [sbe-discussion] Re: A very small typo In-Reply-To: <18E0FCFF-38BC-47A0-821E-1D4B966B51C5@iam.unibe.ch> References: <18E0FCFF-38BC-47A0-821E-1D4B966B51C5@iam.unibe.ch> Message-ID: <20071024100159.GA716@cendre> I guess there's a misunderstanding here. What serge means is that there is an inconsistency in the document; in the body, every sentence ends with a period but in the caption (figures, methods code, ....), some sentences are written like this: "this is a great code" "This is a great code" "this is a great code." "This is a great code." So sometimes, there's a period, sometimes not. Sometimes, there's a capital letter, sometimes not. Thus, it looks like there is not a stable convention for typo. And it's the same thing for footnotes. Regards, -- Martial Oscar Nierstrasz a ?crit : | | Ah well, as you know, in Squeak a dot is a statement separator, not a | terminator, so you can leave it off at the end. | | ;-) | | Oscar | | On Oct 23, 2007, at 10:04, Serge Stinckwich wrote: | | > Sometimes in method caption (and also in figure caption), there is a | > dot at the end of the sentence, sometimes not ... | > | > -- | > Serge Stinckwich | > http://doesnotunerstand.free.fr/ | > _______________________________________________ | > Sbe-discussion mailing list | > Sbe-discussion at iam.unibe.ch | > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion | | _______________________________________________ | Sbe-discussion mailing list | Sbe-discussion at iam.unibe.ch | https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From oscar at iam.unibe.ch Wed Oct 24 12:11:37 2007 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Wed, 24 Oct 2007 12:11:37 +0200 Subject: [sbe-discussion] Re: A very small typo In-Reply-To: <20071024100159.GA716@cendre> References: <18E0FCFF-38BC-47A0-821E-1D4B966B51C5@iam.unibe.ch> <20071024100159.GA716@cendre> Message-ID: <838BD228-344F-4B2E-B154-721642CD65A7@iam.unibe.ch> Yes, it was just a silly joke. We are inconsistent in the captions and it should be fixed. The problem is that some of us (like me) prefer minimal captions, whereas others prefer long captions that are full sentences. We should probably settle on a standard style. I will add it to our to-do list. Oscar On Oct 24, 2007, at 12:01, Martial Boniou wrote: > I guess there's a misunderstanding here. What serge means is that > there > is an inconsistency in the document; in the body, every sentence ends > with a period but in the caption (figures, methods code, ....), some > sentences are written like this: > > "this is a great code" > "This is a great code" > "this is a great code." > "This is a great code." > > So sometimes, there's a period, sometimes not. Sometimes, there's a > capital letter, sometimes not. Thus, it looks like there is not a > stable > convention for typo. And it's the same thing for footnotes. > > Regards, > > -- > Martial > > Oscar Nierstrasz a ?crit : > | > | Ah well, as you know, in Squeak a dot is a statement separator, > not a > | terminator, so you can leave it off at the end. > | > | ;-) > | > | Oscar > | > | On Oct 23, 2007, at 10:04, Serge Stinckwich wrote: > | > | > Sometimes in method caption (and also in figure caption), there > is a > | > dot at the end of the sentence, sometimes not ... > | > > | > -- > | > Serge Stinckwich > | > http://doesnotunerstand.free.fr/ > | > _______________________________________________ > | > Sbe-discussion mailing list > | > Sbe-discussion at iam.unibe.ch > | > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > | > | _______________________________________________ > | Sbe-discussion mailing list > | Sbe-discussion at iam.unibe.ch > | https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > From damien.pollet at lu.unisi.ch Wed Oct 24 12:25:55 2007 From: damien.pollet at lu.unisi.ch (Damien Pollet) Date: Wed, 24 Oct 2007 12:25:55 +0200 Subject: [sbe-discussion] Re: A very small typo In-Reply-To: <838BD228-344F-4B2E-B154-721642CD65A7@iam.unibe.ch> References: <18E0FCFF-38BC-47A0-821E-1D4B966B51C5@iam.unibe.ch> <20071024100159.GA716@cendre> <838BD228-344F-4B2E-B154-721642CD65A7@iam.unibe.ch> Message-ID: <97E68C9D-64A9-4FC0-9C77-AB7367A13E44@lu.unisi.ch> On 24 oct. 07, at 12:11, Oscar Nierstrasz wrote: > We should > probably settle on a standard style. I was thinking about adding "The Chicago Manual of Style" to my last amazon shopping spree, finally didn't, and now I regret... maybe one of you already has it? It seems to be the bible of (american) english typography. I don't remember if Strunk & White's "Elements of Style" has advice on that level of detail, but this one did land on the invoice :) -- Damien Pollet type less, do more [ | ] http://people.untyped.org/damien.pollet From serge.stinckwich at gmail.com Wed Oct 24 12:56:53 2007 From: serge.stinckwich at gmail.com (Serge Stinckwich) Date: Wed, 24 Oct 2007 12:56:53 +0200 Subject: [sbe-discussion] Re: A very small typo In-Reply-To: <20071024100159.GA716@cendre> References: <18E0FCFF-38BC-47A0-821E-1D4B966B51C5@iam.unibe.ch> <20071024100159.GA716@cendre> Message-ID: 2007/10/24, Martial Boniou : > I guess there's a misunderstanding here. What serge means is that there > is an inconsistency in the document; in the body, every sentence ends > with a period but in the caption (figures, methods code, ....), some > sentences are written like this: > > "this is a great code" > "This is a great code" > "this is a great code." > "This is a great code." > > So sometimes, there's a period, sometimes not. Sometimes, there's a > capital letter, sometimes not. Thus, it looks like there is not a stable > convention for typo. And it's the same thing for footnotes. Martial, it's just a joke from Oscar ;-) -- Serge Stinckwich http://doesnotunderstand.free.fr/ From Martial.Boniou at ifrance.com Wed Oct 24 15:41:43 2007 From: Martial.Boniou at ifrance.com (Martial Boniou) Date: Wed, 24 Oct 2007 15:41:43 +0200 Subject: [sbe-discussion] Re: A very small typo In-Reply-To: References: <18E0FCFF-38BC-47A0-821E-1D4B966B51C5@iam.unibe.ch> <20071024100159.GA716@cendre> Message-ID: <20071024134143.GA658@cendre> Serge Stinckwich a ?crit : | 2007/10/24, Martial Boniou : | > I guess there's a misunderstanding here. What serge means is that there | > is an inconsistency in the document; in the body, every sentence ends | > with a period but in the caption (figures, methods code, ....), some | > sentences are written like this: | > | > "this is a great code" | > "This is a great code" | > "this is a great code." | > "This is a great code." | > | > So sometimes, there's a period, sometimes not. Sometimes, there's a | > capital letter, sometimes not. Thus, it looks like there is not a stable | > convention for typo. And it's the same thing for footnotes. | | Martial, it's just a joke from Oscar ;-) I probably forgot to upgrade my *humour* package in my image-brain. ;-) Actually it's a good point I didn't understand well because it could be the source of a more accurate typo for the whole book. The content is excellent and it seems that the printing is good too so that annoys me a bit to see a good work not to be on the way to reach a high pro quality knowing that there is not too much to do to achieve this. It's not only I am perfectionnist but I saw a lot of open-source projects to stop in a version-0.99.99.99-thats-enough style those last years. Squeak is good, we know that, but we have to convince people and this book can only do this if it is really perfect (it's on way!). It's a great work Oscar et al. did and I'm glad to see it's a living document (like smalltalk lives); there will be new chapter, errata... a really coherent typo convention agreed by every writers should be a part of this cooperative neverending project. Out of context: I also notice that the symbol >> is transformed by a french guillements; maybe it's good for everybody but it looks a little bit small. Cheers, -- Martial | -- Serge Stinckwich | http://doesnotunderstand.free.fr/ | _______________________________________________ | Sbe-discussion mailing list | Sbe-discussion at iam.unibe.ch | https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From oscar at iam.unibe.ch Thu Oct 25 09:21:26 2007 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Thu, 25 Oct 2007 09:21:26 +0200 Subject: [sbe-discussion] Re: Small formatting space, Page 186 In-Reply-To: References: Message-ID: Ugh. Thanks. More stupid LaTeX macro problems. oscar On Oct 22, 2007, at 21:41, Michael Roberts wrote: > "All Number objects support various.... > others which generate Duration s, such as hour..." > > I think the space between Duration and s should be removed? > > thanks, > > Mike From enrico.spinielli at googlemail.com Wed Oct 24 16:38:55 2007 From: enrico.spinielli at googlemail.com (Enrico Spinielli) Date: Wed, 24 Oct 2007 16:38:55 +0200 Subject: [sbe-discussion] problematic filename ? Message-ID: Hi, I was trying to get a copy of the svc repository of the book and got the following at some point $ svn checkout https://www.iam.unibe.ch/scg/svn_repos/SqueakByExample/ ... svn: Can't check path 'SqueakByExample\Book\FirstApp\Where is the source code?': The filename, directory name, or volume label syntax is incorrect. I did this both under cygwin and plain MS Windows Any helps? Bye Enrico PS: svn version is 1.4.5 --- Enrico Spinielli "Do Androids dream of electric sheep?" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/sbe-discussion/attachments/20071024/26a6718e/attachment.html From oscar at iam.unibe.ch Thu Oct 25 10:15:10 2007 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Thu, 25 Oct 2007 10:15:10 +0200 Subject: [sbe-discussion] Re: problematic filename ? In-Reply-To: References: Message-ID: ugh. I deleted the offending file and moved the contents to README.txt Thanks for pointing this out. Please let me know if you succeed now in checking it out. Oscar On Oct 24, 2007, at 16:38, Enrico Spinielli wrote: > Hi, > I was trying to get a copy of the svc repository of the book and > got the following at some point > > $ svn checkout https://www.iam.unibe.ch/scg/svn_repos/SqueakByExample/ > ... > svn: Can't check path 'SqueakByExample\Book\FirstApp\Where is the > source code?': > The filename, directory name, or volume label syntax is incorrect. > > I did this both under cygwin and plain MS Windows > > Any helps? > Bye > Enrico > PS: svn version is 1.4.5 > --- > Enrico Spinielli > "Do Androids dream of electric sheep?" > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From enrico.spinielli at googlemail.com Thu Oct 25 18:01:12 2007 From: enrico.spinielli at googlemail.com (Enrico Spinielli) Date: Thu, 25 Oct 2007 18:01:12 +0200 Subject: [sbe-discussion] eating your own dog's food Message-ID: Hi, I notices that < https://www.iam.unibe.ch/scg/svn_repos/SqueakByExample/Book/examples.st> is using gst to extract the source code examples from the LaTeX file of the book I am curious to know why you did not use squeak itself to do it...in a way it would be a great example to be added in the book! Thanks in advance Bye --- Enrico Spinielli "Do Androids dream of electric sheep?" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/sbe-discussion/attachments/20071025/53496a8a/attachment.html From oscar at iam.unibe.ch Thu Oct 25 18:09:55 2007 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Thu, 25 Oct 2007 18:09:55 +0200 Subject: [sbe-discussion] Re: eating your own dog's food In-Reply-To: References: Message-ID: <0B71609C-DD03-466B-924E-80580D5F1787@iam.unibe.ch> That's easy. Right now there is no easy way to run a Squeak "script" from a Makefile rule. But it is possible with Gnu Smalltalk (or Ruby, which is what I first used). We don't claim that Squeak is a hammer with which to hit every nail. ;-) Oscar On Oct 25, 2007, at 18:01, Enrico Spinielli wrote: > Hi, > I notices that SqueakByExample/Book/examples.st> > is using gst to extract the source code examples from the LaTeX > file of the book > > I am curious to know why you did not use squeak itself to do > it...in a way it would be a > great example to be added in the book! > > Thanks in advance > Bye > --- > Enrico Spinielli > "Do Androids dream of electric sheep?" > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From jason at strangely.org Tue Oct 30 21:03:09 2007 From: jason at strangely.org (Jason Brown) Date: Tue, 30 Oct 2007 20:03:09 +0000 Subject: [sbe-discussion] Abrupt end to printed Lulu book Message-ID: Hi, I downloaded the free PDF of the book and liked what I saw (I've been after a decent Squeak book for ages), so I ordered the printed version from Lulu. It arrived yesterday, but it ends on page 87:-( Lulu have told me that it's a problem in the file, and have refunded my money. I haven't paid to download their PDF, but the free one looks fine to me. Any chance of a ping to this list or the website if you correct it, so that I can try ordering it again (assuming that Lulu are correct, of course)? Cheery, Jason. From xs4hkr at gmail.com Tue Oct 30 21:11:46 2007 From: xs4hkr at gmail.com (Has van der Krieken) Date: Tue, 30 Oct 2007 21:11:46 +0100 Subject: [sbe-discussion] Re: Abrupt end to printed Lulu book In-Reply-To: References: Message-ID: <1e86bb070710301311x63dbbbbfu202ae414989e2df8@mail.gmail.com> I've got a printed copy that's ok. It's based on the 2007-09-13 version. Received it about a month ago. Regards, Has. On 10/30/07, Jason Brown wrote: > Hi, > > I downloaded the free PDF of the book and liked what I saw (I've been > after a decent Squeak book for ages), so I ordered the printed version > from Lulu. It arrived yesterday, but it ends on page 87:-( Lulu have > told me that it's a problem in the file, and have refunded my money. I > haven't paid to download their PDF, but the free one looks fine to me. > > Any chance of a ping to this list or the website if you correct it, so > that I can try ordering it again (assuming that Lulu are correct, of > course)? > > Cheery, > Jason. > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > From oscar at iam.unibe.ch Tue Oct 30 21:20:06 2007 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Tue, 30 Oct 2007 21:20:06 +0100 Subject: [sbe-discussion] Re: Abrupt end to printed Lulu book In-Reply-To: <1e86bb070710301311x63dbbbbfu202ae414989e2df8@mail.gmail.com> References: <1e86bb070710301311x63dbbbbfu202ae414989e2df8@mail.gmail.com> Message-ID: Hi Jason, I have ordered myself over 50 copies for students and found no problems. Michele Lanza ordered a bunch too, and found one copy that was printed partway upside-down. So it seems that there is some small risk of print errors, but the chance is about 1 in 100. Please let us know what happens if you re-order it. We still have perfectly ok copies, and in a pinch can send you one of these. Oscar PS: the PDF you can download from lulu should be identical to the free one. PPS: I also had a problem ordering another book once from lulu, and they very quickly solved the problem. I have the impression that they take care to maintain their reputation. On Oct 30, 2007, at 21:11, Has van der Krieken wrote: > I've got a printed copy that's ok. It's based on the 2007-09-13 > version. > Received it about a month ago. > > Regards, Has. > > On 10/30/07, Jason Brown wrote: >> Hi, >> >> I downloaded the free PDF of the book and liked what I saw (I've been >> after a decent Squeak book for ages), so I ordered the printed >> version >> from Lulu. It arrived yesterday, but it ends on page 87:-( Lulu have >> told me that it's a problem in the file, and have refunded my >> money. I >> haven't paid to download their PDF, but the free one looks fine to >> me. >> >> Any chance of a ping to this list or the website if you correct >> it, so >> that I can try ordering it again (assuming that Lulu are correct, of >> course)? >> >> Cheery, >> Jason. >> _______________________________________________ >> Sbe-discussion mailing list >> Sbe-discussion at iam.unibe.ch >> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion >> > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From jason at strangely.org Tue Oct 30 21:27:26 2007 From: jason at strangely.org (Jason Brown) Date: Tue, 30 Oct 2007 20:27:26 +0000 Subject: [sbe-discussion] Re: Abrupt end to printed Lulu book In-Reply-To: References: <1e86bb070710301311x63dbbbbfu202ae414989e2df8@mail.gmail.com> Message-ID: Hmm. My copy is at work (in case Lulu wanted me to return it), so I will check the version tomorrow. I will respond to Lulu and see what they say about the evidence suggesting that the file is not the problem. Thanks for the quick responses, Has and Oscar. On 10/30/07, Oscar Nierstrasz wrote: > I have ordered myself over 50 copies for students and found no > problems. Michele Lanza ordered a bunch too, and found one copy that > was printed partway upside-down. So it seems that there is some small > risk of print errors, but the chance is about 1 in 100. > ... > On Oct 30, 2007, at 21:11, Has van der Krieken wrote: > > > I've got a printed copy that's ok. It's based on the 2007-09-13 > > version. > > Received it about a month ago. From oscar at iam.unibe.ch Tue Oct 30 21:30:27 2007 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Tue, 30 Oct 2007 21:30:27 +0100 Subject: [sbe-discussion] Re: Abrupt end to printed Lulu book In-Reply-To: References: <1e86bb070710301311x63dbbbbfu202ae414989e2df8@mail.gmail.com> Message-ID: Hi Jason, I know that well over 200 copies have been printed and sold, and I only know of two copies that were mis-printed. (Yours and Michele's.) The PDF file cannot be the problem. Lulu should send you a fresh copy. Cheers, Oscar On Oct 30, 2007, at 21:27, Jason Brown wrote: > Hmm. My copy is at work (in case Lulu wanted me to return it), so I > will check the version tomorrow. I will respond to Lulu and see what > they say about the evidence suggesting that the file is not the > problem. > > Thanks for the quick responses, Has and Oscar. > > On 10/30/07, Oscar Nierstrasz wrote: >> I have ordered myself over 50 copies for students and found no >> problems. Michele Lanza ordered a bunch too, and found one copy that >> was printed partway upside-down. So it seems that there is some small >> risk of print errors, but the chance is about 1 in 100. >> ... >> On Oct 30, 2007, at 21:11, Has van der Krieken wrote: >> >>> I've got a printed copy that's ok. It's based on the 2007-09-13 >>> version. >>> Received it about a month ago. > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion