View this PageEdit this PageUploads to this PageVersions of this PageHomeRecent ChangesSearchHelp Guide

Squeak for Programmers

Squeak Crash Course for Programmers


As usual, I have not had time to fully organize the myriad of pieces that I would like to come together to give coherence to this presentation. Many things I have need adaptation in various ways. But, as a start, I offer here first, a bunch of links. Second, sketchy notes on organization of topics, perhaps just to prompt my verbal explanation and real-time demonstration. Ultimately, we want all of what I cover written down in just the right way.

Links

Troubleshooting (Things that go wrong, and how to fix them... idiosyncratic to Squeak).
Pieces of an online book. Eventually aimed at people who do not know how to program.
Squeak How-To. Various explanations of how to make things happen, some aimed at the layperson, some aimed at the expert.
SqueakCMI.org local site for squeakers. Under resources, see the
MSTE Squeak Notebook for oodles of simple projects demonstrating various functions and capabilities in context.
Resource Mess: Help Wanted!
For example, see various pages reachable from CS498LBP page,
including Dave's Page, Robert's Changesets, and the Logic Gates Project.


Let's do it.

CRASH COURSE OUTLINE


Overview of the Afternoon

I'll talk fast. You'll lask questions.
There are lots of simple help balloons, and lots of features, that you can explore on your own.
The goal here is to tell you what you need so that all of that is easier to absorb, and so that you don't get lost in a sea of possibilities.

Demo and Quick Tutorial

We all create a car, program a steering wheel, a joystick, and make it follow a road all by itself.
Par: 30 minutes. (This is a 2-hour engagement for the novice).
Topics: halo, viewer, panes, categories, simple drag/drop scripting, ticking, clock rate, conditional tests.

Squeak versus Etoys versus Smalltalk

  • Huh?
    • Origins
    • Philosophy and Limitations
    • Other platforms?!
  • Objects Galore
  • Oh the Places You'll Go
I will whiz you through places to look. But you'll need to explore on your own time. The general rules to keep in mind:
  • There are not nice divisions between smalltalk/morphic and etoys, so if you're inspecting morphs, and examining classes, you are in the wrong place (unless that is where you want to be.
  • The reasons you may want to know some features are severalfold:
    • It is a general programming capability
    • It is about a special type of very useful object
    • It allows for changing (manually, not under program control) various behavioral aspects of objects (e.g., "resist being picked up")
    • It allows for debugging and overal authoring ease (finding lost objects, viewing running scripts)
Here is a perhaps dated, but at some point exhaustive listing, of things worth looking at.
Where to Go: 

  • Tiles and their composition.
    • Parts-of-speech metaphor.
    • Green drop region is fickle.
    • Sometimes need to be bold at ripping apart, and creating, tiles you want
  • Big view of the squeak (etoys) programming experience
    • create prototype objects
    • script them
    • modify look/feel/GUI manually or under program control
    • many types of projects possible using special-purpose objects
    • programming with one hand tied behind your back. (but the other hand is VERY powerful).

Practical Concerns

  • plugin for brower versus standalone
  • mysqueak folder, squeaklets, resource files
    • need volunteer for controlled experiment or search squeakland.org forum archive
  • clicking on project, dragging it in, etc. (ditto)
  • squeak image file
  • publish DON'T SAVE

Object Creation

  • supplies bin (accepts drops for cross-project sharing... but also can use other shared flaps
  • painting
  • object catalog
  • embedding: warning!

Data

  • types
  • watchers: simple, detailed, new version vs. old version watcher-sprouting.
  • assignment

Math

  • expanding tiles
  • random numbers
  • arghh. order of eval, how to compensate
  • arghh. no parens, how to compensate
  • arghh. few math functions. how to compensate
    • example: sine function!
  • looking for a few good programmers

Simple Scripting

  • fire once
  • button to fire script
  • subroutine call via script name
  • recursion, beware.

Conditionals

  • basic use
  • tests available
  • testing any variable
  • no logical connectives.... alternatives?

Iteration

  • forever
  • scripts are all basic blocks
  • start, pause, do, stop
  • chaining together scripts

Concurrency, Atomicity, Control

  • "do script foo" versus "script foo"
  • global clock and scheduler metaphor
  • no viewing of intermediate results

I/O

  • external files (help)
  • output, input from holders, other "collections" (see below)
  • user input via mouse, keyboard


FOLLOWING FROM PROGRAMMING BOOK TOC... MERGING INTO ABOVE
Chapter 8: Lists
Chapter 9: Tuples
Chapter 10: Dictionaries
Chapter 11: Files and exceptions
Chapter 12: Classes and objects
Chapter 13: Classes and functions
Chapter 14: Methods
Chapter 15: Sets of objects
Chapter 16: Inheritance
Chapter 17: Linked Lists
Chapter 18: Stacks
Chapter 19: Queues and priority queues
Chapter 20: Trees
Appendix A: Debugging
Appendix B: Creating a new datatype
Appendix C: Complete Python listings
Appendix D: Recommendations for further reading
GNU Free Document License
Index

download a gzipped tar file
of the LaTeX source here