I'm a professional software engineer, programming in C, C++ and C#. And I would definitely recommend Pascal to any beginner. I still use Pascal myself for prototyping and hobby programming. Luckily Free Pascal and Lazarus revived the language. 👍🙂
I grew up with BASIC. Learned Pascal at school. My first C program has Pascal structures. 😅 But as soon as I understood C (Turbo C), I never went back to Pascal or Ada. Also, I think most people are better served with BASIC or Processing for their first programming language. But a good computer programmer can easily turn pseudocode (English) to computer code (insert your favorite language here). PS: Have you checked out Rockstar?
@@LearnWithHuw Something like that. It's "codewithrockstar" 😀 The Rockstar Language Specification Rockstar is intended to give the programmer an unprecedented degree of poetic license when it comes to the composition and structure of their programs.
I made my youth code training with Turbo Pascal... Pascal will always be in my heart... I've learned OOP at 14 thanks to "Borland Pascal". Also Borland made very GREAT books, and I remember learning assembly reading the reference of Turbo Assembler...
I wrote a relatively large program in Delphi starting with a 16-bit version in 1993, going to 32 bits in the next year. I maintained and developed the program until I retired in 2014. It is still in use today, having survived every version of Windows, including Windows 11! Today I play around with Lazarus under Linux and it's great.
What was the program? I used Delphi from the beta of v 1 onwards. What is remarkable though is how good backward compatibility is even with very old Turbo Pascal programs for DOS. I have to say that I was surprised at how few changes I had to make to programs 40 years old to run them with Free Pascal.
@@LearnWithHuw It was a program with database, accounting, and specific functions for a particular industry. My wife and I sold more than 1000 copies of it worldwide. Delphi was perfect for that kind of thing because it allowed quick development of new functions when customers required them.
Excellent. I've been pottering about with Lazarus on my Raspberry Pi computer which runs a version of Linux. This makes it easy to program on Windows then recompile on the Raspberry Pi.
After BASIC and 6502, Pascal was the next language I learned, and what blew me away was the IDE and the ability to compile my programs into executable binaries that could be easily distributed. A cool trick of Turbo Pascal that I loved was that you could have inline assembly code if you needed to speed up some bits of code. Another cool trick of Turbo Pascal was being able to explicitly place a variable at a memory location, which made it easy to map an array over video memory and manipulate the display using an array. Anders Hejlsberg, the legend who created Turbo Pascal, went on to develop C# and TypeScript for Microsoft.
It was also very fast to compile (C compilers like Lattice C were very slow - write/compile/link etc.) and rarely had anything that could reasonably be called an editor or IDE.
I followed the same path. Atari Basic (always wanted to get my little hands on Turbo Basic) , MAC/65 and jumping to PC the only thing i found was TP3. Pascal holds a special place because its strict structure has helped me maintain good 'code hygiene' over the years. 🙃
A sweet memories: I’ve built a LP and cassette indexation system in Turbo Pascal in 1988, little did I know about using a database so I built my own. Later moved on to Delphi when I bought versions 1 and 2. Had an article public in UNDU, The Unofficial Delphi Newsletter. Pascal is now one of the 18 languages I’ve learned over the years.
Turbo/Object Pascal was my next after 8-bit BASICS.... Swiss army knife in DOS times, C was not needed. Then Delphi, now mostly C#... so many memories...
I started programming with Microsoft Basic in the early 1980s. But Borland Turbo Pascal was revolutionary when it was released. I used TP 3, 4, 5 & 5.5 to write many programs. It was so fast for its time. These days, I find C# is most productive for most things.
It's hard to get across to modern programmers quite how revolutionary Turbo Pascal was at the time. Small, blazingly fast, and with a built-in editor. I'd never seen anything like it.
I have TP V1 on 8” disk for CP/M-86 and MS-DOS 86, I purchased for my NEC APC computer. I used TP all the way through to Borland failing, teaching Delphi for Borland Australia for many years. I purchased my first house with a TP application I wrote using TP V1 & V2. Always had a soft spot for Delphi and TP. Been a C# developer mostly from 2000.
Absolutely!!!!!!!! When I was in high school (1988 - 1992), our intro to programming was in Pascal. I believe the authors of the book were CHip Wheems and Nell Dale. Turbo Pascal was the environment (I don't recall what version, but it actually had an object-oriented extension to it that we never used). While yet in high school I picked up C and later C++. But believe it or not, I STILL have my Turbo Pascal book and the installation diskettes on 3.5" floppy!!!LOL Great memories. By the way, I remember that Compaq very well. I interned at GTE Spacenet while in college and that was one of the portable devices we used in the field. Oh to be back there, again.
I think TP 5.5 was the first version with objects. I started with TP 3 and used every version thereafter (also Delphi). That Copaq III was considered to be a marvel of miniaturization when it was first released. Surely, we thought, a computer can never get any smaller than this!!!! 🤣
When I was around 11 or 12, I studied Turbo Pascal 7. This was on very old computers in ~2012. My fondest memory of that experience was zapping myself by touching two CRT monitors at the same time.
I learnt PASCAL at school then went on to program VAX PASCAL for 16 years building low latency stock exchange financial market systems. Wonderful language on that platform. Very powerful and dependable.
I never crossed paths with Pascal, never written Pascal code, and as I'm retired now I guess I never will, so I shall watch this series to discover what I missed out on.
I got to know Niels Jensen when he and some ex-Borland developers set up their TopSpeed Modula-2 offices in London. TS Modula was so good. It was a great shame that it wasn't more successful.
I found an internet page (klangexperimente-mit-der-soundkarte) with a Pascal listing and i build a routine in assembly. @echo off REM Hover 2 voices REM klangexperimente-mit-der-soundkarte echo a cs:100>tmp.deb echo mov si,113>>tmp.deb echo mov cx,E>>tmp.deb echo mov dx,388>>tmp.deb echo lodsb>>tmp.deb echo out dx,al>>tmp.deb echo inc dx>>tmp.deb echo lodsb>>tmp.deb echo out dx,al>>tmp.deb echo dec dx>>tmp.deb echo dec cx>>tmp.deb echo jnz 109>>tmp.deb echo ret>>tmp.deb echo DB 23,1,24,1,E3,0,E4,0,43,0,44,0,63,F0,64,F0,83,F1,84,F1,A0,44,B0,32,A1,3F,B1,32>>tmp.deb echo.>>tmp.deb echo n T1.com>>tmp.deb echo rcx>>tmp.deb echo 2F>>tmp.deb echo wcs:100>>tmp.deb REM echo a cs:100>>tmp.deb echo mov dx,388>>tmp.deb echo mov al,B0>>tmp.deb echo out dx,al>>tmp.deb echo inc dx>>tmp.deb echo mov al,12>>tmp.deb echo out dx,al>>tmp.deb echo dec dx>>tmp.deb echo mov al,B1>>tmp.deb echo out dx,al>>tmp.deb echo inc dx>>tmp.deb echo mov al,12>>tmp.deb echo out dx,al>>tmp.deb echo ret>>tmp.deb echo.>>tmp.deb echo n T2.com>>tmp.deb echo rcx>>tmp.deb echo 13>>tmp.deb echo wcs:100>>tmp.deb echo q>>tmp.deb debugdeb.inf del tmp.deb T1.com pause T2.com del T1.com del T2.com
After GWBasic and IBM's BasicA, turbo pascal 5.5 was my next and it was a very good language. It was also the first version of turbo pascal that vas object oriented.
Still like the turbo bridge. One of the backlist is migrate it to run everywhere like raspberry pi. And update its bidding system to say 5 card major or 2 over 1.
On my ZX Spectrum I learned calculus, by programming in Sinclair BASIC. By the way: then and now, there was no `German` homecomputer around back then. I like your video wholeheartedly !
@@purnamawinarsa7079 I think they released "Borland Pascal With Objects" first, with a class library created by the Whitewater Group (who had previously created a Pascal/Smalltalk hybrid called Actor). Delphi came along a bit later on. At some stage I programmed using all of them (but I've now forgotten a few of them 🙂).
You have mentioned you taught yourself many programming languages, including Ruby, C#, Pascal, etc. and your approach is not to read vast quantities of books but to get stuck into a project. Of all the languages, you did not mention VBA. Nevertheless, I'm sure you can relate to what I'm about to say. I program in VBA but only write code in a procedural way. I have tried following what little material there is on object orientation (for VBA) but things aren't clicking. I know VBA lacks inheritance but that hasn't stopped seasoned C# / C++ programmers writing VBA in a fairly OO way and I find it hard to follow. What's even more difficult for me is understanding the programmer's thought process BEFORE coding takes place. How many classes will be needed, what should each one do and how might they relate to each other? I believe ths is a topic called Data Modelling. What would be your advice for writing VBA in an OO way? (I would prefer not to have to learn another language first, just as I don't think one needs to learn Latin before English or Spanish before French).
It's a long time since I wrote VBA. I still have some code that I use in Excel and Access but that's about it. I can't recall it being object oriented. I think some people claim it has OO-like features because it has properties and "methods" (sort of). But even so, I think it would be a real struggle to try to write in an object oriented manner. I think you would do much better to work on modularity ("encapsulation" and "data hiding" in OOP terminology). I have a video discussing modular programming here: ruclips.net/video/MYDAAhB1QIo/видео.htmlsi=tHTpRmkahMcjRPvb Best wishes Huw
@@LearnWithHuw Thanks for your speedy response. I'll check out your video. With regard to writing VBA in an OO way, I refer to code like these two: ruclips.net/video/vUg-NH-Wqss/видео.html ruclips.net/video/JcVpyIFxUDw/видео.html To me, it is as if the programmer somehow knows the classes he needs and simply starts writing them (akin to a typist, typing at 100wpm)! I have literally just come across this series: ruclips.net/video/fJW65Wo7IHI/видео.html and it appears that to create an OO program takes A LOT of planning. It is often stated that OO is great for large programs but an overkill otherwise. Let us arbitrarily classify small to be anything less than 1000 lines of code. Does that mean if the program stays below the limit of 1000 lines, we can use procedural but if it exceeds 1000, we should use OO? So if there's already 1000 lines and the requirements change, (meaning we need to add code), then what shall we do? Write lines 1001 onwards in an OO way or scrap the whole lot and start from line 1 in an OO way? These are the type of OO planning questions I have not been able to fathom. Hope other readers can understand my predicament!
@@chess-s1q I haven't watched all those videos but I get the feeling the teacher is taking a *very* broad definition of "Object Orientation". VBA doesn't fulfil the definition most people use (e.g. with inheritance and polymorphism). I really think you should concentrate on making your code modular (in well-defined chunks) and keeping individual subroutines or functions are short as possible. Code clarity and modularity are the essentials you should aim for. Best wishes Huw
@@LearnWithHuw Thanks, I already do that and would like to think I have reached a fairly decent level. But to reiterate a golden rule relating to classes and that is "a class should do one thing and one thing alone", perhaps I'm taking things a bit too literally. Suppose you want to bold and underline something. According to the one thing rule, this should be defined in two separate classes, one to bold and another to underline. Therefore no class should ever contain more than a handful lines of code.
@@chess-s1q I wouldn't necessarily strive to make classes smaller than seems useful. However, I would try to make methods as small as possible. So I'd be tempted to have Format class (say) with Bold and Underline methods. Best wishes Huw
Do you please have a suggestion for learning deep computer knowledge behind the scenes, I just barely know computers ends compliers/interpreter but I just want to know like how when we write a code and it is processed in GUI window..like how the computer get its task to draw lines or dots on screen which in-turn show us a GUI window, these day we get pre baked stuff so I think I have missed that side of the knowledge.
Graphics and windowing is VERY complicated. You can certainly learn how to draw shapes and lines by setting pixel colours. However, modern windows-based environments rely on huge amounts of pre-existing code. I am old enough to remember how all this used to be done in early versions of windows. Dragging a window onscreen required writing lots of code a) to find the window dimensions, b) to find what was 'behind' the window, c) to draw the edges of the window in the new position, d) to draw the "background" into the gaps left by the edges of the moved window etc. This had to be done for every single pixel that was moved. I recommend letting the operating system and programming libraries deal with all that now. It was no fun to do the hard way.
@@LearnWithHuw I understand, But i just want to understand theory behind it, few weeks ago a nephew came to my house and these days Minecraft is hot for 9-10 y/o so while i setup him another game to play as i was using Linux some days ago, he asked me can you make minecraft like game for me, which made me thinking how are things done behind all i know is yea there are engine which draw stuff for us and using those libraries even python which is general propose language nowadays can make a simpler version of minecraft, but then i was left with a hole which i don't understand like how those libraries work together to generate pixels to move or create things. Maybe he started my curiosity that i don't want to be left out of much abstraction, i need to learn stuff as to someday tell them when they are older that how these work in my days. Using premade libraries and other important runtimes i feel its better now, but for the sake of future which people have started thinking "this is not my problem so i should just move on" and maybe they just skip some important step that might later help them or maybe it might be myself who can have clear state of process for later stage maybe making a game engine for young nephews or learning stuff for myself.
@@nikkuku7021 There are many "levels" yo would need to dig down to understand this fully. Ultimately it's in the hardware. But at higher levels, the operating system communicates instructions to draw and remove (invalidate in the jargon) pixels, rectangles and other shapes. Then the programming language either communicates with the operating system buy calling API functions or else that is wrapped up in higher level functions. In the early days of MS Windows, typically you had to call API functions using (normally) C. That was very complicated and took a lot of code to do even very simple things like moving a window. These days, languages such as Java, C# etc. hide the API calls (mostly) and provides functions to reduce the amount of highly repetitive code you would otherwise have to write. If you want to understand this more, you may need to experiment with API calls which are still useful when (for example) taking screenshots of windows or rectangles on screen. I teach a whole course on that on Udemy. I wouldn't want to go back to the old way of coding it all laboriously with C and invalidating rectangles etc. however.
TIOBE index is not legitimate and hasn't been for a long time. It's enough to look at its flawed methodology (it's stupid to base anything off of an ever-changing search engine ranking algorithm) and how it's the only place that places Delphi at a top spot. This joke of an index wants us to believe the mighty Visual Basic is more popular than Swift and Objective-C *combined* (so the entire Apple ecosystem). If so, we should be writing Subs and Dims by now. ;) Don't fall for the bullshit, be honest with yourself and appreciate Pascal without tying it to a fake index. It's a wonderful language as is.
I could never get the hang of when to use a DO in Pascal, and also where and where not to place a semicolon. I found the inconsistencies to be annoying and so learned C instead, which has its own set of inconsistencies of course!
Pascal sucked in the 90s. It still sucks. God I hate that we had to use it at school. For me it was Assembly language (m68k) then C, then C++ in 1992. now still C++ in 2024.
I'm a professional software engineer, programming in C, C++ and C#. And I would definitely recommend Pascal to any beginner.
I still use Pascal myself for prototyping and hobby programming.
Luckily Free Pascal and Lazarus revived the language. 👍🙂
Yes, I'm surprised Free Pascal and Lazarus aren't more widely used. Maybe my videos might lead a few people to give them a try, at any rate.
I grew up with BASIC. Learned Pascal at school. My first C program has Pascal structures. 😅
But as soon as I understood C (Turbo C), I never went back to Pascal or Ada. Also, I think most people are better served with BASIC or Processing for their first programming language.
But a good computer programmer can easily turn pseudocode (English) to computer code (insert your favorite language here).
PS: Have you checked out Rockstar?
@@simpletongeek Is that the hair metal language thingummy? Nope. Not yet!
@@LearnWithHuw Something like that. It's "codewithrockstar" 😀
The Rockstar Language Specification
Rockstar is intended to give the programmer an unprecedented degree of poetic license when it comes to the composition and structure of their programs.
I made my youth code training with Turbo Pascal... Pascal will always be in my heart... I've learned OOP at 14 thanks to "Borland Pascal".
Also Borland made very GREAT books, and I remember learning assembly reading the reference of Turbo Assembler...
I wrote a relatively large program in Delphi starting with a 16-bit version in 1993, going to 32 bits in the next year. I maintained and developed the program until I retired in 2014. It is still in use today, having survived every version of Windows, including Windows 11! Today I play around with Lazarus under Linux and it's great.
What was the program?
I used Delphi from the beta of v 1 onwards. What is remarkable though is how good backward compatibility is even with very old Turbo Pascal programs for DOS. I have to say that I was surprised at how few changes I had to make to programs 40 years old to run them with Free Pascal.
@@LearnWithHuw It was a program with database, accounting, and specific functions for a particular industry. My wife and I sold more than 1000 copies of it worldwide. Delphi was perfect for that kind of thing because it allowed quick development of new functions when customers required them.
Excellent. I've been pottering about with Lazarus on my Raspberry Pi computer which runs a version of Linux. This makes it easy to program on Windows then recompile on the Raspberry Pi.
Started pascal programming in school aoround 1981, UCSD pascal, Pascal MT+ 🙂 Still use latest Delphi 12.2
You've been at it about as long as I have then! Maybe a bit longer as I began with TP 3. 🙂
After BASIC and 6502, Pascal was the next language I learned, and what blew me away was the IDE and the ability to compile my programs into executable binaries that could be easily distributed.
A cool trick of Turbo Pascal that I loved was that you could have inline assembly code if you needed to speed up some bits of code. Another cool trick of Turbo Pascal was being able to explicitly place a variable at a memory location, which made it easy to map an array over video memory and manipulate the display using an array.
Anders Hejlsberg, the legend who created Turbo Pascal, went on to develop C# and TypeScript for Microsoft.
It was also very fast to compile (C compilers like Lattice C were very slow - write/compile/link etc.) and rarely had anything that could reasonably be called an editor or IDE.
I followed the same path. Atari Basic (always wanted to get my little hands on Turbo Basic) , MAC/65 and jumping to PC the only thing i found was TP3.
Pascal holds a special place because its strict structure has helped me maintain good 'code hygiene' over the years. 🙃
A sweet memories: I’ve built a LP and cassette indexation system in Turbo Pascal in 1988, little did I know about using a database so I built my own. Later moved on to Delphi when I bought versions 1 and 2. Had an article public in UNDU, The Unofficial Delphi Newsletter. Pascal is now one of the 18 languages I’ve learned over the years.
I'm not sure how many languages I've used over the years. Pascal was certainly one of the first (for which I am grateful).
Bringing back wonderful memories. TP was my first language and brought me to programming initially 20 years ago.
My absolute first language was GW-Basic (ugh!!!). Turbo Pascal came as a wonderful relief. 🙂
Yes, I was blown away with Pascal’s pointers at the time 😂
Ah, the innumerable exciting ways of crashing a program! 🙂
@@LearnWithHuw ha ha 🤣, yes
Turbo/Object Pascal was my next after 8-bit BASICS.... Swiss army knife in DOS times, C was not needed. Then Delphi, now mostly C#... so many memories...
I started programming with Microsoft Basic in the early 1980s. But Borland Turbo Pascal was revolutionary when it was released. I used TP 3, 4, 5 & 5.5 to write many programs. It was so fast for its time. These days, I find C# is most productive for most things.
It's hard to get across to modern programmers quite how revolutionary Turbo Pascal was at the time. Small, blazingly fast, and with a built-in editor. I'd never seen anything like it.
I have TP V1 on 8” disk for CP/M-86 and MS-DOS 86, I purchased for my NEC APC computer. I used TP all the way through to Borland failing, teaching Delphi for Borland Australia for many years. I purchased my first house with a TP application I wrote using TP V1 & V2. Always had a soft spot for Delphi and TP. Been a C# developer mostly from 2000.
Yes. Delphi was great but it has been overtaken by C# in Visual Studio.
Absolutely!!!!!!!! When I was in high school (1988 - 1992), our intro to programming was in Pascal. I believe the authors of the book were CHip Wheems and Nell Dale. Turbo Pascal was the environment (I don't recall what version, but it actually had an object-oriented extension to it that we never used). While yet in high school I picked up C and later C++. But believe it or not, I STILL have my Turbo Pascal book and the installation diskettes on 3.5" floppy!!!LOL Great memories. By the way, I remember that Compaq very well. I interned at GTE Spacenet while in college and that was one of the portable devices we used in the field. Oh to be back there, again.
I think TP 5.5 was the first version with objects. I started with TP 3 and used every version thereafter (also Delphi). That Copaq III was considered to be a marvel of miniaturization when it was first released. Surely, we thought, a computer can never get any smaller than this!!!! 🤣
When I was around 11 or 12, I studied Turbo Pascal 7. This was on very old computers in ~2012.
My fondest memory of that experience was zapping myself by touching two CRT monitors at the same time.
No, I'm not doing that even it it would make a popular RUclips video! 😂
I learnt PASCAL at school then went on to program VAX PASCAL for 16 years building low latency stock exchange financial market systems.
Wonderful language on that platform. Very powerful and dependable.
Yes. It's a shame the curly-bracket languages became quite so dominant!
Been a long time. Gotta love the limits.
I never crossed paths with Pascal, never written Pascal code, and as I'm retired now I guess I never will, so I shall watch this series to discover what I missed out on.
Never say never! 🙂
Modula-2 was great, used it to build a real-time monitoring system on a VAX 11/70 in the mid 80’s. love all the great language choices in the day.
I got to know Niels Jensen when he and some ex-Borland developers set up their TopSpeed Modula-2 offices in London. TS Modula was so good. It was a great shame that it wasn't more successful.
Upvoted for mentioning Oberon.
Ha! Appreciated.
I like to use batch files as open source container for x86 assembly to create tiny executable for DosBox. Have fun.😊
Batch files. It's a while since I've written one of those. Soon I'll be getting nostalgic for win.ini... 🙂
I found an internet page (klangexperimente-mit-der-soundkarte) with a Pascal listing and i build a routine in assembly.
@echo off
REM Hover 2 voices
REM klangexperimente-mit-der-soundkarte
echo a cs:100>tmp.deb
echo mov si,113>>tmp.deb
echo mov cx,E>>tmp.deb
echo mov dx,388>>tmp.deb
echo lodsb>>tmp.deb
echo out dx,al>>tmp.deb
echo inc dx>>tmp.deb
echo lodsb>>tmp.deb
echo out dx,al>>tmp.deb
echo dec dx>>tmp.deb
echo dec cx>>tmp.deb
echo jnz 109>>tmp.deb
echo ret>>tmp.deb
echo DB 23,1,24,1,E3,0,E4,0,43,0,44,0,63,F0,64,F0,83,F1,84,F1,A0,44,B0,32,A1,3F,B1,32>>tmp.deb
echo.>>tmp.deb
echo n T1.com>>tmp.deb
echo rcx>>tmp.deb
echo 2F>>tmp.deb
echo wcs:100>>tmp.deb
REM
echo a cs:100>>tmp.deb
echo mov dx,388>>tmp.deb
echo mov al,B0>>tmp.deb
echo out dx,al>>tmp.deb
echo inc dx>>tmp.deb
echo mov al,12>>tmp.deb
echo out dx,al>>tmp.deb
echo dec dx>>tmp.deb
echo mov al,B1>>tmp.deb
echo out dx,al>>tmp.deb
echo inc dx>>tmp.deb
echo mov al,12>>tmp.deb
echo out dx,al>>tmp.deb
echo ret>>tmp.deb
echo.>>tmp.deb
echo n T2.com>>tmp.deb
echo rcx>>tmp.deb
echo 13>>tmp.deb
echo wcs:100>>tmp.deb
echo q>>tmp.deb
debugdeb.inf
del tmp.deb
T1.com
pause
T2.com
del T1.com
del T2.com
After GWBasic and IBM's BasicA, turbo pascal 5.5 was my next and it was a very good language.
It was also the first version of turbo pascal that vas object oriented.
Yes, I remember TP 5.5 very well.
I loved Pascal, I had to learn Pascal before I could learn C.
Pascal is a great foundation. It's a shame more programmers don't learn that way now.
Still like the turbo bridge. One of the backlist is migrate it to run everywhere like raspberry pi. And update its bidding system to say 5 card major or 2 over 1.
Epic language…I started on BASIC/assembly and BCPL then moved to Pascal/Modula-2 Also loved Borland C, RM C for low level stuff😎🤓😵💫
BCPL. Not many people remember that now. Good experience to have!
On my ZX Spectrum I learned calculus, by programming in Sinclair BASIC. By the way: then and now, there was no `German` homecomputer around back then. I like your video wholeheartedly !
Many thanks.
By the way, there was a great Hisoft Pascal compiler for the Spectrum. I loved it!
@@thomasrichard7054 Oh yes, I remember HiSoft. Whatever became of them, I wonder?
@@LearnWithHuw Unfortunately, I have no idea. Anyone else perhaps?
Turbo Pascal contiunue with Borland Delphi, i remember ..
but i loss all the diskettes
@@purnamawinarsa7079 I think they released "Borland Pascal With Objects" first, with a class library created by the Whitewater Group (who had previously created a Pascal/Smalltalk hybrid called Actor). Delphi came along a bit later on. At some stage I programmed using all of them (but I've now forgotten a few of them 🙂).
You have mentioned you taught yourself many programming languages, including Ruby, C#, Pascal, etc. and your approach is not to read vast quantities of books but to get stuck into a project.
Of all the languages, you did not mention VBA. Nevertheless, I'm sure you can relate to what I'm about to say.
I program in VBA but only write code in a procedural way.
I have tried following what little material there is on object orientation (for VBA) but things aren't clicking. I know VBA lacks inheritance but that hasn't stopped seasoned C# / C++ programmers writing VBA in a fairly OO way and I find it hard to follow.
What's even more difficult for me is understanding the programmer's thought process BEFORE coding takes place. How many classes will be needed, what should each one do and how might they relate to each other?
I believe ths is a topic called Data Modelling.
What would be your advice for writing VBA in an OO way? (I would prefer not to have to learn another language first, just as I don't think one needs to learn Latin before English or Spanish before French).
It's a long time since I wrote VBA. I still have some code that I use in Excel and Access but that's about it. I can't recall it being object oriented. I think some people claim it has OO-like features because it has properties and "methods" (sort of). But even so, I think it would be a real struggle to try to write in an object oriented manner. I think you would do much better to work on modularity ("encapsulation" and "data hiding" in OOP terminology). I have a video discussing modular programming here: ruclips.net/video/MYDAAhB1QIo/видео.htmlsi=tHTpRmkahMcjRPvb
Best wishes
Huw
@@LearnWithHuw Thanks for your speedy response. I'll check out your video.
With regard to writing VBA in an OO way, I refer to code like these two:
ruclips.net/video/vUg-NH-Wqss/видео.html
ruclips.net/video/JcVpyIFxUDw/видео.html
To me, it is as if the programmer somehow knows the classes he needs and simply starts writing them (akin to a typist, typing at 100wpm)!
I have literally just come across this series:
ruclips.net/video/fJW65Wo7IHI/видео.html
and it appears that to create an OO program takes A LOT of planning.
It is often stated that OO is great for large programs but an overkill otherwise.
Let us arbitrarily classify small to be anything less than 1000 lines of code.
Does that mean if the program stays below the limit of 1000 lines, we can use procedural but if it exceeds 1000, we should use OO?
So if there's already 1000 lines and the requirements change, (meaning we need to add code), then what shall we do? Write lines 1001 onwards in an OO way or scrap the whole lot and start from line 1 in an OO way?
These are the type of OO planning questions I have not been able to fathom.
Hope other readers can understand my predicament!
@@chess-s1q I haven't watched all those videos but I get the feeling the teacher is taking a *very* broad definition of "Object Orientation". VBA doesn't fulfil the definition most people use (e.g. with inheritance and polymorphism). I really think you should concentrate on making your code modular (in well-defined chunks) and keeping individual subroutines or functions are short as possible. Code clarity and modularity are the essentials you should aim for.
Best wishes
Huw
@@LearnWithHuw Thanks, I already do that and would like to think I have reached a fairly decent level.
But to reiterate a golden rule relating to classes and that is "a class should do one thing and one thing alone", perhaps I'm taking things a bit too literally.
Suppose you want to bold and underline something. According to the one thing rule, this should be defined in two separate classes, one to bold and another to underline.
Therefore no class should ever contain more than a handful lines of code.
@@chess-s1q I wouldn't necessarily strive to make classes smaller than seems useful. However, I would try to make methods as small as possible. So I'd be tempted to have Format class (say) with Bold and Underline methods.
Best wishes
Huw
Do you please have a suggestion for learning deep computer knowledge behind the scenes, I just barely know computers ends compliers/interpreter but I just want to know like how when we write a code and it is processed in GUI window..like how the computer get its task to draw lines or dots on screen which in-turn show us a GUI window, these day we get pre baked stuff so I think I have missed that side of the knowledge.
Graphics and windowing is VERY complicated. You can certainly learn how to draw shapes and lines by setting pixel colours. However, modern windows-based environments rely on huge amounts of pre-existing code. I am old enough to remember how all this used to be done in early versions of windows. Dragging a window onscreen required writing lots of code a) to find the window dimensions, b) to find what was 'behind' the window, c) to draw the edges of the window in the new position, d) to draw the "background" into the gaps left by the edges of the moved window etc. This had to be done for every single pixel that was moved. I recommend letting the operating system and programming libraries deal with all that now. It was no fun to do the hard way.
@@LearnWithHuw I understand, But i just want to understand theory behind it, few weeks ago a nephew came to my house and these days Minecraft is hot for 9-10 y/o so while i setup him another game to play as i was using Linux some days ago, he asked me can you make minecraft like game for me, which made me thinking how are things done behind all i know is yea there are engine which draw stuff for us and using those libraries even python which is general propose language nowadays can make a simpler version of minecraft, but then i was left with a hole which i don't understand like how those libraries work together to generate pixels to move or create things. Maybe he started my curiosity that i don't want to be left out of much abstraction, i need to learn stuff as to someday tell them when they are older that how these work in my days. Using premade libraries and other important runtimes i feel its better now, but for the sake of future which people have started thinking "this is not my problem so i should just move on" and maybe they just skip some important step that might later help them or maybe it might be myself who can have clear state of process for later stage maybe making a game engine for young nephews or learning stuff for myself.
@@nikkuku7021 There are many "levels" yo would need to dig down to understand this fully. Ultimately it's in the hardware. But at higher levels, the operating system communicates instructions to draw and remove (invalidate in the jargon) pixels, rectangles and other shapes. Then the programming language either communicates with the operating system buy calling API functions or else that is wrapped up in higher level functions. In the early days of MS Windows, typically you had to call API functions using (normally) C. That was very complicated and took a lot of code to do even very simple things like moving a window. These days, languages such as Java, C# etc. hide the API calls (mostly) and provides functions to reduce the amount of highly repetitive code you would otherwise have to write. If you want to understand this more, you may need to experiment with API calls which are still useful when (for example) taking screenshots of windows or rectangles on screen. I teach a whole course on that on Udemy. I wouldn't want to go back to the old way of coding it all laboriously with C and invalidating rectangles etc. however.
10th place at tiobe index this month 💪💪
Ah yes! It's not up there with Python and C++. But it's above Rust and Ruby, so there's still hope.
TIOBE index is not legitimate and hasn't been for a long time. It's enough to look at its flawed methodology (it's stupid to base anything off of an ever-changing search engine ranking algorithm) and how it's the only place that places Delphi at a top spot. This joke of an index wants us to believe the mighty Visual Basic is more popular than Swift and Objective-C *combined* (so the entire Apple ecosystem). If so, we should be writing Subs and Dims by now. ;)
Don't fall for the bullshit, be honest with yourself and appreciate Pascal without tying it to a fake index. It's a wonderful language as is.
Begin and end should have never gone away. Software would be. BEtter today
I could never get the hang of when to use a DO in Pascal, and also where and where not to place a semicolon. I found the inconsistencies to be annoying and so learned C instead, which has its own set of inconsistencies of course!
Awesome.
Thanks. Have fun with this!
i program in scratch
It does not run like this in macOS. whilst one can run in on command line separately, running it would NOT present a window!
I'm not sure what you mean. Are your comments relating to Turbo Pascal or Free Pascal or Lazarus ? Which window isn't shown?
No not pascal, eeiww
Pascal sucked in the 90s. It still sucks. God I hate that we had to use it at school.
For me it was Assembly language (m68k) then C, then C++ in 1992. now still C++ in 2024.
It still sucks because...?
Thank you for ur knowledge sir 🙏