The Caveman's Algorithm
begin
if hear barking
then
curse like Bronson
go outside and investigate
if barking from wolf
then
domesticate the damn animal
endif
ask dog what matter is
repeat
thrash mutt
until recall that dogs can't speak
investigate more scientifically
if science hasn't been invented yet
then
wait a few thousand years for it to be
endif
if bonehead is barking for nothing
then
invent fire and hurl it at the mangy cur
else
follow it
if it leads to dinosaur
then
if feeling sensible
go back to cave
else
take out life insurance
attack dino with hi-tech automatic TR-35 bludgeons
endif
else if leads to potentially domesticable animals eg TVs
then
capture sample animals using sophisticated methods
depicted on Friday's movie
else if leads to food (eg McDonald's)
take some home for junior
else if leads to group of travelling salesman
take them to club (ie pulp their mostly empty brains)
endif
go home with best friend (pizza, or dog if former is
yet to enter this stinking planet)
reach home sweet home
pull up a rock and meditate upon the future - invent
wheel perhaps
set alarm for 1 hour past dawn on sundial
go back to bed
endif
else (if no barking heard)
why get up?
endif
end.
Dinoj Surendran @ 1995