Small Basic Challenge of the Week 1 RRS feed

  • General discussion

  • Welcome to the first 'SmallBasic Challenge of the Week'.  This is just a suggestion for a programming project where users can contribute their solutions/ideas and help each other.  There are no prizes and the only rule really is to use standard SmallBasic methods (no extensions).  Post solutions/help on this thread that will remain 'sticky' for about one week before we move onto the next.  Please also give any suggestions for a future 'Challenge of the Week'.

    So here it is:

    Write a program to ask a user for their name and output their name in reverse order.  Such as:
    Input: James
    Output: semaJ


    If you fancy a harder challenge try Airwaves suggestion:

    Create a program to create users and encrypt their password and store the encrypted password in a file with their user-name.

    Then allow login with user-name and password validating the password.

    To make it harder still, write it so that even if someone can read the SmallBasic code they still cannot decrypt the password (although they could bypass the validation by altering the code).  That is: given the code and encrypted password they cannot back calculate the correct password.

    • Edited by litdev Tuesday, July 5, 2011 5:47 PM Follow up challenge
    Monday, July 4, 2011 9:31 PM

All replies

  • Here is my entry:



    I thought of another challenge: A program to scramble a certain text, with a password, then to unscramble when that password is correct.

    [EDIT] Happy 4th of July!

    Monday, July 4, 2011 10:59 PM
  • Is there a code to simply 'reverse'? I don't understand the middle segment on the 'comment' above mine. Help?


    I.E. The one written by AirWaves

    Tuesday, July 5, 2011 7:03 AM
  • Basically the same as Airwaves solution, just a little shorter:



    Tuesday, July 5, 2011 1:57 PM
  • SetDef, which line of AirWaves code do you mean?
    Tuesday, July 5, 2011 6:26 PM
  • The only problem with your code rdohmen, is that if you want some numbers reversed, it gives you the sum. Try this code with Text.Append


    Wednesday, July 6, 2011 12:55 AM
  • Here is my entry for encrypting program, but I don't know if it works because my Norton360 seems to think it is a virus, and doesn't allow it to run.


    Wednesday, July 6, 2011 1:15 AM
  • A relatively secure encryption algorithm with login, import LTB987 (File commands auto commented).  If you can reverse engineer any password for encrypted value 23894880013798 then you deserve a prize.

    If anyone wants to write next weeks challenge, then please do so and post it on or before Sunday.

    Thursday, July 7, 2011 5:27 PM
  • Wow, litdev. Your program is really good. I tried a whole HOUR to reverse engineer it but I just gave up after that (seriously, an hour).

    For next week's challenge, I thought of two programs to do:

    1. A program to get the weather forecast of an area (get from a website with weather, if there is one)

    2. A painting program, with a wheel of colors to choose the brushcolor from.


    Friday, July 8, 2011 4:59 AM
  • I came to this forum late, but I have a idea too.
    Sorry, I don't know how to make the letters bigger.
    Here's the code.

    Wednesday, July 13, 2011 6:52 AM
  • Bestideas,

    Nice use of the Stack, it can also be useful to reverse any array indexed by non-numeric (string) keys.

    Wednesday, July 13, 2011 5:30 PM
  • Excellent idea, litdev!  Looking forward to more of these challenges.
    Thursday, July 14, 2011 4:56 PM
  • Hello Vijaye! I just wanted to let you know, it was Kirkkaf's idea to start a challenge of the week. See this forum post http://social.msdn.microsoft.com/Forums/en-US/smallbasic/thread/dd6f6fa1-d293-47cb-9704-f290f68d6932
    Thursday, July 14, 2011 8:12 PM