Thursday, February 13, 2014

From little Acorns..

Just reading some of this:

I don't really want to get too involved with the arguments about it, but for what it's worth...

I've been programming for a living since leaving school in 1987. My first job was programming which was rather unusual at the time. In fact I started programming for my uncles company before leaving school and had been programming for a few years before that.  I didn't learn programming from school, I learned it at home programming my ZX81, which was about all you could do with it, but that was a good thing I think.

I got interested in computing from several sources, I was already interested in electronics and some of my friends were too and some had computers.  My school had a lunchtime computer club where pupils got involved with setting up the BBC micros and RML 380Z's and had small programming projects they worked on.  All this created an interest and a desire to get my own computer. I remember it took a bit of talking my parents round to splashing the £100 on it, and my uncle helped with that argument.

I spent a couple of years programming my ZX81 and later Spectrum and BBC (I did have  games on tape & disk as well - not all programming). I think it was the fact you had to almost construct the basic machine, connect tape recorders or disk drives and had just a command prompt that forced a certain level of ingenuity to get any reward from the machine.  But you did get a reward when programs worked or you found a new way of getting the machine to do something. Myself and my friends also used to have fun programming the demo computers in Boots and WHSmiths.

Which brings me on to the Raspberry Pi.  There has been a desire to try and recreate that era of discovery and ingenuity that the BBC Micro and early home microcomputers generated.  I think that's where the RPi is coming from and it's a nice cheap introduction to computing.  But it still takes a certain type of person to get properly interested in it.

  I saw an article the other day (can't find the source now) which was about making the Raspberry Pi even easier to use.  I balked a bit at that.  I personally think that's the wrong way to go. If you want something easy to use then there's plenty of cheap Android tablets for that.  I think what it needs is to be more basic perhaps running some more basic OS that drops you into a command prompt much like the Beeb did with languages on hand.  Possibly even something like the RiscOS OS from the Archimedes.  (These OS's are practically bullet proof).  But they provide the basic raw materials for learning about computing.   Once those are mastered the desire for more complex OS's and programs may well grow and the RPi would be able to grow with that. 

I have to assume that schools are running computer clubs but I'm not sure what form they take these days. Perhaps that's an area that might be used to get kids interested in programming again if it isn't already. Probably better than forcing everyone to do it. From my experiences with my own children and with quite a number I met when I took my BBC Micros to Maker Faire, kids love using the old machines, some were appalled that they didn't have Facebook, but most liked the basic games and some even had a stab at programming.

I think all is not lost (yet).


//images from

Thursday, February 6, 2014

Amazon AWS basics in Rails

Listing Amazon EC2 instances

# Class for VM's 
class Vm
  include ActiveModel::Validations

  validates_presence_of :name, :status

  attr_accessor :id, :name, :dns, :status
  @@ec2 =

  def self.all
    return @@ec2.instances.inject([]) { |m, i|
      tags = i.tags.to_h
      name = tags['Name']
      m.push, name, i.dns_name, i.status )

  def initialize( id, name, dns,  status )
    @id     = id
    @name   = name
    @dns    = dns
    @status = status


Listing Amazon S3 buckets

# Class for S3 Storage
class Storage
include ActiveModel::Validations
validates_presence_of :name
attr_accessor :name
@@ec2 =
def self.all
return @@ec2.buckets.inject([]) { |m, i|
    m.push )
def initialize( name )
@name = name

AWS Config

  :secret_access_key => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  :access_key_id => 'YYYYYYYYYYYYYYY',
  :region => 'us-west-2',