Thursday, April 30, 2020

Programming unlocked

I remember that I have promised several times to continue my discussion slash literary review of HP Lovecraft and CS Lewis, and of course I have not done that yet because I haven’t performed the crucial and required re-reading of the Space Trilogy by Lewis and some selected stories by Lovecraft. 

In the meantime and before I launch my own comic book version of Lewis’s Perelandra, I’ll take a minute to discuss computer programming or “coding” as the kids and cooler old people call it. I’ve been learning this computer programming thing for a few years now, and I’ve made some stunning progress, specifically I have already created my own future calculator.  Not a Future Value Calculator, a Future Calculator. 
In the How To Program books they usually show you, in one of the early chapters, how to write a Future Value Calculator that will calculate interest on a loan. They probably figure that anyone who is going to learn computer programming will most likely be getting a sweet job and buying a huge house very soon and will most def need to figure out what kind of huge mortgage payment they’ll have to fork over each month to live in that huge house.  
That didn’t really pertain to me so I kind of lost interest in the Future Value Calculator and instead I thought, “I’d much rather determine  the actual future than just the future amount of some sleazy loan. “ Then I tossed the programming book into the trash and began to devise an electronic tarot card reading program and fished the programming book out of the trash and slowly over the course of months and indescribable frustration I created Hagentarot, a tarot card reading that will predict your future (within a reasonable percentage of accuracy) using nothing but JavaScript, which is a programming language for web pages, specifically for images and buttons. Please take a moment to experience Hagentarot now. The reading does not take long and it will change your life. 
In which case the reading wouldn’t be very accurate, would it? I may do a version 2.0 where it doesn’t change your life so much that it affects the accuracy of the reading, that’s a tricky one.

I had a sort of a vision when I began the project, of what the tarot reading would look like and how it would work. Needless to say that beautiful vision did not quite make it into reality. Computers are cruel and uncooperative, but as you age you become inured to failure and disappointment, resigned to defeat. You don’t cry when the candy gets snatched away. You just move on patiently to the next bright wrapper, living for the brief spark of residual hope you feel when you gaze upon the bright colored crinkliness. 
Obviously, since we’re talking about web pages, I also learned some HTML and CSS along the way. Even as a 50 year old who fondly remembers the Atari 2600 Superman game, I didn’t have much trouble with HTML. 
But then I had to learn about CSS, which is the code for the appearance of the web page. I say “learn about” because after months of effort, patiently typing in values in “em” and “%” for “padding” and “margin-left”, and seeing the results, or more often than not with CSS, seeing no result at all, I came to the conclusion that CSS just doesn’t really work, that I knew CSS fairly well and that while it can perform some amusing tricks, it’s in beta testing still, not something a professional would ever rely on without the mediation of special patch code kept in secret files in Iceland by the Swedish guy who invented the Internet. But then I saw this website, CSS Lace, where someone created a painting out of CSS. It only works if you view it in Chrome. 

If you’ve never heard of CSS or tried to learn it, you wouldn’t even look twice at this image. It would be another flash of colors that you swipe by on the interwebs without a thought. 
But if you’ve tried to learn CSS, and you find out it they used CSS to make it, you will know it as satanic wizardry. Something inside me went pop when I saw it, and I knew that I might learn about CSS, but I would never know it.