D5 XP tutorial 
Author Message
 D5 XP tutorial

Quote:

> Hi all,

> I've added a page (Extreme Programming) to my web site
> (www.tedbracht.co.uk)

> taking the reader through some of the principles of XP. Of course it
> is

> using the D5Pro XP tools, but if you haven't got that (yet) you could
> do the

> testing part with D4 and SUnit. You will miss out on the refactoring
> tools

> though and have to do that the long way round.

> Enjoy.

Cool, I suggested a long time ago that Ron Jeffries should do a book
on hands on Extreme Programming with Dolphin Smalltalk, the time seems
to be ripe, with the release of Dolphin XP. Nudge, nudge :-)

--

Vennlig hilsen

Syver Enstad



Mon, 18 Oct 2004 23:21:19 GMT  
 D5 XP tutorial


Quote:
>Cool, I suggested a long time ago that Ron Jeffries should do a book
>on hands on Extreme Programming with Dolphin Smalltalk, the time seems
>to be ripe, with the release of Dolphin XP. Nudge, nudge :-)

It'd be fun. But how many would be sold?

Ronald E Jeffries
http://www.XProgramming.com
http://www.objectmentor.com
I'm giving the best advice I have. You get to decide whether it's true for you.



Tue, 19 Oct 2004 04:16:09 GMT  
 D5 XP tutorial

Quote:

>Hi all,

>I've added a page (Extreme Programming) to my web site (www.tedbracht.co.uk)
>taking the reader through some of the principles of XP. Of course it is
>using the D5Pro XP tools, but if you haven't got that (yet) you could do the
>testing part with D4 and SUnit. You will miss out on the refactoring tools
>though and have to do that the long way round.

Good stuff. Thanks for taking the initiative. I'll dare to comment, with
respect, since you had the energy to actually DO this! I hope you don't mind ...

I've just started to look. An early comment: I wouldn't want to have all those
comments in the test:

 DriverTest>>testName
     "both firstname and surname are nil, return an empty string"
     self assert: driver name = ''.
     "firstname is nil, return surname without space"
     driver surname: 'Barrichello'.
     self assert: driver name = 'Barrichello'.
     "firstname and surname are set, return both with space in between"
     driver firstname: 'Rubens'.
     self assert: driver name = 'Rubens Barrichello'.
     "surname is blank, return firstname without space"
     driver surname: ''.
     self deny: driver name = 'Rubens '.

XPers believe that the need for a comment is a signal that the code needs to be
more clear. At first glance I might do something like:

testUninitializedDriverHasBlankName
  self assert: driver name = ''

testSurname
  driver surname: 'Barrichello'.
  self assert: driver name = 'Barrichello'

testFirstAndSurname
  driver surname: 'Barrichello'.
  driver firstName: 'Rubens'.
  self assert: driver name = 'Rubens Barrichello'

and so on. In the last test, I might do this if I wanted to emphasize the
missing space:

testFirstNameOnly
  driver firstName = 'Rubens'.
  self assert: driver name = 'Rubens'.

Note that my tests are all running on a fresh instance so I didn't need to clear
the surname for that last one.
  self deny: driver name last = Character space

Also, as a matter of style I usually wouldn't create an object and then jam its
instance variables. Instead I'd have a constructor method:

Driver class>firstname: firstNameString surname: surnameString

The classic XP Smalltalk style is to follow Kent Beck's Best Practice Smalltalk
Patterns, from which the above is taken.

More when I know more ...

Regards,

Ronald E Jeffries
http://www.XProgramming.com
http://www.objectmentor.com
I'm giving the best advice I have. You get to decide whether it's true for you.



Tue, 19 Oct 2004 04:28:31 GMT  
 D5 XP tutorial

Quote:

>I've added a page (Extreme Programming) to my web site (www.tedbracht.co.uk)
>taking the reader through some of the principles of XP.

One more thing ... I'd suggest doing the tests one at a time. See if you like it
better that way. One assert, a little code, another assert, lather, rinse,
repeat.

I find that ludicrously small steps help me go faster and let me walk away from
the computer any time. Since Smalltalk just /loves/ tiny steps, the technique
works particularly well there.

Just an idea ...

Ronald E Jeffries
http://www.XProgramming.com
http://www.objectmentor.com
I'm giving the best advice I have. You get to decide whether it's true for you.



Tue, 19 Oct 2004 04:36:38 GMT  
 D5 XP tutorial
Hi Ted

I quickly checked out your page, and think it's quite good as an intro to XP.
Ron hit most of the important points in his eloquent post, and I don't really
want to nit-pick on the rest. There's one method that could be more elegantly
refactored, though:

String>>capitalizeEachWord
     "Change the first letter of each word to uppercase"
     | in out capitalizeNext |
     in := ReadStream on: self.
     out := WriteStream on: (String new: self size).
     capitalizeNext := true.
     [in atEnd] whileFalse: [ | char |
             char := in next.
             out nextPut: (capitalizeNext ifTrue: [char asUppercase] ifFalse:
[char]).
             capitalizeNext := char isLetter not].
     ^out contents

SmallLint (in other dialects) would flag your posted version as being
"optimizable".

Cheers
Joseph

Quote:

> Hi all,

> I've added a page (Extreme Programming) to my web site (www.tedbracht.co.uk)
> taking the reader through some of the principles of XP. Of course it is
> using the D5Pro XP tools, but if you haven't got that (yet) you could do the
> testing part with D4 and SUnit. You will miss out on the refactoring tools
> though and have to do that the long way round.

> Enjoy.

> Ted
> www.tedbracht.co.uk

--
Joseph Pelrine [ | ]
MetaProg GmbH

Web:   http://www.metaprog.com

"Inheritance was invented at 2 AM between January 5th and 6th, 1967" -
Krysten Nygaard



Wed, 20 Oct 2004 01:26:39 GMT  
 D5 XP tutorial

Quote:

> >Cool, I suggested a long time ago that Ron Jeffries should do a book
> >on hands on Extreme Programming with Dolphin Smalltalk, the time
> seems to be ripe, with the release of Dolphin XP. Nudge, nudge :-)

> It'd be fun. But how many would be sold?

At least one!

I had been trying out some of the XP practices when I read Ron's
article where he refactored a hastily built alarm clock into prose
like (Dolphin) smalltalk code, it was first then I *got* the feel of
programming and testing at the same time. A book of extreme
programming episodes like the alarm clock (or maybe different) would
be a very cool thing in my eyes.
--

Vennlig hilsen

Syver Enstad



Wed, 20 Oct 2004 02:00:02 GMT  
 D5 XP tutorial


Quote:
> At least one!

<AOL> Me too! </AOL>


Wed, 20 Oct 2004 02:29:59 GMT  
 D5 XP tutorial
Do you have a link for the article you referenced?

jlo

Quote:


>>>Cool, I suggested a long time ago that Ron Jeffries should do a book
>>>on hands on Extreme Programming with Dolphin Smalltalk, the time

>>seems to be ripe, with the release of Dolphin XP. Nudge, nudge :-)

>>It'd be fun. But how many would be sold?

> At least one!

> I had been trying out some of the XP practices when I read Ron's
> article where he refactored a hastily built alarm clock into prose
> like (Dolphin) smalltalk code, it was first then I *got* the feel of
> programming and testing at the same time. A book of extreme
> programming episodes like the alarm clock (or maybe different) would
> be a very cool thing in my eyes.



Wed, 20 Oct 2004 04:10:35 GMT  
 D5 XP tutorial

Quote:

> Do you have a link for the article you referenced?

> jlo



> >>>Cool, I suggested a long time ago that Ron Jeffries should do a
> book

> >>>on hands on Extreme Programming with Dolphin Smalltalk, the time

> >>seems to be ripe, with the release of Dolphin XP. Nudge, nudge :-)

> >>It'd be fun. But how many would be sold?
> > At least one!
> > I had been trying out some of the XP practices when I read Ron's
> > article where he refactored a hastily built alarm clock into prose
> > like (Dolphin) smalltalk code, it was first then I *got* the feel of

> > programming and testing at the same time. A book of extreme
> > programming episodes like the alarm clock (or maybe different) would

> > be a very cool thing in my eyes.

I think it's on Ron Jeffries site, www.xprogramming.com....

Yes, there it was: http://www.xprogramming.com/xpmag/alarm_clock.htm

--

Vennlig hilsen

Syver Enstad



Thu, 21 Oct 2004 08:25:24 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. [DOLPH] D5 XP tutorial

2. XP tutorial for VW/Squeak?

3. To XP or not to XP?

4. XP Home vs XP Pro - switch ???

5. XP mean Windows XP proffessional

6. D5.1.1 Bug -- The Save as Ugly Name Blues

7. D5.1: Workarounds for two strange TreeView quirks

8. what version of D5.1 runs smacc?

9. Q: Unicode support for text edit control? (D5)

10. Issues porting app from D4 to D5

11. D5 patches

12. D5: DBResultSet>>isEmpty

 

 
Powered by phpBB® Forum Software