Webometric Thoughts

November 9, 2008

Small BASIC: A simple programming introduction

Filed under: Small BASIC,programming — admin @ 9:21 pm

Way back in April Bill Thompson posed the question “Who will write tomorrow’s code?” As an appalling programmer it is a topic I am very interested in, and was therefore intrigued by Microsoft’s Small BASIC (via ReadWriteWeb): A development environment using a small version of the BASIC programming language.

Whilst Small Basic incorporates web elements (even having a Flickr class), reading the 62 page ‘Getting Started’ guide was bit of a trip down programming memory lane; reminding me of learning to draw simple graphics on the ZX Spectrum, and using Logo on the BBC Micro.

The success of Small BASIC will depend on the user-community and the third-party libraries that build up around it, and at this early stage it is impossible to say how much interest Small BASIC will gain. However, I for one will enjoy seeing what I can do with it’s limited keywords (15 according to the front page, 14 according to the FAQ), although a vibrant community will need people with far more extensive programming skills than mine.

August 31, 2008

Twittering with Python …on the web

Filed under: Python,Twitter,programming — admin @ 9:20 pm

Programming is really addictive, especially when you are bad at it. Whilst the proficient programmer can deal with their problems in a matter of minutes, bad programmers can spend hours on the simplest of problems. Today I decided to start messing about with some server-side programming for the first time; now I find myself wondering what happened to my Sunday.

This particular form allows anyone to post to your Twitter account (and then displays the comments that have already been posted):

Enter Comment:

Now all I need to do is think of a use for anonymous twittering….
(http://twitter.com/blogcomments)

The code:
>#!/usr/bin/python
>import cgi
>import urllib
>print “Content-type: text/html\n\n”
>form=cgi.FieldStorage()
>data = urllib.urlencode({“status” : form["status"].value})
>res = urllib.urlopen(“http://USERNAME:PASSWORD@twitter.com/statuses/update.xml”
, data)
>lines = urllib.urlopen(‘http://twitter.com/statuses/user_timeline/16066835.rss’)
.readlines()
>for line in lines:
>>>if line.find(‘title’) <>-1:
>>>>>>line=line[11:(len(line)-9)]
>>>>>>print line

April 2, 2008

Programming Python on the Eee PC

Filed under: API,Eee PC,Python,RM minibook,programming — admin @ 8:30 am

Since Friday I have been spending a lot of time programming in Python on the Eee PC, the more I program the more I like both the language and the ease if having it on the Eee PC. Over at the Beeb Bill Thompson poses the question “Who will write tomorrow’s code?”, I suggested last week that the Eee PC (and other similar devices) may be the answer, and now I more convinced that ever.

Already I have been writing codes in python that use the Twitter, Flickr and Digg API, programs that can form the basis of numerous articles that I will never get around to writing…it’s SO easy (with the possible exception of installing the simplejson library that the Twitter library relies on). Just wish some other sites would roll out APIs (e.g., Stumbleupon and Reddit).

So, do we all need to become top-class programmers? No. But if you can program, even to a basic level, the web becomes a lot more exciting and interactive place.

Powered by WordPress