Donald Trump spotted inside a fruit

I dropped a pepper on the floor which causes some bruising to the fruit, but was surprised to discover that when I cut out the offending damaged flesh, the President Elect Donald Trump was hiding inside. He made me pay for the pepper as well.

scary - complete with bile-filled, forked tongue.
If you have parachuted into this page from somewhere else on the Internet, then you may wish to gather up your thoughts, dust yourself down, and check out the following Donald Trump fruit-a-likes.

The A-Z of geek: I is for Intra-Galactic Battles

So I have had a lazy Sunday afternoon watching Star Trek movies. All the references to 'photon torpedoes' and transporter beams put me in mind of a retro DOS game action that I actually spent many hours playing throughout the 90's.

I is for Intra-Galactic Battles

IGB is a strategy game by William D. Hause released back in 1990. Although not endorsed in any way by the owners of the Star Trek franchise, the look and feel of the game places in the Star Trek universe. Four factions battle for control of the game world: The Federation, Klingons, Orions and Andromedans.

The aim of the game is to destroy or capture all of your opponents space craft. This is not a game for people you need graphics and storylines to enjoy a game. IGB is simple great because of the gameplay.



The alien races are differentiated by their method of attack. The Klingon weapons never miss, although their destructive power decreases with distance. The word Klingon is replaced by 'Gorgon' in all game documentation, presumably to avoid a nasty law suit. The Federation weapons have a chance of missing based on the distance they are from their target, however they always do maximum damage for each successful strike. The Orion weapons do minimal damage to the hull integrity of enemy ships but instead murder the crew onboard. Once an enemy ship has been thus 'softened up' a bit, Orions use transporter beams to try to take over control of the enemy ship.

An Intra-Galactic Battles skirmish. The green base has fired a laser at the pink klingon. What is klingon for "All your base are belong to us"?

My favourite race is the Andromedans whose weapons have no maximum value - they can simply be charged up to any level, thus can be significant one-shot killers, provided you have not been destroyed while you wait to charge.

Game play involves management of resources, so that there is a healthy balance between energy used to charge your defensive shields, weapons, tractor beams and engines.

When you first load IGB you will be presented with half a dozen options for scenarios to play out, although you can also select a 'custom battle' in which you can add your own ships at will. You can play with a friend or select 'Computer' when prompted with the question 'Who will control this ship?'. You can also add ships at anytime to the battle either on your own side or your enemies, so an IGB battle can theoretically last forever, although I did find my IBM PS/1 actually ran out of memory during a very long battle.

Play Intra-Galactic Battles in your browser now.

#startrek #dos #retro #games

Nerdy books for geeks

With the pagan festival of Yule figuratively around the corner, you may wish to curl up in front of an open fire with a good book. Or you may wish to go out and buy one for your nerdiest significant other(s). Listed here are a selection that I recommend.

The Thrilling Adventures of Lovelace and Babbage

Presented in this wonderful book is the (alternative) story of Ada Lovelace and Charles Babbage and their comic-book adventures with the Difference Engine. Enter a parallel universe where Victorian computers compute pi, correct spelling errors and offer guidance on etiquette.



Feynman

This comic book tells the life story of one of the greatest minds of the twentieth century: safecracker, musician, romantic and Nobel-prize winning physicist Richard Feynman. If he isn't already on your fantasy dinner party list then he should be, and this book should also be on your list for Santa Claus.


The Meaning of Liff

Even though the English language has many hundreds of thousands of words, there remain many commonly-shared experiences that do not have a word assigned to them... until now, thanks to Douglas Adams and John Lloyd. For example, there once was no word for the act of dribbling involuntarily into one's own pillow, until now: Sompting.





What If?: Serious Scientific Answers to Absurd Hypothetical Questions

What would happen if you fired a nuclear weapon at a hurricane? How much physical space does The Internet take up? What would happen if a rainstorm dropped all of its water in a single giant drop? Could you build a bridge of Lego across the Atlantic ocean?

All these absurd questions and more are answered in this book by XKCD comic creator Randall Munroe. It's like having this website printed out into book form.
And if XKCD is your thing, then do also find the website is available in book form as well... Randall Munroe describes xkcd as a webcomic of romance, sarcasm, math, and language. It is practically required reading in the geek community.

One geek experience points are awarded each to Sydney Padua, Jim Ottaviani, Leland Myrick, Hilary Sycamore, Douglas Adams, John Lloyd and Randall Munroe.

Life hack 001

I was shown this life hack today, so I thought I would share it. A plastic container, like the ones you get inside chocolate eggs that all so contain a surprise... (and something to play with) make handy containers for earphones.  That is all.


Extra geek experience points for anyone who remembers this...

The A-Z of geek: H is for Hobgoblin

Described in the superdecade games dictionary as noun: Mischievous imp, this post is about a game for the BBC microcomputer by David Parsons.

H is for Hobgoblin

In this game you have three lives to recover 'The Golden Orb of Altoris' by marching headlong to the right of the screen, avoiding ghouls and ghosts who can kill with one touch. The gameplay involves a great deal of precisely-time jumps to avoid spike-tipped pits and an endless hail of arrows fired from zombie Robin Hood type characters. You are armed only with a set of infinite throwing knives, a fairly useless suit of plate-armour and a rather tidy ginger beard.

Oh no, a baddy! JUMP! No fire! Quick!

Hobgoblin is a clone of the more-popular Ghouls 'n Ghosts available from Capcom for a variety of platforms.

Success in Hobgoblin demands careful attention to detail - for example not dying - as well as upgrading one's weapons so as to better squish the army of undead that are perpetually waiting somewhere to the right of the screen (as well as occasionally to the left!).

The old 'climb on a rock' trick
Particularly difficult sections involve precise jumping and picking your fights very carefully. One slip and you are inconveniently teleported several screens to the left where you are forced to attempt the difficult section again, only with downgraded weapons (and, of course, your trusty beard).

Video Time:


Complete walkthrough

The A-Z of geek: G is for Game of Life

From simple rules can arise incredible complexity.

There are those who have spent entire careers exploring it. All programmers should be familiar with it. I once spent an entire night coding it on a BBC microcomputer. It is, of course, recreation mathematics time, because....

G is for Game of Life

Conway's Game of Life has been described as a 'zero-player game'. In Game of Life cells exist on a two-dimensional game board who live or die based on four simple rules:
  1. Any live cell with fewer than two live neighbours dies, as if caused by under-population.
  2. Any live cell with two or three live neighbours lives on to the next generation.
  3. Any live cell with more than three live neighbours dies, as if by over-population.
  4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

The resulting effect is something that resembles life in a petri dish. Some patterns repeat themselves, as though moving across the canvas like spacecraft. Others reach stable or oscillating states, and other configurations complete vanish after a few generations. It is also possible to build logic gates and thus create a Turing Machine using the rules of Game of Life, that is you can actually perform calculations within Game Of Life that could be performed on any other computer.

Game of Life sims you can play right now:

Bitstorm
pmav.eu JavaScript Game of Life
Kongregate
Emergent Universe
Open source Life


Video time:

Mind-blowing Game of Life video


Conway on Conway's Game of Life (Numberphile)

Number converter in Python

Just because I was set this challenge this morning, I have written my first attempt at a number converter in Python 3. You simply pass a positive integer and the program returns that number in words.


For example, if you pass 1234, it will return "one thousand two hundred and thirty-four".

The program works for all positive integers up to ten to the power 48, which should be good enough for most practical purposes.

The code is listed below, or you can download it from OneDrive.


def numberConvert( num ):
    # pass a string containing a positive integer
    # will return the number as a string of words
    # for example 1234 will return
    # "one thousand two hundred and thirty-four"
    number = str(num)
    digitlist = []
    groupedlist = []
   
    for digit in number:
        digitlist.append(digit)
    #puts text into grouped list eg
    #567893 --> ['893', '567']
    while len(digitlist)>0:
        s = ""
        c = 0
        while c<3 and len(digitlist)>0:
            s = s + digitlist.pop()
            c += 1
        groupedlist.append(s[::-1])
    out = ""
    power = 0
    a = ["thousand", "million", "billion", "trillion", "quadrillion", "quintillion", "sextillion", "spetillion", "octillion", "nonillion", "decillion", "undecillion", "duodecillion", "tredecillion", "quattuordecillion", "quidecillion"]
    for item in groupedlist:
        if power >0:
            out = parseNumber(item) + " "+ a[power-1] + " "+out
        else:
            out = parseNumber(item)
        power += 1
    return out
def parseNumber( number ):
    #pass a 3 digit string , eg '456'
    if len(number) == 1:
        return(parseDigit(number))
    elif len(number) == 3:
        if number[0:1] != '0':
            if int(number[1:3]) != 0:
                return(parseDigit(number[0:1])+" hundred and "+parseTwoDigit(number[1:3]))
            else:
                return(parseDigit(number[0:1])+" hundred ")
        else:
            if int(number[1:3]) != 0:
                return("and "+parseTwoDigit(number[1:3]))
            else:
                return(parseTwoDigit(number[1:3]))
    else:
        return(parseTwoDigit(number))
              
def parseDigit( number ):
    #deals with one digit numbers
    a = ['', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']
    return a[int(number)]
def parseTwoDigit( number ):
    #deals with two digit numbers
    a = ['twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety']
    b = ['ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen']
    if (number[0:1]) == '1':
        return(b[int(number[1:2])])
    elif (number[0:1]) == '0':
        return(parseDigit(number[1:]) )
    else:
        if number[1:] != '0':
            return(a[int(number[0:1])-2]+ "-" +parseDigit(number[1:]) )
        else:
            return(a[int(number[0:1])-2])
#test program
while True:
    num = int(input("Enter integer: "))
    print(numberConvert(num))

Happy Halloween Cortana

The Trumpkin

Today Cortana suggested that I use her algorithms to help decide what costume I should wear for Hallowe'en. I gave it a go.

This is NOT how we used to do Halloween 'up north'.
...and the results...
Well, thanks Cortana, but it's going to take more than a lick of paint to make me look like that cat!

New updates to my chatbot

I have spent most of Sunday having very daft conversations with my chatbot, Mac, and I am pleased to say that I am happy with progress so far. His dictionary files have increased in size and he is becoming a much better conversationalist.


If you want to have a pointless conversation with Mac, then you can find him waiting for you here. Try asking him who he thinks will win the race for the White House, or what his opinions are on current affairs. I'm not actually claiming that he will make any sense, but it will be fun finding out. Enjoy!

This year's pumpkin is a Trumpkin

Every year I carve a pumpkin for Hallowe'en. This year's effort is the most frightening yet.

Introducing the Superdecade Games Donald Trumpkin...

Orange skin, hate-filled eyes. It's a trumpkin. I'm not too pleased with it myself, but at least I had a go. The pumpkin was quite expensive from my supermarket, however I'm going to get Donald to pay for it.

Some notable pumpkins from previous years.
Alien pumpkin with a petroleum jelly finish.

nom nom nom
There's something in my eye.


Wishing all my readers a happy Hallowe'en!

If you liked this post then you might like to see some other seasonal posts from back in history:

Putting Vaseline on your pumpkin works - sort of. 2015
Under construction 2014
Happy Hallowe'en 2012

The A-Z of geek: F is for Flowers of Crystal

Primary school children throughout the 1980's got their first experience of computers via an adventure game called Granny's Garden. In this game you had to solve various puzzles with the vague aim of rescuing some fictional children from the evil witch, who would often show-up unannounced, play some horrible music, kill you and annoy your teacher, who had lost count of the number of times they had heard it happen. Granny's Garden was rather well-known (and well-loved), however many people are not aware that 4-Mation software released a sequel....

F is for Flowers of Crystal

In Flowers of Crystal the planet Crystal is in danger, and only primary school children transported across the galaxy can save it. It seems that the evil antagonist, Mr Grubble, an industrialist and entrepreneur, has put the entire planet in danger. Along the way you will meet Jim, protector of the planet Crystal and after a long, convoluted back story, you will discover that your mission involves finding the Flowers of Crystal which have the power to save the entire planet, or something.

I am scared...

As in Granny's Garden, success in Flowers of Crystal involves carefully solving puzzles. The first puzzle involves reading the 'weather report' which gives a hint as to which items will be needed. For example, if the weather report tells you that it is likely to rain, then taking the raincoat might be a good idea.

Part of the world of Crystal - thanks to Super Jim

The next puzzle does not provide you will such an easy hint. You are required to navigate through a map of the game world moving from location to location using or finding other objects along the way. I am sure that when I was a child we managed to make much greater progress through the game (or at least we had guessed the code word for getting onto the second level).  I do know that you need a disguise kit to get into Mr Grubble's bubblegum factory, in which you will discover the security pass allowing you access to the City.  The world of Flower's of Crystal is a fascist police state in which one must always obtain the correct paperwork in order to be granted permissions to travel. I wonder what 4-mation were trying to teach us?

Teachers across the land would plug children into the Flowers of Crystal, and then sneak out for some of their own 'special water'.
Another teletext monster murders you for no reason. So senseless.
Choose wisely or you will be murdered and then some other kid will get a go, and you have to go back to your seat and do long division problems
If you somehow survive the first map, then you will find out a code that allows you to access the second level, which, from memory, was much more fun. It involved a few more puzzles, but crucially, the mini-games were more 'arcade' in style. I seem to remember one puzzle where you have to fly through a cavern avoiding lightning bolts. Or maybe I am just remembering our school corridor at lunchtime. There was also a game of Nokia snake built in, and some sort of creature known as the Exiles who were literally hopping mad. I have no screenshots of that part of the game because I haven't managed to survive long enough however there is a video below.  Playing this game will be much improved by using the 'save state' feature of your emulator, because being randomly killed is no fun.

Not again....
So, if you enjoyed this post and you fancy having a go, stock up on some bubble-gum (the only way to protect yourself from underground worms - obviously), and award yourself some geek experience points.

Video time


The most impressive Little Man Computer Code...so far

What follows is some of the most impressive code written for the Little Man Computer that I have ever seen.

Thanks to Eric and Will, here is a 'general purpose calculator' program, squeezed into the one hundred available memory locations of the LMC.

The program can perform Square root, DIV, addition, square numbers, Integer powers and multiplication.

In order to use the calculator the two operands are entered into the keypad first, and then lastly the operation is entered by selecting the corresponding operation code (listed in the comments).


For example, in order to perform the operation 13 DIV 2,
firstly enter 13 then 2, then 0 to select DIV.

You can download the source code from these pages, or find it listed below.



#Will

#Modified by Eric Rodriguez for more than just add and divide

#A general purpose calculator which works with the limitations of the little man computer

#

#KEY:

#1 or above for SUBTRACT

#0 for DIVIDE

#-1 for ADDITION

#-2 for SQUARE

#-3 for POW

#-4 for SQRT

#5 or below for MULT

#Input 1 is the first number

#Input 2 is the second

#Input 3 is the selection

INP #Enter the first number, this is the number that all the functions will be done to

STA A

INP #With square and power, due to limitations of little man computer size, does nothing but is the operating number

STA B

INP

BRZ DIVIDE #case 0

BRP SUBTRACT #case 1+

ADD ONE

BRZ ADDITION #case -1

ADD ONE

BRZ SQUARE #case -2

ADD ONE

BRZ POW #case -3

ADD ONE

BRZ SQRT #case -4

#else fall through to mult

MULT LDA B #Multiply Function

SUB ONE

STA B

LOOP LDA C

ADD A

STA C

LDA B

SUB ONE

STA B

BRP LOOP

LDA C

BRA MULTOUT

DIVIDE LDA A #Divide function

STA A

LOOPD LDA COUNT

ADD ONE

STA COUNT

LDA A

SUB B

STA A

BRZ ZEROD

BRP LOOPD

LDA COUNT

SUB ONE

STA COUNT

ZEROD LDA COUNT

BRA OUTPUT

ADDITION LDA A #Addition Function

ADD B

BRA OUTPUT

SUBTRACT LDA A #Subtract Function

SUB B

BRA OUTPUT

SQRT LDA A #Square root function

STA A

LOOPS LDA COUNT #SQRT loop

ADD ONE

STA COUNT

LDA A

SUB X

STA A

LDA X

ADD TWO

STA X

LDA A

BRP LOOPS

LDA COUNT

SUB ONE

BRA OUTPUT

SQUARE LDA A #Square function (set A = B and let multiply do the rest)

STA B

BRA MULT

POW LDA POWOUT

STA MULTOUT

LDA B

SUB TWO

STA POWC

LDA A

STA B

STA POWNUM

BRA MULT

MULTRTN STA A

LDA ZERO

STA C

LDA POWNUM

STA B

LDA POWC

SUB ONE

STA POWC

BRP MULT

LDA A

OUTPUT OUT

HLT

MULTOUT DAT 684 #default out - to OUTPUT

POWOUT DAT 674 #power out - to MULTRTN

A DAT

B DAT

C DAT

POWC DAT

COUNT DAT

X DAT 001

ONE DAT 001

TWO DAT 002

POWNUM DAT

ZERO DAT 000


The A-Z of geek: E is for Elite

When I was knee-high to a grasshopper, I persuaded my father to spend £15 of his hard earned cash on software that I assured him would 'really help me understand astronomy and physics'. In reality, it was a game of intergalactic trade and combat. What followed was many a Friday night of my youth spent battling with pirates and Thargoids on my BBC model 'B'.  Buckle your space-seatbelt for a trip through a procedurally-generated universe...

E is for Elite

Created by a young Ian Bell and David Braben, Elite was the first 3D space simulation game of all time. It featured a universe of 8 galaxies, populated by harmless bug-eyed birds, communist rodents, various coloured frogs, birds, lizards and edible arts graduates who have an exceptional loathing of sitcoms.

Elite running on the BeebEm BBC emulator.  Here I have travelled from the starting point at Lave to Diso (a planet populated by 4 Billion democratic cats).
The aim of the game is: do anything you want. This was rather a new concept for computer games for at the time games gave your three lives and expected you to play for ten minutes. In Elite you can fly to any planet you wish; trade with the various alien species you encounter; do battle with pirates, aliens, trade ships or the police. You can upgrade your space-craft with missiles or lasers, or buy from a variety of other space-technology.

Trying to dock at a space station required matching the roll of your spacecraft to the roll of the space station in addition to some careful initial 'lining up', all the while being careful not to press the trigger on your laser cannons (they don't like it - not one bit).
A photo of the manual showing artistic representation of various polygons, I mean spacecraft that you will encounter.
A list of fun stuff you can do in Elite

  • Watch planets spin below you at ludicrous speed (as the inhabitants all fly into space due to centrifugal force).
  • Wait outside space stations and glooping the police as they emerge to arrest you for glooping the police, who then send more police, who you can gloop...
  • Travel the galaxy by only using your fuel-scoops to refuel.
  • Travel into deep space looking for pirates to gloop (and using your escape pod to get home again).
  • Fill up your cargo bay with questionable products and try to blast your way into the nearest system.
  • Sell your defeated enemies to the slave trade!
  • Gloop innocent traders and steal their stuff (then sell the traders as slaves).
  • Try and find the space-dredgers and the generation ships indicated in the manual (SPOILER: they don't exist).
If you like this game, then you might like...

A few years ago I wrote a 2D space shooter game for Windows.  It is called Starfunk. You may wish to go and play it.

Introducing Star Funk for Windows. Kind of like Elite, but 2D. Visit strange new worlds and encounter mysterious beings, then kill them to death and steal their stuff.

Video time:






The A-Z of geek: D is for DOS

This summer I purchased an IBM PS/1 computer.  This machine was originally released 26 years ago in 1990, the year that the Hubble space telescope was launched; Thatcher was replaced by John Major; Iraq invaded Kuwait; the Channel Tunnel between France and England was completed and Deee-lite released "Groove Is in the heart". 

The IBM PS/1 runs an Intel 80286 processor at 10 MHz and has a massive 1024KiB of RAM.  The system has one 31/2 inch floppy disk-drive and a 40MB hard disk.

...So, prepare to type "cd.." because today...

D is for DOS

DOS is the name for a family of command line disk operating systems popular throughout the 1980s and 90s. My IBM PS/1 runs IBM DOS4.01.

An IBM PS/1 in slightly better condition than mine.

The computer does not run Windows. Instead it has a four-quadrant graphical displaying giving access to a fairly comprehensive system tutorial; MS-Works office tools; file explorer and DOS. The display can be navigated with either the mouse or cursor keys.

The IBM Graphical User Interface.
This machine was designed for home users with little experience of computers, and so everything has been made as simple as possible. In fact, you do not need to know any DOS commands to use the system, but seriously, where is the fun in that?

The IBM has a graphical 'file explorer' program built-in. They have tried to make it look like a filing cabinet, and although it looks great, DOS is much more fun.

The first thing that I needed for my computer was a text editor program to edit bat files.  I chose to use a shareware application called "QEDIT" from SemWare. I then created a bat file in the DOS folder. The bat file contains the following two commands:

c:\utils\qedit\q.exe %1
type %1


The first line is the path to the qedit program which allows an optional parameter. The second line passes the parameter to the qedit program. I then saved the file as "c:\dos\qedit.bat".

This allows me to edit any text file, or create a new text file, by typing "qedit <filename>" from anywhere in the command line.

DOS was really a great system because it allowed you to create as many bat files as you wanted. If they were saved to the DOS folder (or another folder that you could specify in the configuration settings) thus expanding the system's vocabulary.

The second job I did with the IBM was to create a 'help' file to allow me to keep track of all of the user-defined bat files that I was creating.

The help file is accessed by the command 'help' (which, of course, runs the 'c:\dos\help.bat' script), or 'help <topic>' which then gets information about the specified topic.  This is achieved with the following code:

@echo off
cls
ECHO Greeting message
IF %1. == . GOTO showall
IF %1. == helptopic1 GOTO helptopic1
IF %1. == helptopic2 GOTO helptopic2

GOTO end

:showall
ECHO SYNTAX: help <topic>
ECHO Help available for the following commands:
ECHO helptopic1, helptopic2, etc
GOTO end

:helptopic1
ECHO help provided here
GOTO end

:helptopic2
ECHO help provided here
GOTO end

:end
ECHO That's all folks!




Well that's about all I've done with DOS on my IBM PC apart from loading several DOS games, and also playing with the version of BASIC that comes with it.

If you find the need to dust off your DOS computer, then there are a load of DOS games archived on various websites, not least, this one.



So, it's video time.

Here is an IBM PS/1 promotional video, with (hilarious) jab at Apple computers.




IBM PS/1 showing boot-up time.


An IBM running Prince of Persia


An IBM PS/1 running Windows 3.0

Label