I started playing with small basic last night.
Turns out, it's a very good introduction to programming (I started with JavaScript, then C++, and this is much more simple/powerful in the early stages)
It's very similar in syntax to ASP or VB.
Since it's a variant of Basic, it has some things that I'm not a fan of (goto), but really, I won't hold that against it, goto makes sense in english, so it makes sense for a beginning language.
I took a few minutes and downloaded small basic, .Net 3.5 and the getting started guide from: http://msdn.microsoft.com/en-us/devlabs/cc950524.aspx
It was simple to setup, and the guide was definitely directed to the absolute beginer. *(sort of frustrating for their lack of documentation)
Here is my first small basic program:
It does trivial encoding and decoding. Encode a message with a passcode, and send it to a friend, who can then decode it with the same passcode.
This is also a primer on how 'shared-key encryption' works.
start:
TextWindow.Write("(E)ncode or (D)ecode ")
a = TextWindow.Read()
If (a = "E") Then
TextWindow.Write("String to Encode ")
estring = TextWindow.Read()
TextWindow.Write("Encryption Key ")
password = TextWindow.Read()
t = Network.GetWebPageContents("http://www.issackelly.com/string.php?action=encode&string="+estring+"&key="+password)
TextWindow.WriteLine(t)
Goto start
Else
If (a = "D") Then
TextWindow.Write("String to Decode ")
estring = TextWindow.Read()
TextWindow.Write("Encryption Key ")
password = TextWindow.Read()
t = Network.GetWebPageContents("http://www.issackelly.com/string.php?action=decode&string="+estring+"&key="+password)
TextWindow.WriteLine(t)
Goto start
EndIf
EndIf
What you wil notice is Network.GetWebPageContents(.... I didn't actually do the encoding or decoding with small basic. It lacked the basic math or character functions that I needed, so I had to fill in the gaps with PHP (I could have written an extension, but the documentation is too sparce)
So, here is my challenge. Can you guess what I did to encrypt the string?
I'll give a free year of servee hosting and subscription to the first person who figures it out in the comments.
11th January 2009
I won't ever give out your email address. I don't publish comments but if you'd like to write to me then you could use this form.
I'm Issac. I live in Oakland. I make things for fun and money. I use electronics and computers and software. I manage teams and projects top to bottom. I've worked as a consultant, software engineer, hardware designer, artist, technology director and team lead. I do occasional fabrication in wood and plastic and metal. I run a boutique interactive agency with my brother Kasey and a roving cast of experts at Kelly Creative Tech. I was the Director of Technology for Nonchalance during the The Latitude Society project. I was the Lead Web Developer and then Technical Marketing Engineer at Nebula, which made an OpenStack Appliance. I've been building things on the web and in person since leaving Ohio State University's Electrical and Computer engineering program in 2007. Lots of other really dorky things happened to me before that, like dropping out of high school to go to university, getting an Eagle Scout award, and getting 6th in a state-wide algebra competition. I have an affinity for hopscotch.