SlideShare a Scribd company logo
1 of 16
S.Ducasse 1
QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.
Stéphane Ducasse
Stephane.Ducasse@univ-savoie.fr
http://www.listic.univ-savoie.fr/~ducasse/
Common Mistakes and
Debugging in VW
S.Ducasse 2
• Preventing: Most Common Mistakes
• Curing: Debugging Fast (from ST Report July 93)
• Extras
Roadmap
S.Ducasse 3
• true is the boolean value, True its class.
• Book>>initialize
• inLibrary := True
• Book>>initialize
• inLibrary := true
• nil is not an acceptable receiver for ifTrue:
Common Beginner Bugs (I)
S.Ducasse 4
• whileTrue: and whileTrue receivers must be a block
•
[x<y] whileTrue: [x := x + 3]
• Redefining a class:
• Before creating a class, check if it already exists.This is
(sigh) a weakness of the system
Object subclass: #View (Squeak)
• VisualWorks 7.0 has namespaces so less likely to
redefine a class
Common Beginner Bugs (II)
S.Ducasse 5
• In a method self is returned by default. Do not forget ^
for returning something else.
• Packet>>isAddressedTo: aNode
• ^ self addressee = aNode name
Common Beginner Bugs (III)
S.Ducasse 6
• Do not try to access instance variables to initialize
them in a class method. It is impossible!
• A class method can only access class instance variables
and classVariables.
• -> Define and invoke an initialize method on
instances.
InstanceVariable Access in Class Method
S.Ducasse 7
Example
Packet class>>send: aString to: anAddress
contents := aString.
addressee := anAddress
Instead create an instance and invoke instance methods
Packet class>>send: aString to: anAddress
^ self new
contents: aString;
addressee: anAddress
S.Ducasse 8
• Do not try to assign a value to a method argument.
Arguments are read only
setName: aString
aString := aString, 'Device'.
name := aString
Method Argument Are Read-Only
S.Ducasse 9
self and super are Read-Only
• Do not try to modify self and super
S.Ducasse 10
• Never redefine basic-methods (==, basicNew,
basicNew:, basicAt:, basicAt:Put:...)
• Never redefine class
• Never redefine name on the class side!
basic* Method Redefinition
S.Ducasse 11
The hash and = Pair
• Redefine hash when you redefine = so that if a = b
then a hash = b hash
•
Book>>=aBook
^self title = aBook title & (self author = aBook
author)
Book>>hash
^self title hash bitXor: self author hash
S.Ducasse 12
• add: returns the argument and not the receiver, so use
yourself to get the collection back.
• Do not subclass Collection classes.
Common Beginner Bugs - Collections
S.Ducasse 13
• Never iterate over a collection which the iteration
somehow modifies.
•
timers do: [:aTimer| aTimer isActive
ifFalse: [ timers remove: aTimer]]
• First copy the collection
• timers copy do: [:aTimer| aTimer isActive
• ifFalse: [ timers remove:
aTimer]
• Take care, since the iteration can involve various
methods and modifications which may not be obvious!
Don’t iterate over collection and modify it
S.Ducasse 14
• Basic Printing
• Transcript cr; show:‘The total= ’, self total printString.
• Use a global or a class to control printing information
Debug
ifTrue:[Transcript show: self total printString]
Debug > 4
ifTrue:[Transcript show: self total printString]
Debug print:[Transcript show: self total printString]
Debugging - Hints
S.Ducasse 15
• Breakpoints
• self halt.
• self error:‘ invalid’
• Conditional halt
i > 10 ifTrue:[self halt]
i haltIfNil
• In Squeak 3.8: haltIf
•self haltIf: (i > 10)
•i haltIf: [:o | o >10]
•self haltIf: #doIt
BreakPoints
S.Ducasse 16

More Related Content

Viewers also liked (20)

Stoop 413-abstract classes
Stoop 413-abstract classesStoop 413-abstract classes
Stoop 413-abstract classes
 
Stoop sed-smells
Stoop sed-smellsStoop sed-smells
Stoop sed-smells
 
06 debugging
06 debugging06 debugging
06 debugging
 
Stoop 421-design heuristics
Stoop 421-design heuristicsStoop 421-design heuristics
Stoop 421-design heuristics
 
Stoop 301-internal objectstructureinvw
Stoop 301-internal objectstructureinvwStoop 301-internal objectstructureinvw
Stoop 301-internal objectstructureinvw
 
Stoop 437-proxy
Stoop 437-proxyStoop 437-proxy
Stoop 437-proxy
 
Stoop 423-smalltalk idioms
Stoop 423-smalltalk idiomsStoop 423-smalltalk idioms
Stoop 423-smalltalk idioms
 
8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model8 - OOP - Smalltalk Model
8 - OOP - Smalltalk Model
 
15 - Streams
15 - Streams15 - Streams
15 - Streams
 
Stoop 433-chain
Stoop 433-chainStoop 433-chain
Stoop 433-chain
 
Stoop 414-smalltalk elementsofdesign
Stoop 414-smalltalk elementsofdesignStoop 414-smalltalk elementsofdesign
Stoop 414-smalltalk elementsofdesign
 
Stoop 431-visitor
Stoop 431-visitorStoop 431-visitor
Stoop 431-visitor
 
Stoop 300-block optimizationinvw
Stoop 300-block optimizationinvwStoop 300-block optimizationinvw
Stoop 300-block optimizationinvw
 
Stoop 416-lsp
Stoop 416-lspStoop 416-lsp
Stoop 416-lsp
 
11 bytecode
11 bytecode11 bytecode
11 bytecode
 
Stoop ed-class forreuse
Stoop ed-class forreuseStoop ed-class forreuse
Stoop ed-class forreuse
 
9 - OOP - Smalltalk Classes (b)
9 - OOP - Smalltalk Classes (b)9 - OOP - Smalltalk Classes (b)
9 - OOP - Smalltalk Classes (b)
 
Stoop 400-metaclass only
Stoop 400-metaclass onlyStoop 400-metaclass only
Stoop 400-metaclass only
 
01 intro
01 intro01 intro
01 intro
 
Stoop ed-subtyping subclassing
Stoop ed-subtyping subclassingStoop ed-subtyping subclassing
Stoop ed-subtyping subclassing
 

Similar to Debugging VisualWorks (20)

10 - OOP - Inheritance (a)
10 - OOP - Inheritance (a)10 - OOP - Inheritance (a)
10 - OOP - Inheritance (a)
 
Stoop ed-frameworks
Stoop ed-frameworksStoop ed-frameworks
Stoop ed-frameworks
 
10 - OOP - Inheritance (b)
10 - OOP - Inheritance (b)10 - OOP - Inheritance (b)
10 - OOP - Inheritance (b)
 
Stoop 450-s unit
Stoop 450-s unitStoop 450-s unit
Stoop 450-s unit
 
Stoop ed-lod
Stoop ed-lodStoop ed-lod
Stoop ed-lod
 
Stoop ed-some principles
Stoop ed-some principlesStoop ed-some principles
Stoop ed-some principles
 
Stoop 432-singleton
Stoop 432-singletonStoop 432-singleton
Stoop 432-singleton
 
Stoop 303-advanced blocks
Stoop 303-advanced blocksStoop 303-advanced blocks
Stoop 303-advanced blocks
 
9 - OOP - Smalltalk Classes (a)
9 - OOP - Smalltalk Classes (a)9 - OOP - Smalltalk Classes (a)
9 - OOP - Smalltalk Classes (a)
 
2 - OOP
2 - OOP2 - OOP
2 - OOP
 
Ruby :: Training 1
Ruby :: Training 1Ruby :: Training 1
Ruby :: Training 1
 
8 - OOP - Syntax & Messages
8 - OOP - Syntax & Messages8 - OOP - Syntax & Messages
8 - OOP - Syntax & Messages
 
Java assgnmt2.
Java assgnmt2.Java assgnmt2.
Java assgnmt2.
 
Stoop ed-unit ofreuse
Stoop ed-unit ofreuseStoop ed-unit ofreuse
Stoop ed-unit ofreuse
 
Stoop 304-metaclasses
Stoop 304-metaclassesStoop 304-metaclasses
Stoop 304-metaclasses
 
SUnit: latest developments
SUnit: latest developmentsSUnit: latest developments
SUnit: latest developments
 
Drush. Why should it be used?
Drush. Why should it be used?Drush. Why should it be used?
Drush. Why should it be used?
 
Sergei Stryukov.Drush.Why it should be used.DrupalCamp Kyiv 2011
Sergei Stryukov.Drush.Why it should be used.DrupalCamp Kyiv 2011Sergei Stryukov.Drush.Why it should be used.DrupalCamp Kyiv 2011
Sergei Stryukov.Drush.Why it should be used.DrupalCamp Kyiv 2011
 
Stoop 423-some designpatterns
Stoop 423-some designpatternsStoop 423-some designpatterns
Stoop 423-some designpatterns
 
Python.ppt
Python.pptPython.ppt
Python.ppt
 

More from The World of Smalltalk (16)

05 seaside canvas
05 seaside canvas05 seaside canvas
05 seaside canvas
 
99 questions
99 questions99 questions
99 questions
 
13 traits
13 traits13 traits
13 traits
 
10 reflection
10 reflection10 reflection
10 reflection
 
09 metaclasses
09 metaclasses09 metaclasses
09 metaclasses
 
08 refactoring
08 refactoring08 refactoring
08 refactoring
 
05 seaside
05 seaside05 seaside
05 seaside
 
04 idioms
04 idioms04 idioms
04 idioms
 
03 standardclasses
03 standardclasses03 standardclasses
03 standardclasses
 
02 basics
02 basics02 basics
02 basics
 
Stoop sed-sharing ornot
Stoop sed-sharing ornotStoop sed-sharing ornot
Stoop sed-sharing ornot
 
Stoop sed-class initialization
Stoop sed-class initializationStoop sed-class initialization
Stoop sed-class initialization
 
Stoop sed-class initialization
Stoop sed-class initializationStoop sed-class initialization
Stoop sed-class initialization
 
Stoop metaclasses
Stoop metaclassesStoop metaclasses
Stoop metaclasses
 
Stoop ed-dual interface
Stoop ed-dual interfaceStoop ed-dual interface
Stoop ed-dual interface
 
Stoop 440-adaptor
Stoop 440-adaptorStoop 440-adaptor
Stoop 440-adaptor
 

Recently uploaded

Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 

Recently uploaded (20)

Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 

Debugging VisualWorks

  • 1. S.Ducasse 1 QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture. Stéphane Ducasse Stephane.Ducasse@univ-savoie.fr http://www.listic.univ-savoie.fr/~ducasse/ Common Mistakes and Debugging in VW
  • 2. S.Ducasse 2 • Preventing: Most Common Mistakes • Curing: Debugging Fast (from ST Report July 93) • Extras Roadmap
  • 3. S.Ducasse 3 • true is the boolean value, True its class. • Book>>initialize • inLibrary := True • Book>>initialize • inLibrary := true • nil is not an acceptable receiver for ifTrue: Common Beginner Bugs (I)
  • 4. S.Ducasse 4 • whileTrue: and whileTrue receivers must be a block • [x<y] whileTrue: [x := x + 3] • Redefining a class: • Before creating a class, check if it already exists.This is (sigh) a weakness of the system Object subclass: #View (Squeak) • VisualWorks 7.0 has namespaces so less likely to redefine a class Common Beginner Bugs (II)
  • 5. S.Ducasse 5 • In a method self is returned by default. Do not forget ^ for returning something else. • Packet>>isAddressedTo: aNode • ^ self addressee = aNode name Common Beginner Bugs (III)
  • 6. S.Ducasse 6 • Do not try to access instance variables to initialize them in a class method. It is impossible! • A class method can only access class instance variables and classVariables. • -> Define and invoke an initialize method on instances. InstanceVariable Access in Class Method
  • 7. S.Ducasse 7 Example Packet class>>send: aString to: anAddress contents := aString. addressee := anAddress Instead create an instance and invoke instance methods Packet class>>send: aString to: anAddress ^ self new contents: aString; addressee: anAddress
  • 8. S.Ducasse 8 • Do not try to assign a value to a method argument. Arguments are read only setName: aString aString := aString, 'Device'. name := aString Method Argument Are Read-Only
  • 9. S.Ducasse 9 self and super are Read-Only • Do not try to modify self and super
  • 10. S.Ducasse 10 • Never redefine basic-methods (==, basicNew, basicNew:, basicAt:, basicAt:Put:...) • Never redefine class • Never redefine name on the class side! basic* Method Redefinition
  • 11. S.Ducasse 11 The hash and = Pair • Redefine hash when you redefine = so that if a = b then a hash = b hash • Book>>=aBook ^self title = aBook title & (self author = aBook author) Book>>hash ^self title hash bitXor: self author hash
  • 12. S.Ducasse 12 • add: returns the argument and not the receiver, so use yourself to get the collection back. • Do not subclass Collection classes. Common Beginner Bugs - Collections
  • 13. S.Ducasse 13 • Never iterate over a collection which the iteration somehow modifies. • timers do: [:aTimer| aTimer isActive ifFalse: [ timers remove: aTimer]] • First copy the collection • timers copy do: [:aTimer| aTimer isActive • ifFalse: [ timers remove: aTimer] • Take care, since the iteration can involve various methods and modifications which may not be obvious! Don’t iterate over collection and modify it
  • 14. S.Ducasse 14 • Basic Printing • Transcript cr; show:‘The total= ’, self total printString. • Use a global or a class to control printing information Debug ifTrue:[Transcript show: self total printString] Debug > 4 ifTrue:[Transcript show: self total printString] Debug print:[Transcript show: self total printString] Debugging - Hints
  • 15. S.Ducasse 15 • Breakpoints • self halt. • self error:‘ invalid’ • Conditional halt i > 10 ifTrue:[self halt] i haltIfNil • In Squeak 3.8: haltIf •self haltIf: (i > 10) •i haltIf: [:o | o >10] •self haltIf: #doIt BreakPoints