Friday, 21 January 2011

My first computing steps

Part of the job hunting and interview process seems to be to go back to the start of your career - even though I have been in the industry 20 years someone always asks how did you get started? And do you have the same drive. It isn't something I really thought about before going into an interview a few months ago. Thinking about your degree and your first jobs. It was just something you have done. But you do get asked.

I  was thinking the other day of my first computer - which was a Commodore VIC 20, around 1983 (age 14 or 15). It was interesting reading the Wikipedia article about the computer - built on a shoe string and always seem to be compromising. When the computer was first released it had a retail price of around $300, which was around £150 at the time (not including add ons) - which would be in today's money around £377 (by retail price index) or £555 (by average earnings) - source www.measuringworth.com. I also think I had two VIC-20's after one failed, so I can only thank my parents for investing in these.

The computer had 5K of memory, of which you had access to 3.5k and the processor was running at 1MHz and the screen was 22 characters by 23 lines. But it did have a real keyboard. The Sinclair Spectrum (and ZX80/81) had poor keyboards, and whilst I think the Spectrum was more popular, I think I was more interested in the programming part.

I did write a program that was published - in "Your Computer" magazine in August 1985. So not only did I have a computer I spent loads on computer magazines. When you look back at the program it had to be loaded from tape each time I started the computer (so imagine if you are working on something and the PC crashes).  The program reprogrammed most of the keys on the keyboard so that you can get keywords to come out (one touch). This was a big thing on the Spectrum.

It is a shame when they published it they didn't proof read the copy material!


(Sorry for the poor quality - it is a photo of the program, rather than a scan)

Best thing was that I got paid £35 for the program!

At school their was a computer club run in lunchtime where we used HP computers. These had thermal printout paper and one line dot-matrix display whilst you type in your program. Fortunately they had tape drives for them - a few years (possibly only two years earlier) the people using them had to put the programs on cards which were then read by special (noisy) readers.

But what stood out at school was the one BBC Micro they had. I think the teachers were also trying to get into computers as well, so the kids didn't get near it. But they wrote programs on it to bounce a ball from side to side on the monitor.

I was watching a documentary series last year where a family was taken back to the 60's, 70's, 80's and 90's to see the difference in things like food, cars and technology. What I found striking was that the family was given a BBC micro that they set-up themselves (and also had the family arguing about using the television to use it). And then they went to program it. Whilst children now are so computer literate - superb mouse skills, good thinking, creating pictures, most it if is also down to good software and good teaching.

But what they don't do is write any programs for the computer. Even if it is typing the command to make it good "Beep" up to programs with graphics. I think that this is a shame as it teaches you about logic, decisions and makes your think. Especially when you have so little memory to play with.

Sunday, 2 January 2011

Testing a website before DNS has propogated

One of my resolutions (I don't have many) is to write some more technical posts. After having a year off real technical work and focusing my direction on house refurbishment and reducing my golf handicap, I am now looking for a suitable new position seriously since around September. I took on the building of a website based on a database I created a while ago (more on that once I have got it officially launched).

The problem that I have was I commissioned a new server using Amazon Web Services (see the previous post) and I could test using the IP address. One of the (minor) issues I have found so far with AWS is that you only get one IP address per instance - you don't have the option of purchasing any more. If you want more IP addresses you need more instances - which means paying more.

To host multiple sites on the one instance means using host headers if you want to host multiple sites.

The other problem that I had was I used the IP address which was assigned to the box and then modified my DNS entries for the domains. Then I setup an Elastic IP address. This is an IP address which is assigned to my account that I can then relate to a server instance. As soon as you setup this IP address the original IP address is lost! This meant I had to change the DNS again!

But I wanted to test the servers as quickly as possible. I can be impatient.

I have used the solution below before. When I worked at GTI we hosted sites in our own network centre. Every site was located on at least two servers and associated with it's (real/internal) IP address (on the private network). When we deployed the site we would setup some temporary (real/internal) IP addresses and check things would work. We could do this over the private network. However, this created issues if any URL's were hardcoded - and also if we were using SSL certificates.

The solution (for testing purposes) is to modify the hosts.txt file on your own computer. This is located in the directory c:\windows\system32\drivers\etc.

hosts.txt file


In this file you can add an entry for new sites that you can then test - either until DNS propagates or on a longer term basis, e.g. unless someone knows the URL (and IP address) and implements the same method on their PC then access to that site from your server will be quite difficult (this is known as "security through obscurity", and therefore should not be relied upon for anything really confidential!).

I also use this to occasionally test sites on my local computer.

Few caveats

  • Remember to remove entries afterwards. Otherwise you will be browsing for a site and getting the wrong one.
  • If you have already browsed to the site, you then need to exit your browser and start a new one in order for it to be picked up. (And with Firefox you might need to stop all browser instances - and check using task manager).