Getting started with Smalltalk
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Subtitle |
| |
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 | 10.5446/32532 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | |
Genre |
00:00
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
09:14
QuicksortIntegrated development environmentStudent's t-testBitEvent horizonWater vaporProcess (computing)Endliche ModelltheorieGoodness of fitWindowNumberPhysical systemComputer animation
11:08
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
19:02
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
26:09
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
33:16
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)
00:00
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.
00:37
We can get some statistics on the room occupation.
00:56
How has the occupation been so far? Great. We only have lunch that we were really told yet.
01:05
OK. And here's one. So, you just, if it's not going to happen on Sunday, it's like early, and it happens.
01:22
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.
01:41
Thank you. We don't know where we are. OK. We don't. So we are.
02:00
OK. Yes. Yes. No, no, I was wondering. We only have the same notes. Oh, OK. Yeah. Yeah.
02:22
OK. So I hope that you have this full photo tutorial.
02:48
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.
03:06
And please pass around the memory sticks. This is something to work along.
03:24
So please bear with someone. All right. Thank you. And we prefer people fanning.
03:40
So if you would say you can join the call line. That makes it much easier.
04:20
So, may I see hands full hands.
04:22
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.
04:40
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.
05:09
I guess so.
05:41
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.
06:01
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.
06:26
You make nice pictures. Yeah, the introspection is already in the small block already. But the nice pictures are much easier.
06:52
And then we hope that you are able to start this by dragging the moose image on the VM.
07:01
That's the way I do it on my Mac. So let me show how that works.
07:24
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.
07:42
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.
08:00
Does everyone have their stick? May I see hands for who has a running image? Yes. Running image? Yes.
08:37
Who is it?
08:45
Okay, who is having notes?
09:01
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.
09:33
Well, you can put the cable in there. You can. Give me a little bit.
09:58
Who has more sticks?
10:10
Good. So, the basic idea is that Smalltalk for people who already know how to program
10:22
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.
10:42
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
11:00
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.
11:24
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.
11:41
Good. Do we all have the image started now?
12:25
Everybody? Everybody? So if everybody got this started
13:13
then please try to use the left mouse and try to see if we can get to the settings
13:27
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
13:46
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
14:04
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.
14:32
You only have to roll without the presentation because you don't have to show it on a large screen.
14:46
Everybody got it up? Who has not?
15:17
Everybody?
16:10
Everyone?
16:55
Everyone? Okay, anyone? We are all there? Good
17:05
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
17:24
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
17:48
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
18:04
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
18:21
This is a small integer with value 7 and with lots of different methods available to run on it
18:48
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
19:02
Yeah, it could be alt depending on your keyboard settings Yeah, shortcut
19:24
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
19:41
and if you want the difference then you should use parents What do we have anymore?
20:14
We have test runners which shows us all the tests in the system
20:24
I can select the bottom one and can say, well run Windows Running all tests in the system takes a lot of time
20:42
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
21:02
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?
21:22
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
21:43
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
22:01
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
22:39
What we see here is
22:46
the packages of classes the classes the category of methods and the methods of a class So there are quite a few classes
23:02
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
23:23
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
23:47
even so many that it gets slow Do you know how many methods objects have?
24:07
Yeah, methods big? I think you can say all selectors
24:23
Oh, selectors, nice So that's the reason why
24:40
we are cleaning up Squeak and 5.0 This is a lot Yours works? Which magical little? This one?
25:01
What I did I just said I want some class and then I said Where is my... Oh shit
25:30
So
25:41
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
26:01
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
26:22
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?
26:41
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
27:01
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
27:21
If you don't return anything special then you will return the object itself cell times self Accept
27:40
Well, and continue I should have restarted that computation probably Anyone know why this does fail?
28:24
I'm one times self to a Metroid of 9 3 cubed is 27, not 9 Thank you
28:41
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
29:02
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
29:20
But you can keep on going in the debugger changing code in the debugger creating methods, creating classes We're going to do that
29:42
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
30:04
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
30:22
in as yet unclassified, I have defined a method cubed The other way around Who is sending this?
30:41
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
31:00
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
31:21
browsers and inspectors and tools to look at code This is the flat view I can also look at the hierarchy
31:42
Then I have the inheritance lookup So that was everything is an object
32:14
Very powerful environment And we have a very simple
32:21
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
32:41
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
33:12
We have a few ways of looking at the code
33:36
So what we see here is that for one of the
33:40
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
34:06
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
34:34
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
34:42
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
35:02
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
35:22
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
35:46
In what space? In this browser If you take a look at this You got this
36:01
Yeah You can also do it by by saying well How's that? And you can see
36:59
It's different ways of looking at the code
37:02
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
37:20
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
37:41
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
38:00
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
38:23
of the packages Just take a look No, that's
38:41
Sorry This is one R package With name forum
39:01
And with classes Those 31 This is not a really good
39:26
example Because this is code That is partially deprecated So we have some strange things Going on here
39:40
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
40:02
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
40:21
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
40:43
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
41:01
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
41:27
Are easier So where we are going to work with Today is this forum package This forum has
41:47
Questions and answers And if you take a look At a web browser And go to port 8181
42:22
Then you can browse The applications installed on your image Yes And we are going to take a look at Agile overflow
42:41
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
43:07
It works on Safari browser Yeah There you can enter a name
43:22
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
43:41
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
44:00
Yeah Oh you just registered Don't think There are any users in there Yeah And then You should ask some questions
45:20
So just
45:21
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
45:42
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
46:00
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
46:21
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
46:42
But you can have persistence options If you want to But you don't need it for this You may notice
47:00
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
47:22
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
47:40
JavaScript libraries And we are now Getting to this
48:05
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
48:20
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
48:46
Well In this case We can say this Text
49:04
Where is it? Extended search Method strings with it
49:26
And then we see Yeah
49:51
Now The thing about using smalltalk is that You have to navigate around Your code a lot And it is a object oriented system
50:01
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
50:21
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
50:46
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
51:01
Method strings with it Command shift E And then I get These results And that's, well Basically I assume that this Stefan is
51:20
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
51:43
Let's find Do I need the quotes For that
52:05
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
52:21
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
52:48
So, what do we have for hints here? We found that Well, then of course We can say
53:02
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
53:21
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
53:42
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
54:01
The navigation is about Limiting the amount of code And 5 So The normal class
54:27
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
54:40
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
55:02
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
55:20
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
55:42
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
56:02
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
56:21
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
56:41
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
57:01
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
57:20
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
57:42
And then of course you need to be Locked in still I think we have time out of ten minutes Ok maybe Yeah
58:01
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
58:39
That's where we want logal to happen
58:41
Can I redraw that? Yes So Yes, well actually
59:03
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
59:22
And the be extra small Ok Did everyone have the button already? Yes
59:48
Does anyone have Any way of moving The image into a very small card? The SD card? Yeah, the micro SD
01:00:18
In smalltalk, methods are compiled independently, so if I say that it's compiled and works
01:00:25
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,
01:00:54
I need to remove that. The language from the canvas was extended with Twitterhoodscrap-specific
01:01:24
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.
01:02:00
Yes, creating methods. That's the same thing as with creating, if I want to create a method.
01:02:12
Well, mostly I just find the class where I want to do it, I find the method.
01:02:23
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?
01:02:46
Yes, you can specify categories. There are predefined ones which you should reuse if they fit. It has no implementation consequences normally.
01:03:02
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
01:03:33
do a method which is called blah. I save it, so I have a method, blah.
01:03:46
Yes, please comment me. So that helps. That's the comment. And of course, we are now looking
01:04:13
at the instance side of a class. There might also be class side methods. So this open returns
01:04:23
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
01:04:44
somewhere. I have a class side method open. That means
01:05:04
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,
01:05:25
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
01:05:42
take a look. We have this. Then of course we want this logout button to do something.
01:06:32
So please remove this method. Right mouse click. That means that we are implementing
01:06:47
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
01:07:08
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.
01:07:55
No, this is not removing all logouts. This is only moving this one. Yeah.
01:08:04
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.
01:08:22
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
01:08:48
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
01:09:03
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
01:09:26
it large enough, we get this plus symbol. And there we can create logout. Just let
01:09:47
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.
01:10:13
Then we see, well, it should be implemented. Then we better do something there. Well, for
01:10:25
the moment, we do nothing and accept again. Oh, that is a nice one.
01:10:59
Not all changes are lost. We have a couple of changes. There I can go back to everything
01:11:12
that I saved as a method can be recovered. But there are at the moment not much interesting
01:11:22
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
01:12:32
of Faro 3.0, which is supposed to be released in March. I should have taken a more stable
01:12:40
VM image. Yes. So yes. The dot is end of sentence. No, I only needed a separator.
01:13:30
Yes. Yes. For methods, I have only one version of this one in here. But if I make some
01:13:52
changes, like I had this, I guess I have a few different versions of that. That's
01:14:12
built in. This is on this image only. We have a distributed version management
01:14:23
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
01:14:40
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
01:15:03
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
01:15:26
where you get them from. Without this Monticello, you're not able to do a proper version control?
01:15:41
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
01:16:01
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
01:16:30
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
01:16:47
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
01:17:11
at all different implementers of user and then take a look. Oh, here I find two different kinds
01:17:24
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,
01:17:41
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.
01:18:05
So if I go back here and do self user nil, we can see if it works. With me it works. Yes?
01:18:44
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
01:19:04
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
01:19:26
self announce, what did that do? It uses an announcements framework which tells interested parties that something happened. So you can subscribe that.
01:19:42
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.
01:20:14
Did that work?
01:20:26
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
01:20:43
since you already used recently. And things which are in the same package. And yeah, make sure that your method names are specific enough.
01:21:10
You should not have the same image started twice because it will be writing both to the changes
01:21:22
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.
01:21:47
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.
01:22:12
Yes, you can find that, yes. But it's not defined here, but it's defined here.
01:22:23
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
01:22:54
of the method which is always public? Methods are always public and there are some conventions
01:23:03
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.
01:23:26
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.
01:23:42
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,
01:24:05
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.
01:24:31
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
01:24:43
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,
01:25:02
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.
01:25:26
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,
01:25:47
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.
01:26:12
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.
01:26:25
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.
01:26:55
The easy thing is to just have an Oracle database behind it and connect lots of images to it.
01:27:06
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.
01:27:26
What about integrating a smalltalk in a graphical interface from Windows, for instance when you have an application, Windows and Azure interface, graphical interface.
01:27:45
This is all face-based now. We have interaction with that.
01:28:06
It's not what I call pretty, but it works.
01:28:28
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,
01:28:45
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
01:29:01
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.
01:29:21
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.
01:29:42
If you have things where you have real objects already instantiated, you can do that. You get the yellow test.
01:30:06
If you finish this exercise, then you can continue with the next exercises. I'll walk around.
01:30:56
Okay.
01:31:20
Yes, yes, yes.
01:32:18
No, no, no, no.
01:32:47
Yes.
01:33:32
Or is it, doesn't it, yeah, well,
01:33:50
okay, so what you did before, implemented one cute method somewhere, pretty basic,
01:34:09
which indicates that part of my, I can do that, I can get the name star
01:34:38
here, and then it would be in the
01:34:47
so
01:35:12
let's say you have some type of object and you will be able to show every
01:35:30
object, so you will put these
01:35:52
So I'm going to ask you a few questions. Do you have any questions? Yes, we do. Okay.
01:36:00
Okay. Okay. Okay. Okay. Okay. Okay. Okay. Okay.
01:36:25
Okay.
01:36:42
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.
01:37:01
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.
01:37:22
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?
01:37:40
Okay.
01:38:07
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?
01:38:22
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.
01:38:44
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.
01:39:00
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,
01:39:20
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.
01:39:43
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
01:40:02
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?
01:40:20
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.
01:40:41
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.