Sunday 15 June 2014

First BASIC Program

I mentioned in a recent post that BASIC is 50 years old.

I can't remember the first BASIC program I entered into my Apple II computer when I got it but I captured the screen below on the AppleWin emulator and I'll bet this wasn't very far from it.

Back in those days the convention of using "Hello World" had not been established. So I would probably have either used "Hello" as I illustrate below or I would have just printed the current value of X.

The AppleWin emulator is available to download here.

Notes:
  • As you can see below, the Apple II emulator starts in the "Monitor" language. I had to access the Redbook Reference Manual (available here) in order to remind myself how to get into Integer BASIC (it's Ctrl-B by the way). 
  • You can see that there is a bug in my short 3 line program. Integer BASIC would have been much happier if I had added the following line: 40 END



Saturday 14 June 2014

Glen Campbell

I mentioned that Glen Campbell's Wichita Lineman is one of my all-time favourite songs in a previous posting.

I happened upon this nice video today which talks about his career and his Alzheimer's condition.

The part I didn't realise was this:
In 1963 alone,  Campbell performed on nearly 600 cuts for other artists. He played guitar for Frank Sinatra on "Strangers in the Nigh"; for The Monkees on "I'm a Believer"; and for The Beach Boys on many of their recordings. And when Brian Wilson took time off from the band, Campbell filled in for six months.

You can watch the piece here:

Tetris is 30 years old

The computer game Tetris was released on June 6th, 1984 and went on to be a worldwide hit on computers and consoles.

He It was developed by Alexey Pajitnov who was working for the Dorodnicyn Computing Centre of the Academy of Science of the USSR in Moscow. He wrote it originally on an Elektronika 60, which was a terminal computer developed in the Soviet Union,

The genius of the game is that it is so simple. There are just 7 different shapes that fall and which you must rotate so that they form complete lines. Simple and yet compelling.

And even though the game was designed and developed 30 years ago, it is, of course, perfect for smartphones!

I found out about the anniversary because (the fantastic) Ian Dempsey mentioned it on his morning radio programme. He indicated that he has spent many hours playing it.

So 30 years on the game is still ubiquitous. A search on my new Android phone tells me that there are more than 250 matching apps. A search on scratch.mit.edu says that there are about 1,990 results!

If you would like to play Tetris (to celebrate the anniversary) then here are 2 pretty good Scratch versions:

http://scratch.mit.edu/projects/2767355/
http://scratch.mit.edu/projects/2569483/

Here is a picture of the latter version:

"When Doves Cry" by Prince is 30 years old

The fabulous "When Doves Cry" was released by Prince on May 16th 1984.

The track is taken from "Purple Rain" which is one of my two favourite albums of all time.

Purple Rain the album was released on June 25th. Purple Rain the movie was released on July 27th in the USA and on August 31st here in Ireland.

I had seen a feature on Prince on some TV programme (I think it was on BBC 2) before any of this happened and I was really looking forward to the movie release. But when I first heard "Doves Cry" I was completely blown away. It truly is a work of genius.

There is some interesting background information on the album here.


BASIC is 50 years old

The BASIC programming language turned 50 on the 1st of May this year.

BASIC was first successfully used to run programs on the school’s General Electric computer system at 4 a.m. on May 1, 1964. It was invented by John G. Kemeny and Thomas E. Kurtz of Dartmouth College in Hanover, New Hampshire. They are shown in the photo below with one of their students.

BASIC is an acronym, standing for "Beginner’s All-Purpose Symbolic Instruction Code".

You can see the manual for this first version of BASIC here.I particularly like the section on the use of "teletype typewriters"! That first version had a very limited number of commands, including the infamous GOTO!

But, in my opinion, BASIC played a critical role in the Personal Computer revolution. Every computer came with some form of BASIC. My own first computer, an Apple II, came with "Integer BASIC" in ROM (written by the genius who is Steve Wozniak) and "Applesoft BASIC" (written my Microsoft) on cassette tape. And everyone who bought a person computer entered programs in BASIC (often transcribing them from books and magazines).

Without BASIC, what would have been fuelling this desire to write programs on your own computer? COBOL? Pascal? FORTRAN? Forth? Logo? ALGOL? Lisp? It's hard to imagine. (Java, by the way, wasn't to make an appearance until many years later in 1995)

And of course Assembler would be out of the question (too complex, and no practical ability to share code across different computers).

There is a nice video on this part of computer history on the Dartmouth website here.


Anniversaries

There have been a number of significant anniversaries recently.

Three to be specific.

I intend to blog about them in the upcoming posts.

I'm going to do them in the order in which they happened, but this also reflects their order of importance.

New Phone - HTC One

I decided to replace my ageing Samsung Galaxy S2 the other day.

My kids wanted me to go for an iPhone but (given my relationship with App Inventor through CoderDojo) I was determined to stick with Android. They were completely shocked that I wasn't going for an iPhone when they heard that I could get the 4S model for "free".

I got my decision down to either a Samsung S4 or a HTC One pretty quickly. But then I found it hard to make the final selection.

In the end I did abandon Samsung though, and I bought the HTC.

I couldn't tell you exactly why I did that - I was very happy with my Samsung after all.

This may have been a factor: The card beside the Samsung said that it supported NFC. I wanted NFC because App Inventor supports it and I like the idea of experimenting with NFC tags.

The card beside the Samsung did not mention NFC. So I looked at the shops brochure. No mention of NFC at all. So I asked the staff. They has no idea, looked up their website, and still had no idea.

I went to the Samsung shop elsewhere in the shopping centre and they confirmed that the S4 does indeed have NFC. But I guess I had already started to drift towards the HTC at that stage.

The second negative for the S4 was the fact that the S5 is available. So I would be buying a model behind - which is never good news.

I'll undoubtedly revisit the topic of my new phone in upcoming posts as I get used to it.


Weather App YR.NO

I mentioned a prediction from the YR.NO app in my last post.

The prediction was fairly accurate.

I say "fairly" because there was a very small fall of rain/sleet shortly after I made the posting!

But it was pretty accurate overall.

In fact, I find YR.NO to be pretty accurate for rainfall and I have come to depend on it when deciding whether or not a coat is needed when I am heading out to work.