Turtle Maze versus Hangman - a case for seamless sharing.
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:
- NFV721-2 (Turtle Maze)
- XNF825 (Hangman)
Sharing the code for both these programs is seamless for SB students. You simply:
- copy the ID
- click on the Import icon in Small Basic
- paste the ID as prompted, and
- click OK to load
To share the "program" (meaning, running the code from the IDE), is seamless for Turtle Maze:
- do the above 4 steps, then
- click the Run icon in Small Basic
However sharing the Hangman "program" is NOT seamless:
- do the above 4 steps, then
- scroll down to line 83 and uncomment it
- 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.
Comments
Anonymous
May 22, 2015
The comment has been removedAnonymous
May 22, 2015
We'll need to get this feature idea written up on the wiki. Great points!Anonymous
May 24, 2015
zx spectrum like emulator with 3dcubes and logo turtle code MWB767Anonymous
May 24, 2015
Very interesting qwx. Your MWB767 is a great example of what I'm trying to put together in this blog. The program highlights 2 things: 1st the File objects were commented out - not too much effort to uncomment, and 2nd it uses several different extensions which requires finding and installing each extension. If the SB V-team could work out a solution for us to share programs without the blocking of File objects working with children files of the ProgramDirectory, then. the native File object might be used more which would find SB coders pushing it to more limits within the native SB landscape. Fascinating and thanks for sharing your program.Anonymous
May 25, 2015
tx jibb)) some traffic simulator: NHM344Anonymous
May 25, 2015
updated version of spectrum emul. now works on sb1.1 and new cool features MWB767-1 new: "for" loop nesting print newline by "| "char as arg2 new init sampleAnonymous
May 26, 2015
Hey qwx Your code is looking good my friend. Can you create a thread in the forum and post these programs there. That way others can check them out and post replies and votes. If you have any thoughts on what's discussed in this blog article then post those here as I would love to read them. Thanks.Anonymous
May 26, 2015
sure, i ll have to make a compilation)) another cool and simple animation sample LRZ907Anonymous
June 08, 2015
CodingCat has created a TechNet Wiki article about seamless file sharing as: social.technet.microsoft.com/.../31224.a-sandbox-file-object-small-basic-safe-file-operations-for-seamless-sharing.aspxAnonymous
September 25, 2015
Unfortunately the 2 program id's in this blog wont work anymore. I've uploaded them to: Turtle Maze: gallery.technet.microsoft.com/Turtle-Maze-32663dc5 Hangman: gallery.technet.microsoft.com/Hangman-e4e79d2c Thanks.