Sign in Join

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

Mailing lists / fpc-pascal / 2019-03

Need Advice: Teaching a Child Programming

12 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 need some advice from you guys.

I might soon be teaching a child about computer programming and am considering using Free Pascal as the first language. The problem is the child is a distance away from me and I want a way to see his code as he types and help him along by moving his cursor and sending him snippets or correcting his code while he watches, all done remotely along with two way voice chat.

I need some sort of tool to help with this. I could simply use Skype and set him up to allow me to occasionally take control remotely, but I am wondering if there might be a better way?

What do you people think?

I was considering writing a small cross platform desktop text editor type application that would forward to me the text and cursor location as he types, and allow me to change his text and highlight text and move the cursor. That wouldn't be very difficult, but I would need a separate program for VOIP, and I also might want syntax highlighting, code completion drop downs, compile functions.

Again, do you people have any suggestions?

Thanks

Michael Van Canneyt
to Anthony Walter
Anthony Walter wrote 23 lines
I need some advice from you guys. I might soon be teaching a child about computer programming and am considering using Free Pascal as the first language. The problem is the child is a distance away from me and I want a way to see his code as he types and help him along by moving his cursor and sending him snippets or correcting his code while he watches, all done remotely along with two way voice chat. I need some sort of tool to help with this. I could simply use Skype and set him up to allow me to occasionally take control remotely, but I am wondering if there might be a better way? What do you people think? I was considering writing a small cross platform desktop text editor type application that would forward to me the text and cursor location as he types, and allow me to change his text and highlight text and move the cursor. That wouldn't be very difficult, but I would need a separate program for VOIP, and I also might want syntax highlighting, code completion drop downs, compile functions. Again, do you people have any suggestions?

No suggestion, but there is an actual feature request to build this in in the IDE as a plugin, exactly for teaching purposes. James Ralston suggested it.

According to Martin Friebe it should be doable, although not easy.

Michael.

Paul Breneman
to Michael Van Canneyt
Michael Van Canneyt wrote 34 lines
On Wed, 6 Mar 2019, Anthony Walter wrote: > I need some advice from you guys. > > I might soon be teaching a child about computer programming and am > considering using Free Pascal as the first language. The problem is the > child is a distance away from me and I want a way to see his code as he > types and help him along by moving his cursor and sending him snippets or > correcting his code while he watches, all done remotely along with two > way > voice chat. > > I need some sort of tool to help with this. I could simply use Skype and > set him up to allow me to occasionally take control remotely, but I am > wondering if there might be a better way? > > What do you people think? > > I was considering writing a small cross platform desktop text editor type > application that would forward to me the text and cursor location as he > types, and allow me to change his text and highlight text and move the > cursor. That wouldn't be very difficult, but I would need a separate > program for VOIP, and I also might want syntax highlighting, code > completion drop downs, compile functions. > > Again, do you people have any suggestions? No suggestion, but there is an actual feature request to build this in in the IDE as a plugin, exactly for teaching purposes. James Ralston suggested it. According to Martin Friebe it should be doable, although not easy.

Is there a wiki page about this feature request? If not, where can I (and how) get involved?

http://controlpascal.com/tutorial.htm

Ralf Quint
to Anthony Walter: I need some advice from you guys. I might soon be teaching a child about computer…
Anthony Walter wrote 23 lines
I need some advice from you guys. I might soon be teaching a child about computer programming and am considering using Free Pascal as the first language. The problem is the child is a distance away from me and I want a way to see his code as he types and help him along by moving his cursor and sending him snippets or correcting his code while he watches, all done remotely along with two way voice chat. I need some sort of tool to help with this. I could simply use Skype and set him up to allow me to occasionally take control remotely, but I am wondering if there might be a better way? What do you people think? I was considering writing a small cross platform desktop text editor type application that would forward to me the text and cursor location as he types, and allow me to change his text and highlight text and move the cursor. That wouldn't be very difficult, but I would need a separate program for VOIP, and I also might want syntax highlighting, code completion drop downs, compile functions. Again, do you people have any suggestions?

If you're doing this with Windows on both sides, you can use AeroAdmin (https://www.aeroadmin.com/en/) to remotely see (and even assist) his remote screen. I use this as a remote support tool...

You still would have to use Skype for the voice communication though, but that can run just in the background.

Ralf

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

Anthony Walter
to Paul Breneman: Is there a wiki page about this feature request? If not, where can I (and how) get…

Thanks for the feedback guys. I have enough experience with IDE extensions that I know I could write something fit the needs I outline except for the VOIP part.

Here is an outline of what I could create, and I'd like to get feedback from you guys to add to or alter this plan before I get started:

An IDE extension that allows you to connect to a mentor. You select from a menu under file with the label "Mentoring ...". When click mentoring you are presenting with a dialog where you can either choose to be a student or a mentor.

When you choose to be a mentor you are given a unique 8 character code and can select start mentoring or cancel. If you start mentoring you can open "Mentoring ..." again to stop the mentoring session.

When you choose to be a student asked for the mentor's unique 8 character code and can select learn from mentor or cancel. If you choose learn from mentor you can open "Mentoring ..." again to stop the mentoring session.

When a student connects to a mentor they will both see a mentoring connection has been made notification.

When a mentoring session is active the mentor's project and student's projects are synchronized. Any source code or project changes either client makes is synchronized with the other client in real time.

Additionally the mentor has the ability to highlight and draw on areas on the screen of the student.

After having typed that I may need a little help in the area of detecting and synchronizing changes to source code and projects.

How does this sound to you guys?

Martin Frb
to Anthony Walter
Anthony Walter wrote
How does this sound to you guys?

Like a good deal of work.

- Adding a menu, and a form in a new package are trivial.
- Storing your settings
- Make an encrypted connection
- The main bit of work:
SourceEditorInteface allows you to be notified of changes.  You need:  -- text changes (not just keypress). You may need to add a self written plugin to synedit to get senrEditAction (not sure, there may be easier ways)
 -- change of caret and selection. Those are in the StatusChange event of SynEdit

When a change occurs you need to send it.
Textchanges must be sent with some context, so they can be rejected if the line was change on the remote (rejection then needs to be handled locally, or merge to be performed)

For selection you can write a SynEditMarkup that shows the selection of the other person.
The Markup can also create an additional caret object, to show the other persons caret.

On top the markup can keep a list of remote changes and highlight them.

------------
Then you want to add handling if the active editor changes on either side, and what that should do on the remote.
Same for new/closed editors.
Maybe scrolling.

----------
Note this is text only.
I don't know how to deal with the form designer.

Martin Frb
to Martin Frb
Martin Frb wrote 16 lines
On 06/03/2019 20:04, Anthony Walter wrote: > > How does this sound to you guys? > Like a good deal of work. - Adding a menu, and a form in a new package are trivial. - Storing your settings - Make an encrypted connection - The main bit of work: SourceEditorInteface allows you to be notified of changes.  You need:  -- text changes (not just keypress). You may need to add a self written plugin to synedit to get senrEditAction (not sure, there may be easier ways)  -- change of caret and selection. Those are in the StatusChange event of SynEdit

Actually scrap that.

The teacher wants his editor to be a slave-editor to the student.

multiple synedits can already work on the same textbuffer.

All you need is a TSynEditStrings that forwards all methods over the network.
It will also need a cache, or paint events will be deadly slow.

Anthony Walter
to Martin Frb: Like a good deal of work. - Adding a menu, and a form in a new package are trivial. -…

I agree that the hardest part would be detecting project changes. That is files opened, new files added, packages added or removed and so on. I think if I could or someone could write something to synchronize two instances of Lazarus on different computers / platforms, then rest of everything would be trivial. This would need to include create a new projects with different base paths (i.d. C:\Temp\Example and /home/user/temp/example).

Is anyone here a real expert in this area of the IDE?

Martin, I think the student computer would be the slave.

Martin Frb
to Anthony Walter

I cc / reply-to the Lazarus list, since this is not an fpc topic.

Anthony Walter wrote 8 lines
I agree that the hardest part would be detecting project changes. That is files opened, new files added, packages added or removed and so on. I think if I could or someone could write something to synchronize two instances of Lazarus on different computers / platforms, then rest of everything would be trivial. This would need to include create a new projects with different base paths (i.d. C:\Temp\Example and /home/user/temp/example).

That depends on the indent.
If you just want to supervise, then you do not need the project locally. You only need to be able to see what happens, and to send actions (i.e. edit text).

Both computers having the full project synchronized, is a much bigger task. It will also need conflict resolution, and monitoring disc changes outside the IDE.
SourceEditorIntf tells you when editors are opened/closed. But that is for visually synchronizing, since opening a unit does not say anything about its project status.
Not sure if IDEIntf would have the hooks you need. Some would probably be needed to be added.

Is anyone here a real expert in this area of the IDE?

There are too many different areas touched (at least in case of full syncro). So I doubt there is a single expert. Different people would know the answers to different parts.

Martin, I think the student computer would be the slave.

Depends on the above.

Graeme Geldenhuys
to Anthony Walter: I need some advice from you guys. I might soon be teaching a child about computer…
Anthony Walter wrote
I could simply use Skype and set him up to allow me to occasionally take control remotely, but I am wondering if there might be a better way?

For VOIP, I have been been using Jitsi [https://jitsi.org] for quite some time and talk across continents in groups of 5-10 people with great success. It uses standard VOIP built right into most modern web browsers, so no extra software installs required, no creation of accounts and totally free.

Simply pick a url chat room name, and share that url via email or such. It does voice, video, can do live streaming, record video, group chats etc. I did not explore remote control support, so unsure if it can do that, but wouldn't be suprised if it could.

Example chatroom url:

https://meet.jit.si/pascal_training

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
Graeme Geldenhuys
to Graeme Geldenhuys
Graeme Geldenhuys wrote
I did not explore remote control support, so unsure if it can do that, but wouldn't be suprised if it could.

A quick look and it has a "shared document" option, where everybody involved in the chat can see the same editor and make changes. Not an IDE, but still useful to show and write code examples on the fly.

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
Anthony Walter
to Graeme Geldenhuys

Thank you all for your feedback. I will be following up with a stand alone demo program very soon based on what we've discussed. I will also be setting up a page or website for the community to continue with this project. If anyone would like to discussion this idea here further please feel free to do so.