The Marvels Of Potato Programming
The Marvels Of Potato Programming

Friday • December 23rd 2022 • 11:26:11 pm

The Marvels Of Potato Programming

Friday • December 23rd 2022 • 11:26:11 pm

I have a strange little tradition, where if there is time, I write little programs for holidays.

While I haven't come up with any ideas yet, I remembered an interesting programming environment.

It is the world of UserScripts, facilitated by the Greasemonkey web browser add-on.


It is the quick and little programs, that get you.

If you are programming, like a normal person…

You can expect, a normal environment.

Where things will go, as you would normally expect them to go.


But if you start programming, without preparation... sideways, in something new.

It will most likely be, quite an educational experience.


If all you do to learn programming is write normal programs, things can get pretty boring.

But if you challenge yourself to, for example create a screensaver in P5.js.

You’ll learn something new, while having a pretty interesting time.


My idea is to establish a communication channel, between my web operating system and Greasemonkey.

Greasemonkey or Tampermonkey has some extra privileges, like downloading data from external domains.

One of the fundamental features, of an operating system.


To this day my favorite Potato program was a JavaScript, running under the Rhino JavaScript Engine…

That controlled Android’s Java API, and told me how long to work out to increase my endurance.

I wrote a crude Interval timer, in the gym parking lot, by using a little android phone.


While it seems, like something that would hardly present any lessons, and quickly become annoying.

It helped me see Android API or function calls, in a universal way through the eyes of multiple programming languages.

In part because of it, when I created my web OS terminal, I did not bother with creating special room for commands.

Instead, when I type in a command and press enter, I emit an event named after the command,

With command arguments as it payload data, and without caring if there is something listening for that command.

My little terminal became a universal way, to dispatch events into my Operating System event bus.

The bus, can be connected to a server, or a network, so the terminal with just one life of code can control everything.

What started off as a Potato Program ages ago, ended up becoming a pretty nifty line of code.