DevLabs > DevLabs Forums > Small Basic > List of sample programs
Ask a questionAsk a question
 

QuestionList of sample programs

  • Tuesday, November 03, 2009 8:44 AMBillAtWork Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,
    Is there a "directory" of program codes that you can import into Small Basic? There are a few on the blog e.g. "STARGATES" but it would be nice to browse a full list.

    Thanks!

All Replies

  • Wednesday, November 04, 2009 3:12 AMVijaye RajiMSFT, OwnerUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    We don't quite have one, Bill.  Here's a start: http://wiki.smallbasic.com/smallbasic.com/wiki/Samples.ashx.

    I would love to get the help of the community to collect interesting samples. 

    I'll be happy to make this a sticky and collect samples.  What does everyone think?
  • Wednesday, November 04, 2009 1:56 PMjswlhw Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I think that would be great. Maybe using the program import numbe and a brief description rather than the raw code.
  • Thursday, November 05, 2009 11:24 PMlitdevAnswererUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    There are lots of samples and projects about in this forum, but they can be hard to find if they aren't recent or in one one of the sticky (post your code) threads or the wiki.

    Perhaps we can have some kind of categorisation as bill or jswlhw suggest.  If the uploaded published programs were also tagged with some sort of description and category , and there was a web accessible database of these it would be easier.

    I can see that that there may be a large number of published samples and hard to find what you want without a description and choice of categories set during the publish such as:

    FORUM QUESTION
    SHORT PROGRAM (< 50 lines)
    GRAPHICAL GAME
    PHYSICS/MATHEMATICAL
    USING EXTENSIONS
    TEXT BASED PROGRAM
    TEACHING PROGRAM
    etc

    This makes the publish a bit more of an effort, selecting a category and adding a description, but this should be optional (best if a database doesn't get too bloated), but useful categorised samples could be a helpful resource to all.
  • Friday, November 06, 2009 12:33 AMRushworksAnswererUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I wrote a program that looked for random IDs and then saved the .html as .sb.   I noticed many were in different languages. 

    A 'language' tag/category would also be helpful.

  • Friday, November 06, 2009 7:56 AMVijaye RajiMSFT, OwnerUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Litdev, this is a nice list of categories. 

    From experience, any kind of automated categorization (even if the developer picks the category) usually leads to
    poor Signal to Noise ratio.  Quite a lot of time, you have multiple versions of the program published and remember you cannot unpublish.  Without a way to go back and edit your published programs, it's going to be challenging to get the categorization process to work properly.

    For the database to be useful, it needs to be filled with quality programs and I believe the best way to do that is to do that manually.

    What do you guys think about a webpage where you can put in an ID and add the category and description, after polishing up your program and publishing it?  I can get that up and hosted really quickly.

    PS: Rushworks, if you're interested, I can send you a list of all published IDs.  There are about 13,000 of them.
  • Friday, November 06, 2009 1:06 PMBillAtWork Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,
    Thought I'd add my own $0.02 to the ideas!

    Firstly a simple "description" field may be the simplest implementation with the same description applying to all published version of the same program. If you publish a newer version and supply a different description, only that latest description is used.

    "Categories" are useful here if you make it default to something like "Test Program". That way MOST programs would fall into this category (since the developer won't be bothered to choose a different category) as people publish inconsequential test code. And we can ignore them or leave them out of the directory entirely :-)

    You would also need an option to "report" programs as objectionable. There'll always be someone who publishes something offensive under a disguised description. Something simple like 5 user reports and the program stops showing up in the directory?

    How about a simple rating system? Programs given "5 stars" would naturally rise to the top of lists/searches. Good way to use the power of the community to ensure the highest quality programs get noticed.

    Hope that help. SB has been a superb platform so far for teaching my 8 year old to program!

    Thanks,
    Bill.
  • Friday, November 06, 2009 7:01 PMCoding CatAnswererUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Anytime you have an algorithm that is trying to do something that humans would think of as intuitive, the system quickly becomes insane. As VR stated, the signal to noise ratio is just too low.

    And I don't like the idea of making the publish ID's freely available in the first place. SmallBASIC has tremendous possibility for self discovery and learning. Making a ridiculous number of examples easily available will discourage invention rather than encourage it. Most people, especially most kids, would spend all their time mining a catalog of other peoples work rather than trying to experimenting on their own. And it would be even worse with teaching.  I shudder at the thought of an easy to search catalog, where programs cannot be removed, populated with the solutions to every project I have ever assign.

    Keep the publish and import system semi-anonymous. It is doing a great job just the way it is.

    With all that said, I have to add that I love the idea of setting up a page where polished examples can be shared. As a teacher I am forever looking for ideas for new projects, and being able to page through finished ideas would be immeasurable useful. And don’t forget the entertainment value. I vividly remember the "Games in BASIC" and "More Games in BASIC" volumes that got me started programming.

  • Friday, November 06, 2009 8:29 PMlitdevAnswererUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Obviously some well categorised good quality samples would be a valuable resource, especially to those learning on their own.  The question is how do we achieve this.

    There is a choice - do we let anyone add to them or somehow moderate the content.  If the consensus is for the latter and the samples are not maintained by the community at large, then they will tend to stagnate unless they are seen to be widely used.

    The more people that know it's there and use it, the more likely it is to be updated, maintained and ultimately better.  The wiki already provides some of this including a samples page!, but as far as I know it is not used that much and is consequently rarely updated (nothing since I added a couple in September).  Perhaps it is used a lot and we don't know, perhaps the content is not helpful, perhaps users don't know its there - either way it is not maintained.

    With this in mind...

    1] Some sort of download counter or other feedback that shows what content is being used and appreciated will guide the content and encourage maintenance.
    2] It could be linked somehow to the SB interface so new users know it's there.
  • Friday, November 06, 2009 9:21 PMCoding CatAnswererUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Download center. Yes, I think that is a good idea. I have a perfect name for it:

    "Free App Store" --  I'm sure "App Store" would be a hard sell considering the Apple/MS rivalry but the idea is perfect.

    A button added just below "publish" on the ribbon. It would bring up a list of pre-approved examples. Everything with just a little bit of quality, from StarGates and Asteroids, to the entries for the 25 lines challenge -- a little clearing house for examples. You could even hook the system into the Wiki and pull the content from there; thus making adding to the list easy and open to all.

    I would make one request though. It may be time for SmallBasic to have a config file or command line options. I would want the ability to disable this functionality on the student computers to prevent goofing off that looks like studying.