Programming and general geekiness.

Posts tagged ‘visual basic’

BASIC is dead, long live Python?

Many years ago I sat down with a program called Liberty BASIC to learn programming. A few weeks later I progressed to Visual Basic and I stayed with VB for over a year before finally moving on to learn C#. As time went by I gradually rejected BASIC and I don’t think I’ve worked with it in at least two and a half years.

In January this year I had a look at Python for the first time and initially rejected it deeming it as a pointless extension of BASIC whilst assuming that C#, C++ and Java were far better languages. However one Sunday earlier this year I decided it would be sensible to learn Python, so I learned it in a morning on a dying Ubuntu computer. That was when I discovered it was quite a good programming language.

Before stepping into why Python will gradually take over from BASIC I would like to first consider how BASIC came into being. It has existed in one form or another for almost fifty years and stands for Beginner’s All-purpose Symbolic Instruction Code (is it sad that I didn’t have to lo0k that up). When the home computer era began BASIC became incredibly common as many people learned it so that they could make simple games for their new computers – it is these people that currently fuel the global programming industry today.

BASIC had its greatest success in 1991 when Microsoft developed Visual Basic which was designed to make it incredibly fast to design applications and this happened with great success, pushing VB skills to become a common business requirement. The aim was, however, unclear. Was BASIC and introduction to programming or serving as a professional language? Today I would suggest that it provides a platform for learning programming. The problem is that it is no longer best.

With time I realized how excellent a programming language Python is. Not only is it simple (and therefore incredibly easy to learn) but it is also speedy and extendable. According to this chart, we can see that Python is currently two times more popular than Visual Basic. There is also a lot more support on the web for Python and many people actually use it to develop complex software and websites.

Python will definitely become more popular over the next few years. In the UK there is certainly the possibility that it will become common knowledge thanks to projects like Raspberry Pi, but I wouldn’t be surprised if it gets onto the curriculum of other countries as well.

Kinect SDK for Windows 7 Beta available now!

http://research.microsoft.com/en-us/um/redmond/projects/kinectsdk/download.aspx

Microsoft has just released the official beta of the Kinect SDK for Windows 7. According to the website this SDK will work with all Windows 7 Dual-core computers (above a minimum system requirements, and requiring the Kinect sensor, obviously) and will allow for native and .Net coding using C++, C# or Visual Basic.

According to the Getting Started guide the SDK will enable developers to use the full potential of Kinect to build applications that take advantage of skeletal tracking with two people, audio recognition and a whole batch of Native and .Net APIs that allow for all sorts of cool features. The website is full of a lot of content about NUIs – Natural User Interfaces – that are designed for users to able to wave their arms around to use.

It does look like the SDK is quite cool and I am sure that in the next few weeks, if not days, there will be all sorts of fascinating applications emerging. It is no surprise that Microsoft has released the SDK, but I am glad that their website was always telling the truth: it was coming Spring 2011.

Approaches to coding a BASIC programming language

BASIC taught me programming to begin with. It can (at times) by a surprisingly complex language, but it starts off at a very simple level. There are hundreds of options for beginning BASIC online, and you can gradually progress up to Visual Basic, and then one what I like to think of as ‘proper syntax languages’ – those languages whose syntax uses {curly brackets} and is descended from C.

It is enough a challenge for a beginner to learn BASIC, but for a programmer with three years experience it becomes a lot harder to build a BASIC clone. For instance, how would you handle variables? Control statements? Functions? Parameters? Could it be more advanced, including GUIs and Objects?

My plan is to build a simple programming language first based on BASIC, but then being built-up to be a mix of PHP, Objective-C and VB.  It will have interfaces declared in XML files and code stored in text files that contains code. The procedure has been painless so far and with any luck it will prove to be very easy to use once finished.

Here is how I am approaching challenges:

  • Variables: values are stored in an array of a maximum of 10,000 values. The values are evaluated by a special function that returns their value once Math has been evaluated along with the combining of strings
  • Control statements: These evaluate the variable boolean before executing the appropriate statements
  • Commands/Functions: Currently non-object based, have one argument at the moment, so it is statement then argument, so print might be print “hello world” and this can be split by spaces and easily evaluated.

The language is going to be called ThomasScript, and intend to have the first (Windows) beta version finished by the end of July, ready for a simple version to be integrated into early builds of ThomasOS.

Follow

Get every new post delivered to your Inbox.