Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-10

Teaching Pascal at College

129 messages · 26 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Adrian De Armas

Hello everyone,
I am a professor of "introduction to programming". Currently we are working with matlab and c.

Today I had a meeting about doing the module more interesting to the students. Currently we teach algorithms making console applications and usually I receive questions like "Why don't we do something more modern?".

I recommended that we should use Pascal in General and Lazarus in particular to teach how to create rich GUI Applications and to my surprise the idea was well recieved. Now I have to make suggestions about how to prepare the module starting from zero. Students do not know how to program and I need to include subjects as: variable declaration, operations, if, while, for, functions and procedure, arrays and multidimensional arrays.

I would love to know what you think about making the transition from console to GUI.
This is an exciting opportunity I'd love to make it right.

Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161012/7aef02c8/attachment.html>

Reply by email

Paul Breneman
to Adrian De Armas
Adrian De Armas wrote 18 lines
Hello everyone, I am a professor of "introduction to programming". Currently we are working with matlab and c. Today I had a meeting about doing the module more interesting to the students. Currently we teach algorithms making console applications and usually I receive questions like "Why don't we do something more modern?". I recommended that we should use Pascal in General and Lazarus in particular to teach how to create rich GUI Applications and to my surprise the idea was well recieved. Now I have to make suggestions about how to prepare the module starting from zero. Students do not know how to program and I need to include subjects as: variable declaration, operations, if, while, for, functions and procedure, arrays and multidimensional arrays. I would love to know what you think about making the transition from console to GUI. This is an exciting opportunity I'd love to make it right.

As an electrical engineer (starting study at age 14) I've always enjoyed learning programming when it is *combined* with hardware. There are links to two such projects at the top of this page: http://controlpascal.com/tutorial.htm

There is a link near the bottom of that page to *ideU* which might be one way to transition from console to GUI.

Please keep us informed about how things progress!

Regard,
Paul

Reply by email

Chris Kelling

I'll tell you, after years of doing top down modular programming, it took me a little time to adjust to event driven programing. It wasn't until I used a FOR loop on a form to collect the input that I realized what the difference is.

For a beginning student, you can approach it in two ways - teach programming concepts or just teach the language. This is what I learned in my Computer Science classes.

I had a couple of classmates who were hot shots in JAVA by reading the tutorials online. Where as their mastery of JAVA was impressive, they had no concept of what they were doing in the context of programming. This was a data structures class, and concepts and how to apply them was totally lost on them. Their code was sloppy, inefficient, and very hard to troubleshoot.

One exercise in my C class called for creating a linked list. I used recursion, which took my instructor off guard. He said it wouldn't work, and I asked, "It worked on all my tests, should I stop doing it this way?" He looked at my code again, get a huge smile and remarked that
I used recursion. I said yes, the pre-req for the course was programming I and II, which is where we learned recursion. He still have me more credit because most students were using some king of loop

The point being, the language doesn't matter except for syntax. Programming is programming. That being said, more to what you asked.

To understand how the more advanced concepts work and are used, there needs to be a broad base. I still write a lot of my logic in a unit and then add that unit into a project. Defiantly start them off making simple console programs just to demonstrate the concepts. I'd do it via the Lazarus IDE so they get used to that environment. After they have the basic concepts, introduce what Lazarus is - a group of libraries extending FPC into the visual design. They should have enough of a grasp on the concept of say arrays to understand how a list control works, or how you can use conditional branching (both IF -THEN-ELSE and CASE) to check for radio button and check box states.

But then again, I'm not a professional educator.

-Chris

On Wed, Oct 12, 2016 at 2:10 PM, Adrian De Armas via Lazarus wrote:

Hello everyone, I am a professor of "introduction to programming". Currently we are working with matlab and c.

Today I had a meeting about doing the module more interesting to the students. Currently we teach algorithms making console applications and usually I receive questions like "Why don't we do something more modern?". 

I recommended that we should use Pascal in General and Lazarus in particular to teach how to create rich GUI Applications and to my surprise the idea was well recieved. Now I have to make suggestions about how to prepare the module starting from zero. Students do not know how to program and I need to include subjects as: variable declaration, operations, if, while, for, functions and procedure, arrays and multidimensional arrays.

I would love to know what you think about making the transition from console to GUI.
This is an exciting opportunity I'd love to make it right.

Regards

------------------------------

Reply by email

Mehmet Erol Sanliturk
to Chris Kelling

On Wed, Oct 12, 2016 at 11:52 AM, Chris Kelling via Lazarus <

Show quoted text 74 lines
wrote: I'll tell you, after years of doing top down modular programming, it took me a little time to adjust to event driven programing. It wasn't until I used a FOR loop on a form to collect the input that I realized what the difference is. For a beginning student, you can approach it in two ways - teach programming concepts or just teach the language. This is what I learned in my Computer Science classes. I had a couple of classmates who were hot shots in JAVA by reading the tutorials online. Where as their mastery of JAVA was impressive, they had no concept of what they were doing in the context of programming. This was a data structures class, and concepts and how to apply them was totally lost on them. Their code was sloppy, inefficient, and very hard to troubleshoot. One exercise in my C class called for creating a linked list. I used recursion, which took my instructor off guard. He said it wouldn't work, and I asked, "It worked on all my tests, should I stop doing it this way?" He looked at my code again, get a huge smile and remarked that I used recursion. I said yes, the pre-req for the course was programming I and II, which is where we learned recursion. He still have me more credit because most students were using some king of loop The point being, the language doesn't matter except for syntax. Programming is programming. That being said, more to what you asked. To understand how the more advanced concepts work and are used, there needs to be a broad base. I still write a lot of my logic in a unit and then add that unit into a project. Defiantly start them off making simple console programs just to demonstrate the concepts. I'd do it via the Lazarus IDE so they get used to that environment. After they have the basic concepts, introduce what Lazarus is - a group of libraries extending FPC into the visual design. They should have enough of a grasp on the concept of say arrays to understand how a list control works, or how you can use conditional branching (both IF -THEN-ELSE and CASE) to check for radio button and check box states. But then again, I'm not a professional educator. -Chris On Wed, Oct 12, 2016 at 2:10 PM, Adrian De Armas via Lazarus wrote: Hello everyone, I am a professor of "introduction to programming". Currently we are working with matlab and c. Today I had a meeting about doing the module more interesting to the students. Currently we teach algorithms making console applications and usually I receive questions like "Why don't we do something more modern?". I recommended that we should use Pascal in General and Lazarus in particular to teach how to create rich GUI Applications and to my surprise the idea was well recieved. Now I have to make suggestions about how to prepare the module starting from zero. Students do not know how to program and I need to include subjects as: variable declaration, operations, if, while, for, functions and procedure, arrays and multidimensional arrays. I would love to know what you think about making the transition from console to GUI. This is an exciting opportunity I'd love to make it right. Regards ------------------------------

I have taught mostly Fortran programming to the students ( with Cobol , but , less frequently ) in a University ( Pascal in another University ) .

In those days , there was no any GUI programming facility like Lazarus .

When GUI is started , it was assumed that the students may learn more effectively . My opinion is that such an assumption is misleading , because , it is very easy to generate a GUI program . When it comes to perform some , let's say , data processing , it is becoming necessary to write some Pascal procedure parts ( or procedures ) within GUI program . In that part , the students becoming helpless because they do not know how to write such procedures or parts . To help to the students , my opinion is that , a double way approach should be used :

First teach how to program in plain Pascal , for example , input - process
- output in a console program which is easy to write . After the students have learned what can be down , embed main steps of this console program into a Lazarus ( GUI ) program . In that way , the students will learn how to write an algorithm in Pascal and test it in a simple console program , and then how to make it a GUI program .

They in that way learn how to generate a GUI program . Sometimes by beginning from a console program or directly beginning a GUI program and improve its procedures supplied by Lazarus generated sources , they will be able to develop a software by selecting whichever way is easy and suitable for them .

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161012/7a44e01e/attachment-0001.html>

Reply by email

Tony Whyman
to Adrian De Armas: I am a professor of "introduction to programming". Currently we are working with matlab…

When I read your post ,it sent me back to read the Introduction to Nicklaus Wirth's original "Pascal user Manual and Report" where the opening paragraph says:

"The development of the language Pascal is based on two principal aims. The first is to make available a language suitable to teach programming as a systematic discipline based on certain fundamental concepts clearly and naturally reflected by the language. The second is to develop implementations of this language which are both reliable and efficient on presently available (1975) computers".

Certainly the intent was a very good match for what you want and IMHO that intent was fully realised.

If you can find it, I would recommend getting hold of a copy of what is now an ancient text "Pascal - An Introduction to Methodical Programming
- Findlay and Watt - ISBN 0 273 01220 7 (Original Edition) now 978-1857283648". First published 1978. This used to be the definitive text for learning Pascal and somewhat to my surprise still seems to be available from Amazon in its 3rd Edition.

When I looked down through the content list the order of play and presentation still seems just right for a first course in programming. It does not deal with Object Oriented programming or even "Units". ISO standard Pascal will still some time away but that anyway should be the next semester.

I would also caution against starting on GUI programming too early. If the students don't have a grasp of fundamentals then they will get lost very quickly. Perhaps the best approach is at the end of each subject to translate the simple procedural program they have been working on into a GUI program as a whole class exercise.

From having myself developed many courses in Data Communications over the years, I would also always try and make sure the students understand the context, the background to what they are doing and why.

Somehow you need to get Boolean Algebra in there as well. Findlay and Watt give a primer on this in chapter 5, which is probably about the right stage after having done the basics. And then, of course, there are Turing Machines...

Have fun

Tony Whyman

MWA

Adrian De Armas wrote 24 lines
Hello everyone, I am a professor of "introduction to programming". Currently we are working with matlab and c. Today I had a meeting about doing the module more interesting to the students. Currently we teach algorithms making console applications and usually I receive questions like "Why don't we do something more modern?". I recommended that we should use Pascal in General and Lazarus in particular to teach how to create rich GUI Applications and to my surprise the idea was well recieved. Now I have to make suggestions about how to prepare the module starting from zero. Students do not know how to program and I need to include subjects as: variable declaration, operations, if, while, for, functions and procedure, arrays and multidimensional arrays. I would love to know what you think about making the transition from console to GUI. This is an exciting opportunity I'd love to make it right. Regards

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161012/fd754403/attachment.html>

Reply by email

LacaK
to Tony Whyman
I would also caution against starting on GUI programming too early.

+1
(few years ago I have teached programing on school in our city. I am not a techaer, but school lost teacher and was not able to find someone else) I have used FreePascal + Lazarus for my courses, but we have used only project type of "Program" (so no LCL GUI), exactly for reasons what was mentioned.

I understand, that black/white window does not look modern. You can introduce 2 courses:
1. Introduction to Pascal (Object Pascal)
2. GUI programing

L.

Reply by email

Martin Schreiber
to Adrian De Armas: I am a professor of "introduction to programming". Currently we are working with matlab…
Adrian De Armas wrote
Today I had a meeting about doing the module more interesting to the students. Currently we teach algorithms making console applications and usually I receive questions like "Why don't we do something more modern?".

I made such an experiment with Free Pascal and MSEide+MSEgui:

https://sourceforge.net/projects/mseuniverse/files/book/ "programmierspass_0_1.zip" contains the text and example code (German).

Martin

Reply by email

Graeme Geldenhuys
to LacaK: +1 (few years ago I have teached programing on school in our city. I am not a techaer,…
LacaK wrote
I understand, that black/white window does not look modern. You can introduce 2 courses: 1. Introduction to Pascal (Object Pascal) 2. GUI programing

+1

That would be the best solution. GUI programming is based on fundamentals than need to be understood first. We don't want another whole generation of Visual Basic programmers. The Visual Basic 4-6 programs I had seen and unfortunately had to maintain were the sloppiest code I've ever seen - all written by "programmers" that dived straight into VB with no prior programming experience.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Graeme Geldenhuys
to Chris Kelling: I'll tell you, after years of doing top down modular programming, it took me a little…
Chris Kelling wrote
I would love to know what you think about making the transition from console to GUI.

All kids/students love games, so introducing programming with games in mind helps keep their attention. Here is a link to some online and free course material. Take a look at the "Coding with Pascal - writing the Pong game".

http://www.clubengineer.org/online-learning

I would still teach them the basics of the language first, then introduce GUI programming as Stage 2.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Michael Schnell
to Adrian De Armas: I am a professor of "introduction to programming". Currently we are working with matlab…
Adrian De Armas wrote
"Why don't we do something more modern?".

I don't think Pascal is "modern" at all. IMHO it's a shame, but new projects in Pascal seem to be declining, even though, or maybe exactly because, the quality of the language is great and enforces an elaborated programming style creating decently predictable results.

More "sloppy" languages like Java or Python seem more "modern, right now.

-Michael

Reply by email

Michael Schnell
to Adrian De Armas: I am a professor of "introduction to programming". Currently we are working with matlab…
Adrian De Armas wrote
teach how to create rich GUI Applications and to my surprise the idea was well recieved. Now I have to make suggestions about how to prepar

The GUI development in Lazarus is not "modern" at all (but IMHO a *very* decent way to do a GUI).

Embarcadero Delphi changed to the "FireMonkey" GUI builder, that is intended to do a "modern" "dynamic" GUI, more suitable for mobile-trained users.

Regarding building a GUI, the "RAD" paradigm seems not to to be widely accepted any more, but a dedicated GUI builder, separated from the language code, is recommended in many places, even though a lot more clumsy than Delphi-alike RAD.

-Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161013/09050c74/attachment-0001.html>

Reply by email

Graeme Geldenhuys
to Michael Schnell: I don't think Pascal is "modern" at all. IMHO it's a shame, but new projects in Pascal…
Michael Schnell wrote
IMHO it's a shame, but new projects in Pascal seem to be declining,

That's got nothing to do with the Object Pascal being modern or not (I think it is modern enough). The decline is about marketing and popularity contests, and management decisions (how easy is it to replace a Object Pascal developers vs a Java developer).

Delphi being sold every other year doesn't help with the stability of Object Pascal in the marketplace either.

Regards,
Graeme

Reply by email

Mehmet Erol Sanliturk
to Graeme Geldenhuys

On Thu, Oct 13, 2016 at 3:02 AM, Graeme Geldenhuys via Lazarus <

Show quoted text 20 lines
wrote: On 2016-10-13 10:04, Michael Schnell via Lazarus wrote: > IMHO it's a shame, but new > projects in Pascal seem to be declining, That's got nothing to do with the Object Pascal being modern or not (I think it is modern enough). The decline is about marketing and popularity contests, and management decisions (how easy is it to replace a Object Pascal developers vs a Java developer). Delphi being sold every other year doesn't help with the stability of Object Pascal in the marketplace either. Regards, Graeme -- _______________________________________________

Free Pascal is a "Turing complete" and "Resource complete" language , means it is not "lower" than any other programming language whatever it is .

The unfortunate situation is that Free Pascal ( and Lazarus ) is alone , i.e., there is no any other competing compiler production SIMILAR to Free Pascal . Also Free Pascal is a voluntary project means the developers can not devote their times solely to develop ( maintain ) the Free Pascal because they a "life" to pursue .

In a commercial environment such a structure can not be used for a "life critical" component as used "programming language" , because there is no any alternative . Delphi can not be considered as an alternative due to reasons about their development and maintenance policies and it is also "monopoly" naturally because there is no any alternative SIMILAR compiler .

I am using Free Pascal . I have abandoned Delphi , I did not buy a new version of it because it is for only a single operating system . Now , I will convert my program to C ( around 12 000 procedures ) where there is no any converter which can convert such a program . In that respect , I consider my program ( about data base programming language and interpreter ) as went into nearly scratch .

Main reason is that in such a program generated code is correct but when an error is occurring it is not possible to its place or reason of it . Debugging tools are useless because they are very difficult to use .

As a result , Pascal is a dead language , but a very useful and nice language to teach programming concepts . For small problems it is very good , but now , problem definitions started to become very complex . When a problem tends to be very large , Pascal is losing its power because of its non-standard ( actually related standards are dead and not maintained and not adhered ) structure .

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161013/2a88e2ec/attachment.html>

Reply by email

Adrian De Armas
to Graeme Geldenhuys: That's got nothing to do with the Object Pascal being modern or not (I think it is modern…

First of all,
Thank you all who spent your time reading and suggesting about this subject. First, some clarifications. When I wrote "modern" my comparison was againts console applications. Even those students who won't do a line of code except in my class realize that console applications are not what they have been using since they approached to a computer.

Introducing GUI is an efford to make the module more attractive to the students (the droupout rate is high). The module is taught as a basic science. All my students will be civil, environmental or bio engineers but not computer engineers. So I have two modules (Introduction to programming and advanced programming) to give them an idea of what programming is.

My main focus now is "introduction to programming". It is a four-months course and given your advice, I will split the course in two months parts.

First part will be all console applications where I will introduce the basics of pascal:

- structure of a pascal program
- variable declarations (integers, doubles, strings...)
- read, readln, write, writeln
- operations (+. -, *, /)
- if, case, while, for, repeat/until
- procedures and functions
- algorithms like getting prime numbers, fibonacci series, etc

The second part will introduce:

- GUI environment. Dropping components on a form and arrange them. Changing properties.
- Event oriented programming
- simple and multidimensional arrays
- ¿files?

I will use some specific components to help the transition for example:
var
  a, b, c: integer
begin
  ...bla..bla...
c=a+b;
end;

In GUI a, b, and c will be spinedits with a "value" integer property so I can write:

spineditc.value := spinedita.value+spineditb.value;

instead of

editc.Text := IntToStr(StrToInt(Edita.Text)+StrToInt(Editb.Text));

Comboboxes and list control will be used in case statements with the "ItemIndex" property

Memo.Lines and arrays will be given at the same time... etc...

What do you think?

Regards

2016-10-13 7:02 GMT-03:00 Graeme Geldenhuys via Lazarus <

Show quoted text 23 lines
: On 2016-10-13 10:04, Michael Schnell via Lazarus wrote: > IMHO it's a shame, but new > projects in Pascal seem to be declining, That's got nothing to do with the Object Pascal being modern or not (I think it is modern enough). The decline is about marketing and popularity contests, and management decisions (how easy is it to replace a Object Pascal developers vs a Java developer). Delphi being sold every other year doesn't help with the stability of Object Pascal in the marketplace either. Regards, Graeme -- _______________________________________________ Lazarus mailing list http://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161013/5d0e2d96/attachment.html>

Reply by email

Michael Schnell
to Mehmet Erol Sanliturk: On Thu, Oct 13, 2016 at 3:02 AM, Graeme Geldenhuys via Lazarus < Free Pascal is a "Turing…
Mehmet Erol Sanliturk wrote
When a problem tends to be very large , Pascal is losing its power because of its non-standard ( actually related standards are dead and not maintained and not adhered ) structure .

I do know several very large systems done in Delphi. The only real downside I see is that they are not portable to Linux and/or ARM.

-Michael

Reply by email

Chris Kelling

Because there are some basic controls that use array logic (lists, combo boxes, even edit boxes when dealing with positions of characters in a string), I'd introduce the concept with the variables. If the student can make the connection between the visual controls and concept of array logic, the inserting, selecting, and manipulation of that data should be easy to grasp.

Considering your audience, it should fit in with stuff they are already familiar with, just not thought of in the way of how a computer organizes memory? Meh, may be I'm getting too far down into the weeds.

Adrian De Armas wrote 117 lines
First of all, Thank you all who spent your time reading and suggesting about this subject. First, some clarifications. When I wrote "modern" my comparison was againts console applications. Even those students who won't do a line of code except in my class realize that console applications are not what they have been using since they approached to a computer. Introducing GUI is an efford to make the module more attractive to the students (the droupout rate is high). The module is taught as a basic science. All my students will be civil, environmental or bio engineers but not computer engineers. So I have two modules (Introduction to programming and advanced programming) to give them an idea of what programming is. My main focus now is "introduction to programming". It is a four-months course and given your advice, I will split the course in two months parts. First part will be all console applications where I will introduce the basics of pascal: - structure of a pascal program - variable declarations (integers, doubles, strings...) - read, readln, write, writeln - operations (+. -, *, /) - if, case, while, for, repeat/until - procedures and functions - algorithms like getting prime numbers, fibonacci series, etc The second part will introduce: - GUI environment. Dropping components on a form and arrange them. Changing properties. - Event oriented programming - simple and multidimensional arrays - ¿files? I will use some specific components to help the transition for example: var a, b, c: integer begin ...bla..bla... c=a+b; end; In GUI a, b, and c will be spinedits with a "value" integer property so I can write: spineditc.value := spinedita.value+spineditb.value; instead of editc.Text := IntToStr(StrToInt(Edita.Text)+StrToInt(Editb.Text)); Comboboxes and list control will be used in case statements with the "ItemIndex" property Memo.Lines and arrays will be given at the same time... etc... What do you think? Regards 2016-10-13 7:02 GMT-03:00 Graeme Geldenhuys via Lazarus < >: > On 2016-10-13 10:04, Michael Schnell via Lazarus wrote: >> IMHO it's a shame, but new >> projects in Pascal seem to be declining, > > That's got nothing to do with the Object Pascal being modern or not > (I > think it is modern enough). The decline is about marketing and > popularity contests, and management decisions (how easy is it to > replace > a Object Pascal developers vs a Java developer). > > Delphi being sold every other year doesn't help with the stability of > Object Pascal in the marketplace either. > > Regards, > Graeme > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus-ide.org/listinfo/lazarus > ------------------------------ -- _______________________________________________ Lazarus mailing list http://lists.lazarus-ide.org/listinfo/lazarus

Reply by email

Michael Schnell
to Adrian De Armas: Thank you all who spent your time reading and suggesting about this subject. First, some…
Adrian De Armas wrote 6 lines
The second part will introduce: * GUI environment. Dropping components on a form and arrange them. Changing properties.

Thanks to RAD, creating a GUI is extremely simple in Lazarus (any of the students you described can learn to create a simple GUI in just some minutes). It's a lot more fun to test your code in the GUI you created yourself.

So I would begin the lessons with "creating a simple GUI".

Here you would teach to create a program ("application" in Lazarus speak) that shows a Button. No code at all needs to be written and you can start it and happily see your GUI.

Then doubleclick the button in the GUI designer and Lazarus will write (and install) an event handler function for you.

Now you can do your first line of code:

Caption := 'Hello World';
(You even don't need to write Caption := as Lazarus autocompletes the
code if desired.)

Now press F9 and Lazarus compiles and starts your program and you can click the Button and see the result.

I thinks this start will make the students most happy, as they are rewarded by instant success.

-Michael

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161013/994df19f/attachment.html>

Reply by email

Tony Whyman
to Adrian De Armas: Thank you all who spent your time reading and suggesting about this subject. First, some…
Adrian De Armas wrote
# GUI environment. Dropping components on a form and arrange them. Changing properties. #

Be careful to explain carefully the separate components that Lazarus brings together:

The LCL
The Compiler/Linker
The Debugger
The Text and Form Editors.

Lazarus blends these together so seamlessly that programming novices often have difficulty understanding the difference between their program and the IDE.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161013/ff3f42c2/attachment.html>

Reply by email

Martin Schreiber
to Adrian De Armas: Thank you all who spent your time reading and suggesting about this subject. First, some…

On Thursday 13 October 2016 15:37:53 Adrian De Armas via Lazarus wrote: [...]

Show quoted text 10 lines
In GUI a, b, and c will be spinedits with a "value" integer property so I can write: spineditc.value := spinedita.value+spineditb.value; instead of editc.Text := IntToStr(StrToInt(Edita.Text)+StrToInt(Editb.Text));

In the mentioned "Programmieren macht Spass" text I tried to combine to discover the programming by "click and place" and learning the programming basics. Free Pascal and MSEgui are exceptionally well suited for the purpose. MSEgui provides TDataEdit descendants for the base types (TIntegerEdit, TRealEdit, TStringedit...) which all have an OnDataEntered event property which can be used to react on user data entries.

An example from "Die Rechenkünstlerin" step2:
"
type
 tmainfo = class(tmainform)
   ergebnis: tintegerdisp;
   a: tintegeredit;
   b: tintegeredit;
   procedure dataentered(const sender: TObject);
 end;
var
 mainfo: tmainfo;
implementation
uses
 main_mfm;
procedure tmainfo.dataentered(const sender: TObject);
begin
 ergebnis.value:= a.value + b.value;
end;
"

The form looks like this:
http://mseide-msegui.sourceforge.net/pics/rechenkunst2.png The end of the chapter:
http://mseide-msegui.sourceforge.net/pics/rechenkunst.png ;-)

Martin

Reply by email

Reimar Grabowski
to Adrian De Armas: Thank you all who spent your time reading and suggesting about this subject. First, some…
Introducing GUI is an efford to make the module more attractive to the students (the droupout rate is high). The module is taught as a basic science. All my students will be civil, environmental or bio engineers but not computer engineers.

And nonetheless you think replacing matlab with pascal (or any other language) is a good idea? If you just want a GUI to make it more fancy matlab can provide that, too.

If you want modern, teach them Java and let the programs run on their phones or keep doing console programs and do the GUI in JS (aka web applications). ^^

R.

Reply by email

Mehmet Erol Sanliturk
to Michael Schnell: I do know several very large systems done in Delphi. The only real downside I see is that…

On Thu, Oct 13, 2016 at 7:04 AM, Michael Schnell via Lazarus <

Show quoted text 15 lines
wrote: On 13.10.2016 15:32, Mehmet Erol Sanliturk via Lazarus wrote: > When a problem tends to be very large , Pascal is losing its power > because of its non-standard ( actually related standards are dead and not > maintained and not adhered ) structure . > I do know several very large systems done in Delphi. The only real downside I see is that they are not portable to Linux and/or ARM. -Michael -- _______________________________________________

This is the real problem as you said : Portability among different operating systems .

As an example : All of the super computers are using Linux ( there are very few exceptions being the smallest super computers in "500 super computers list" using Windows ) .

Development in Delphi is no use in that environment .

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161013/36c6dc06/attachment.html>

Reply by email

Martin Collins
to Graeme Geldenhuys: +1 That would be the best solution. GUI programming is based on fundamentals than need to…

Darn it, sounds like Graeme is describing me!

I wandered into Lazarus/Free Pascal a few years ago after enjoying writing VBA code in Excel. Admittedly I always found my (VBA) code sloppy and wrote some odd code just to make things work!

My coding is just a hobby that I enjoy, but I would like to be able to do it well and also somehow know that I am. Unfortunately I come from a marine (ships) background not from an IT one. No formal training in programming. I'm a lonely Linux user and an even more lonely pascal coder, so I only have this mailinglist to "litmus test" my "skills" against. Sometimes I feel like I'm being a pain but no one has yet been rude to me, just helpful which I appreciate ;-)

When I see a recommendation from someone on this list, I normally go for it. Therefore just ordered a copy of An Introduction To Methodical Programming, thanks Tony. I am envious of the students of Adrian De Armas who will receive some formal training.

I have a lot of books on pascal programming, pascal manuals (turbo 5.5), even Kylix & Delphi 3 tomes including Lazarus The Complete Guide that all threaten to break my shelves at any moment. All these books have been a great help to me, but out of interest what would the IT graduates on this mailing list recommend as the best reference publication for teaching a) programming concepts in general, & b) pascal programming specifically?

Thanks, Martin

Graeme Geldenhuys wrote 11 lines
.............................................. We don't want another whole generation of Visual Basic programmers. The Visual Basic 4-6 programs I had seen and unfortunately had to maintain were the sloppiest code I've ever seen - all written by "programmers" that dived straight into VB with no prior programming experience. Regards, Graeme

Reply by email

Giuliano Colla
to Reimar Grabowski: On Thu, 13 Oct 2016 10:37:53 -0300 And nonetheless you think replacing matlab with pascal…

Il 13/10/2016 16:48, Reimar Grabowski via Lazarus ha scritto:

If you want modern, teach them Java and let the programs run on their phones or keep doing console programs and do the GUI in JS (aka web applications). ^^

I find very unlikely that civil, environmental and bio engineers will find of any use learning how to write program for their phones, or for developing web applications. On the contrary they may need to develop typical computer applications, where a traditional programming language provides the required efficiency, and RAD can be very important bonus, to get it quickly done.

I have always found that following no matter what the most "modern" technology is totally wrong and misleading. One should be aware of what is available, of course, but then one should always select the most "appropriate" technology, and not be influenced by what is "modern".

Tombstones are still made of stone, a stone age technology, just because it still turns out to be the most appropriate technology to cover a grave.

Giuliano

Reply by email

Graeme Geldenhuys
to Martin Collins: Darn it, sounds like Graeme is describing me! I wandered into Lazarus/Free Pascal a few…
Martin Collins wrote
My coding is just a hobby that I enjoy, but I would like to be able to do it well and also somehow know that I am. Unfortunately I come from a marine (ships) background not from an IT one. No formal training in programming.

You background doesn't matter. Many have found there way into programming from whatever they did before. Formal training is also not a requirement for becoming a good or even excellent programming. I know many excellent self-taught programmers. Most things programmers do are all self-taught anyway. Formal training just plants the seed. From what you described (your willingness to learn by reading various programming books), it seems you are well on your way to become a better programmer. You should give yourself more credit. :-)

on this mailing list recommend as the best reference publication for teaching a) programming concepts in general, & b) pascal programming specifically?

With the availability of the Internet, there are tons of useful information out there - all for free. You just need the willingness to read, learn and practice. My biggest leap in improving my programming skills was when I started studying Design Patterns.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Erwin van den Bosch
to Adrian De Armas: I am a professor of "introduction to programming". Currently we are working with matlab…

Although I use Free Pascal/Lazarus a lot (because we have a lot of existing pascal code) I think C++ and some GUI framework like QT might be a better option. C/C++ is the number one used programming language. C/C++ code is much more portable to other systems. There are more compilers. QT has a very nice IDE (QT Creator) and is available for Windows, Mac and Linux. Nobody is using Pascal these days. So why learn it?

I'm not a big fan of the RAD development way any more. (I was years ago). The problem is that you should separate your business logic and the GUI. With Delphi like RAD it's very difficult to do that. (but it is possible) Everything is coded in events and connected to database aware GUI controls. (In the case of a database application) Another problem with the RAD way is that a lot is stored in forms (.lfm files) and it's difficult to see/notice changes to those files. They can be very big and it's difficult to see if some control is missing, for example, an event or so. The Lazarus IDE does frequently change the properties of controls on the form. For example the width and the height properties frequently change with no reason as it seems. As specially when you do development on both Windows and Linux. That makes tracking code changes (and so potential new bugs) not very easy.

Regards,
Erwin

Op 12-10-2016 om 20:10 schreef Adrian De Armas via Lazarus:

Show quoted text 24 lines
Hello everyone, I am a professor of "introduction to programming". Currently we are working with matlab and c. Today I had a meeting about doing the module more interesting to the students. Currently we teach algorithms making console applications and usually I receive questions like "Why don't we do something more modern?". I recommended that we should use Pascal in General and Lazarus in particular to teach how to create rich GUI Applications and to my surprise the idea was well recieved. Now I have to make suggestions about how to prepare the module starting from zero. Students do not know how to program and I need to include subjects as: variable declaration, operations, if, while, for, functions and procedure, arrays and multidimensional arrays. I would love to know what you think about making the transition from console to GUI. This is an exciting opportunity I'd love to make it right. Regards

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161014/11cd7db2/attachment.html>

Reply by email

DougC
to Erwin van den Bosch

---- On Thu, 13 Oct 2016 18:13:58 -0400Erwin van den Bosch via Lazarus &lt;&gt; wrote ----

Although I use Free Pascal/Lazarus a lot (because we have a lot of existing pascal code) I think C++ and some GUI framework like QT might be a better option. C/C++ is the number one used programming language. C/C++ code is much more portable to other systems. There are more compilers. QT has a very nice IDE (QT Creator) and is available for Windows, Mac and Linux. Nobody is using Pascal these days. So why learn it?

Learn Object Pascal early instead of C/C++ because it is simpler and better designed. It therefore allows the students to focus on the content of what they are building and not the extraneous details/dangers of the language. This is why Pascal was the standard language for advanced placement courses for several decades before the academic establishment gave in to market forces.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161013/6886f4a9/attachment-0001.html>

Reply by email

Paul Breneman
to Erwin van den Bosch: Although I use Free Pascal/Lazarus a lot (because we have a lot of existing pascal code)…

On 10/13/2016 05:13 PM, Erwin van den Bosch via Lazarus wrote: ...

Show quoted text 11 lines
Another problem with the RAD way is that a lot is stored in forms (.lfm files) and it's difficult to see/notice changes to those files. They can be very big and it's difficult to see if some control is missing, for example, an event or so. The Lazarus IDE does frequently change the properties of controls on the form. For example the width and the height properties frequently change with no reason as it seems. As specially when you do development on both Windows and Linux. That makes tracking code changes (and so potential new bugs) not very easy. Regards, Erwin

I've used Beyond Compare since (about) 1995 to always compare my form files.

Here is a related topic:
Cleaning up the Delphi uses statements
http://brenemanlabs.com/Uses.htm

Regards,
Paul
www.ControlPascal.com

Reply by email

Mehmet Erol Sanliturk
to Erwin van den Bosch: Although I use Free Pascal/Lazarus a lot (because we have a lot of existing pascal code)…

On Thu, Oct 13, 2016 at 3:13 PM, Erwin van den Bosch via Lazarus <

Show quoted text 26 lines
wrote: Although I use Free Pascal/Lazarus a lot (because we have a lot of existing pascal code) I think C++ and some GUI framework like QT might be a better option. C/C++ is the number one used programming language. C/C++ code is much more portable to other systems. There are more compilers. QT has a very nice IDE (QT Creator) and is available for Windows, Mac and Linux. Nobody is using Pascal these days. So why learn it? I'm not a big fan of the RAD development way any more. (I was years ago). The problem is that you should separate your business logic and the GUI. With Delphi like RAD it's very difficult to do that. (but it is possible) Everything is coded in events and connected to database aware GUI controls. (In the case of a database application) Another problem with the RAD way is that a lot is stored in forms (.lfm files) and it's difficult to see/notice changes to those files. They can be very big and it's difficult to see if some control is missing, for example, an event or so. The Lazarus IDE does frequently change the properties of controls on the form. For example the width and the height properties frequently change with no reason as it seems. As specially when you do development on both Windows and Linux. That makes tracking code changes (and so potential new bugs) not very easy. Regards, Erwin

I consider QT a very big trap . Please be careful about its license if you want to develop commercial software and also if you want to teach computer programming to the students that they will work for commercial companies .

I am seeing many student projects in , especially , Github , which I consider a total disaster for the students because over time , when they start as a worker in a commercial company , they will not be able to use their knowledge if the company does not buy a commercial license from QT owner .

Trap is the following : QT is using LGPLv2 license in some parts . This seems to be a good choice , BUT , the same sources are using in some parts LGPLv3 ( Three ) license . Since software is developed or contributions accepted by QT owner , this LGPLv3 license is NOT compulsory , means they can have it LGPLv2 license . Really , I consider GPLv3/LGPLv3 licenses not suitable for a service to humanity as a whole because they are very hostile to commercial companies . If any LGPLv3 part is used , is only a disaster for all of the other software . In QT , this fact is a seemingly hidden trap .

I am not a commercial person . I am a retiree of the Government of Turkey from a State University .
I have attempted to a business to produce furniture , it turned to be a disaster . I decided that business activities is not for me . I am trying to produce software to supply it to market just to obtain money at least to support its maintenance . If more money , there may be possibility to produce more software .

I know that software development is an extremely costly process . To try to enforce commercial companies to make their software open source unconditionally , really it is not a friendly action . Or trying to entrap into a situation that they will be enforced to buy a software by tricking them in any way .

It is not my business to discuss the issues about QT , but it is necessary to be at least friendly to the people . My trouble is that point . To expect that everyone ( especially students ) will know details of the licenses and their legal consequences is not very realistic . Here , main responsibility lies on the schools and their instructors . A huge number of student projects ( in order of many ten thousands ) even does not contain any single sentence about their license . With this structure , no one of the students in job search can use their projects to show their achievements because most of the project copyrights are belong to their universities . When a software does not contain any explicit license about what can be done with it , its rule is with respect to copyright laws : You can NOT touch to this !
So simply .

Since I have mentioned the above issue about student projects , I want to also mention the following disastrous issue about them :

Quality of projects is so low that ( even in best universities of the world ) , the only my feeling was a big disappointment and sorrow . It is not necessary to each everything listed in a manual of a programming language , but teach a subset that , at least the student can write a program which can be used in a production environment with its inherent quality . It is not important of its size also , but its quality . Quality of software is the most important feature . Use knowledge found in "Software Engineering" books in a way that it can be used even in an introductory course .

A starting point may be

https://en.wikipedia.org/wiki/Software_development_process

Instead of writing fifty useless programs , allow the student to write five quality programs written in such a way that it can be used in a commercial product with its full development steps defined in the above page ( including its copyright and license information ).

This point should also be considered with respect to size of software : Perhaps small , but in sufficient quality .

Thank you very much .

Mehmet Erol Sanliturk

Show quoted text 34 lines
Op 12-10-2016 om 20:10 schreef Adrian De Armas via Lazarus: Hello everyone, I am a professor of "introduction to programming". Currently we are working with matlab and c. Today I had a meeting about doing the module more interesting to the students. Currently we teach algorithms making console applications and usually I receive questions like "Why don't we do something more modern?". I recommended that we should use Pascal in General and Lazarus in particular to teach how to create rich GUI Applications and to my surprise the idea was well recieved. Now I have to make suggestions about how to prepare the module starting from zero. Students do not know how to program and I need to include subjects as: variable declaration, operations, if, while, for, functions and procedure, arrays and multidimensional arrays. I would love to know what you think about making the transition from console to GUI. This is an exciting opportunity I'd love to make it right. Regards -- _______________________________________________ Lazarus mailing list http://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161013/7b9770eb/attachment-0001.html>

Reply by email

zeljko
to Mehmet Erol Sanliturk
Mehmet Erol Sanliturk wrote 22 lines
I consider QT a very big trap . Please be careful about its license if you want to develop commercial software and also if you want to teach computer programming to the students that they will work for commercial companies . I am seeing many student projects in , especially , Github , which I consider a total disaster for the students because over time , when they start as a worker in a commercial company , they will not be able to use their knowledge if the company does not buy a commercial license from QT owner . Trap is the following : QT is using LGPLv2 license in some parts . This seems to be a good choice , BUT , the same sources are using in some parts LGPLv3 ( Three ) license . Since software is developed or contributions accepted by QT owner , this LGPLv3 license is NOT compulsory , means they can have it LGPLv2 license . Really , I consider GPLv3/LGPLv3 licenses not suitable for a service to humanity as a whole because they are very hostile to commercial companies . If any LGPLv3 part is used , is only a disaster for all of the other software . In QT , this fact is a seemingly hidden trap .

AFAIK, LGPLv3 is applied only to Qt extra modules (like QVirtualKeyboard etc), but not to the core lib which is LGPLv2, and we are using core/gui lib only for lazarus, so no problems with commercial usage.

zeljko

Reply by email

Michael Schnell
to Graeme Geldenhuys: +1 That would be the best solution. GUI programming is based on fundamentals than need to…
Graeme Geldenhuys wrote
+1 That would be the best solution. GUI programming is based on fundamentals than need to be understood first.

-1 !!

The OP explained that his main purpose is to introduce more fun in the education. That can be done by plunging into programming directly with GUI development.

This is why RAD had been invented.

Of course there are decent drawbacks regarding relying too much on RAD and about not really understanding the fundamentals behind it.

But in the end the addressees are non-computer engineers.

-Michael

Reply by email

Michael Schnell
to Erwin van den Bosch: Although I use Free Pascal/Lazarus a lot (because we have a lot of existing pascal code)…
Erwin van den Bosch wrote
I'm not a big fan of the RAD development way any more. (I was years ago). The problem is that you should separate your business logic and the GUI.

This is absolutely true especially when doing large systems or (embedded) systems that don't are tightly bundled with the GUI. But even there using RAD for testing/debugging is a way for speed up the development.

And here the addressees are non-computer engineers who most likely will not do large systems on their own, but just should understand what programming means to enable them to talk decently with their colleagues who will do the programming for appropriate projects.

So a fast way ("RAD") to do and test a rather simple working project and understand the basics

With Delphi like RAD it's very difficult to do that. (but it is possible) Everything is coded in events and connected to database aware GUI controls. (In the case of a database application)

I don't think so.

With a more careful design it's absolutely possible to do "non RAD" programs by doing "GUI units" and "business code Units" that interact via Objects with functions, properties and events (callback-properties) .

I believe this is not more effort that using an external GUI designer.

I did this for embedded projects using the GUI units for debugging and testing and then replacing them by dummies without needing to modify the business code units and hence being able to start testing again at any time, while the "GUI-stripped" executable can used on a "headless" target system

-Michael

Reply by email

Mark Morgan Lloyd
to Michael Schnell: -1 !! The OP explained that his main purpose is to introduce more fun in the education. …
Michael Schnell wrote
Of course there are decent drawbacks regarding relying too much on RAD and about not really understanding the fundamentals behind it. But in the end the addressees are non-computer engineers.

Seconded. If I could make a general observation: when teaching/supporting Pascal-style languages I've found it useful to completely decouple pointers, records and dynamic memory, irrespective of the fact that most books lump them in together by talking about linked lists and trees.

Records are a useful general-purpose way of organising data. Pointers are something that refer to e.g. a block of known format returned by the operating system, but are used much less in OO systems than they used to be. Only after those are understood should dynamic memory be introduced, if ever.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mehmet Erol Sanliturk
to Michael Schnell: -1 !! The OP explained that his main purpose is to introduce more fun in the education. …

On Fri, Oct 14, 2016 at 1:18 AM, Michael Schnell via Lazarus <

Show quoted text 26 lines
wrote: On 13.10.2016 10:20, Graeme Geldenhuys via Lazarus wrote: > +1 > That would be the best solution. GUI programming is based on > fundamentals than need to be understood first. > -1 !! The OP explained that his main purpose is to introduce more fun in the education. That can be done by plunging into programming directly with GUI development. This is why RAD had been invented. Of course there are decent drawbacks regarding relying too much on RAD and about not really understanding the fundamentals behind it. But in the end the addressees are non-computer engineers. -Michael -- _______________________________________________

As an engineer , they need to write programs for doing computations not available in ready-made packages . Therefore , they need to a sufficient knowledge to write programs . This can be achieved in a good balance of learning programming itself and GUI application .

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161014/1492b2f4/attachment-0001.html>

Reply by email

Mehmet Erol Sanliturk
to Michael Schnell: This is absolutely true especially when doing large systems or (embedded) systems that…

On Fri, Oct 14, 2016 at 1:50 AM, Michael Schnell via Lazarus <

Show quoted text 13 lines
wrote: On 14.10.2016 00:13, Erwin van den Bosch via Lazarus wrote: > > I'm not a big fan of the RAD development way any more. (I was years ago). > The problem is that you should separate your business logic and the GUI. > This is absolutely true especially when doing large systems or (embedded) systems that don't are tightly bundled with the GUI. But even there using RAD for testing/debugging is a way for speed up the development.

"

Show quoted text 6 lines
And here the addressees are non-computer engineers who most likely will not do large systems on their own, but just should understand what programming means to enable them to talk decently with their colleagues who will do the programming for appropriate projects. "

The above paragraph is not correct very much , because the computer engineers and the other engineers are different professions . The other engineers are using computer programming to solve their own problems , the computer engineers are using computer programming to solve other people's problems .

Mehmet Erol Sanliturk

Show quoted text 29 lines
So a fast way ("RAD") to do and test a rather simple working project and understand the basics With Delphi like RAD it's very difficult to do that. (but it is possible) > Everything is coded in events and connected to database aware GUI controls. > (In the case of a database application) > I don't think so. With a more careful design it's absolutely possible to do "non RAD" programs by doing "GUI units" and "business code Units" that interact via Objects with functions, properties and events (callback-properties) . I believe this is not more effort that using an external GUI designer. I did this for embedded projects using the GUI units for debugging and testing and then replacing them by dummies without needing to modify the business code units and hence being able to start testing again at any time, while the "GUI-stripped" executable can used on a "headless" target system -Michael -- _______________________________________________ Lazarus mailing list http://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161014/e54d5632/attachment.html>

Reply by email

Graeme Geldenhuys
to Erwin van den Bosch: Although I use Free Pascal/Lazarus a lot (because we have a lot of existing pascal code)…
Erwin van den Bosch wrote
The problem is that you should separate your business logic and the GUI. With Delphi like RAD it's very difficult to do that. (but it is possible) Everything is coded in events and connected to database aware GUI controls. (In the case of a database application)

Exactly why I use tiOPF for every application I write - even non-Database applications. Also exactly why I implemented the MGM (Model-GUI-Mediator) design pattern for use with VCL, LCL and fpGUI Toolkit - also included in the tiOPF repository.

All my form units are now VERY empty as all the real functionality lives in mediators. This also makes unit testing of my code much easier.

Another problem with the RAD way is that a lot is stored in forms (.lfm files) and it's difficult to see/notice changes to those files.

And exactly why I designed the fpGUI Visual Forms Designer to generate actual Object Pascal code in a AfterCreate() method, instead of using *.lfm or *.dfm files. I now have one unit in my source code revision system that shows all changes (no need review two files for form changes), I can easily do a search & replace for form components and other code, and I also don't need to fire up a visual form designer if I just want to make one small tweak to a property.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Graeme Geldenhuys
to Michael Schnell: -1 !! The OP explained that his main purpose is to introduce more fun in the education. …
Michael Schnell wrote
The OP explained that his main purpose is to introduce more fun in the education. That can be done by plunging into programming directly with GUI development.

So for somebody that doesn't know anything about programming, then suddenly using a Visual Form Designer, but when they look at the code that was generated they have NO idea what is going on. The don't know what a Class is, they don't know what Inheritance is. They don't know what Event Handlers are, what Properties are, what's the difference between 'var' and 'const' parameters etc.

They will be thrown into the deep end and sink. The result - if they keep their head above water - they become "programmers" like that rubbish Visual Basic generation we saw in the late 90's, early 2000's. Writing horrific code because they actually don't have a clue what they are doing.

Yeah, that sounds great! [major sarcasm]

Start with the fundamentals, and maybe incite them every now and again with the same example done in a GUI environment. Just enough to keep them interested and excited in programming, but you have to get those fundamentals down, otherwise they have no base to build on.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Mehmet Erol Sanliturk
to Graeme Geldenhuys: Exactly why I use tiOPF for every application I write - even non-Database applications.…

On Fri, Oct 14, 2016 at 3:48 AM, Graeme Geldenhuys via Lazarus <

Show quoted text 40 lines
wrote: On 2016-10-13 23:13, Erwin van den Bosch via Lazarus wrote: > The problem is that you should separate your business logic and > the GUI. With Delphi like RAD it's very difficult to do that. (but it is > possible) Everything is coded in events and connected to database aware > GUI controls. (In the case of a database application) Exactly why I use tiOPF for every application I write - even non-Database applications. Also exactly why I implemented the MGM (Model-GUI-Mediator) design pattern for use with VCL, LCL and fpGUI Toolkit - also included in the tiOPF repository. All my form units are now VERY empty as all the real functionality lives in mediators. This also makes unit testing of my code much easier. > Another problem with the RAD way is that a lot is stored in forms (.lfm > files) and it's difficult to see/notice changes to those files. And exactly why I designed the fpGUI Visual Forms Designer to generate actual Object Pascal code in a AfterCreate() method, instead of using *.lfm or *.dfm files. I now have one unit in my source code revision system that shows all changes (no need review two files for form changes), I can easily do a search & replace for form components and other code, and I also don't need to fire up a visual form designer if I just want to make one small tweak to a property. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -- _______________________________________________

I am reading/studying the fpGUI system . The problem here is that it is NOT an alternative to , let's say , Lazarus , in the sense that , the SAME program can not be compiled as a Lazarus program or an fpGUI program as it is like compiling the same program by Delphi ( with required compiler directives ) . It is necessary either use Lazarus or fpGUI programming .

As an example , I want to convert my program to fpGUI . If I can do it , it may be more easy to convert it to C program . To convert it to fpGUI program is a hard problem because it is necessary to convert all of the GUI related parts ( because all of the unit names are different , I did not study their contents very much ) .

In previous years

https://sourceforge.net/projects/mseide-msegui/

was limited to Linux . I do not know whether the same program can be compiled as a Lazarus or MSEide program .

During teaching , it is necessary to take care about such differences .

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161014/6ab518d1/attachment-0001.html>

Reply by email

Graeme Geldenhuys
to Mehmet Erol Sanliturk
Mehmet Erol Sanliturk wrote
program can not be compiled as a Lazarus program or an fpGUI program as it is like compiling the same program by Delphi ( with required compiler directives ) . It is necessary either use Lazarus or fpGUI programming .

I am yet to see that in reality! [excluding all but he most basic "Hello World" programs]

I've never come across a real-world Delphi project that can simply be opened in Lazarus IDE and compiles 100% correctly first time. As proof of that, it would also explain why Lazarus IDE includes the "Tools -> Delphi conversion" set of menu items, which does a one-way conversion (thus you can't go back to Delphi).

Saying that, yes it is partly possible to have a single project that is compilable in both Delphi and Lazarus, but it requires significant amounts of changes and compromises. I don't see any benefit in having dual compiler and dual toolkit support in a single project.

As an example , I want to convert my program to fpGUI . If I can do it , it may be more easy to convert it to C program. To convert it to fpGUI program is a hard problem because it is necessary to convert all of the GUI related parts.

And you think moving to C with a totally different GUI toolkit is any easier? I seriously doubt that. I think it is pretty straight forward to convert a Lazarus project to fpGUI - I've done it many times with components and whole applications. It's not a 5 minute job, but will be significantly less effort that moving to C/C++ and using GTK, Qt or wxWidgets etc.

was limited to Linux . I do not know whether the same program can be compiled as a Lazarus or MSEide program .

GUI programs - definitely not. Lazarus LCL and MSEgui are very different toolkits. Much more so than LCL vs fpGUI.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Martin Schreiber
to Michael Schnell: This is absolutely true especially when doing large systems or (embedded) systems that…
Michael Schnell wrote 5 lines
With a more careful design it's absolutely possible to do "non RAD" programs by doing "GUI units" and "business code Units" that interact via Objects with functions, properties and events (callback-properties) .

Separating GUI and program logic is also possible with RAD. See for example MSEkicadBOM, the application I am currently working on. https://gitlab.com/mseide-msegui/mseuniverse/tree/master/tools/kicad/bom It is a component and footprint database program for KiCad.

It consists of a datamodule with the program logic and the database and action components:
http://mseide-msegui.sourceforge.net/pics/kicadbommainmo.png

a mainform with the mainmenu, GUI actions and the main datagrid: http://mseide-msegui.sourceforge.net/pics/kicadbommainfo.png

and several editforms:
http://mseide-msegui.sourceforge.net/pics/kicadbomcomponented.png

The editforms inherit from a common base editform with base functionality (datasource, navigator, timestamp display, window close logic...) and have no or GUI-code only. The connection GUIdatamodule is made with TDataSource, action- and ifi-dataendpoint-components.

If done right the RAD-approach is productive and convenient, the projects are easily extendable and maintainable.

Martin

Reply by email

Mehmet Erol Sanliturk
to Martin Schreiber: MSEide+MSEgui runs on Windows and Linux from several years it runs on FreeBSD too. Martin

On Fri, Oct 14, 2016 at 5:05 AM, Martin Schreiber via Lazarus <

Show quoted text 18 lines
wrote: On Friday 14 October 2016 13:08:13 Mehmet Erol Sanliturk via Lazarus wrote: > > In previous years > > https://sourceforge.net/projects/mseide-msegui/ > > was limited to Linux . MSEide+MSEgui runs on Windows and Linux from several years it runs on FreeBSD too. Martin -- _______________________________________________

I am sorry that I did not include Windows . My intention was to say "other than Windows" , but remained incomplete .

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161014/75a0d9d3/attachment-0001.html>

Reply by email

Unknown author
to Graeme Geldenhuys: Oops, that meant to read: "...and maybe entice them..." Graeme
Graeme Geldenhuys wrote
On 2016-10-14 12:01, Graeme Geldenhuys via Lazarus wrote: > and maybe incite them every now and again Oops, that meant to read: "...and maybe entice them..."

incite works, too :)

NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted.

Reply by email

Michael Schnell
to Graeme Geldenhuys: So for somebody that doesn't know anything about programming, then suddenly using a…
Graeme Geldenhuys wrote
They will be thrown into the deep end and sink.

I don't think so. You can learn to drive a car even if you don't know how the engine is constructed.

At first you can just *use* the GUI and later you can find out how it works.

-Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161014/cabc78b0/attachment.html>

Reply by email

Mehmet Erol Sanliturk
to Michael Schnell

On Fri, Oct 14, 2016 at 6:52 AM, Michael Schnell via Lazarus <

Show quoted text 18 lines
wrote: On 14.10.2016 13:01, Graeme Geldenhuys via Lazarus wrote: They will be thrown into the deep end and sink. I don't think so. You can learn to drive a car even if you don't know how the engine is constructed. At first you can just *use* the GUI and later you can find out how it works. -Michael -- _______________________________________________

My life is consumed in teaching . I had started as an elementary school teacher means that my profession was teaching ( not a university graduate , and then a professor , knowing approximately nothing about teaching since they are not a graduate of "Faculty of Education" ) .

Then I went to University and become an instructor to teach computer programming ( mainly ) .

Your opinion about how to teach programming ( i.e. , start from GUI , then teach ( if you can ) programming ) is physically wrong .

Please think the situation from the point of view of students , not with respect to yourself .

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161014/9274b9d4/attachment.html>

Reply by email

Jürgen Hestermann
to Michael Schnell: I don't think so. You can learn to drive a car even if you don't know how the engine is…
Michael Schnell wrote
On 14.10.2016 13:01, Graeme Geldenhuys via Lazarus wrote: > They will be thrown into the deep end and sink. I don't think so. You can learn to drive a car even if you don't know how the engine is constructed. At first you can just use the GUI and later you can find out how it works.

In most cases they never get to the step "find out how it works". If it works, nobody wants to invest time anymore to look under the hood. So they always operate on the surface and repeat the same subobtimal programming over and over again
because they don't know how to do it better.

The problem is, that often it does *not* work (or at least not as good as expected) because of the lack of knowledge. Then such people without background knowledge desperately click on this and that and some have luck and suddenly it works (more or less). But they do not know why and they also do not know why the performance is so bad, but hey, as long as it more or less works....

Reply by email

Santiago A.
to Giuliano Colla: Il 13/10/2016 16:48, Reimar Grabowski via Lazarus ha scritto: I find very unlikely that…
Giuliano Colla wrote
but then one should always select the most "appropriate" technology, and not be influenced by what is "modern".

More modern means maybe with a few extra features. And in this context I suppose that "modern" also means more popular.
Both points are important, being popular is also important, network effect is important. More users means more libraries, more beta testers, more information, more tools. So, better frameworks.

Don't underestimate the "popular factor".

Saludos Santiago A.

Reply by email

Graeme Geldenhuys
to Jürgen Hestermann: In most cases they never get to the step "find out how it works". If it works, nobody…
Jürgen Hestermann wrote
desperately click on this and that and some have luck and suddenly it works (more or less). But they do not know why and they also do not know why the performance is so bad, but hey, as long as it more or less works....

Straight from the Visual Basic 6 manual. :-p

[okay, I'll stop bashing VB for now]

Regards,
Graeme

Reply by email

Lukasz Sokol
to Reimar Grabowski: On Thu, 13 Oct 2016 10:37:53 -0300 And nonetheless you think replacing matlab with pascal…
Reimar Grabowski wrote 16 lines
On Thu, 13 Oct 2016 10:37:53 -0300 Adrian De Armas via Lazarus wrote: > Introducing GUI is an efford to make the module more attractive to > the students (the droupout rate is high). The module is taught as a > basic science. All my students will be civil, environmental or bio > engineers but not computer engineers. And nonetheless you think replacing matlab with pascal (or any other language) is a good idea? If you just want a GUI to make it more fancy matlab can provide that, too. If you want modern, teach them Java and let the programs run on their phones or keep doing console programs and do the GUI in JS (aka web applications). ^^

D'oh, really.

I recall the couple of days when i downloaded Android Studio and tried modifying the Bluetooth Chat example to do what I want...

I only wanted to put a couple of tracking sliders (for 'analog' direction and speed control). and make it send characters repeatedly to the serial Bluetooth device on the other side of the link...

It did work in the end though, but any attempts to mod out the existing gui controls in any way were mostly greeted by app crash. I ended up trying to squeeze my controls into available space...

I still haven't recovered from the experience.

R.

-L.

Reply by email

Reimar Grabowski
to Lukasz Sokol
D'oh, really. D'oh, really? (fixed that for you)

Answer: No (well actually the part about matlab I meant serious)

Reminder to myself:
The interwebz dozn't get sarcazm
The interwebz dozn't get sarcazm
The interwebz dozn't get sarcazm

R.

Reply by email

el es
to Reimar Grabowski
Reimar Grabowski wrote 8 lines
On Fri, 14 Oct 2016 16:24:04 +0100 Lukasz Sokol via Lazarus wrote: > D'oh, really. > D'oh, really? (fixed that for you) Answer: No (well actually the part about matlab I meant serious)

Ah Matlab. Happy TU days. Calculating 2D FFT of a picture or trying to implement discrete audio filters with just a couple of lines of code ;) Transformation of bitmaps through 2D FFT, applying bandpass filters and rev-2D-FFT ;)

Show quoted text 5 lines
Reminder to myself: The interwebz dozn't get sarcazm The interwebz dozn't get sarcazm The interwebz dozn't get sarcazm

if you want sarcasm, go xkcd (386) ;)

R.

el es

Reply by email

Michael Schnell
to Jürgen Hestermann: In most cases they never get to the step "find out how it works". If it works, nobody…
Jürgen Hestermann wrote 7 lines
In most cases they never get to the step "find out how it works". If it works, nobody wants to invest time anymore to look under the hood. So they always operate on the surface and repeat the same subobtimal programming over and over again because they don't know how to do it better.

That is absolutely correct.

But the point where the "knowing how it works" is just a matter of deliberate choice (or the professor, the student or the situation you get in and need to crawl deeper into the complexity of the matter.-

- do I need know how/why the GUI builder creates the code that makes a Button visible on a Form and my Event handler be called when a button is pressed ? (I.e. do I need to be able to write the code myself without the help of the GUI builder ?)

- do I need to know how the startup code works that make the Form visible on the screen ?

- do I need to know how the Event-Queue and the checksynchronize() system works ?

- do I need to know what system, calls the pascal program performs ?

- do I need to know what ASM code is generated from a pascal instruction ?

- do I need to know how semaphores are done by atomic instructions ?

- do I need to tell the difference between CISC and RISC ?

- do I need to know what microcode the CPU runs ?

- do I need to know how a transistor works ?

- do I need to know how dotating silicone is done ?

In most cases it's better to first concentrate on the task at hand and dig deeper if necessary.

-Michael

Reply by email

Graeme Geldenhuys
to Michael Schnell
Michael Schnell wrote
- do I need know how/why the GUI builder creates the code that makes a Button visible on a Form and my Event handler be called when a button is pressed ?

Yes

(I.e. do I need to be able to write the code myself

without the help of the GUI builder ?)

Yes

- do I need to know how the startup code works that make the Form visible on the screen ?

Yes

- do I need to know how the Event-Queue and the checksynchronize() system works ?

If you are using queues and Synchronise, then Yes.

- do I need to know what system, calls the pascal program performs ?

No

The rest of your questions were just flame bait so don't deserve an answer.

If you don't know any of the above, how do you expect to do any debugging? Yes, debugging is a major part of being a programmer.

You made the [totally wrong] comparison earlier about learning to drive a car and knowing how the engine is constructed. Well, a programmer is not the driver of the car, he/she is the engineer designing and building the car. The driver is more like the end-user using your program. So YES, a programmer needs to know how the internals of a program works and fits together, after all, it is the programmer that designs the program and puts it together (coding).

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Michael Schnell
to Graeme Geldenhuys
Graeme Geldenhuys wrote
YES ...YES...NO...

IMHO a personal POV that is not very helpful in a totally general discussion (please keep in mind that the intention of the OP to consider Pascal instead of C was to keep the students from running away too soon.

The rest of your questions were just flame bait so don't deserve an answer. If you don't know any of the above, ...

I only mentioned examples about which I do have a certain amount of knowledge. Of course there are a lot more layers and interesting stuff to learn that might be helpful in certain situations.

-Michael (usually I get bashed for digging to deep and hence not being effective)

Reply by email

Lars
to Mark Morgan Lloyd: Seconded. If I could make a general observation: when teaching/supporting Pascal-style…
Show quoted text 6 lines
On 14/10/16 08:30, Michael Schnell via Lazarus wrote: Of course there are decent drawbacks regarding relying too much on RAD and about not really understanding the fundamentals behind it. But in the end the addressees are non-computer engineers.

The big issue with teaching using a RAD tool, is welding the program logic into the onclick events, instead of decoupling the logic in separate procedures that can be reused elsewhere. RAD tools are superior at prototyping... I can't believe how awesome they are inferior, however, when it comes to bad habits being brought on. With this warning, RAD tools can still be very useful for writing solid programs, as long as one knows this warning ahead of time.

When I first learned delphi I made the mistake of putting code in the onClick events and similar, and then when you expand your app later you realize all that code is welded in place and cannot be reused outside of the events.

Of course decoupling the logic from the GUI leads to more layers of code.

How I got rid of my bad habits when I first learned delphi: I started writing console apps with no object oriented programming, no events, and learned that not everything is a click event in computer programming.

People late in the game (learned programming when GUI's were available) and have no experience with console mode apps will earn some bad habits because of the GUI oriented programming. Those with experience in other areas of programming such as old Dos programs, web programs (basically like a dos or unix console program) will learn different ways of organizing code without everything being tied to a GUI event driven code.

I suppose even doing a plain Win32 API app with no delphi code (pure win api) would help someone learn how to organize code from a second opinion view, without being forced to use the event driven system you were given by the RAD tool.

Of course, also learning other programming languages helps (although, IMO learning too many brain dead languages and hip cool ones will not help, as much as others claim... Basic programmers from the 80's or 70's still think in GOTO's and line numbers)

Reply by email

Mehmet Erol Sanliturk
to Lars

On Mon, Oct 17, 2016 at 12:05 PM, Lars via Lazarus <

Show quoted text 25 lines
wrote: > On 14/10/16 08:30, Michael Schnell via Lazarus wrote: > > > Of course there are decent drawbacks regarding relying too much on RAD > and about not really understanding the fundamentals behind it. But in the > end the addressees are non-computer engineers. The big issue with teaching using a RAD tool, is welding the program logic into the onclick events, instead of decoupling the logic in separate procedures that can be reused elsewhere. RAD tools are superior at prototyping... I can't believe how awesome they are inferior, however, when it comes to bad habits being brought on. With this warning, RAD tools can still be very useful for writing solid programs, as long as one knows this warning ahead of time. When I first learned delphi I made the mistake of putting code in the onClick events and similar, and then when you expand your app later you realize all that code is welded in place and cannot be reused outside of the events. Of course decoupling the logic from the GUI leads to more layers of code.

-------------

Show quoted text 5 lines
How I got rid of my bad habits when I first learned delphi: I started writing console apps with no object oriented programming, no events, and learned that not everything is a click event in computer programming.

-------------

My opinion is that the above ideas are really very good to be applied during teaching :
First , teach language on , let's say , "atomic" problems . Then , use these "atomic" concepts in further problems either embedded in a GUI or console program .

One obvious point is that an "event" driven programming knowledge is a must to become a competent programmer . The problem is how this can be learned . Without knowing how to program an algorithm when a related event is occurred , will bring any one to nothing means ( not to a success ) .

-------------

Show quoted text 13 lines
People late in the game (learned programming when GUI's were available) and have no experience with console mode apps will earn some bad habits because of the GUI oriented programming. Those with experience in other areas of programming such as old Dos programs, web programs (basically like a dos or unix console program) will learn different ways of organizing code without everything being tied to a GUI event driven code. I suppose even doing a plain Win32 API app with no delphi code (pure win api) would help someone learn how to organize code from a second opinion view, without being forced to use the event driven system you were given by the RAD tool.

-------------

Show quoted text 6 lines
Of course, also learning other programming languages helps (although, IMO learning too many brain dead languages and hip cool ones will not help, as much as others claim... Basic programmers from the 80's or 70's still think in GOTO's and line numbers) --

-------------

With respect to researches ( I am not able to supply links now because this view is based on old times readings , but I am sure that such research findings can be found ) ,

people ( mostly ) uses a "primary" language for her/his profession and a "secondary" language for some her/his works as an additional tool .

This shows that during teaching , this feature should be taken into consideration : Guide the students to discover which language she/he will prefer to use in much of her/his works , and attempt to teach that language in a "best" way to be used by the students in their profession .

A similar approach should also be used for a "secondary" language .

If a language is taught just for fun or whatever else other than being a possible candidate for "primary" or "secondary" is likely that , if it not a necessity for the learner , is only a waste of everything is involved .

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161017/8dad4350/attachment.html>

Reply by email

Travis Ayres

I'm all for this effort, and hope it leads to new and modern tutorials, books or notes that would be useful for others that use FreePascal/Lazarus to convey graphical system interactions. If there's any need to proofread such materials, I'll gladly help out!

On Oct 17, 2016 6:32 PM, "Mehmet Erol Sanliturk via Lazarus" <

wrote:

On Mon, Oct 17, 2016 at 12:05 PM, Lars via Lazarus <

Show quoted text 25 lines
wrote: > On 14/10/16 08:30, Michael Schnell via Lazarus wrote: > > > Of course there are decent drawbacks regarding relying too much on RAD > and about not really understanding the fundamentals behind it. But in the > end the addressees are non-computer engineers. The big issue with teaching using a RAD tool, is welding the program logic into the onclick events, instead of decoupling the logic in separate procedures that can be reused elsewhere. RAD tools are superior at prototyping... I can't believe how awesome they are inferior, however, when it comes to bad habits being brought on. With this warning, RAD tools can still be very useful for writing solid programs, as long as one knows this warning ahead of time. When I first learned delphi I made the mistake of putting code in the onClick events and similar, and then when you expand your app later you realize all that code is welded in place and cannot be reused outside of the events. Of course decoupling the logic from the GUI leads to more layers of code.

-------------

Show quoted text 5 lines
How I got rid of my bad habits when I first learned delphi: I started writing console apps with no object oriented programming, no events, and learned that not everything is a click event in computer programming.

-------------

My opinion is that the above ideas are really very good to be applied during teaching :
First , teach language on , let's say , "atomic" problems . Then , use these "atomic" concepts in further problems either embedded in a GUI or console program .

One obvious point is that an "event" driven programming knowledge is a must to become a competent programmer . The problem is how this can be learned . Without knowing how to program an algorithm when a related event is occurred , will bring any one to nothing means ( not to a success ) .

-------------

Show quoted text 13 lines
People late in the game (learned programming when GUI's were available) and have no experience with console mode apps will earn some bad habits because of the GUI oriented programming. Those with experience in other areas of programming such as old Dos programs, web programs (basically like a dos or unix console program) will learn different ways of organizing code without everything being tied to a GUI event driven code. I suppose even doing a plain Win32 API app with no delphi code (pure win api) would help someone learn how to organize code from a second opinion view, without being forced to use the event driven system you were given by the RAD tool.

-------------

Show quoted text 6 lines
Of course, also learning other programming languages helps (although, IMO learning too many brain dead languages and hip cool ones will not help, as much as others claim... Basic programmers from the 80's or 70's still think in GOTO's and line numbers) --

-------------

With respect to researches ( I am not able to supply links now because this view is based on old times readings , but I am sure that such research findings can be found ) ,

people ( mostly ) uses a "primary" language for her/his profession and a "secondary" language for some her/his works as an additional tool .

This shows that during teaching , this feature should be taken into consideration : Guide the students to discover which language she/he will prefer to use in much of her/his works , and attempt to teach that language in a "best" way to be used by the students in their profession .

A similar approach should also be used for a "secondary" language .

If a language is taught just for fun or whatever else other than being a possible candidate for "primary" or "secondary" is likely that , if it not a necessity for the learner , is only a waste of everything is involved .

Mehmet Erol Sanliturk

Reply by email

Michael Schnell
to Lars: The big issue with teaching using a RAD tool, is welding the program logic into the…
Lars wrote
The big issue with teaching using a RAD tool, is welding the program logic into the onclick events, instead of decoupling the logic in separate procedures that can be reused elsewhere.

As you point out in the text this is as well a pro (easy fast solving of small unitary tasks) as a con (bad reusability, bad code when doing big projects).

But as Learning of course starts with doing small unitary tasks RAD obviously is a great help to fight the FUD and prejudice the students might have regarding programming.

Of course it's great to dedicate a (later) lesson to un-RAD-ing your code in order to be prepared for bigger tasks.

-Michael

Reply by email

Mehmet Erol Sanliturk
to Travis Ayres: I'm all for this effort, and hope it leads to new and modern tutorials, books or notes…
Travis Ayres wrote 6 lines
I'm all for this effort, and hope it leads to new and modern tutorials, books or notes that would be useful for others that use FreePascal/Lazarus to convey graphical system interactions. If there's any need to proofread such materials, I'll gladly help out!

To test a large program , I want to use Petri Nets to drive the testing steps in an information processing , let's say network , to simulate a business environment :

https://en.wikipedia.org/wiki/Petri_net
( Petri net )

https://en.wikipedia.org/wiki/Category:Petri_nets
Category:Petri nets

( My work on this is "Perhaps" now ... )

One unfortunate situation is that there is not much Pascal software for Petri Nets processing , except the following ( which its license is very ambiguous means not usable ) and may be considered very old with respect to new Pascal language level :

http://staff.um.edu.mt/jskl1/petrisim/
PetriSim - Discrete Simulation Environment

There are others , perhaps , but again , not usable very well .

Petri Nets are a vast subject now . There are some Petri Nets processing software but their licenses being copy left are not friendly for commercial environment .

For event driven systems , Petri Nets are very important .

My opinion is that a "good" , "permissively" licensed , as much as general purpose Petri Nets simulation software may be a very useful tool for the students to simulate their event driven system definition , and , then write its special purpose Pascal program by using Lazarus easily .

Actually , it is not compulsory to use Pascal , but Pascal will supply the Pascal programming language learners a very good example , its license will permit them to use some of its parts whatever they want to do without any hostile restriction in any environment .

In such a tool , only it is necessary to describe the nodes , information flow between nodes , etc. .
( Please see above link about PetriSim . )

Mehmet Erol Sanliturk

Show quoted text 123 lines
On Oct 17, 2016 6:32 PM, "Mehmet Erol Sanliturk via Lazarus" < > wrote: On Mon, Oct 17, 2016 at 12:05 PM, Lars via Lazarus < > wrote: > > On 14/10/16 08:30, Michael Schnell via Lazarus wrote: > > > > > > Of course there are decent drawbacks regarding relying too much on RAD > > and about not really understanding the fundamentals behind it. But in > the > > end the addressees are non-computer engineers. > > The big issue with teaching using a RAD tool, is welding the program logic > into the onclick events, instead of decoupling the logic in separate > procedures that can be reused elsewhere. RAD tools are superior at > prototyping... I can't believe how awesome they are > inferior, however, when it comes to bad habits being brought on. With > this warning, RAD tools can still be very useful for writing solid > programs, as long as one knows this warning ahead of time. > > When I first learned delphi I made the mistake of putting code in the > onClick events and similar, and then when you expand your app later you > realize all that code is welded in place and cannot be reused outside of > the events. > > Of course decoupling the logic from the GUI leads to more layers of code. > > ------------- > How I got rid of my bad habits when I first learned delphi: I started > writing console apps with no object oriented programming, no events, and > learned that not everything is a click event in computer programming. > > ------------- My opinion is that the above ideas are really very good to be applied during teaching : First , teach language on , let's say , "atomic" problems . Then , use these "atomic" concepts in further problems either embedded in a GUI or console program . One obvious point is that an "event" driven programming knowledge is a must to become a competent programmer . The problem is how this can be learned . Without knowing how to program an algorithm when a related event is occurred , will bring any one to nothing means ( not to a success ) . ------------- > People late in the game (learned programming when GUI's were available) > and have no experience with console mode apps will earn some bad habits > because of the GUI oriented programming. Those with experience in other > areas of programming such as old Dos programs, web programs (basically > like a dos or unix console program) will learn different ways of > organizing code without everything being tied to a GUI event driven code. > > I suppose even doing a plain Win32 API app with no delphi code (pure win > api) would help someone learn how to organize code from a second opinion > view, without being forced to use the event driven system you were given > by the RAD tool. > > ------------- > Of course, also learning other programming languages helps (although, IMO > learning too many brain dead languages and hip cool ones will not help, as > much as others claim... Basic programmers from the 80's or 70's still > think in GOTO's and line numbers) > -- > ------------- With respect to researches ( I am not able to supply links now because this view is based on old times readings , but I am sure that such research findings can be found ) , people ( mostly ) uses a "primary" language for her/his profession and a "secondary" language for some her/his works as an additional tool . This shows that during teaching , this feature should be taken into consideration : Guide the students to discover which language she/he will prefer to use in much of her/his works , and attempt to teach that language in a "best" way to be used by the students in their profession . A similar approach should also be used for a "secondary" language . If a language is taught just for fun or whatever else other than being a possible candidate for "primary" or "secondary" is likely that , if it not a necessity for the learner , is only a waste of everything is involved . Mehmet Erol Sanliturk -- _______________________________________________ Lazarus mailing list http://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161018/5befa99b/attachment-0001.html>

Reply by email

Mehmet Erol Sanliturk
to Michael Schnell: As you point out in the text this is as well a pro (easy fast solving of small unitary…

On Tue, Oct 18, 2016 at 1:11 AM, Michael Schnell via Lazarus <

Show quoted text 24 lines
wrote: On 17.10.2016 21:05, Lars via Lazarus wrote: > The big issue with teaching using a RAD tool, is welding the program logic > into the onclick events, instead of decoupling the logic in separate > procedures that can be reused elsewhere. > As you point out in the text this is as well a pro (easy fast solving of small unitary tasks) as a con (bad reusability, bad code when doing big projects). But as Learning of course starts with doing small unitary tasks RAD obviously is a great help to fight the FUD and prejudice the students might have regarding programming. Of course it's great to dedicate a (later) lesson to un-RAD-ing your code in order to be prepared for bigger tasks. -Michael -- _______________________________________________

Order of teaching is not so critical : As you say , write a GUI program for events : Say : "Now it is necessary to define what will be done for the events ? ... Its way is the following : Write your program parts in that way ..."

My application was like the following ( as a very simple example ) :

Pose a problem "Display your name ."
After this is done :

"Display your name 10 times ."

The students were not able to write their programs . Then , solution was "You should use a loop ."
"A loop is defined in the following ways : ... "

Such an approach is used frequently in Mathematics text books :

Subject text .

Problems ..

Last problems were "Unsolvable" with the above text .

Solution :
"Read the next chapter ..."

.....................

Such approaches are "the Art of Teaching" ...

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161018/48f90808/attachment.html>

Reply by email

Jürgen Hestermann
to Mehmet Erol Sanliturk
Mehmet Erol Sanliturk wrote
Order of teaching is not so critical : As you say , write a GUI program for events : Say : "Now it is necessary to define what will be done for the events ? ... Its way is the following : Write your program parts in that way ..."

IMO the order is extremly important!
If you start with the fundamental informations
(how does the processor work in general,
how are variables stored (stack/heap/etc.),
what does the processor do in loops, etc.)
then this information is remembered very well
because everybody can imagine what goes on in general. You can *predict* what will (should) happen in your program.

If you just start with clicking you do not know *why* it works (if it works) nor do you know *why* it does not work (if it does not do so). They would always need someone at hand with exprience to tell them how to continue. This can be very frustrating for studends.

Therefore I would always present at least a rough overview about procedural programming before starting with objects and events. In the end, the latter is still processed in a procedural manner which every programmer should know.

Show quoted text 14 lines
My application was like the following ( as a very simple example ) : Pose a problem "Display your name ." After this is done : "Display your name 10 times ." The students were not able to write their programs . Then , solution was "You should use a loop ." "A loop is defined in the following ways : ... " Such an approach is used frequently in Mathematics text books : Subject text . Problems .. Last problems were "Unsolvable" with the above text . Solution : "Read the next chapter ..." Such approaches are "the Art of Teaching" ...

IMO this "approach" has a severe drawback:
The students do not get an overall picture of what *can* be done and *how* it can be done.
If they do not know about loops how should they
know that they exist? They would need to read *everything* that is available and hope to find something helpful. That is very frustrating and can lead to suboptimal solutions because they get tired of reading yet another chapter and instead use something else (like copying the code in the editor 10 times).

Reply by email

Mehmet Erol Sanliturk
to Jürgen Hestermann

On Tue, Oct 18, 2016 at 6:23 AM, Jürgen Hestermann via Lazarus <

Show quoted text 57 lines
wrote: Am 2016-10-18 um 12:53 schrieb Mehmet Erol Sanliturk via Lazarus: > Order of teaching is not so critical : As you say , write a GUI program for events : Say : "Now it is necessary to define what will be done for the events ? ... Its way is the following : Write your program parts in that way ..." IMO the order is extremly important! If you start with the fundamental informations (how does the processor work in general, how are variables stored (stack/heap/etc.), what does the processor do in loops, etc.) then this information is remembered very well because everybody can imagine what goes on in general. You can *predict* what will (should) happen in your program. If you just start with clicking you do not know *why* it works (if it works) nor do you know *why* it does not work (if it does not do so). They would always need someone at hand with exprience to tell them how to continue. This can be very frustrating for studends. Therefore I would always present at least a rough overview about procedural programming before starting with objects and events. In the end, the latter is still processed in a procedural manner which every programmer should know. > My application was like the following ( as a very simple example ) : > Pose a problem "Display your name ." > After this is done : > "Display your name 10 times ." > The students were not able to write their programs . Then , solution was > "You should use a loop ." > "A loop is defined in the following ways : ... " > Such an approach is used frequently in Mathematics text books : > Subject text . > Problems .. > Last problems were "Unsolvable" with the above text . > Solution : > "Read the next chapter ..." > Such approaches are "the Art of Teaching" ... IMO this "approach" has a severe drawback: The students do not get an overall picture of what *can* be done and *how* it can be done. If they do not know about loops how should they know that they exist? They would need to read *everything* that is available and hope to find something helpful. That is very frustrating and can lead to suboptimal solutions because they get tired of reading yet another chapter and instead use something else (like copying the code in the editor 10 times). -- _______________________________________________

I have said that

"the Art of Teaching" ...

Assume that a course is designed by a department , and you are the instructor .

For example : Course X : Programming using Lazarus

Course outline is the Lazarus components .

What can you do ?

"I am resigning because this course is not well designed ." or

"I am changing the course outline as I want ." ( which you do not have authority to do that ) .

or

"Lazarus is this ... The following parts are necessary to learn to use when you click ... ( here you will teach what is required which yo described above ... ) "

Please select an appropriate one .

If you are the designer of the courses you are right what to do .

Problem arises when you are not course designer but an instructor of it . Then you need to use "the Art of Teaching" with your "the Science of Teaching" .

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161018/8d1a7c34/attachment.html>

Reply by email

Michael Schnell
to Jürgen Hestermann: IMO the order is extremly important! If you start with the fundamental informations (how…
Jürgen Hestermann wrote 9 lines
IMO the order is extremly important! If you start with the fundamental informations (how does the processor work in general, how are variables stored (stack/heap/etc.), what does the processor do in loops, etc.) then this information is remembered very well because everybody can imagine what goes on in general. You can *predict* what will (should) happen in your program.

IMO the order is extremely important!

If you start with complex stuff that does not yield immediate success (i.e. a working program that does something that might be useful) The students will loose interest and run away, unless they are nerds like ourselves.

-Michael

Reply by email

Jürgen Hestermann
to Michael Schnell
Michael Schnell wrote
If you start with complex stuff that does not yield immediate success (i.e. a working program that does something that might be useful) The students will loose interest and run away, unless they are nerds like ourselves.

Yes, therefore start with simple procedural (console) programs that let them have immediate success with all the elementary things that a program consists of (variables/types, loops, commands, etc.).
If that is understood you can switch to GUI applications.

If you do it the other way round you only delay the date of frustration but you do not avoid it.

Reply by email

Lars
to Michael Schnell: As you point out in the text this is as well a pro (easy fast solving of small unitary…
Michael Schnell wrote 8 lines
> The big issue with teaching using a RAD tool, is welding the program > logic into the onclick events, instead of decoupling the logic in > separate procedures that can be reused elsewhere. As you point out in the text this is as well a pro (easy fast solving of small unitary tasks) as a con (bad reusability, bad code when doing big projects)

....

Show quoted text 6 lines
Of course it's great to dedicate a (later) lesson to un-RAD-ing your code in order to be prepared for bigger tasks. -Michael

Agree, although one could even just start out teaching console mode programs before RAD, which I think is what many universities do... I remember seeing that they were still using turbo pascal in some courses in Canada at universities here.

The issue with console mode programs is students see utterly no use for them. I remember when I was using dos as a little kid, I was introduced to basic, and I saw no use of it. GUI apps are of much more use to people as they are flashy and rich with widgets, whereas console mode programs seem utterly boring.

I guess that's the difference between unix users and Windows users.. Unix users back in the old days saw console mode programs as huge thrills and a great experience. When I saw Dos programs when I was a kid I thought they were pathetic and useless, and it deterred me from programming.

If I knew about delphi as a child I probably would have been more interested in programming. I remember trying visual basic and disliking the language keywords. I liked the visual basic tool since you could easily create widgets on forms, but I disliked the language itself. Visual basic also forms the exact same (if not worse) bad habits of welding code into click events and doing sloppy quick coding.

Reply by email

Lars
to Mehmet Erol Sanliturk: On Mon, Oct 17, 2016 at 12:05 PM, Lars via Lazarus < ------------- ------------- My…
Mehmet Erol Sanliturk wrote 5 lines
One obvious point is that an "event" driven programming knowledge is a must to become a competent programmer . The problem is how this can be learned . Without knowing how to program an algorithm when a related event is occurred , will bring any one to nothing means ( not to a success ) .

An interesting question is what is an event and isn't in some way or another all programming based on events that occur?

The concept of callbacks is very similar to events. you make a callback when something happens, just like an event. This can be done even in old turbopascal programs or console mode programs..

I'm not so sure event driven programming is a must to become a competent programmer, I would have to think about that. Events could (may) force a programmer to think about programs in a certain way... when there are alternatives? or are events the only alternative just in another form (callbacks, or calling procedures). It begs the question about whether events are just procedures being called, which is the same as any programming methodology since all programs "call procedures".

Is a compiler event driven? A competent programmer could write a compiler, or a parser. Are they necessary to have event driven architectures?

i.e. is the fpc compiler event driven, even if not officially event driven someone ended up reinventing events in it? From what I understand Michael V. C.'s documentation tool is event driven which differs from the fpc compiler. However I beg the question: is all programming event driven in some way since events are just "calls to procedures". Of course that is simplifying it, but "what is an event?" would be a good computing science article to write. If I had any time..

Reply by email

Lars
to Michael Schnell: That is absolutely correct. But the point where the "knowing how it works" is just a…
Michael Schnell wrote 22 lines
On 14.10.2016 16:10, Jürgen Hestermann via Lazarus wrote: > > In most cases they never get to the step "find out how it works". > If it works, nobody wants to invest time anymore to look under the hood. > So they always operate on the surface and repeat the same > subobtimal programming over and over again because they don't know how to > do it better. > That is absolutely correct. But the point where the "knowing how it works" is just a matter of deliberate choice (or the professor, the student or the situation you get in and need to crawl deeper into the complexity of the matter.- - do I need know how/why the GUI builder creates the code that makes a Button visible on a Form and my Event handler be called when a button is pressed ? (I.e. do I need to be able to write the code myself without the help of the GUI builder ?)

Sometimes knowing the internals and details can be a disadvantage because instead of thinking about the abstract program you are thinking about cpu cycles, bit popping, bit twiddling, low level API calls.

Sometimes it's nice to live in La La land of an abstract layer over top so you can focus on the program construct, instead of low level implementation details. I for one, do not like doing pure Win Api calls, even though that can be so much fun for an intellectual exercise. The first time I really realized this was when I downloaded the Sysinternals tools (procmon, taskmon, regmon) now which no longer exist as sysinternals tools and were purchased by microsoft. I was absolutely fascinated that Mark R. and friend, wrote those tools in pure winapi... I was beautiful code.

But I was also disappointed that they would waste their time on such low level code when a lot of it could have been easily abstracted with a tool like Delphi, with just some winapi calls directly, and most of the stuff automated with gui widgets already in a vcl. They didn't use c++ and did it in pure c, AFAIR. It was beautiful code, but then I asked my self.. why? why would you waste your time doing pure api calls? Just as intellectual exercize?

Sometimes it's nice to live in a fairy land (abstract) over top of all the low level details.

Also, Edsgar Dijkstra was also very much against knowing too many details about the CPU or computer hardware, as he though computing was math, not engineering of computers.

Reply by email

Lars
to Graeme Geldenhuys: Yes (I.e. do I need to be able to write the code myself Yes Yes If you are using queues…
Graeme Geldenhuys wrote 43 lines
On 2016-10-17 09:52, Michael Schnell via Lazarus wrote: > - do I need know how/why the GUI builder creates the code that makes a > Button visible on a Form and my Event handler be called when a button > is pressed ? Yes (I.e. do I need to be able to write the code myself > without the help of the GUI builder ?) Yes > - do I need to know how the startup code works that make the Form > visible on the screen ? Yes > - do I need to know how the Event-Queue and the checksynchronize() > system works ? If you are using queues and Synchronise, then Yes. > - do I need to know what system, calls the pascal program performs ? > No The rest of your questions were just flame bait so don't deserve an answer. If you don't know any of the above, how do you expect to do any debugging? Yes, debugging is a major part of being a programmer.

I can chime in on this flame here. Although debugging is a major part of a lot of programmers life, it SHOULD NOT be. We should be developing applications knowing the entire source code of the application in our minds, without just knowing little tiny bits of the system and "Winging it".

Today's bloatware applications are so large no one can understand them which is what attracts me to systems like Oberon by Nik. Wirth, and OpenBSD, and other small systems that are simple enough you can understand them in a month of reading about them (the basics).

Also Plan9 from bell labs... and small programming languages, like oberon, are very interesting because they go against today's trends of bloatware like Firefox (as much as I love firefox) and Lisp, or Emacs.

The idea that programmers spend much of their efforts debugging, is a bug, not a feature. Debugging itself, is a bug in a programmers life, that should be fixed. I love a small program that I rarely debug that's been running on a server for years without being touched. I dislike so much apps that need "maintenance".

Reply by email

Lars
to Michael Schnell: IMHO a personal POV that is not very helpful in a totally general discussion (please keep…
Michael Schnell wrote 10 lines
On 17.10.2016 11:07, Graeme Geldenhuys via Lazarus wrote: > YES ...YES...NO... > IMHO a personal POV that is not very helpful in a totally general discussion (please keep in mind that the intention of the OP to consider Pascal instead of C was to keep the students from running away too soon.

oberon/golang instead of C are some other options. The issue with standard pascal in place of C was that once you figured out the limitations of the 255 length string and other standard pascal gotchyas, you not only ran away from C, you also ran away from Pascal.

Apple tried to solve this by extending pascal, which defeated the purpose of a standard pascal. It was no longer standard. This all written about by Brian K in "what pascal is not my fav..."

And the story is not so much different today, we have several instances of pascal floating about: delphi, fpc... and it gets worse: each release of delphi, breaks the last version so you end up polluting your code with IFDEF's and version checks, taking away from the actual program and causign the programmer to be concerned about completely irrelevant details that have nothing to do with high level abstract programming

Oberon was supposed to solve this by making a standard version of pascal that was modern, but not calling it pascal since pascal had a bad reputation. But oberon, sadly, has several versions of itself... active oberon, object oberon, oberon 1 2 3 4 5... embedded oberon (oberon 7?) so this "shit" is not much different than C++, excuse my french! As much as I love all these programming languages we have to stop FORKING everything and replacing it with a new incompatible version next year.

The time I waste converting old delphi 5 code to work in delphi berlin, or converting turbopascal units that are really useful over to modern delphi, is time wasted. I would rather have one language that remained the same for 20 years and then changed only after 20 years. This seems to be something that GOLang wants to do, stop making so many incompatible changes.. We'll see. Sometimes I just write code in Delphi 5 style and don't use any other features, to make it portable everywhere.. since any modern pascal compiler will compile delphi 5 code. The discipline of sticking to one standards compliant code is difficult. That's what Plain C is all about I guess, but then you end up wasting your life coding your own memory allocations.

Reply by email

Lars
to Mehmet Erol Sanliturk: To test a large program , I want to use Petri Nets to drive the testing steps in an…
Mehmet Erol Sanliturk wrote
One unfortunate situation is that there is not much Pascal software for Petri Nets processing , except the following ( which its license is very ambiguous means not usable )

Hopefully in these situations, you can find a C dll and then just write a wrapper, in Pascal, to link the the DLL code.

Any petri related DLL's that you could bind to?

Just because the petri code is written in another language, doesn't mean you can then use fpc to link to it and write layers around it?

I have no idea of dll's available for petri.. sorry, just offering this idea. In fact 99 percent of programming today is using other people's code that is stored away in dll's. The entire operating system is a bunch of dll's and likely your typical lazarus application only uses 1-10 percent pascal code and 90 percent DLL code in C.

Show quoted text 6 lines
Petri Nets are a vast subject now . There are some Petri Nets processing software but their licenses being copy left are not friendly for commercial environment .

Ahh, the age old license war which I've been a part of and why I prefer MIT/bsd code...

Actually , it is not compulsory to use Pascal , but Pascal will supply the Pascal programming language learners a very good example ,

Again you could also use a combination here: c dll's linked in. If that works.

Reply by email

Lars
to Mehmet Erol Sanliturk: On Tue, Oct 18, 2016 at 1:11 AM, Michael Schnell via Lazarus < Order of teaching is not…
Mehmet Erol Sanliturk wrote 12 lines
My application was like the following ( as a very simple example ) : Pose a problem "Display your name ." After this is done : "Display your name 10 times ." The students were not able to write their programs . Then , solution was "You should use a loop ."

How do you know some clever student wouldn't end up using recursion without any loop involved?

And that leads to a question, should recursion even be used in teaching or are loops easier to reason about?

I find recursion, although intellectually interesting, kind of difficult to map in the mind, and I'm skeptical of all the functional languages using recursion, almost abusively.

Reply by email

Lars
to Reimar Grabowski: On Thu, 13 Oct 2016 23:11:31 +0200 ^^ = ;) R.
Show quoted text 6 lines
> Il 13/10/2016 16:48, Reimar Grabowski via Lazarus ha scritto: > > >> If you want modern, teach them Java and let the programs run on their >> phones or keep doing console programs and do the GUI in JS (aka web >> applications). ^^

Wait, wasn't java killed, the day someone thought up the idea of compiling other languages to the JVM... LOL. What's the need for java if you can take any language of your choice, and compile it to JVM.

The great thing about Java is that supposedly it's a small language.. but hell the libraries make it super complicated.

Reply by email

Jürgen Hestermann
to Lars: .... Agree, although one could even just start out teaching console mode programs before…
Lars wrote
The issue with console mode programs is students see utterly no use for them.

Why should they not?
A computer is a information processing machine and GUI is not necessary to process information, it's just a cosmetic thing.
The interaction of a program with the user can be done in text mode too. Algorithms have nothing to do with GUI or text mode. If students just want to paint graphics and make a game of every program then they will never be real programmers.
Not every program must be a game with visual effects.

GUI apps are of much more use to people as they are flashy and rich with widgets, whereas console mode programs seem utterly boring.

What is the use of a program? Entertainment?

Reply by email

Lars
to Unknown author: incite works, too :) NOTE: No off-list assistance is given without prior approval.…
wkitty42--- wrote 11 lines
On 10/14/2016 07:04 AM, Graeme Geldenhuys via Lazarus wrote: > On 2016-10-14 12:01, Graeme Geldenhuys via Lazarus wrote: > >> and maybe incite them every now and again > > Oops, that meant to read: "...and maybe entice them..." > incite works, too :)

I recall Michael V. C. saying you could revoke a person's programming language... give them an "incitation"

https://s-media-cache-ak0.pinimg.com/564x/20/41/bb/2041bb01aa8b11cb5c715cebd520d12a.jpg

Reply by email

Lars
to Santiago A.: More modern means maybe with a few extra features. And in this context I suppose that…
Both points are important, being popular is also important, network effect is important. More users means more libraries, more beta testers, more information, more tools. So, better frameworks.

Popular isn't always good. Look at perl's Cpan, or heck even java. Basically if you have a bunch of monkeys typing on typewriters it does not necessarily mean you are going to get a good book written by monkeys even if there are 1,000,000 working on it in the same room.

Ruby Gems same thing. All this popular stuff doesn't necessarily mean high quality code.

Take something utterly unpopular like Oberon, and you see super high quality code. Or OpenBSD that virtually no one uses yet it is rock solid code compared to some of the other garbage out there.

Of course I don't want to reiterate what Paul Graham has said, he wrote an article about "popular" and it's issues.

Don't underestimate the "popular factor".

Certainly. But popular is also analogous to monkeys on typewriters pumping out quantity, but not quality.

Don't mean to call Ruby or Perl or Java programmers monkeys, but some of the stuff I've seen come out of that end appears to be of such.

Cpan, for example, is a repository for all perl code. And very popular it was during the internet days when Perl was the duct tape of the internet. The fact that they called it "duct tape" should be the first clue...

Reply by email

Jürgen Hestermann
to Lars: Sometimes knowing the internals and details can be a disadvantage because instead of…
Lars wrote
Sometimes knowing the internals and details can be a disadvantage because instead of thinking about the abstract program you are thinking about cpu cycles, bit popping, bit twiddling, low level API calls.

How do you think about "the abstract program" if you have no knowledge about the program language? How can you program without knowing what a variable or a while statement is? Programming is the mapping of an abstract problem into a programming language. But if you do not know how the programming language works, how can you then write programs?

Also, Edsgar Dijkstra was also very much against knowing too many details about the CPU or computer hardware, as he though computing was math, not engineering of computers.

And how do you do math without knowledge about variables and loops?

Reply by email

Lars
to Jürgen Hestermann: IMO the order is extremly important! If you start with the fundamental informations (how…
Jürgen Hestermann wrote 15 lines
Am 2016-10-18 um 12:53 schrieb Mehmet Erol Sanliturk via Lazarus: > Order of teaching is not so critical : As you say , write a GUI program > for events : Say : "Now it is necessary to define what will be done for > the events ? ... Its way is the following : Write your program parts in > that way ..." IMO the order is extremly important! If you start with the fundamental informations (how does the processor work in general, how are variables stored (stack/heap/etc.), what does the processor do in loops, etc.) then this information is remembered very well because everybody can imagine what goes on in general. You can *predict* what will (should) happen in your program.

Hmmm.. I'm not so sure learning about the internals of the CPU is so good. IMO that is computer science, whereas programming is computing science.

I was interested in how computers physically worked, before I became a programmer. One of the worst things a programmer can do is think in CPU cycles because it's a low level detail that has nothing to do with the program as a mathematical construct.

For example in mathematics when you write equations on paper do you ever think about how the electronic calculator works, to process these numbers, when you punch the math into your calculator? The last thing a mathematics student knows about, is the internal architechture of the Casio calculator he is using, because he's more focused on the maths... which IMO is good. To now know anything, and be completely ignorant, of the casio calculator and how it processes your equations and additions and subtractions, is a very good thing.

On the other hand, someone interested in physics, and computer science (not computing science) will benefit greatly from learning how the cpu works, memory, etc. Every time they said they were offering "computer science" courses, as a child I always wondered... is that how the capacitors, resistors, and cpu chips work? I never once could possibly grasp how programming a computer had anything to do with the computer itself. As programming can be done on paper and never touch a computer, and still be a a program that is understandable even if it doesn't run on any physical system.

I've been very skeptical of any programmer who immediately converts his program to assembly instructions. I can see how it is useful for debugging, and creating a compiler on hardware, but it completely ruins the abstract program concept. It's equivalent of someone writing a beautiful mathematics paper, and then converting it to his casio calculator instruction set. A mathematician would never do such a thing as he couldn't care less about the internals of his casio calculator. So I don't understand why so many programmers are obsessed with low level details. I guess I just find abstract la la land a better place to be in, where there is even a potential for a program to be proven correct and never debugged.

Show quoted text 45 lines
If you just start with clicking you do not know *why* it works (if it works) nor do you know *why* it does not work (if it does not do so). They would always need someone at hand with exprience to tell them how to continue. This can be very frustrating for studends. Therefore I would always present at least a rough overview about procedural programming before starting with objects and events. In the end, the latter is still processed in a procedural manner which every programmer should know. > My application was like the following ( as a very simple example ) : > Pose a problem "Display your name ." > After this is done : > "Display your name 10 times ." > The students were not able to write their programs . Then , solution was > "You should use a loop ." > "A loop is defined in the following ways : ... " > Such an approach is used frequently in Mathematics text books : > Subject text . > Problems .. > Last problems were "Unsolvable" with the above text . > Solution : > "Read the next chapter ..." > Such approaches are "the Art of Teaching" ... > IMO this "approach" has a severe drawback: The students do not get an overall picture of what *can* be done and *how* it can be done. If they do not know about loops how should they know that they exist? They would need to read *everything* that is available and hope to find something helpful. That is very frustrating and can lead to suboptimal solutions because they get tired of reading yet another chapter and instead use something else (like copying the code in the editor 10 times). -- _______________________________________________ Lazarus mailing list http://lists.lazarus-ide.org/listinfo/lazarus

Reply by email

Lars
to Jürgen Hestermann: Yes, therefore start with simple procedural (console) programs that let them have…
Jürgen Hestermann wrote 16 lines
Am 2016-10-18 um 16:47 schrieb Michael Schnell via Lazarus: > If you start with complex stuff that does not yield immediate success > (i.e. a working program that does something that might be useful) The > students will loose interest and run away, unless they are nerds like > ourselves. Yes, therefore start with simple procedural (console) programs that let them have immediate success with all the elementary things that a program consists of (variables/types, loops, commands, etc.). If that is understood you can switch to GUI applications. If you do it the other way round you only delay the date of frustration but you do not avoid it.

There are two sides to this story, I'm afraid. I'm a fan of the console program teaching method myself but the issue is: console mode programs are irrelevant and useless. Today, MS DOS doesn't exist any more. Even when ms dos existed, console mode programs were boring, and only complete geeks would be interested in creating console mode programs. We're talking about people who have no social lives who create text mode games here...

If I was introduced to ComponentPascal (oberon) or delphi as a person learning programming, where there were actual widgets you could create, it just might convince me that programming is of some use. Console mode programs are utterly useless to a newcomer. Wow you created a console mode program that prints and asks questions... Joy Joy! I think that's why I never got interested in Basic, for ms dos... It was on my machine but I just couldn't see how it was of any use. Now on the other hand if Delphi was on a windows 3.1 machine I may have even been interested, as you could just see a person being drawn into wiz bang widgetsets.. that do something useful, unlike a boring console mode program.

Saying that, I still am a fan of console mode program teaching as it teaches you about variables, setting values, incrementing, etc.

Today, programmers learn to program in PHP because HTML is the widgetset. Often a first programming language a person learns is PHP these days, IMO. And that's sad, as it creates bad habits galore. All because HTML today is literally "the widget set" being used for programming.

Reply by email

Jürgen Hestermann
to Lars: How do you know some clever student wouldn't end up using recursion without any loop…
Lars wrote
How do you know some clever student wouldn't end up using recursion without any loop involved?

How can a student think about loops and recursion at all if he does not get the information that they exist (in the specific programming language)? So the "clever" student that does something that has not been taught in a course may not need the what about those who want to learn in a course? If you do not give essential information about a programming language then you do not need the course at all.

Show quoted text 5 lines
And that leads to a question, should recursion even be used in teaching or are loops easier to reason about? I find recursion, although intellectually interesting, kind of difficult to map in the mind, and I'm skeptical of all the functional languages using recursion, almost abusively.

I prefer loops instead of recusion too, mostly because they are easier to understand and debug.
Nevertheless, in some special situations I also use recursion, especially, when interim results need to be stored which is easier on the stack.
Handling additional data (on the heap) is cumbersome too.

And when teaching a programming language that allows recursion then of course it should be taught.

Reply by email

Lars
to Mehmet Erol Sanliturk: On Fri, Oct 14, 2016 at 1:18 AM, Michael Schnell via Lazarus < As an engineer , they need…
Mehmet Erol Sanliturk wrote 41 lines
On Fri, Oct 14, 2016 at 1:18 AM, Michael Schnell via Lazarus < > wrote: > On 13.10.2016 10:20, Graeme Geldenhuys via Lazarus wrote: > > >> +1 >> That would be the best solution. GUI programming is based on >> fundamentals than need to be understood first. >> > > -1 !! > > > The OP explained that his main purpose is to introduce more fun in the > education. That can be done by plunging into programming directly with > GUI > development. > > This is why RAD had been invented. > > > Of course there are decent drawbacks regarding relying too much on RAD > and about not really understanding the fundamentals behind it. > > But in the end the addressees are non-computer engineers. > > > -Michael > -- > _______________________________________________ > > As an engineer , they need to write programs for doing computations not available in ready-made packages . Therefore , they need to a sufficient knowledge to write programs . This can be achieved in a good balance of learning programming itself and GUI application .

The word engineer is so overloaded, that I hate it, with my guts.

What is an engineer? A guy "who makes stuff".. which pretty much describes every single profession.

Do software engineers have to buy an APPEGA subscription? are they registered as professional engineers and have to have a degree to prove it?

I think the word engineer should be kept for the oil and gas industry, IMO, where buffoons engineer solutions to rape oil out of the ground.

I prefer the term programmer...

I made the mistake of thinking of myself as a software engineer at one time, but I'm wondering... since engineering requires a membership with an organization like APEGA, are software engineers misusing the engineer term?

Now, if you mean "engineer" as in someone who really does hold an APEGA subscription and is using programming languages to control oil and gas industry PLC's (logic controllers) then I can understand using engineer as a title.

Honestly, I just hate the word engineer... as to me an engineer is a vague, meaningless term. It essentially means "guy who makes solutions to problems" or "Guy who makes things"... But since engineers have to have an APEGA subscription to be a valid engineer, why are programmers using the term? It's leaked into the industry and profession, which was a big mistake imo. I just prefer the term programmer. Not hacker. Not engineer. I'm a programmer.

Reply by email

Jürgen Hestermann
to Lars: Hmmm.. I'm not so sure learning about the internals of the CPU is so good. IMO that is…
Lars wrote 6 lines
Hmmm.. I'm not so sure learning about the internals of the CPU is so good. IMO that is computer science, whereas programming is computing science. I was interested in how computers physically worked, before I became a programmer. One of the worst things a programmer can do is think in CPU cycles because it's a low level detail that has nothing to do with the program as a mathematical construct.

I am talking about the general construction of a computer: That a CPU exists with registers to store data which runs your program and that it has some rudimentary built in commands (a rough overview of them is useful) and that a stack and a heap exits to store data. That's almost enough. I am not talking about knowing how many CPU cycles a certain command takes. But a programmer should know to what his program boils down to in the end. Otherwise he would not know what limits exist and how to avoid exceeding them.

Show quoted text 5 lines
For example in mathematics when you write equations on paper do you ever think about how the electronic calculator works, to process these numbers, when you punch the math into your calculator? The last thing a mathematics student knows about, is the internal architechture of the Casio calculator he is using, because he's more focused on the maths... which IMO is good.

That is a bad comparison. In a calculator you have no choice how to "program" equations. You just type them and get a result. But even here you need to know how the calculator works as you may have polish notation or the calculator may obey point before line calculation or not. If you do not know these details you cannot use the calculator effiently.

Reply by email

Luca Olivetti
to Jürgen Hestermann: Why should they not? A computer is a information processing machine and GUI is not…

El 21/10/16 a les 11:09, Jürgen Hestermann via Lazarus ha escrit:

Show quoted text 9 lines
Am 2016-10-21 um 09:20 schrieb Lars via Lazarus: > The issue with console mode programs is students see utterly no use for them. Why should they not? A computer is a information processing machine and GUI is not necessary to process information, it's just a cosmetic thing. The interaction of a program with the user can be done in text mode too. Algorithms have nothing to do with GUI or text mode.

e.g.

http://stats.ioinformatics.org/tasks/2016/

Bye

Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007

Reply by email

Jürgen Hestermann
to Lars: There are two sides to this story, I'm afraid. I'm a fan of the console program teaching…
Lars wrote 7 lines
There are two sides to this story, I'm afraid. I'm a fan of the console program teaching method myself but the issue is: console mode programs are irrelevant and useless. Today, MS DOS doesn't exist any more. Even when ms dos existed, console mode programs were boring, and only complete geeks would be interested in creating console mode programs. We're talking about people who have no social lives who create text mode games here...

Well, how can you do GUI programming without knowing about variables and loops? Console mode programs are just a vehicle to introduce these fundamentals. Nobody can expect to be able to program a block buster game after a one hour programming course. If students are already bored by not having fun after 10 minutes course they will not become successful programmers anyway.

And there are useful console mode programs
where you can learn the fundamentals:
I once got a (physical) card game with 9 cards.
Each showed parts of a person with differently colored arms, legs, heads on top, bottom, left, right.
You had to arrange these cards in 3 rows and 3 columns so that the whole picture shows all persons with the same
colored bodies on adjacent sides.
This drove me nuts as I did not find out how to arrange them even after days. So I programmed it (in a console program),
eh voila, all possible solutions were found after 1 or 2 hours of programming. I think this is a good exercise to learn about the details of a programming language. And I had fun when doing this (even though it was a console mode program).

Reply by email

Lars
to Martin Schreiber: "Event driven" probably means that there is an event queue with a central…
Martin Schreiber wrote 10 lines
On Friday 21 October 2016 09:51:38 Lars via Lazarus wrote: > > I'm not so sure event driven programming is a must to become a > competent programmer, I would have to think about that. "Event driven" probably means that there is an event queue with a central toolkit-main-eventloop which dispatches the events instead a program specific flow control.

What about a pure win32 API app written in C. Do you essentially reinvent your own event system using callbacks with program flow control? Or the win32 api has an event system in its api itself? Been a while since I did some win32 api programming..
I'm just wondering if pretty much every system out there has some kind of rolled your own event system of some kind. The other common item that pops up everywhere is some kind of messaging system to notify objects, which I guess is what Smalltalk takes credit for.

Reply by email

Martin Schreiber
to Lars
Lars wrote 12 lines
On Fri, October 21, 2016 2:11 am, Martin Schreiber via Lazarus wrote: > On Friday 21 October 2016 09:51:38 Lars via Lazarus wrote: >> I'm not so sure event driven programming is a must to become a >> competent programmer, I would have to think about that. > > "Event driven" probably means that there is an event queue with a central > toolkit-main-eventloop which dispatches the events instead a program > specific flow control. What about a pure win32 API app written in C. Do you essentially reinvent your own event system using callbacks with program flow control? Or the win32 api has an event system in its api itself?

Win32 API works with message queues.

Martin

Reply by email

Mehmet Erol Sanliturk
to Lars: An interesting question is what is an event and isn't in some way or another all…

On Fri, Oct 21, 2016 at 12:51 AM, Lars via Lazarus <

Show quoted text 38 lines
wrote: On Mon, October 17, 2016 7:32 pm, Mehmet Erol Sanliturk wrote: > One obvious point is that an "event" driven programming knowledge is a > must to become a competent programmer . The problem is how this can be > learned . Without knowing how to program an algorithm when a related event > is occurred , will bring any one to nothing means ( not to a success ) . > An interesting question is what is an event and isn't in some way or another all programming based on events that occur? The concept of callbacks is very similar to events. you make a callback when something happens, just like an event. This can be done even in old turbopascal programs or console mode programs.. I'm not so sure event driven programming is a must to become a competent programmer, I would have to think about that. Events could (may) force a programmer to think about programs in a certain way... when there are alternatives? or are events the only alternative just in another form (callbacks, or calling procedures). It begs the question about whether events are just procedures being called, which is the same as any programming methodology since all programs "call procedures". Is a compiler event driven? A competent programmer could write a compiler, or a parser. Are they necessary to have event driven architectures? i.e. is the fpc compiler event driven, even if not officially event driven someone ended up reinventing events in it? From what I understand Michael V. C.'s documentation tool is event driven which differs from the fpc compiler. However I beg the question: is all programming event driven in some way since events are just "calls to procedures". Of course that is simplifying it, but "what is an event?" would be a good computing science article to write. If I had any time.. -- _______________________________________________

Please see the following pages :

https://en.wikipedia.org/wiki/Event-driven_programming ( Event-driven programming )

https://en.wikipedia.org/wiki/Imperative_programming ( Imperative programming )

https://en.wikipedia.org/wiki/Category:Events_(computing) ( Category:Events (computing) )

https://en.wikipedia.org/wiki/Category:Programming_paradigms ( Category:Programming paradigms )

You can find plenty of information in the above pages and in their linked pages .

Lazarus IDE : An example of event driven programming FPC : An example of imperative programming

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161021/380afd38/attachment-0001.html>

Reply by email

Michael Schnell
to Lars: An interesting question is what is an event and isn't in some way or another all…
Lars wrote
The concept of callbacks is very similar to events.

The difference is that with a callback you usually know both sides and hence how exactly it is called, while with an event (especially when fired by the LCL on behalf of something that happens in the GUI, aka RAD) you don't need to know exactly how and why it is fired, you just place your user code in it and are happy (at least if you are not a nerd like myself).

-Michael

Reply by email

Michael Schnell
to Jürgen Hestermann: Yes, therefore start with simple procedural (console) programs that let them have…
Jürgen Hestermann wrote 6 lines
Yes, therefore start with simple procedural (console) programs that let them have immediate success with all the elementary things that a program consists of (variables/types, loops, commands, etc.).

Yep. Satisfying for a Nerd, but it does not get something useful done and hence frustrating for a beginning application developer.

If you do it the other way round you only delay the date of frustration but you do not avoid it.

That is true if (s)he one day will be confronted with large, complex, unusual or critical tasks.

-Michael

Reply by email

Jürgen Hestermann
to Michael Schnell: The difference is that with a callback you usually know both sides and hence how exactly…
Michael Schnell wrote 5 lines
On 21.10.2016 09:51, Lars via Lazarus wrote: > The concept of callbacks is very similar to events. The difference is that with a callback you usually know both sides and hence how exactly it is called, while with an event (especially when fired by the LCL on behalf of something that happens in the GUI, aka RAD) you don't need to know exactly how and why it is fired, you just place your user code in it and are happy (at least if you are not a nerd like myself).

You cannot "be happy" if you don't know exactly when an event is fired. It is of course important to know that.
Otherwise you only assume something (that must not be true). The discussions about events fired by the user but not when changes are done by code showed this clearly.

Reply by email

Jürgen Hestermann
to Michael Schnell: Yep. Satisfying for a Nerd, but it does not get something useful done and hence…
Michael Schnell wrote 6 lines
On 18.10.2016 17:16, Jürgen Hestermann via Lazarus wrote: > Yes, therefore start with simple procedural (console) > programs that let them have immediate success with > all the elementary things that a program consists of > (variables/types, loops, commands, etc.). Yep. Satisfying for a Nerd, but it does not get something useful done and hence frustrating for a beginning application developer.

You mean it is possible to write a program with Free Pascal without knowing about variables, loops, etc.?
I doubt this.

Reply by email

Jürgen Hestermann
to Michael Schnell: Nowadays in 90% of the usage exactly this. Maybe other usage cases are more "important",…
Michael Schnell wrote
On 21.10.2016 11:09, Jürgen Hestermann via Lazarus wrote: > What is the use of a program? Entertainment? Nowadays in 90% of the usage exactly this. Maybe other usage cases are more "important", but still the money is made with Entertainment.

There may be a misunderstanding:
I did not ask whether the *purpose* of a program is entertainment but whether *programming* it has to be entertainment? The aim of programming should be to get a program running (as the programmer wants it) not to spend time with juggling gaudy pictures, icons and videos.

In the end, it is somehow "entertaining" if a program works but this requires knowledge about how the programming language works. Ignoring all facts will never lead to a satisfying programming experience.

Reply by email

Travis Ayres

With over 100 replies, we could have already written a course outline, introduction, and some notes about events and RAD programming, maybe also the observer pattern?

On Oct 24, 2016 3:51 AM, "Jürgen Hestermann via Lazarus" <

wrote:
Michael Schnell wrote
On 21.10.2016 11:09, Jürgen Hestermann via Lazarus wrote: > What is the use of a program? Entertainment? Nowadays in 90% of the usage exactly this. Maybe other usage cases are more "important", but still the money is made

with Entertainment.

There may be a misunderstanding:
I did not ask whether the *purpose* of a program is entertainment but whether *programming* it has to be entertainment? The aim of programming should be to get a program running (as the programmer wants it) not to spend time with juggling gaudy pictures, icons and videos.

In the end, it is somehow "entertaining" if a program works but this requires knowledge about how the programming language works. Ignoring all facts will never lead to a satisfying programming experience.

Reply by email

Mehmet Erol Sanliturk
to Travis Ayres

On Mon, Oct 24, 2016 at 9:11 AM, Travis Ayres via Lazarus <

Show quoted text 29 lines
wrote: With over 100 replies, we could have already written a course outline, introduction, and some notes about events and RAD programming, maybe also the observer pattern? On Oct 24, 2016 3:51 AM, "Jürgen Hestermann via Lazarus" < > wrote: Am 2016-10-24 um 12:20 schrieb Michael Schnell via Lazarus: > On 21.10.2016 11:09, Jürgen Hestermann via Lazarus wrote: >> What is the use of a program? Entertainment? > Nowadays in 90% of the usage exactly this. > Maybe other usage cases are more "important", but still the money is made with Entertainment. There may be a misunderstanding: I did not ask whether the *purpose* of a program is entertainment but whether *programming* it has to be entertainment? The aim of programming should be to get a program running (as the programmer wants it) not to spend time with juggling gaudy pictures, icons and videos. In the end, it is somehow "entertaining" if a program works but this requires knowledge about how the programming language works. Ignoring all facts will never lead to a satisfying programming experience.

I have the book :

https://www.amazon.com/Lazarus-Complete-Guide-pascal-teaching/dp/9490968021 ( Lazarus The complete Guide )

You can write a course outline about , for example , "Programming Pascal by using Lazarus" from thr above book .

For Free Pascal , unfortunately , I do not have a teaching oriented book .

For general Pascal programming , the following book may be useful :

https://www.amazon.com/Structured-Programming-Pascal-Winston-Crawley/dp/0138540357/ref=sr_1_1?s=books&ie=UTF8&qid=1477331132&sr=1-1&keywords=0138540357 ( Structured Programming Using Pascal )

For event based programming , the following pages and links in them may be useful :

(
Please see my messages from starting the following link : http://lists.lazarus-ide.org/pipermail/lazarus/2016-October/229807.html )

in page

http://lists.lazarus-ide.org/pipermail/lazarus/2016-October/author.html

especially :

http://lists.lazarus-ide.org/pipermail/lazarus/2016-October/229976.html

My opinion is that event based programming needs special care . A simulation example may be useful , for example , by using PetriSim sources , adapted to Free Pascal .

Thank you very much .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161024/5a5f2d15/attachment.html>

Reply by email

Travis Ayres
to Jürgen Hestermann: There may be a misunderstanding: I did not ask whether the *purpose* of a program is…

The part I'm most interested in is using Lazarus to full effect with good architecture; I don't think the GUI portion would make a good first (or even second) course in computers/computing.

I would like to see a "Software Architecture" course that used Delphi/FreePascal/Lazarus

On Mon, Oct 24, 2016 at 3:51 AM, Jürgen Hestermann via Lazarus <

Show quoted text 27 lines
wrote: Am 2016-10-24 um 12:20 schrieb Michael Schnell via Lazarus: > On 21.10.2016 11:09, Jürgen Hestermann via Lazarus wrote: >> What is the use of a program? Entertainment? > Nowadays in 90% of the usage exactly this. > Maybe other usage cases are more "important", but still the money is made with Entertainment. There may be a misunderstanding: I did not ask whether the *purpose* of a program is entertainment but whether *programming* it has to be entertainment? The aim of programming should be to get a program running (as the programmer wants it) not to spend time with juggling gaudy pictures, icons and videos. In the end, it is somehow "entertaining" if a program works but this requires knowledge about how the programming language works. Ignoring all facts will never lead to a satisfying programming experience. -- _______________________________________________ Lazarus mailing list http://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161024/baecab17/attachment.html>

Reply by email

Unknown author
to Mehmet Erol Sanliturk: On Mon, Oct 24, 2016 at 9:11 AM, Travis Ayres via Lazarus < I have the book :…
Mehmet Erol Sanliturk wrote

i've been looking for that book off and on since i heard about it... amazon currently shows it as unavailable and does not show a price for it :( :( :(

NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted.

Reply by email

Mehmet Erol Sanliturk
to Unknown author

On Mon, Oct 24, 2016 at 1:00 PM, wkitty42--- via Lazarus <

Show quoted text 24 lines
wrote: On 10/24/2016 01:53 PM, Mehmet Erol Sanliturk via Lazarus wrote: > I have the book : > > https://www.amazon.com/Lazarus-Complete-Guide-pascal-teachin > g/dp/9490968021 > ( Lazarus The complete Guide ) > i've been looking for that book off and on since i heard about it... amazon currently shows it as unavailable and does not show a price for it :( :( :( -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted. -- _______________________________________________

I am sorry that I have forgot to write the following sentence :

"Please search the phrase

Lazarus The complete Guide

in Google ."

I have obtained my book through a friend in Turkey who ordered it from publisher of the above book or a book seller in Europe , I do not know which one , but for a possible link , please see :

http://www.pascalgamedevelopment.com/content.php?229-Lazarus-The-Complete-Guide-is-Finally-Here http://www.blaisepascal.eu/index.php?actie=./subscribers/subscription_mainpageUKPaypalPage2 http://www.blaisepascal.eu/subscribers/UK/UK_Book_Department.html http://www.cul.de/lazarus2.html

I do not know the availability of the book at present , but , a name is good to start . Sometimes , I am ordering a used book when a new one is not available .

In University libraries , it is very likely that the above book may be found .

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161024/4a667e7c/attachment-0001.html>

Reply by email

Graeme Geldenhuys
to Mehmet Erol Sanliturk
Mehmet Erol Sanliturk wrote

I believe Blaise Pascal is now the official publisher of that book. From what I can see, they now offer a PDF version of that book, so “out of print” should be of no concern any more. :)

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Mehmet Erol Sanliturk
to Graeme Geldenhuys

On Mon, Oct 24, 2016 at 3:25 PM, Graeme Geldenhuys via Lazarus <

Show quoted text 21 lines
wrote: On 2016-10-24 21:29, Mehmet Erol Sanliturk via Lazarus wrote: > http://www.blaisepascal.eu/subscribers/UK/UK_Book_Department.html I believe Blaise Pascal is now the official publisher of that book. From what I can see, they now offer a PDF version of that book, so “out of print” should be of no concern any more. :) Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -- _______________________________________________

In my book , the following is written :

"
Copyright (c) 2011
All rights for the English version reserved by Blaise Pascal Magazine . Email : http://www.blaisepascalmagazine.eu
"

where http://www.blaisepascalmagazine.eu/
is giving "Server not found"

but when searched in Google , it is finding

http://www.blaisepascal.eu/

( My opinion is that supplied code , let's say , license is not very well defined , and management of book content requires a different approach because the book is a very good reference and documentary quality . )

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161024/0191d98a/attachment.html>

Reply by email

Mehmet Erol Sanliturk
to Martin Schreiber

On Mon, Oct 24, 2016 at 11:41 PM, Martin Schreiber via Lazarus <

Show quoted text 9 lines
wrote: On Monday 24 October 2016 19:53:21 Mehmet Erol Sanliturk via Lazarus wrote: > > > My opinion is that event based programming needs special care . > A simulation example may be useful , for example , by using PetriSim > sources , adapted to Free Pascal .

Please here add the following sentence :

Then a Petri Net definition may be represented by Lazarus forms easily . I am not ignoring other works such as fpGUI , mseIDE-mseGUI , but we are talking about mostly Lazarus .

Show quoted text 8 lines
> The last chapter of "Programmieren macht Spass!" is a lift simulation: http://mseide-msegui.sourceforge.net/pics/aufzug.mpeg Martin -- _______________________________________________

It is difficult to play *.mpeg files in Linux ( there is no default player ) . If you have a converter to format which can be played with default players of Linux ( for example , Dragon Player ) , it would be a very good contribution .

Simulation subjects may be selected easily for the Department related subjects where Lazarus is taught .

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161025/661b423d/attachment.html>

Reply by email

Travis Ayres
to Michael Schnell

So...who wants to work on a modern course outline with me? We have a lot of opinions and people willing to chime in, maybe we can do something good for the community?

On Oct 25, 2016 4:03 AM, "Michael Schnell via Lazarus" <

Show quoted text 21 lines
wrote: On 24.10.2016 18:11, Travis Ayres via Lazarus wrote: > > With over 100 replies, we could have already written a course outline, > introduction, ... > > It seems we have lost (or silenced) the OP long since :-( -Michael -- _______________________________________________ Lazarus mailing list http://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161025/35becf7c/attachment.html>

Reply by email

Mehmet Erol Sanliturk
to Travis Ayres

On Tue, Oct 25, 2016 at 9:23 AM, Travis Ayres via Lazarus <

Show quoted text 22 lines
wrote: So...who wants to work on a modern course outline with me? We have a lot of opinions and people willing to chime in, maybe we can do something good for the community? On Oct 25, 2016 4:03 AM, "Michael Schnell via Lazarus" < > wrote: > > > On 24.10.2016 18:11, Travis Ayres via Lazarus wrote: > >> >> With over 100 replies, we could have already written a course outline, >> introduction, ... >> >> It seems we have lost (or silenced) the OP long since :-( > > -Michael > >

My opinion is that writing a course outline is not an abstract process .

It will be delivered in a Department :

Goals of Department with its web site
Class of Students as Year ( First . ... , Fourth ) Curriculum of Department : Where the course(s) will be embedded Goals of the Course(s) : What is the purpose of course : What will gain the students from the course ?
Upward services to other courses : Names of such courses Prerequisite Courses : If any
Background courses : Previous courses which can be used as supporting the course
Text books selected for course(s) ;
How many course(s) with weekly number of class hours are selected

Course class schedule ( Two courses , etc. ) will determine load level of classes
Possible Goals will serve to determine course Names and contents ( examples , problems , etc. ) .

"Pascal" itself may require an independent course
"Lazarus" itself may require an independent course "Event driven" programming ( with Petri Nets ) itself may require an independent course

"Pascal" may be an independent course as a "First" computer programming course or a "Second" .
There may be a previously taken "Computer Programming Algorithms" ( as Introduction ) course or students may need such a course independent from a programming language .

All of these affect a course sequence contents .

This means that to be able to design a course outline which will serve to your needs , it is necessary to supply the above information ( at least ) without forgetting the instructor factor .

Thank you very much .

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161025/9213e45c/attachment.html>

Reply by email

Paul Breneman
to Travis Ayres: So...who wants to work on a modern course outline with me? We have a lot of opinions and…
Travis Ayres wrote
So...who wants to work on a modern course outline with me? We have a lot of opinions and people willing to chime in, maybe we can do something good for the community?

Some suggestions:

1) As the OP wrote (in a later message) "All my students will be civil, environmental or bio engineers but not computer engineers", I would recommend checking out SoftwareCarpentry.org (see links on home page www.ControlPascal.com ) which has been teaching basic programming to non-programmer engineers since 1998. They've already done a *lot* of work that doesn't need to be repeated! But a pascal version would be nice.

2) I just purchased the least expensive PicoScope which I hope to combine with the Basic Stamp kit (see top of this page): http://www.controlpascal.com/tutorial.htm

Instant gratification (blinking LEDs, switches to push) has worked for me and others. One of my favorite college courses (in about 1981) combined programming and electronics, and after that I decided to jump into embedded programming (previously I did electronic work).

Regards,
Paul

Reply by email

Paul Breneman
to Paul Breneman
Paul Breneman wrote 28 lines
On 10/25/2016 11:23 AM, Travis Ayres via Lazarus wrote: > So...who wants to work on a modern course outline with me? We have a > lot of > opinions and people willing to chime in, maybe we can do something > good for > the community? Some suggestions: 1) As the OP wrote (in a later message) "All my students will be civil, environmental or bio engineers but not computer engineers", I would recommend checking out SoftwareCarpentry.org (see links on home page www.ControlPascal.com ) which has been teaching basic programming to non-programmer engineers since 1998. They've already done a *lot* of work that doesn't need to be repeated! But a pascal version would be nice. 2) I just purchased the least expensive PicoScope which I hope to combine with the Basic Stamp kit (see top of this page): http://www.controlpascal.com/tutorial.htm Instant gratification (blinking LEDs, switches to push) has worked for me and others. One of my favorite college courses (in about 1981) combined programming and electronics, and after that I decided to jump into embedded programming (previously I did electronic work). Regards, Paul

I just added a link (to a recent magazine article on using a scope to "see" Arduino timing) to the top of this page:
http://controlpascal.com/tutorial.htm

Just trying to help increase embedded and hobby electronic use of Free Pascal! :)

Reply by email

Martin Vahi
to Adrian De Armas: I am a professor of "introduction to programming". Currently we are working with matlab…
Adrian De Armas wrote 19 lines
Hello everyone, I am a professor of "introduction to programming". Currently we are working with matlab and c. Today I had a meeting about doing the module more interesting to the students. Currently we teach algorithms making console applications and usually I receive questions like "Why don't we do something more modern?". I recommended that we should use Pascal in General and Lazarus in particular to teach how to create rich GUI Applications and to my surprise the idea was well recieved. Now I have to make suggestions about how to prepare the module starting from zero. Students do not know how to program and I need to include subjects as: variable declaration, operations, if, while, for, functions and procedure, arrays and multidimensional arrays. I would love to know what you think about making the transition from console to GUI. This is an exciting opportunity I'd love to make it right. ...

I haven't used Lazarus yet, I need to learn it,
but during the development of my own
JavaScript GUI library I have came to a conclusion that GUI-s are inherently something that require
"dynamic programming" or the code gets really bloated.

Another thing that I noticed, when developing my
own GUI library, is that the simple "deck of cards" style of GUI models that web developers use, which essentially mimic ordinary, old-school, HTML-pages, where each screen state is a separate HTML-page,
are useless in practice, because the number of cards in the deck of cards gets really huge really fast.
At least that's the story with GUI-s that implement various forms. I suspect that Your best bet for a
simple GUI is actually a 3D-game based on the

http://castle-engine.sourceforge.net/

That should be fun, "modern", and actually
MUCH-MUCH-MUCH-MUCH EASIER TO USE than anything
that uses forms. My own summary for the case that
uses forms, is:

http://longterm.softf1.com/specifications/rastclsp_t1/

So, I really suggest that You avoid the typical
blanks-and-buttons types of GUI-s like a plaque, when teaching beginners. Those are really hard even for me as a professional. Stick with the 3D-game-engine and game levels. If I were to teach beginners to
program, then I would use Ruby, not Pascal, but
the Castle 3D game engine is my first choice for
anything 3D. Although, in the JavaScript and web browser world there is the "yet-another-VRML-ready-to-die-off"

https://www.x3dom.org/

and the x3dom competitor, web browser version of OpenGL, WebGL, based game engines like

http://babylonjs.com/

Any kind of client projects have to use the
web browser, because almost everything else has various installation problems. I do not mean just the
time that it takes to download and install, but
literally PROBLEMS, crashing or lack of support
at a given operating system and hardware configuration, etc.

So, all in all, Lazarus seems nice, but the task
that it seems to be designed to solve, the creation of 2D GUIs, seems too complex for beginners. You'll be probably much better of, if You stick to 3D in stead of 2D.
The Castle 3D game engine has some very nice
sample code, which might be used as a template.

3D graphics, on the other hand, is more tedious to do than 2D graphics, because there is more information that needs to be entered/decided, but once the statues are molded, a simple 3D game or a 2D-game with a running turtle on it, is much easier than anything with
buttons and blanks. Besides, every blank needs input verification, id est the height of a pet can not be negative, the name of a dog can not be an empty string, etc.

With a hope to be helpful,

P.S. When talking about "more modern", then my current architecture is

http://mmmvkos.softf1.com/k2sitsi_hallatav/wiki_supplements/diagramo/editor/viewDiagram.php?diagramId=46

and overall development process is described at

http://intervaarium.softf1.com/lounge/work_process/en/

That is to say, the "most modern" might not be necessarily something very new. The question might rather be:
why has industry used crap, when they knew better?

Reply by email

Mehmet Erol Sanliturk
to Martin Vahi

On Sun, Jan 15, 2017 at 5:52 PM, Martin Vahi via Lazarus <

Show quoted text 10 lines
wrote: Sorry for sending my previous letter about teaching Pascal to the mailing list. The letter was meant to be sent directly to the Adrian De Armas, not the mailing list. My mistake. -- _______________________________________________

Please do not worry , because your message was a very useful contribution to the thread .

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170115/f2cfe26b/attachment.html>

Reply by email

Michael Schnell
to Martin Vahi: I haven't used Lazarus yet, I need to learn it, but during the development of my own…
Martin Vahi wrote
have came to a conclusion that GUI-s are inherently something that require "dynamic programming" or the code gets really bloated.

The nice thing about Lazarus "RAD" paradigm is that this is completely hidden (in the library) from application programmer. So (s)he only needs to write the code that is obviously useful for the adding a GUI for the single purpose of debugging / visualizing the application code makes a lot of sense.

-Michael

Reply by email

Martin Schreiber
to Martin Vahi: I haven't used Lazarus yet, I need to learn it, but during the development of my own…
Martin Vahi wrote 7 lines
I haven't used Lazarus yet, I need to learn it, but during the development of my own JavaScript GUI library I have came to a conclusion that GUI-s are inherently something that require "dynamic programming" or the code gets really bloated.

That's the reason why systems like Lazarus, fpGUI and MSEide+MSEgui have been invented. ;-)
You really should try them.

Martin

Reply by email

Lars
to Martin Schreiber
Show quoted text 8 lines
On Sunday 15 January 2017 15:30:44 Martin Vahi via Lazarus wrote: > > I haven't used Lazarus yet, I need to learn it, > but during the development of my own JavaScript GUI library I have came > to a conclusion that GUI-s are inherently something that require "dynamic > programming" or the code gets really bloated. >

GUI's require wrappers.

Delphi 5 as an example, is a wrapper around the win32api

All successful programming projects are just good wrappers. (everything is a wrapper)

If you program GUI's yourself from scratch, you waste thousands (if not millions) of lines of code instead of having a tool that already wrapped it and abstracted it for you and put it in a reusable library (again a wrapper)

Reply by email

Lars
to Michael Schnell: The nice thing about Lazarus "RAD" paradigm is that this is completely hidden (in the…
Michael Schnell wrote 9 lines
On 15.01.2017 15:30, Martin Vahi via Lazarus wrote: > have came to a conclusion that GUI-s are inherently something that > require "dynamic programming" or the code gets really bloated. > > The nice thing about Lazarus "RAD" paradigm is that this is completely hidden (in the library) from application programmer. So (s)he only needs to write the code that is obviously useful for the when you find a bug in the lcl, and have to dig in to it..

In theory one could never look into the lcl or underlying api's

in practice, sometimes there is an issue to be resolved... like when I fired up the macOS laptop and found that moving the mouse crashed the app, and Dmitry helped me figure out why ;-) Had too look into the macOS related lcl code

Reply by email

Michael Schnell
to Lars
Lars wrote
Except when you find a bug in the lcl, and have to dig in to it..

I don't suppose Lazrus is so bad that it can't be used for the simple programs the students will start with when learning programming :-):-):-).

-Michael

Reply by email

Graeme Geldenhuys
to Lars: GUI's require wrappers. Delphi 5 as an example, is a wrapper around the win32api All…
Lars wrote
GUI's require wrappers.

No they don't.

Delphi 5 as an example, is a wrapper around the win32api

Yes, Delphi's VCL is a wrapper around the common Win32 widgets. LCL is a wrapper around Win32, Qt, Cocoa, Carbon and even fpGUI. But not all GUI toolkits are designed like than.

For example, fpGUI is not a wrapper around any existing widgets on any platform. fpGUI implements its own widgets (gui controls) from scratch and talks directly to the underlying libraries (XLib & GDI) to notify the system about the top-level window and receiving OS events. All other behaviour (widget clipping, widget events, widget mouse events etc) are all implemented in fpGUI itself. The benefit of this design is that you are in full control of everything, have real single source across multiple systems, and fpGUI is very easy to port to new OSes.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Michael Schnell
to Graeme Geldenhuys
Graeme Geldenhuys wrote
Yes, Delphi's VCL is a wrapper around the common Win32 widgets. LCL is a wrapper around Win32, Qt, Cocoa, Carbon and even fpGUI.

And for ease of use as well Delphi as Lazarus come with an IDE that is a combination of source code editor, debugger, compiler controller and *GUI Designer*. Making the use of a simple GUI extremely easy (introducing and suggesting the (dreaded) RAD paradigm.

-Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170117/f5315f8f/attachment.html>

Reply by email

Lars
to Graeme Geldenhuys: No they don't. Yes, Delphi's VCL is a wrapper around the common Win32 widgets. LCL is a…
Graeme Geldenhuys wrote 7 lines
On 2017-01-16 20:18, Lars via Lazarus wrote: > GUI's require wrappers. > No they don't.

Sane GUI programming requires wrappers...

Insane programmers will program a GUI without a wrapper... ;-)

Show quoted text 12 lines
> Delphi 5 as an example, is a wrapper around the win32api > Yes, Delphi's VCL is a wrapper around the common Win32 widgets. LCL is a wrapper around Win32, Qt, Cocoa, Carbon and even fpGUI. But not all GUI toolkits are designed like than. For example, fpGUI is not a wrapper around any existing widgets on any platform. fpGUI implements its own widgets (gui controls) from scratch and talks directly to the underlying libraries (XLib & GDI) to notify the system about the top-level window and receiving OS events.

fpGUI is, in every way possible, a wrapper.

It wrapps low level x11/win32 calls into a usable frameworks called fpGUI

Object orientation is often a wrapper around system calls, fpGUI is object oriented and makes low level calls so someone can use fpGUI as a wrapper around these obnoxious insane low level calls that no one wants to use directly.

Reply by email

Unknown author
to Lars
Lars wrote 8 lines
fpGUI is, in every way possible, a wrapper. It wrapps low level x11/win32 calls into a usable frameworks called fpGUI Object orientation is often a wrapper around system calls, fpGUI is object oriented and makes low level calls so someone can use fpGUI as a wrapper around these obnoxious insane low level calls that no one wants to use directly.

oh good grief, man... i think you're being much too pedantic, here... if we take your definition then all non-GUI programs are also nothing more than wrappers around BIOS and OS calls...

the main point, however, that was trying to be made is to cut the bloat by using your own libraries... like fpGUI... then you have only your bugs to worry about and not those of some library 5 levels down in the dll hell that you don't even know is in play and leaving a huge security hole open in your apps...

sometimes too much is too much ;)

NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted.

Reply by email

Graeme Geldenhuys
to Lars: Sane GUI programming requires wrappers... Insane programmers will program a GUI without a…
Lars wrote
fpGUI is, in every way possible, a wrapper.

In that case even the Writeln() call is a wrapper function (for a low level system call). So as you can see, your quest not to use wrappers is getting a bit ridiculous. Object Pascal is a high level language to make programming easier and faster. There is nothing wrong with that.

If you want no wrappers and low level, then program everything in Assembly. Good luck with that! ;-)

ps:
I don't consider a unit that implements a Object Pascal interface to a C/C++ DLL or SO library a wrapper. How else are you supposed to use that shared library (written in another language)? Reimplementing everything from scratch is not a good use of my time.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email