Sign in Join

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

Mailing lists / lazarus / 2019-04

Feeback wanted: Tutoring kids with Pascal project idea

8 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

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

Anthony Walter

I've been tutoring a few kids aged 9-13 on the topic of computer programming for about two months and want to give a few of them a fun project to play with starting this Monday. So that would mean I need to write this project between now and then. I'd like to get some feedback on this project idea from you guys as I implement the final version, if your willing to give it consideration.

Education goal:

Give more concrete examples of how to write functions in Pascal and demonstrate that they can be both fun and useful. This will hopefully further increase students attention and interest in the area of computer programming.

Project description:

I will design a node based image manipulation program where users can place on a canvas using the mouse and interactively connect them together with source images and other node to generate a final image.

The program will pick up on the procedures a student writes and resulting in new node types becoming available in a toolbox. The user can then select that node and place it on a node canvas and connect the nodes together visually. Every node has a slider to mix the value it uses in a range from 0.0 to 1.0.

Nodes fall into two types, a manipulation node or combination node.

A manipulation node accepts a single source image and outputs changed pixels to one image. Manipulation nodes might do things like change image brightness, saturation, creating a negative image, or converting the image to a mosaic and so on.

A combination node accepts two source images and outputs changed pixels to one image. Combination nodes might include multiplying the pixels of two images, alpha blending two images, doing a screen blend of two images. Essentially combination nodes act like layers in image editing programs like Photoshop or Gimp.

From the perspective of the student he is writing Pascal functions that

look like the following:

procedure BlackOrWhite(var Pixel: TPixel; Mix: Single; var Done: Boolean);
var
  B: Byte;
begin
  if Pixel.Red + Pixel.Green + Pixel.Blue > Mix * High(Byte) * 3 then
    B := High(Byte)
  else
    B := Low(Byte);
  Pixel.Red := B;
  Pixel.Green := B;
  Pixel.Blue := B;
end;

This then shows up in the user interface as an manipulation node named "Black or White" and is available in the toolbox. The user can then place the node on the node canvas and hook its input up to either a picture node or another node, and route its output either to the display node or another node. The user can drag the slider value effecting the mix value of the node.

Multiple node types can be programmed to create varying image effects and multiple nodes can be combined on the node canvas to change what images and what node effects are applied along with mixing values to generate output for the display node.

There are of course a few other features such as global X Y coordinates and image size that is available to the node procedures. They can also use multiple passes to generate node effects that require information from neighboring pixels.

Does anyone are to provide feedback on my project idea for students? Thank you for considering what I've written.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190426/3d0bf2a4/attachment.html>

Reply by email

Travis Ayres
to Anthony Walter

Avoid the most pertinent subject for their age bracket that led a huge number of us into the field.

Weird flex, but ok. In adultspeak: That's a questionable pedagogic choice.

On Fri, Apr 26, 2019, 12:10 PM Anthony Walter via lazarus <

Show quoted text 12 lines
wrote: Thanks Gustavo. With the kids I am teaching I try to avoid all content related to computers used to play or write video games. -- _______________________________________________ lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

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

Reply by email

Ryan Joseph
to Anthony Walter: Thanks Gustavo. With the kids I am teaching I try to avoid all content related to…
On Apr 26, 2019, at 3:09 PM, Anthony Walter via lazarus wrote: With the kids I am teaching I try to avoid all content related to computers used to play or write video games.

Good luck! I would not have started programming if not for games and in fact one of my greatest regrets in my programming career has been not making enough games (trying to fix that lately).

Regards,
Ryan Joseph

Reply by email

Ralf Quint
to Travis Ayres: Avoid the most pertinent subject for their age bracket that led a huge number of us into…
Travis Ayres wrote 5 lines
Avoid the most pertinent subject for their age bracket that led a huge number of us into the field. Weird flex, but ok. In adultspeak: That's a questionable pedagogic choice.

+1

In that age group, it will be hard to get their intention/interest without somehow involving games.

But properly structuring to write a game can teach a lot of useful programming skills. Pong can be quite challenging if you kind of add the physics aspect and/or events, that might be a bit tough for the lower end of that age range.

For an adult (ok, early college students, who's major was not CS), I used to use Solitaire (Klondike, first in a text screen version, to focus on the logic) as a project. Minesweeper is also something that can be used, again in plain text, as using graphics is easily getting quite evolved depending on the underlying operating system(s).

Ralf

---
This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus

Reply by email