Learn Object Oriented Programming - Your First Half Hour!

  Рет қаралды 11,607

Code With Huw

Code With Huw

Жыл бұрын

This series is all about the BIG IDEAS of object orientation. If you are already familiar with an OOP language such as C#, Java, C++ or Ruby, I hope to give you an insight into the principles and practices of object oriented programming as they were originally conceived. Some of those ideas may be new to you. They may give you ideas about coding style that you can apply to whichever language you usually use.
It was the Smalltalk language that really set the standards for object orientation way back in the 1970s and early ‘80s. In this series I will be using Squeak, a free modern implementation of Smalltalk, to help you to get to grips with the core principles of object orientation. Squeak is a lot of fun to use so I encourage you to download a copy and follow along with me.
DOWNLOAD SQUEAK
Squeak Smalltalk
squeak.org/
DOWNLOAD THE SMALLTALK/V TUTORIAL
I will using the excellent Smalltalk/V Tutorial as the “course text” for this series and I encourage you to download a PDF copy of that too:
stephane.ducasse.free.fr/FreeB...
or:
rmod-files.lille.inria.fr/?di...
SUBSCRIBE TO THE CODE WITH HUW CHANNEL
To be notified whenever I upload new lessons, be sure to subscribe.
kzbin.info?s...
BOOKMARK THE SERIES PLAYLIST
To follow this series in order, bookmark the playlist. New episodes are added to the playlist whenever they are published.
• Object Oriented Progra...
WHO IS HUW COLLINGBOURNE?
I’ve been programming since the early 1980s. I’ve written wrote programming columns on Java, C#, Delphi and other languages for “PC Plus Magazine”, “Computer Shopper” and numerous other UK magazines. I wrote the cult adventure game, The Golden Wombat Of Destiny, I have developed programming tools with SapphireSteel Software and I have written programming books published by Dark Neon and No Starch Press. These include books on programming C, C#, Java, Ruby, Delphi and Object Pascal, pointers, recursion and programming adventure games.
All my books can be found on Amazon.
Keep in Touch
==============================
Code With Huw on Facebook:
/ codewithhuw

Пікірлер: 30
@user-dz4nb6hy6r
@user-dz4nb6hy6r Жыл бұрын
I'm just trying out Squeak and this is a brilliant no nonsense start for me. There are very few intro's for interacting with the Squeak system, and this got me over the first hurdle.
@LearnWithHuw
@LearnWithHuw Жыл бұрын
Glad it helped. Squeak takes a bit of getting used to at first. You'll soon feel at home with it!
@detaaditya6237
@detaaditya6237 8 ай бұрын
Thank you so much for sharing about the original OOP concepts, sir!
@LearnWithHuw
@LearnWithHuw 8 ай бұрын
Thank you!
@jinchoung
@jinchoung 8 ай бұрын
alright, that last video was a great intro to what you're going to be covering. subscribed.
@LearnWithHuw
@LearnWithHuw 8 ай бұрын
Many thanks.
@GaryChike
@GaryChike Жыл бұрын
This is awesome Huw! It's not only a solid foundation in the original concepts of OOP, but also a historical lesson. I'm a fan of Pharo myself which is a fork of Squeak. As an aside, for those that may not know, there are actually two Squeaks - one was actually created to communicate with mice by Rob Pike in 1985. It eventually influenced the concurrency model that made its way into the Go language. The Squeak we're learning here, a SmallTalk derivative, was of course created by the venerable Alan Kay in 1996. 🐭🐭
@LearnWithHuw
@LearnWithHuw Жыл бұрын
Yes. Pharo is a great language and IDE too. I was also a big fan of Dolphin Smalltalk for Windows. This was a lovely commercial edition but the market wasn't sufficiently lively to keep it in business. Anyway, I hope the ideas from this series can be applied to Smalltalk dialects as well as other languages object oriented languages.
@GaryChike
@GaryChike Жыл бұрын
@@LearnWithHuw I've heard good things about Dolphin Smalltalk and it appears it has been open sourced with the latest stable version, 7.1.24, released July 2022 with a version 8 in beta.
@humanrayla4785
@humanrayla4785 Жыл бұрын
Loved this really cool!
@LearnWithHuw
@LearnWithHuw Жыл бұрын
Thanks. Lots more to come.
@ccrosetti12
@ccrosetti12 2 ай бұрын
Thanks Hew for bringing back Digitalk Smalltalk/V manual, it was my start long time ago. Have you covered (or plan to cover) what Digitalk released before the acquisition by ParcPlace, the PATRS Workbench for Smalltalk and PARTS Workbench for Java?
@LearnWithHuw
@LearnWithHuw 2 ай бұрын
No. I haven't covered that. I don't recall the Smalltalk workbench. I do remember Actor, however (a curious mix of Smalltalk with a Pascal-like syntax) which may be worth taking another look at.
@tophat593
@tophat593 8 ай бұрын
6:29 paused to take a sneak peak at the syntax. Ohh. I like ifTrue. Indenting is so much better than curly braces, thumbs up there. Single quote for doc string / comment is a bit weird. But yeah, it's not ugly. Putting the internal classes on display is nice too, much less black box and you can ignore if you don't want to be bothered with it. Yeah, pretty good. Pythonesque frankly. Or I guess python is smalltalkese, this very much came first. I wonder why it died so completely.
@LearnWithHuw
@LearnWithHuw 8 ай бұрын
Yes, Smalltalk came on the scene a very long time before Python. As to why some languages succeed and others don't... partly that's due to the features of the language (Smalltalk was VERY hardware intensive at a time when many computers had only a few hundred K of memory and no graphics) and partly it's the luck of the draw. Why did C become all-dominant but Modula-2 faded away?
@NoX-512
@NoX-512 8 ай бұрын
It’s because C style syntax is much more readable and compiles to faster machine code. C style syntax has even been improved in modern languages like Zig. It’s always good to learn old languages if you want to improve modern languages, so that you can take the good ideas and avoid repeating past mistakes. OOP was a huge mistake for most domains. It results in code that is less readable and maintainable, and also less performant than well written procedural/data oriented code.
@tophat593
@tophat593 8 ай бұрын
@@NoX-512 Well you've got some very strong options. I code indented and curly brace languages and I'd go for the former every time in terms of readability. And OOP was a huge mistake... Yeah, yeah, yeah Mr Edgy Opinion.
@NoX-512
@NoX-512 8 ай бұрын
@@tophat593 You sound butthurt. Did I insult your religion?
@maksymiliank5135
@maksymiliank5135 9 ай бұрын
Ok so what is the purpose of the messages and why are they different than calling a function. All I can see is that it's just a syntactic difference but it behaves exactly like a normal function or method Edit: After seeing the conditional statements and loop it seems that you could also pass an arbitrary piece of code as an argument which is then going to be evaluated in the message body. Do I understand it correctly?
@LearnWithHuw
@LearnWithHuw 9 ай бұрын
This should become clearer if you continue to watch the other videos in this series: kzbin.info/aero/PLZHx5heVfgEvuveKG1T7BBSuDOTHl1eLl Essentially, though, message-passing is a way of ensuring that the internal state of objects is kept private. This is explored more in my video on modularity: kzbin.info/www/bejne/g4qncnSed5aEf9E Best wishes Huw
@davidlloyd1526
@davidlloyd1526 8 ай бұрын
There isn't any advantage, it's slower and doesn't really do anything, which is why you don't have messages in modern OO.
@mbaksa
@mbaksa 8 ай бұрын
@@LearnWithHuwInternal state of objects is kept private in many (most?) modern OOP languages, unless you expose members (declare them as public). So, what's the point? Where's the magic? You keep telling us that modern OOP is not real OOP because it doesn't use messages - but it uses method/function calls which are functionally equivalent to messages. Watching your videos is frustrating because in tens of minutes of your video content you lead us to believe that explanation is coming, but there is no explanation on a horizon. And when asked directly about it, you send us to a list of videos. I watched first 45 minutes of that list, and you don't explain the supposed benefits of messages, and what's the big deal. From what I understood from those 45 minutes, you feel that modern OOP languages are not "true OOP" because they allow us to do stuff that Smalltalk doesn't. Is that it? Those limitations can cause more issues than they solve. So it's great that basically nobody uses Smalltalk anymore. It seems there are plenty of reasons for that, starting with those limitations, and the silly thing with operators.
@LearnWithHuw
@LearnWithHuw 8 ай бұрын
@@mbaksa I think you need to concentrate on the "OOP way of doing things" rather than trying to unpick the OOP features of specific languages. I advise everyone to do real, hands-on Smalltalk programming. That's by far the best way to understand the OOP way of thinking. I can try to explain it in the videos, but you really need to program Smalltalk to get a real feel for this.
@rdubb77
@rdubb77 8 ай бұрын
@@davidlloyd1526apparently message passing has advantages with simplifying highly concurrent // parallel systems
@Astrosisphere
@Astrosisphere 4 ай бұрын
Seeing the likes of this language and Haskell, C# seems so far behind! Immutable arrays weren't even a thing in C# until recently - they certainly weren't there prior to .NET Core; the closest thing was a ReadOnlyCollection which needed to take in the heavier and resizable List. 21:03 - Small Talk not only has them but they're also a native part of the language (no need to wrap a mutable array inside an immutable one)!
@ILoveSoImAlive
@ILoveSoImAlive 6 ай бұрын
and what exactly is the difference between a public method and a message?
@LearnWithHuw
@LearnWithHuw 6 ай бұрын
A message describes the request sent to an object. In languages such as Java and C#, a message is implemented as a method-call, based on C-like syntax of function-calls but with the function associated with an object instead of being "free standing" as in C. The method (like a C function but "built into" each object) handles that message.
@ILoveSoImAlive
@ILoveSoImAlive 6 ай бұрын
@@LearnWithHuw so I understand correctly, that the messages can be defined as some process, which involves a sender calling a receiver giving him some typed information with a payload? as far as I know modeling and designing phase for any language uses the correct classical oop terminology, and defines messages, events, signals and this things are later translated into the target programming language, in case of message, as synchronous and asynronous public method calls, or function calls with receiver parameter, with receiver being an object, a component, a class, a struct, a handler. so any language, regardless of oop or not oop does implement messages (or even events or signals) differently, but it implements them correctly. then I do not understand the statement and the reason of it, about modern languages not implementing messages. and imo main feature of oop is not messaging. and even not polymorphism. messges and polymorphism are possible without oop. main thing of oop is specific code structuring and easy info hiding or definition of public interface. later was possible in c/asm also, but one needed like 3 files to set this up. in (most) oop languages you can place all the info into one file.
V - Best Programming Language to Learn in 2023?
8:44
Code to the Moon
Рет қаралды 131 М.
Buy Feastables, Win Unlimited Money
00:51
MrBeast 2
Рет қаралды 90 МЛН
Зу-зу Күлпәш.Курс (6 бөлім)
40:48
ASTANATV Movie
Рет қаралды 427 М.
О, сосисочки! (Или корейская уличная еда?)
00:32
Кушать Хочу
Рет қаралды 4,5 МЛН
FOUND MONEY 😱 #shorts
00:31
dednahype
Рет қаралды 2,6 МЛН
How I would learn to code in 2023 (If I could start over)
8:53
Sahil & Sarra
Рет қаралды 740 М.
Object-Oriented Programming is Bad
44:35
Brian Will
Рет қаралды 2,3 МЛН
Master Object Oriented Programming. Smalltalk’s Big Secret: Turtles!
16:01
3 Types of Algorithms Every Programmer Needs to Know
13:12
ForrestKnight
Рет қаралды 422 М.
Object Oriented Programming is not what I thought - Talk by Anjana Vakil
38:51
Intro to Object Oriented Programming - Crash Course
30:18
freeCodeCamp.org
Рет қаралды 903 М.
The purest coding style, where bugs are near impossible
10:25
Coderized
Рет қаралды 831 М.
Buy Feastables, Win Unlimited Money
00:51
MrBeast 2
Рет қаралды 90 МЛН