Quantcast
Channel: Small Basic
Viewing all articles
Browse latest Browse all 669

Turtle Maze versus Hangman - a case for seamless sharing.

$
0
0

A lot of Small Basic programs use "Assets" in order to work, e.g. images, sound and text files.

Key to Small Basic's effectiveness is our ability to share code and programs. At present the sharing of code is seamless but the sharing of programs may not be.

To demonstrate the difference I use the 2 following games:

 

The Program ID's are:

  1. NFV721-2  (Turtle Maze)
  2. XNF825   (Hangman)

Sharing the code for both these programs is seamless for SB students. You simply:

  1. copy the ID
  2. click on the Import icon in Small Basic
  3. paste the ID as prompted, and
  4. click OK to load

To share the "program" (meaning, running the code from the IDE), is seamless for Turtle Maze:

  1. do the above 4 steps, then
  2. click the Run icon in Small Basic

However sharing the Hangman "program" is NOT seamless:

  1. do the above 4 steps, then
  2. scroll down to line 83 and uncomment it
  3. click the Run icon in Small Basic

Program sharing is predominately done by posting ID's. Seamless sharing of programs is broken at the point where the File object is used. ALL native File members are disabled on publishing.

Having "Introductory Programming" as a part of mandatory school curriculum is becoming ever more popular and I think Small Basic is a top candidate resource.

So I wonder if it's possible and worth while considering if some if not all the File class members be given an extra optional parameter that could set if the operations are using a child of the Program.Directory(). Then these File statements be parsed by the Programs Listing script and exempt any instance that contains the value "True" from security commenting.

Just a thought and a desire for SB to be even more fun.


Viewing all articles
Browse latest Browse all 669

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>