none
Small Basic Challenge of the Week 1

    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

    EDIT

    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 litdevModerator Tuesday, July 05, 2011 5:47 PM Follow up challenge
    Monday, July 04, 2011 9:31 PM
    Moderator

All replies

  • Here is my entry:

    WRB539

    http://smallbasic.com/program/?WRB539

    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!


    ~~AirWaves!!~~
    Monday, July 04, 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 05, 2011 7:03 AM
  • Basically the same as Airwaves solution, just a little shorter:

     

    http://smallbasic.com/program/?PWF754

    Tuesday, July 05, 2011 1:57 PM
  • SetDef, which line of AirWaves code do you mean?
    Tuesday, July 05, 2011 6:26 PM
    Moderator
  • 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

    ZCN901


    ~~AirWaves!!~~
    Wednesday, July 06, 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.

    RCX796


    ~~AirWaves!!~~
    Wednesday, July 06, 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 07, 2011 5:27 PM
    Moderator
  • 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.

    Thanks.


    ~~AirWaves!!~~
    Friday, July 08, 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.
    GWQ867

    --Bestideas[i]--
    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
    Moderator
  • Excellent idea, litdev!  Looking forward to more of these challenges.
    Thursday, July 14, 2011 4:56 PM
    Moderator
  • 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
    ~~AirWaves!!~~
    Thursday, July 14, 2011 8:12 PM