We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Getting started with Smalltalk

00:00

Formal Metadata

Title
Getting started with Smalltalk
Subtitle
Learn how to use a smalltalk system
Title of Series
Number of Parts
199
Author
License
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Power (physics)Visualization (computer graphics)Block (periodic table)System callSoftware frameworkIntegrated development environmentSemiconductor memoryVirtual machineHand fanComputer fileArithmetic meanMiniDiscMathematicsFitness functionNeuroinformatikDifferent (Kate Ryan album)Installation art1 (number)Digital photographyServer (computing)StatisticsTouchscreenWindowMultiplication signOpen setPoint (geometry)Cartesian coordinate systemComputing platformMedical imagingPhysical lawState of matterKernel (computing)AreaNumberMereologyVarianceWordSocial classGame controllerGreatest elementField (computer science)Endliche ModelltheorieLikelihood functionRight angleRadiusGradientNatural number
QuicksortIntegrated development environmentStudent's t-testBitEvent horizonWater vaporProcess (computing)Endliche ModelltheorieGoodness of fitWindowNumberPhysical systemComputer animation
Bit ratePhysical systemMultiplication signMoment (mathematics)WindowMedical imagingGoodness of fitPressureForm (programming)Different (Kate Ryan album)Speech synthesisRight angleElectronic visual displayWordPresentation of a groupMenu (computing)Point (geometry)Programming languageWhiteboardLine (geometry)GodIntegerIntegrated development environmentField (computer science)Context awarenessMereologyKeyboard shortcutSet (mathematics)Letterpress printingPower (physics)Java appletObject (grammar)ParsingTouchscreenGame controllerOpen setDefault (computer science)Computer fontCursor (computers)Type theoryResultantFreewareLecture/ConferenceComputer animation
SpacetimePresentation of a groupPhysical systemArithmetic meanSoftware developerInformationGreatest elementInternetworkingSummierbarkeitDecimalPerformance appraisalDifferent (Kate Ryan album)Medical imagingService (economics)Event horizonMultiplication signSocial classGame controllerCategory of beingObject (grammar)QuicksortWeb browserMenu (computing)Software testingType theoryInheritance (object-oriented programming)Keyboard shortcutWindowFlow separationCASE <Informatik>Test-driven developmentBitComputer animation
Rule of inferenceDifferent (Kate Ryan album)Social classPhysical systemElectronic mailing listDialectQuicksortInheritance (object-oriented programming)Programming languageFeedbackSoftware testingDirection (geometry)Point (geometry)Sheaf (mathematics)NeuroinformatikCondition numberClient (computing)Term (mathematics)Object (grammar)SoftwareMathematical analysisNumberShared memorySymbol table1 (number)Keyboard shortcutIntegerHierarchyMessage passingElement (mathematics)Web browserDebuggerCodeMultiplication signResultantGreen's functionSubsetLibrary (computing)Cellular automatonStandard deviationIntegrated development environmentView (database)ImplementationData analysisCubeSource code
Variable (mathematics)Cartesian coordinate systemSocial classView (database)Mathematics1 (number)Inheritance (object-oriented programming)Endliche ModelltheorieMoment (mathematics)Connected spaceBitLine (geometry)GradientNumberWebsiteMedical imagingSoftware developerNormal (geometry)Neighbourhood (graph theory)Self-organizationLengthDynamical systemMultiplication signLimit (category theory)Instance (computer science)Shape (magazine)Right angleRectangleSampling (statistics)Classical physicsMilitary baseInsertion lossElectronic mailing listTheoryDefault (computer science)QuicksortFood energySet (mathematics)Posterior probabilityMusical ensembleCodePoint cloudError messageMetropolitan area networkComplex (psychology)MereologyRevision controlSlide ruleDegree (graph theory)WeightOpen setWordForcing (mathematics)Cellular automatonNumeral (linguistics)Physical systemSign (mathematics)Uniform resource locatorCASE <Informatik>CircleStudent's t-testVarianceVideo gameSource codeAuthorizationField (computer science)Category of beingData structureState of matterGroup actionBootstrap aggregatingPlanningDisk read-and-write headProgramming languageComputer programmingAreaInternetworkingExecution unitLink (knot theory)EstimatorBuildingSpacetimeCondition numberSound effectEvent horizonHuman migrationElectric generatorRule of inferenceLikelihood functionResultantParameter (computer programming)Power (physics)Cycle (graph theory)Incidence algebraComputer filePhysical lawAxiomExtension (kinesiology)Reverse engineeringTrailForm (programming)Software testingArithmetic meanMathematical analysisImage resolutionPressureComputer chessServer (computing)Single-precision floating-point formatMechanism designSoftware frameworkDecision theoryProcess (computing)Different (Kate Ryan album)Position operatorMessage passingFeedbackSummierbarkeitProblemorientierte ProgrammierspracheObject (grammar)Water vaporPoint (geometry)Projective planeIntegrated development environmentSheaf (mathematics)Vector spaceTelecommunicationUsabilityOrder (biology)Structural loadData managementCuboidVideoconferencingBinary codeProduct (business)Web pageHypothesisWeb browserInternet forumString (computer science)Library (computing)Visualization (computer graphics)Computer hardwareFlow separationGUI widgetImplementationGraph coloringType theoryFunctional (mathematics)PhysicalismComputer configurationFluid staticsScaling (geometry)MultiplicationTable (information)DatabaseFirewall (computing)Buffer overflowRepository (publishing)Web 2.0Proper mapLevel (video gaming)VolumenvisualisierungMeta elementLoginNetwork topologyINTEGRALRun time (program lifecycle phase)Online chatGastropod shellShift operatorClique-widthStability theorySelectivity (electronic)DiagonalQuery languageGraphical user interfaceWeb applicationWindowSoftware bugDebuggerGame controllerSubject indexingDependent and independent variablesJava appletSoftwareFocus (optics)HierarchyComputer animation
Transcript: English(auto-generated)
And then the yellow files, in which the changes are changed. So is everything on the screen also the right time? Should be. Not for all Unix times we have to learn. Linux server should be. And please make sure that you pass around.
We can get some statistics on the room occupation.
How has the occupation been so far? Great. We only have lunch that we were really told yet.
OK. And here's one. So, you just, if it's not going to happen on Sunday, it's like early, and it happens.
People are always late late. No one's ever. I used to go further on the week. More than a year ago. So it's. This room is flat. Especially in the room.
Thank you. We don't know where we are. OK. We don't. So we are.
OK. Yes. Yes. No, no, I was wondering. We only have the same notes. Oh, OK. Yeah. Yeah.
OK. So I hope that you have this full photo tutorial.
So, there are three different VMs in there. One for each kind of meaning. You only need one of those. And then you need the movement, which changes.
And please pass around the memory sticks. This is something to work along.
So please bear with someone. All right. Thank you. And we prefer people fanning.
So if you would say you can join the call line. That makes it much easier.
So, may I see hands full hands.
Not the environment. Please. Not yet. We don't have the stick yet. Yes, that's the movement. That's why I asked. And the sticks are there. Coming.
Do you know if there is any power flows anywhere? Because I doubt that three hours of tutorial. There are some places with power flows. I, for instance, have one there. How about three? We have to deal with kind of 50% damage. And there, at the sides, are power flows. You need a long hand.
I guess so.
You just came in. This is the workshop where you can program. So please take your computer. Or join up with someone with a computer. Do you want us to install stuff for you? Yes. I want you to have on your disk. One of those VMs. The one fitting to your machine.
And the steel files. Moose sketches, moose image, and firework. Moose is a framework on top of firework. Firework is a small block. And moose is the visualization.
You make nice pictures. Yeah, the introspection is already in the small block already. But the nice pictures are much easier.
And then we hope that you are able to start this by dragging the moose image on the VM.
That's the way I do it on my Mac. So let me show how that works.
That's what helps me good. Other platforms may have more difficult ways of starting. Can we do it once again? On a Mac I just block the image on the computer.
Of course if you have a new device machine then you have to tell it that it is allowed to run applications which I'm trying to find. Which is something you can do in the settings. And otherwise work on something you downloaded.
Does everyone have their stick? May I see hands for who has a running image? Yes. Running image? Yes.
Who is it?
Okay, who is having notes?
Who is having notes? Anyone? Tell all about the points. Well, not with the window open, but at least have a window open. I guess this one.
Well, you can put the cable in there. You can. Give me a little bit.
Who has more sticks?
Good. So, the basic idea is that Smalltalk for people who already know how to program
somehow looks like an old-fashioned or strange environment but it has windows, it has text so it should be usable for people who used to make clips or those kind of environments.
The problem with Smalltalk is that it is much older than those systems. It was developed before the Macintosh was there and there are a number of things that Macintosh introduced that made things simpler to use
which are simply not in Smalltalk systems. The discoverability of things is on Mac or later Windows. There was some very clear pressure to make sure that everything should be easy to find.
At that moment, Smalltalk were already using those systems for a long time and so they did not feel that need. So there are some things which we will find here strange and we will help you get through those.
Good. Do we all have the image started now?
Everybody? Everybody? So if everybody got this started
then please try to use the left mouse and try to see if we can get to the settings
In Appearance, we have Use Free Type We want that off and on again because this system is configured so it does not read all the fonts from the system
and if we click it out and on, it will re-read all the fonts. That helps us with this presentation. If you put the cursor on the effort tutorial Open Presentation
Did it work, p-type setting? On and off? Off and on again? Then if you do a right click and do a do it then we are supposed to get this display.
You only have to roll without the presentation because you don't have to show it on a large screen.
Everybody got it up? Who has not?
Everybody?
Everyone?
Everyone? Okay, anyone? We are all there? Good
Thank you Smalltalk is a very, very simple language The parser for the language is about 10 times smaller than that for Java or something like that
We have only six keywords Self, super, this, context, true, false and nil Everything is an object and we have a very powerful environment Let's take a look Left mouse and we create a new workspace Just follow along
I can do right mouse click and print it but I can also do on my Mac command-P On Windows it might be control-P or alt-P Please take a look
In a workspace by default If you put a cursor on a line that line is going to be executed, inspected You can take a look Command-I, inspect I am taking a look at what the result is
This is a small integer with value 7 and with lots of different methods available to run on it
Command-P, yes If you take a look at the menu then you see that it has letters behind it and that's supposed to be the command with the Mac it's command On Windows it's control It could be alt
Yeah, it could be alt depending on your keyboard settings Yeah, shortcut
So this might not be as you expected If we take a look what 3 plus 4 times 2 is then we see that we have left to right evaluation
and if you want the difference then you should use parents What do we have anymore?
We have test runners which shows us all the tests in the system
I can select the bottom one and can say, well run Windows Running all tests in the system takes a lot of time
Not in this system There are packages to do that but I have not included them And there has been interesting work in Squeak on making that automatic
One of the things we find interesting in Smalltalk is test-driven development What I can do Don't do that with me is make a new test case How do I make a class here?
Well, everywhere where I have text I can do things So if I say that I want a subclass of test case and I tell it save or accept, command S
then I've created a class There is no or there used to be no menu entry to create a class In Smalltalk you normally open a browser this is a browser and you type over something
and you make with that a new class If I wanted to be not an AA but somewhere else then I could say then I could move it there
What we see here is
the packages of classes the classes the category of methods and the methods of a class So there are quite a few classes
that have lots of methods and then it makes sense to categorize them have accessors separate from behavioral things A bad example of that is object
and then I can say command B for browse then I get a new browser and we see that we have too many categories of methods
even so many that it gets slow Do you know how many methods objects have?
Yeah, methods big? I think you can say all selectors
Oh, selectors, nice So that's the reason why
we are cleaning up Squeak and 5.0 This is a lot Yours works? Which magical little? This one?
What I did I just said I want some class and then I said Where is my... Oh shit
So
in Smalltalk we invented test-driven development and we do that a bit different there We assert something It tells me that this method, cubed
does not exist in the system That is why it's red It doesn't need type information for that I need to enter my name and then I say, well, I expect it to be cubed
and then I can run this test and then it tells me Message not understood, small integer, cubed 3 is a small integer cubed is a message which I don't understand Well Where was that?
That was in test-cubing I don't understand it Well, then we go back there and then we can say Well Perhaps I want to create that and where would I want to create that? Small integer is in a hierarchy
inherits from integer, inherits from number I think I want that in number and I don't want to classify that and then Well, I could say something like return This is a symbol for returning a value
If you don't return anything special then you will return the object itself cell times self Accept
Well, and continue I should have restarted that computation probably Anyone know why this does fail?
I'm one times self to a Metroid of 9 3 cubed is 27, not 9 Thank you
That might help So What we see is that we can have a very short feedback loop from writing the red test to creating the code
and just implementing what we need in the debugger and continue running in the debugger If I had restarted to the right point I could even have gone to a green test result in one time Mostly I don't do that, mostly I just let it go and then restart the test
But you can keep on going in the debugger changing code in the debugger creating methods, creating classes We're going to do that
What? Well If you don't know, then you ask someone cubed, that was the one? Yeah We select it and then we ask Do we have any
implementers of it? Also command M That's the one where we use the keyboard shortcuts a lot And then it tells me that in the numbers package, in the number class
in as yet unclassified, I have defined a method cubed The other way around Who is sending this?
Tells me, well this test cubing is sending this If I only get one result back, I directly get a browser If I select something which has more senders implementers
Then I get a list We have 150 implementers of open, and I can browse them And if I want a browser on the class itself I can click browse and then get to the place So Smalltalk systems have lots of different
browsers and inspectors and tools to look at code This is the flat view I can also look at the hierarchy
Then I have the inheritance lookup So that was everything is an object
Very powerful environment And we have a very simple
language, but a very large library And the different dialects of Smalltalk have different libraries There is ANSI standard which defines the basic stuff, but stuff on top is different
And on top of Faro, I then loaded software for software and data analysis And we can show that If you take a look here at the FO browser And if you do that Do it and open
We have a few ways of looking at the code
So what we see here is that for one of the
packages forum I made some pictures of the classes which are in there So if you take a look where we find this FO browser Command B, browse it
Which part doesn't work? If you select the line Can you open the browser? Or can you open the What I did here was select and do
So this is a class browser It shows me that in announcements I have 4 classes In application I have 2, 4, 6, 8, 9
2 in browser 2, 4, 6, 8, 10 in model And a few in tests And if I then take a look Then you can see that we have the 5 packages here
And that it thinks that one of the It shows inheritance with the lines And it shows something about the size of each class in the size of
the rectangle I guess the number of lines of code is the vertical axis and the number of methods is the horizontal axis and the color is the number of lines of code
In what space? In this browser If you take a look at this You got this
Yeah You can also do it by by saying well How's that? And you can see
It's different ways of looking at the code
Yeah If you take a look at this browser Then you can see That this complexity 2 Which we are looking at Is for small talk too large method This browser is designed
to be optimal for methods of code length About 10 lines By designing it that way It is easier for people to make short methods Because long methods are annoying to look at
And well, what you can see that we are doing here Is I am collecting the packages My package organizer The default one I ask for its packages And I select from them The select gets a block
And that gets passed in all the packages The p is package And I ask the p for its package name I want to know if it begins with forum And from that one I want the packages Then I Make a set of classes And all packages It is the first package
of the packages Just take a look No, that's
Sorry This is one R package With name forum
And with classes Those 31 This is not a really good
example Because this is code That is partially deprecated So we have some strange things Going on here
But the basic thing is If I inspect this Then I get a list Of all the packages And if I select one of those I can ask them For their classes And if I have collected those classes
I can make a view With rectangle shapes And in those few I get notes The packages So those five packages I get in there And for each of them I put a new shape
Rectangle with the width Based on the Number of instance variables of the class And a height based on the Number of methods And the fill color Based on A normalization of the Number of lines of code
So the lowest Is going to be green And the highest is going to be red And then I put them in a tree layout And Tell me that I want a connection A line from the superclass
Of the package of the class To itself And the whole gets in a grid layout The view is the thing that Shows Shows this The canvas I think the other ones
Are easier So where we are going to work with Today is this forum package This forum has
Questions and answers And if you take a look At a web browser And go to port 8181
Then you can browse The applications installed on your image Yes And we are going to take a look at Agile overflow
So basically In this Moose image we have a web Engine running which Runs on port 8181 Which runs seaside And which runs this program application
It works on Safari browser Yeah There you can enter a name
No You don't have to do anything You just go to You do browse Okay Use that as your default yes And then you go to Agile overflow Okay
Does everybody have the Web browser open Or does that work? Because there can be firewall problems Sorry No, sorry It doesn't work It doesn't work It works on the right side
Yeah Oh you just registered Don't think There are any users in there Yeah And then You should ask some questions
So just
Put some data in there Does it have database On the background Small talk systems are Generally image based And an image is basically A document of all the objects You are currently working with So If you don't want to lose what you are
Doing here today then Please save the image When you want to quit The image How can I scale it? How can I scale it? There are different ways You can run this application On multiple VMs Of course you can
Run it from the gemstone Which is basically a persistent Image Which scales to I think they have 90 million Consections An hour or so
The scaling is Not really the problem If you have money to Scale to that size Then you can scale to that size If I know this image Is a 32 gig image And it is 4 gigabytes
But you can have persistence options If you want to But you don't need it for this You may notice
That there is no way to log out Here We are working with A brownfield environment Where There is code But it is not all working And there is functionality missing Like a typical development project So
What we are going to do Is take a look At the exercises Oh This, I forgot, seaside Is the library we use for web applications Nice DSL widgets Support for the several little
JavaScript libraries And we are now Getting to this
So This first exercise we are going to do together And then there will be Exercises for you to do On your own So on the place where 5073
Is shown The number of points we have In this system We want to have a button allowing us to log out When logged in So we need To find the Place
Well In this case We can say this Text
Where is it? Extended search Method strings with it
And then we see Yeah
Now The thing about using smalltalk is that You have to navigate around Your code a lot And it is a object oriented system
So Behavior is distributed on lots of different objects So you have to find the right Objects To make changes And we are going to show you Lots of different ways of finding Finding your code And this exercise shows a few of them So you see that
This text I could find And it is in Five places So you come to five places And that is ok, that works Then you can find it out
Every place Is where I can type text I can select Type that Select it, do the right mouse Click, do the extended Search And say I want the
Method strings with it Command shift E And then I get These results And that's, well Basically I assume that this Stefan is
I haven't typed Stefan as a name So I don't know how to find that I could have taken a look at chat And maybe find If that is close by Chat String with single quotes
Let's find Do I need the quotes For that
Well, no, this is the one Which is showing those things And Then I could of course say Well, I want to browse this Because this does not show this Really the place where the login is happening And then I see that I get
A place with lots of rendering And I see here Render top user on So that might be the space And that is actually the place where It is
So, what do we have for hints here? We found that Well, then of course We can say
Well, I want Something like that Not enough instructions, sorry Not enough instructions We just can extract We just get one point We can't Ok, you have the workspace open? You have the text
5.7 There will be found by Then you can browse them Ok, yes But this is the exercise The exercise is also the exercise So that is probably not the interesting one
So you probably need to Find the other one And take a look You can view which one Which this option It doesn't look like an interesting one So take a look
The navigation is about Limiting the amount of code And 5 So The normal class
So, when I started learning This was really the Difficult part Let's think about classes and methods And strange order of arguments That's easy
Getting used to Using all those different kinds of Inspectors and browsing Findings That's What you mean I needed someone to show me that Philip Showed me The use of senders and implementers After I have been doing small talk
For two years Without Knowing that It's useful Physicality to use It's essential The senders and implementers I use it every hour now All the time
I didn't know that Because I use it like I was used to Delphi Or the Visual Studio Or the Eclipse And the Eclipse has senders and implementers At that time it was not Easy to use So what we see here
Happening If we take a look This is a part of C-site C-site has a Domain specific language A canvas object Which has methods which help us Send Create HTML
So this canvas space Is going to be translated To an HTML space Non directing space And this text Well let's see If it changes If I do a reload And now I see
Of course I'm logged out Because I waited too long Then I need to log in again And then we see that That is the right place Where we are going to make the change As soon as you change the text it will appear You don't need to save it
Sorry I was too fast of course What I did is I saved the method If I You can see the diagonal layer In orange If I then do command S for save It's changed If I do a redraw Here
I Don't Don't Did I make a change? Oh no I did not Make a change Then with a redraw it will Generate the HTML again
For me So this gives me a very fast Feedback loop for creating web Applications How is the This is beautiful I saved what I changed What I should do after that Well go to the web browser And refresh it
And then of course you need to be Locked in still I think we have time out of ten minutes Ok maybe Yeah
So we are following The exercise One of the other things we can do is Not put a text there But put a submit button there
That's where we want logal to happen
Can I redraw that? Yes So Yes, well actually
The normal submit button Is the plain HTML one And of course you can style the CSS But I created, I did it with Bootstrap So we should use a slightly different one Ok And that is the TBS button
And the be extra small Ok Did everyone have the button already? Yes
Does anyone have Any way of moving The image into a very small card? The SD card? Yeah, the micro SD
In smalltalk, methods are compiled independently, so if I say that it's compiled and works
at the same time, if I have an error in there, it will just put some text in between. Then it tells me that there is something wrong with what I did. If I wanted to compile,
I need to remove that. The language from the canvas was extended with Twitterhoodscrap-specific
commands, so we have a Twitterhoodscrap button, and we want the extra small variant in this case, so it looks a bit more in the same style. It's more fun to work along.
Yes, creating methods. That's the same thing as with creating, if I want to create a method.
Well, mostly I just find the class where I want to do it, I find the method.
So methods are on the very right side. Yes, methods are on the very right. This thing is categories of methods. So if I take a look at all, then you have quite a lot. And the accessors are this one. And the category, myself, can specify any category?
Yes, you can specify categories. There are predefined ones which you should reuse if they fit. It has no implementation consequences normally.
But we have a reflective system, so you can ask the system about all accessors or things which are not categorized. One of the things I showed here was uncategorized methods. Oh, sorry. Let's make an uncategorized method here. In the browser, I'm going to
do a method which is called blah. I save it, so I have a method, blah.
Yes, please comment me. So that helps. That's the comment. And of course, we are now looking
at the instance side of a class. There might also be class side methods. So this open returns
self new, which returns an instance of a browser, tells that to create a browser and to open it on itself. So if I take here a look, then I have this browser. This browser, this returns some kind of VLM tabulator which has an open on method
somewhere. I have a class side method open. That means
that I don't have to tell the class new to get an instance of that one. So in this workspace, I have a browser which is the class, and I can directly tell it open. It's like static method? Yes, like static. It's just not static. But yeah. It's a pandemic,
but yeah, like static method. So I don't need an instance to call it. It's like a class method. It's like a class method, yes. And that was the thing I wanted to explain. Let's
take a look. We have this. Then of course we want this logout button to do something.
So please remove this method. Right mouse click. That means that we are implementing
something which is defined up in the here key. That probably means that we should override something that we have should be implemented somewhere. Please remove this method. It works
better for the... We should remove the logout, yes. Otherwise the exercise is going to be very boring. Yes, just take a look. This is only on methods. Then we have a few more.
No, this is not removing all logouts. This is only moving this one. Yeah.
Can I just comment out this? Like I don't want to remove this function. Just comment out. You could, but then the exercise doesn't work. We'll rebuild it.
Yes, please do. Then we go back and we have to log in again and then logout. And then if we switch back to the image, we get the debugger. That's because I told this
seaside application that I want a debugger for that. The default is that it just ignores it, which is more secure. But for development, you want this debugger. So each mistake
you have on the seaside, on the website, you get directly reflected in the image and you can just debug there and continue. So this tells me that it does not understand logout. That probably means that we need to create it. In the debugger, if we make
it large enough, we get this plus symbol. And there we can create logout. Just let
the copycat query be at the moment. There's a bug in there at the moment. And then the full implementation itself should be implemented. Then we say accept and we continue.
Then we see, well, it should be implemented. Then we better do something there. Well, for
the moment, we do nothing and accept again. Oh, that is a nice one.
Not all changes are lost. We have a couple of changes. There I can go back to everything
that I saved as a method can be recovered. But there are at the moment not much interesting
things which I want to have back in this image. But I could select the changes and file them in. What I probably should not have done is based this on the latest version
of Faro 3.0, which is supposed to be released in March. I should have taken a more stable
VM image. Yes. So yes. The dot is end of sentence. No, I only needed a separator.
Yes. Yes. For methods, I have only one version of this one in here. But if I make some
changes, like I had this, I guess I have a few different versions of that. That's
built in. This is on this image only. We have a distributed version management
system called Monticello, which is somewhat older than Git. It's not as powerful as Git, but it does a job. We have made a shell out to do package management for that. And
last week, there was integration with Git so we could use Monticello on the image and just use a Git repository for that. And then we basically put each method in a file so that it might be slow if you have fairly large packages, but has very fine-drained
version management because the version management is on the meta level. Monticello, yes. You can see it here. We have the Monticello browser, which shows us all packages and
where you get them from. Without this Monticello, you're not able to do a proper version control?
Well, you would be able to, but this is the easiest way to do it. With Monticello, you just start making changes to your packages and then you see the ones who have changed and you find the place where you want to put them in the repository and then you commit
them, have a commit message. I didn't check, but this image is a binary file? Yes. So what I did was remove this, make this logout sound and try again. Then we have
nothing happened? Well, then we need to think about what we need there and we have log in here. So we see there that there is something happening with a user. And it's asking it
for itself. So I can take a look at the hierarchy and see if user is defined somewhere. Not there. Yes, here I have user and that uses the session user. Well, perhaps I should take a look
at all different implementers of user and then take a look. Oh, here I find two different kinds
of session. Well, this tells it this is subclass responsibility. So this is an abstract one. So I probably won't need that. And then I have another session and that tells me, hey,
if this user is nil, then something should happen and otherwise we tell them that we are logged in. That suggests that if I tell the user to be nil, that the logout is going to work.
So if I go back here and do self user nil, we can see if it works. With me it works. Yes?
It's the setter, right? Yes, yeah. And the class in general, it's everything protected and you should put the setters, keep the setter on. Is everything open? The instance variables
are normally only reachable from the class itself. Yeah. So you need the next setter if you want to. Except if you use inheritance. Yes? And I see announce is a method, is it? Yes. And on
self announce, what did that do? It uses an announcements framework which tells interested parties that something happened. So you can subscribe that.
There are in small talks often quite a few different mechanisms for doing this kind of thing. There is model and there is announcements, but modern style is to use announcements.
Did that work?
So you have code completion, but as it is a dynamically typed system, it has to do some things to give you the right one. So it tries to be correct
since you already used recently. And things which are in the same package. And yeah, make sure that your method names are specific enough.
You should not have the same image started twice because it will be writing both to the changes
variable. No, no, no. Don't do that. It might go all right for quite some time. So user is a field of the class. User is a field of the class.
So you define the user in here? Yeah. So it's a field? It's an assignment. Yes, the user is a field of the class. Okay. So you can see in the browser, I can see user.
Yes, you can find that, yes. But it's not defined here, but it's defined here.
And it delegates it to the session. This one returns the value and this is the setter. Okay, thank you. And there is a notion of visibility
of the method which is always public? Methods are always public and there are some conventions
for making clear that you are not supposed to use underscore kind and you have a category private. But it's only convention? It's convention and of course because we have this analysis toolkit here running, you can check it at runtime if people keep up with conventions.
Yeah. And that's much more powerful than just having this static compile time checks. You can do much more strong tests for something, yeah.
The first release of smalltalk was when did you make the first release? Smalltalk was standardized in 1980. With the browser, already with the browser? Yes, that was the version that looked quite similar to this. It was not slow,
it did not have so many colors I think. And of course at that time it was really slow, even on really expensive hardware. But 60 years later, the time has come for smalltalk.
For me the most important argument is that it allows you to work with a very short feedback cycle. So you can test many hypothesis
in a working hour and see if it works or not. So the main productivity for me is this very short feedback loop, being able to write a test, implement it in the debugger,
and go on. It's very intense, but it's very powerful. It allows me to make very much speed. Yes, I used to have a gemstone web application running.
So I do refactoring, migrations, those kind of things, where it's of course easier to sell smalltalk, because nobody cares about the tools you use for migrations. The performance is not as good as you can see,
but if you have a home which is limited by engineering, fine. And you have to build the software, not connect any software together, then smalltalk is good to use.
No, they don't have the tools. The feedback loop in Ruby is not as good as in smalltalk. On the other hand they have support for using existing libraries.
So if you only have to connect libraries together, then smalltalk is at the moment not the tool to use. If you have to write a lot of code, customer specific, domain logic, anywhere else, really performance critical, then smalltalk is the language which has the best.
The easy thing is to just have an Oracle database behind it and connect lots of images to it.
Okay, as a front-end, do you have a web server like Nginx or Apache? Yes, we also have an Nginx or something like that to deliver static content, because they will do that much faster than a new language.
What about integrating a smalltalk in a graphical interface from Windows, for instance when you have an application, Windows and Azure interface, graphical interface.
This is all face-based now. We have interaction with that.
It's not what I call pretty, but it works.
So any more questions we got to the first exercise? I have a quick question. How can I trigger it? Normally I type in control space,
it should be on, and if you wait while you're typing something, it should be on. But the thing is, if you have an instance of a task, and you want to know which method
it has, you can go and say, okay, I see the message, but then I always have this window or this new browser. I thought it must be possible to be behind an instance and say, okay, now give me a proposal message from me that I call.
I always have to start typing with any message, because if I don't have any clue which method I call, if you have any that you should inspect, that you know, and if you should type it, so I don't give a code conclusion without having typed any first query.
If you have things where you have real objects already instantiated, you can do that. You get the yellow test.
If you finish this exercise, then you can continue with the next exercises. I'll walk around.
Okay.
Yes, yes, yes.
No, no, no, no.
Yes.
Or is it, doesn't it, yeah, well,
okay, so what you did before, implemented one cute method somewhere, pretty basic,
which indicates that part of my, I can do that, I can get the name star
here, and then it would be in the
so
let's say you have some type of object and you will be able to show every
object, so you will put these
So I'm going to ask you a few questions. Do you have any questions? Yes, we do. Okay.
Okay. Okay. Okay. Okay. Okay. Okay. Okay. Okay.
Okay.
Okay. Okay. Okay. Okay. Okay. So how is it done? Well, let's do it. I can remove all the dialogue and the areas which are... Many, many countries put up one image.
One window, which is the location. That's what I wanted to say. Yes, you can do that. I'm currently using what I've seen on the management page. But you should... I don't know. I've already combined that. Yes. Then it's not possible.
Yes, it's possible. Yes, you probably don't want to wait a few minutes. Actually, it's possible. Okay. Instead, is there something like one process in place, where I can say something like a build?
Okay.
Instead of making it run also faster, I'd say I don't want to... Is there something that I would really like to focus on? Well, I'm working on that. Don't understand everything, right?
It's always good to be able to talk in the VM, and I don't like it now. We don't ask for that. In general, we don't finish before it's put in the VM, which is easier, so... Okay. So... So... Yes, it's... Right here.
It's still... Yeah, I think it's there. ...on the front wall. There's special... I don't know. It should have been... I don't know. I don't know.
If you are... ...the same thing, and we handle our... ...the same solution. No, it's always the same. Also, they have the... ...the same solution. Whether they run the VM, and it keeps up, or, I mean, how does it handle? They want to be in their own... So, from the page for Java to that,
I think it can do faster. If you could understand the message there, you should be able to read it any time, make sure it gets in the right place. We're trying to find out how food should be made. We're trying to find out then slowly as we go. Do you know what it is? It's a question. Actually, there's not much of a place in the room.
It doesn't show any combination. We're just getting started. So it's a few minutes. June, June, June, June. It's the end of the month. It's the end of the month. It doesn't matter. It's time. It's time. We've been talking about it a few times. I wonder if they can build it functionality fast with very
many points. And they can spend time on all the indexes. I think this is the place where we can stop and talk about the registers. So we can find them all the way through. So it's already jitted. Is it possible to write it again?
Or write it in this place? No, no, no. It's a different manager. It's slower than the original. They have a lot of images. There's certain parts. There's certain parts. I've got a few more of this. I'll show them. Yeah, sure. You know what I saw? I don't know. I thought it was a couple of animals.
Also, the gentlemen. Check with them. I'll show them. I'll show them. Hey, when you talk about it, it's the other one. He's a big tool. So the thing is that the tool thing, the tool thing, is the situation in which you move.