Recent

Author Topic: Example of new way to educate people about pascal  (Read 2359 times)

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Example of new way to educate people about pascal
« on: December 27, 2022, 07:36:49 pm »
Hi guys,

I had a new idea for an interface design to help people who either are not into programming yet or have only used a language other than Free Pascal. Please see this draft Introduction to Free Pascal web page I posted this morning.

https://www.getlazarus.org/guides/intro/

My idea is to implement a web page system where syntax highlight code is presented like in the Lazarus IDE, and special links are peppered throughout an explanation of how and why Pascal works using an example project. When the user highlights the special link, the relevant source code is highlighted in the syntax window. This then hopefully allows people to understand a bit more about pascal by pairing the explanations with lines of source code.

Let me know what you think about this approach and its implementation,

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Example of new way to educate people about pascal
« Reply #1 on: December 27, 2022, 07:45:15 pm »
This line:
Code: Pascal  [Select][+][-]
  1. These can be either unit source code files or precompiled units, and are is similar to the "using" statements available in C#.
has a redundant "is".

I think it would be better to spell Pascal consistently with a capital "P".

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Example of new way to educate people about pascal
« Reply #2 on: December 27, 2022, 07:51:54 pm »
@howardpc

Thanks for noticing. Just fyi, all pages on that website have an edit feature where anyone can submit edits. I have a back end view to view those edits and approve or merge them.

VisualLab

  • Hero Member
  • *****
  • Posts: 742
Re: Example of new way to educate people about pascal
« Reply #3 on: December 27, 2022, 08:21:18 pm »
I have a small suggestion to change this part of the text:

Quote
Optionally, a mode directive can be used once in any source file to tell the compiler to make use of certain language semantics. In this case, we are using Delphi language semantics.

Maybe instead of the word "language" it's better to use: "dialect" or "variant". It seems to me better to avoid the confusion caused by Inprise many years ago. Then this piece of text would be as follows:

Quote
Optionally, a mode directive can be used once in any source file to tell the compiler to make use of certain language semantics. In this case, we are using Delphi dialect semantics.

Roland57

  • Hero Member
  • *****
  • Posts: 609
    • msegui.net
Re: Example of new way to educate people about pascal
« Reply #4 on: December 27, 2022, 08:25:51 pm »
Good idea, very well done.
My projects are on Codeberg.

Thaddy

  • Hero Member
  • *****
  • Posts: 19279
  • Glad to be alive.
Re: Example of new way to educate people about pascal
« Reply #5 on: December 27, 2022, 11:27:20 pm »
This is what my christmas oracle came up wth:
Code: [Select]
What is your request?
 a new idea for an interface design to help people who either are not into programming yet or have only used a language other than Free Pascal.

Please wait for the response, this can take some time:


My idea is to create an intuitive, interactive user interface for Free Pascal that will allow non-programmers and those with a limited coding background to easily create programs. The interface would look similar to a graphic design program, with a visual representation of the code and a suite of tools that allow users to drag and drop elements into the code window. It would also include an on-screen tutorial that guides users through the basics of programming in Free Pascal. Additionally, the interface would include a library of example programs and code snippets that could be used as a reference when coding. Finally, the interface would include a debugging tool to help users identify and fix errors in their code.
Not very good. Been there

, done that.
------------------
objects are fine constructs. You can even initialize them with constructors.

Zath

  • Sr. Member
  • ****
  • Posts: 391
Re: Example of new way to educate people about pascal
« Reply #6 on: December 27, 2022, 11:46:09 pm »
I have a small suggestion to change this part of the text:

Quote
Optionally, a mode directive can be used once in any source file to tell the compiler to make use of certain language semantics. In this case, we are using Delphi language semantics.

Maybe instead of the word "language" it's better to use: "dialect" or "variant". It seems to me better to avoid the confusion caused by Inprise many years ago. Then this piece of text would be as follows:

Quote
Optionally, a mode directive can be used once in any source file to tell the compiler to make use of certain language semantics. In this case, we are using Delphi dialect semantics.

I disagree.
The word "language" is correct but could be preceded by Pascal and further on, add Delphi.
eg.
"Pascal language semantics" and "Delphi Pascal semantics".
That way you can also use "Lazarus Pascal semantics" and perhaps "Free Pascal semantics" but I would suggest to not use dialect or variant. They simply don't work in this context.

Thaddy

  • Hero Member
  • *****
  • Posts: 19279
  • Glad to be alive.
Re: Example of new way to educate people about pascal
« Reply #7 on: December 28, 2022, 01:16:54 am »
Well, the code is on this forum. Run your own queries.. It is fun...
objects are fine constructs. You can even initialize them with constructors.

VisualLab

  • Hero Member
  • *****
  • Posts: 742
Re: Example of new way to educate people about pascal
« Reply #8 on: December 28, 2022, 01:50:14 am »
Quote
The word "language" is correct but could be preceded by Pascal and further on, add Delphi.

The term "Delphi language" caused confusion:

1. in the more distant past, when Inprise replaced the language name "Object Pascal" with "Delphi",
2. in the recent past, Tiobe's portal stubbornly set the names Object Pascal, Delphi and Pascal disjointly in several different positions.

Therefore, I believe that, in any case, confusion should be prevented. In the case of languages, it is better to stick to the names: Pascal and Object Pascal (similar to: C and C++). Delphi is an IDE and let it stay that way. And since there are some differences between the Delphi and Free Pascal compilers, it must be stated that they are compilers, not languages. Hence my suggestion to use the terms dialect or variant. I'm not saying that the definitions of these differences have to be exactly that. It can be called differently. By contrast, the term "Delphi language" unnecessarily evokes old confusion.

It seems to me that this type of ambiguity needs to be dispelled, because various portals, websites and blogs use different names: Pascal, Free Pascal, Object Pascal, Delphi, Lazarus and Turbo Pascal. And it gets messy. Perhaps this should be clearly described, e.g.:
  • Pascal – procedural programming language (analogous to C),
  • Object Pascal - an object-oriented and procedural programming language, i.e. hybrid (analogous to C++),
  • Free Pascal - a modern compiler that supports both of the above-mentioned languages, is constantly being developed, generates files for many operating systems, including Windows and Linux,
  • Lazarus - a modern RAD-type IDE, available as open source, supports both of the above-mentioned programming languages, uses the Free Pascal compiler, equipped with cross-platform libraries (RTL, FCL, LCL), constantly developed, available for many operating systems, including Windows and Linux,
  • Delphi – a modern RAD-type IDE, commercial, supports the Object Pascal language, uses the DCC compiler, equipped with libraries (RTL, LCL, FMX), constantly developed, supports Windows, Android, MacOS X and iOS,
  • Turbo Pascal - old IDE, includes a compiler of the same name (i.e. Turbo Pascal), created by Borland, no longer developed, supports DOS.

Pascal != Turbo Pascal.

Yes, this is loading information with a shovel to the head, but somehow you have to resist the dullness and malice of people fixated on the beloved brace or space-tab language :)
« Last Edit: December 28, 2022, 01:54:11 am by VisualLab »

PierceNg

  • Sr. Member
  • ****
  • Posts: 435
    • SamadhiWeb
Re: Example of new way to educate people about pascal
« Reply #9 on: December 28, 2022, 03:10:02 am »
The first sentence is already confusing to the intended audience, by conflating the Pascal programming language with the Free Pascal compiler:

Quote
introduction to the Free Pascal programming language for anyone who either isn't familiar with writing computer software or perhaps is not acquainted with Free Pascal.

As for distinction between Pascal and Object Pascal, for the latter my preference is to refer to 'modern Pascal' and drop emphasis on 'object', because OOP gets a lot of (sometimes unjustified) bad press these days, and Pascal is itself considered old and unfashionable, so 'Object Pascal' is doubly bad to that part of the intended audience who may have read about OOP's alleged shortcomings.

My suggestion for the opening paragraph, and I quote myself:

Quote
This short program guide is designed as an introduction to the modern Pascal programming language for anyone who either isn't familiar with writing computer software or perhaps is not acquainted with Pascal, using the Free Pascal compiler suite.

All above IMHO of course.
« Last Edit: December 28, 2022, 03:15:41 am by PierceNg »

440bx

  • Hero Member
  • *****
  • Posts: 6542
Re: Example of new way to educate people about pascal
« Reply #10 on: December 28, 2022, 09:59:34 am »
As various other members have already pointed out, there are a number of Pascal variants.

For someone learning Pascal, it is important to know which variant they are learning because, there are very significant differences between them and, the programmer needs to be aware of them.

Part of the problem is that, Pascal as a language, has not evolved.  What has evolved are a number of variations of the language (Turbo Pascal, Object Pascal, Free Pascal, <something>Pascal.)  Depending on your viewpoint, they are all Pascal or none of them are Pascal (likely none of them abide by a Pascal standard - though one of them may come close.)

At this point, I have doubts that, Pascal as a language, can be made popular again.  That said, I do believe that one of the variants, such as FPC, could be made popular (btw, "could" does not mean "easy").

I think the "solution" is to educate/promote Free Pascal and make it a point to state the fact that it is one of the existing variants of the Pascal language. 

my $0.02
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

Thaddy

  • Hero Member
  • *****
  • Posts: 19279
  • Glad to be alive.
Re: Example of new way to educate people about pascal
« Reply #11 on: December 28, 2022, 10:26:44 am »
Well Free Pascal in mode ISO adheres 99.9999% to the orginal ISO standard and mode ExtendedPascal about 90% to the extended ISO standard. So for educational purposes one could choose one of those. OTOH Object Pascal is a different story, but Delphi and mode Delphi are very, very similar.
« Last Edit: December 28, 2022, 02:07:08 pm by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Example of new way to educate people about pascal
« Reply #12 on: December 30, 2022, 08:32:17 am »
I had a new idea for an interface design to help people who either are not into programming yet or have only used a language other than Free Pascal.
I personally think it's too much for the former target audience, maybe fine for the latter. The concept of threads, synchronization, etc. is not easily grasp and understood, even by people who have adequate entry level programming classes.

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Example of new way to educate people about pascal
« Reply #13 on: December 30, 2022, 02:48:38 pm »
Threads are not difficult to understand. In computer programming, a thread is a sequence of instructions that can execute multiple tasks concurrently. The effect of which is that they can make your program more efficient and responsive. In general, threads can be an effective way to improve the performance and scalability of a program.

In my example program, a secondary thread waits on information to be read while the main thread processes user input and updates the visual graphics inside its window.

Which part of that explanation was so confusing that it would be difficult for a novice to understand?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Example of new way to educate people about pascal
« Reply #14 on: January 02, 2023, 11:58:46 am »
Which part of that explanation was so confusing that it would be difficult for a novice to understand?
You gotta present this to an (some?) actual novice, we can't pretend to be one as we already understood. Get their feedback by asking them to rephrase it back to you. It's the standard SOP in education to see whether your material fits your audience or not.

 

TinyPortal © 2005-2018