How To Frighten Programmers: A Programming Tutorial
Saturday • March 12th 2022 • 2:12:48 pm
Good programmers are a bit scared of new things,
so let us frighten the heck out of them.
As you know, you can add a new page to Wikipedia any time,
though moderators will delete it, the Wiki will let you.
The WikiWiki is a marvelous invention,
and it is also very simple.
But it does not work so well,
when you are trying to create interactive things.
Wikis,
only let you create cross connected pages.
But what if we want to create a secure area of our website,
is there something as simple as a wiki? - yes, a computer game.
In just a few lines of code you can create a room,
with a door, and the door will only unlock if you have a key.
This also means that you need to track user locations,
and in the simplest version of this program, that means using the URL.
For example the address /members/gallery/portraits/quality/progress,
shows a path through a virtual world.
Only registered members are allowed to the member's office,
they can venture out to the gallery room.
And enter the portrait office,
where they will deposit their photo.
Then they will have to visit quality assurance room,
to chat with the artist.
And finally, they can visit the progress room,
where they can look at progress of their photo becoming a digital painting.
The thing that is really special about this setup,
is that each time we try to interact with the website we always traverse the full path.
That means is a membership is revoked,
the user will not be able to enter the member's office.
This is a very simple and sturdy security mechanism,
and it can be easily upgraded to, for example, support various keys, passports, key-cards or even items.
There is nothing confusing about this security scheme,
and you don't have to remember to check if a person entering the gallery, is a member or not.
They will be denied right at the member's office,
they can't enter that path.
As you have noticed here,
we are also able to capture a series of steps.
We can represent uploading a photo with a chain of rooms,
a kind of a bureaucratic nightmare.
Programs that don't have a simple idea behind them,
are a lot of trouble for programmers.
Aside the user having an inventory where they store keys, maybe a passport,
and maybe coins that they can buy, gift, or trade with.
We need something in the rooms,
that can represent things like portrait photos that the user uploaded.
And you know - and this is not perfect - but we should just call them objects,
modern programming languages already have that concept.
And here we would only impose a small convention,
to make objects interactive.
You could have an object called filing cabinet,
or list of something, or even pet.
And if the pet had a pat,
then you could pat the cat, and it would follow you around until it got bored.
This also opens up an environment that supports multiple users,
a chat room, too, after all, is a room.
Which also means you can have bots,
bots can make submitting a photograph for painting very easy.
There is absolutely no reason why users can't add new rooms here,
why they can't script bots to reduce a complex question to arguments for a program.
I expect the user interface would too be an object,
with an automatically triggered action called display on screen.
On the surface it would all look like a normal program,
but beneath there could be hundreds of programmers working to expand the system.
For example, with new rooms, and tests, interactive bots or wizards,
complex room based workflows, and proper code modules that integrate with the rest of the world.
I would definitely not recommend learning programming,
lyke; at all.
But if you already decided to do it,
know that programming is an infinite universe, that can contain anything, and everything.