Arch Linux. Not as scary as you think.

Image
Yes I'm a nerd. Yes I use Arch Linux. There is a somewhat unfair view that you have to be a programmer to use Linux, and that Arch Linux in particular is very difficult. Yes I happen to be a programmer, and it might be true that Linux may be particularly useful for programmers considering most distros come with a lot of editors and compilers and such. But it really is a really stable and powerful OS for anyone (that's not computer illiterate). If you want to just use your computer without having to thinking about it, you will probably use whatever Windows version your computer came shipped with, and not bother to install anything else. However if you actually want to Learn how to use Linux, Arch is a good choice, because it assumes you know how to use the command line during the install process. In other words the process of installing it forces you learn som basics of Linux (if you don't already know). Still it is not very difficult. You don't have to compile

BASIC

A simple BASIC program written on the Commodore 64

Why should you learn BASIC?
Well, you shouldn't really.
"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." - Edsger Dijkstra

BASIC was a programming language designed in 1964, primarily to teach basic programming principles to beginners. BASIC is an acronym for Beginners All-purpose Symbolic Instruction Code.

However BASIC became popular with the increase of microcomputers for the home market, and during the 1980s many computers used a BASIC interpreter in place of an operating system.
Examples of such computers are Commodore 64, Apple II, TRS-80, ZX-80, and BBC Micro.
There where several different dialects of BASIC with somewhat different syntax, such as Simons Basic for C64, and BBC Basic for the BBC Micro.

Even if you where unaware of it, you actually used BASIC code to operate your old C64.
For instance in order to load a game form a floppy disk (if you where fortunate to have a floppy drive for your C64, and not just a cassette deck) you would write:
LOAD"$",8
To then see what's on the disk you would type:
LIST
To load a game into memory you would write the following (assuming the disk contained Arkanoid):
LOAD"ARKANOID",8,1
To then actually start the game, you would have to write:
RUN
A bit of a hassle compared to modern games isn't it?

A reference to BASIC syntax in Futurama

The drawback of an interpreted language, such as BASIC in comparison to compilated languages is that the programs run significantly slower.
That being said, a lot of impressive things have been made in BASIC, just look at some of the classic C64 games for example.

Even computers with other operating systems usually came with a BASIC interpreter installed, such as the Victor 9000 (Using Microsoft Basic).
Even when I later got my first own computer: a 486 with MS DOS, it included QBasic (an improvement of the original BASIC).

When writing a line of code it is immediately executed when pressing enter.
To write an actual program each row must begin with a line number, the convention is to use multiples of 10, for instance:
10 PRINT "Hello World!"
20 END


To actually run a program (that is loaded to memory) you must type RUN on a line by itself.

The reason for numbering rows in multiples of 10 is that the programs always run code in the order it is numbered, and if you suddenly realize you need to add some more code between rows you would need to rewrite the entire code to get the correct numbering if you where to use 1,2,3, etc. In case of multiples of 10, you could just add 15 between row 10, and 20 for instance.

If you are going to ignore Edgar Dijkstra's comment above, here's an old VHS tutorial on how to program BASIC on the BBC Micro.


Since it's doubtful you own a BBC Micro, since they where almost exclusively released for schools in the U.K. here's an emulator you can use to code for yourself:
https://bbc.godbolt.org/

Comments

Popular posts from this blog

Carolus Rex

Binary Numeral System