#933

A Brand New Intergalactic Cruiser At The Spacedock For Each And Every Adventure

Monday, September 19th 2022, 11:11:25 pm

I am nearing the completion of my latest program,
it generates a simple website based on folders with text files.
I had a lot of fun writing it,
there are many little programming gems that can make code fascinating.
They are all too strange to describe,
but they are like little creatures, each from a different galaxy.
They are called libraries, and when you plug them into your program,
you inherit the functionality within.
 
There is also this cute little programming style,
where you just write everything in a single line.
Each tiny program that you write and add to the chain,
channels its output as the next little programs input.
It looks very unusual, it is hard to read,
but it has style, and it is a lovely thing.
 
Having almost a thousand poems,
and over a hundred video playlists.
Means that every big operation must be repeated,
at least a thousand times.
This is trouble, as it means you can only write fast code,
if something took a second to run...
You’d have to sit there for a thousand seconds,
about 17 minutes.
Even with fast code,
it still takes 3 seconds to make the website.
And when I move the program to a low-power computer,
that may quickly turn into 30 seconds, or a minute.
 
I’ve been preparing to speed the program up,
with a cache.
A cache is a memorized operation,
you can cache the result of calculating how many minutes in a 1,000 seconds.
Simply save to disk or memory that 1,000 seconds equals
16 minutes and 40 seconds.
And you will never have to recalculate that again,
that calculation is said to be cached.
And it is a lot of fun to come up with eh right strategy,
and with minimal impact on your source code .
 
In programming the simplest things,
can magnificently get out of control.
Creating a cover image for a series of videos,
out of their thumbnails...
Requires, extracting all the video link,
checking what thumbnails are already there.
Downloading whatever is missing,
calculating how the images can fit best in the final cover.
And finally combining them together,
which sometimes requires playing with geometry.
Though there are simple Linux programs,
that can combine multiple images into one.
All of this for a simple cover image,
it almost seems funny.
 
Programming truly is wonderful,
writing a program is like piloting an intergalactic spaceship.
Programs never seem to last very long,
especially the little ones.
It is a combination of usefulness,
and eve changing world.
 
But that is a good thing, it means there is always a new intergalactic Cruiser,
looking for a captain at the Spacedock.

#933: A Brand New Intergalactic Cruiser At The Spacedock For Each And Every Adventure

Monday, September 19th 2022, 11:11:25 pm