Jerry's Blog  1.4.230
mi propio
Data Rings
Data arrays without beginning nor end
Fri April 30 2021  10:33amComputer

Recently participated in another online programming challenge at, and ended up learning a new (for me) programming concept.

In a typical database operation, the data are accessed and processed as individual values, or as single- or multi-dimensional arrays. The array has a defined beginning and end, and is usually processed forward from beginning to end. Not so with data rings, which are conceptualized as circular arrays, with no definite start or end points. The data are still stored in memory and on disk in a linear manner (the computer knows nothing of circles or rings), but the program or operation accesses the data in a circular manner.

The image represents in pictoral form one such data ring. The unique trait of this particular ring is that it consists of the numbers 1 through 32 with no repetition, and that each pair of adjacent numbers when added together equals a perfect square number. This is the case regardless of which point you start processing, and regardless of which direction you take, clockwise or counter-clockwise. So this datum is best treated as a ring, or circular array, of numbers.

Data rings could take many forms. Some might be of a static and unalterable size; others may allow the addition and removal of elements. Some rings might allow processing in either direction; others may facilitate either forward (clockwise) or backward (counter-clockwise) processing, but not both. Its elements may be numeric data, textual data, complex structures, or even more data rings. The data ring pictured contains simple integers, is static both as to its size and its contents, and is bi-directional.

The C++ header file 'DataRing.h', defines a data ring class along with structures, definitions, and functions, which you may download and include in your own C++ program. It currently treats of data rings of any static size whose elements are integers, and allows bi-directional processing. As with other CyberJerry stuff it is free software under the GNU General Public License version 3. The terms of this license can be found -> here.

Improbable Chess Graphics
html graphics without normal image rendering
Wed March 3 2021  7:31pmComputer

The highly unlikely chess scenario pictured has a couple of interesting aspects:


At first glance, black might seem to be winning. He has all 16 of his pieces (six are still in their original position), while white has lost four of his pawns and three of his power pieces, including the queen. But a closer look shows white to be in control. In fact, he can checkmate in one move (Rf8# 1-0). That is, if it's white's turn. A third look reveals a different twist: Black is so boxed in that, if it's his turn, he has no legal move, and the match ends in a stalemate.

Fine. A pretty cool, if improbable chess situation. But this blog article is categorized under 'Computer' for a different reason: The usual method for drawing the chess pieces would be to create 11 small image files for each of the chess pieces (white queen not needed here), then include them on the grid using the html <img> tag. Another method, not available on many browsers, would be to insert raw image data bits within html elements. In either case, a browser set to not display images would render no pieces on an empty chess board. Modern browsers could use the new html5 <canvas> element in conjunction with javascript, or SVG vector graphics. But such methods are even less widely available. I want my website to work on as wide a variety of browsers as possible, including old browsers, and browsers with image rendering turned off. I think the chess game pictured here should display correctly in any such browser.

For each chess piece, pixels and groups of pixels are individually drawn using html relative positioning of <div> elements whose background color is the color of the pixel(s). So, for example, the following draws 10 black pixels starting at the top of the container html element, 17 pixels from its left side:

<div style="position:relative; top:0px; left:17px; width:10px; height:1px; background:#000;"></div>

There are, of course, a great many such <div> tags for just a single chess piece image, and I certainly didn't type each one in manually, but used server-side php scripting to generate the html code for each chess piece. Can share this php code with anyone interested; just ask. You can also do 'View Source' in your browser to see the actual html code thus generated here.

Am not real sure what practical value lies in either the chess game or the non-standard method of rendering graphics. There may yet be a practical benefit to the latter. Meanwhile, my brain and possibly yours have been occupied with some harmless noodling.

Billionth Birthsecond
Calculate exact seconds elapsed
Sat January 11 2020  5:58pmComputer

It's probably a guy thing, like watching the car's odometer roll over to 100,000 miles. But, when you think about it, observing birthseconds is really no different than celebrating birthdays. Specifically, the occurrence of one's billionth birthsecond is a rather singular milestone in one's life span. It is the only birthsecond magnitude one can observe with any real appreciation. The next lower magnitude, that of 100 million seconds, occurs when one is just a tad over 3 years old, too young to grasp what such a number entails. The next larger magnitude, 10 billion seconds, occurs at an interval of over 300 years; no chance to observe that event.

Just shy of 32 years of (read article)

  1 comment
rev. May 6 2020  11:50am
CyberJerry software license
Tue December 3 2019  12:42pmComputer

Starting a few days ago, the comments area on Jerry's Blog now contains a few words reminding you that your comment is a public work and may be quoted, copied, and shared freely by other people. This is simply an explicit disclaimer of what was always implicit, applicable to pretty much any blog comment on the internet. What's new is that large segments of this website, including Jerry's Blog, are now protected by the Gnu General Public License (GPL). A public license is sometimes called copyleft protection. Conventional copyright means that nobody can copy the work without explicit permission. Copyleft means that the public may freely copy it, but they cannot later claim (read article)

New Math
Fractional-Exponential Integer Math
Thu July 11 2019  10:09amComputer

This old dog is learning a new trick. Specifically, a new math programming technique, called Fractional-Exponential Integer Math. Less complicated than it sounds. It is "a programming technique for storing and computing fractional and exponential numbers without the inaccuracies inherent to floating point numbers. . . It is precise because all numeric values are stored internally as integers."

It began for me earlier this year when I participated in an online math challenge at , my favorite online forum. My (read article)

  1 comment
Data Security
The ironic insecurity of data privacy
Thu November 29 2018  6:40pmComputer

I used to drive a Toyota pickup whose non-functioning ignition switch I replaced with an array of 3 ordinary household toggle switches for: engine, starter, dashboard. Not what you'd call advanced security; anyone could start my truck and drive off without a key (if they could figure out which switch was which.) At the same time, I lived in a farm house with 4 exterior doors, only one of which had a working keyed lock, and that one key was a big skeleton key, too cumbersome to carry about with me. For eleven years I lived a completely key-less life. And never had a problem with auto theft nor home burglary nor vandalism.

Not that I lived in a crime-free area. I'm sure there were (read article)

  1 comment
rev. Nov 26 2019  6:39pm
Blog End
The blog is up and running!
Sat December 2 2017  4:45pmComputer

Contrary to what the first post says, there seems to be no obvious need to write any more about the process of creating a blog from scratch. Oh, you may notice a few minor tweeks since that post: The color scheme now looks more like the rest of the CyberJerry web pages. Have converted completely away from mysql. Made a small collection of my favorite quotes to display at random on the top of the side bar. Mostly, the past two weeks have been spent testing and shaking out bugs, a process that will surely continue.

In concord with the first post, I believe Jerry's Blog has become pretty much what was intended: A simple tool that should run well on a variety of devices, with reasonable (read article)

rev. Dec 4 2017  3:37pm
...death does not exist, even for a moment; all we have is two lives.
- René Bazin

4/30/21Data Rings  2
3/3/21Improbable Chess Graphics
1/11/20Billionth Birthsecond 1
12/3/19Copyright/left 2
7/11/19New Math 1
11/29/18Data Security 1
12/2/17Blog End
11/16/17Meta Blog 6
Copyright (c) 2017-2021 Gerald DePyper - Jinotega, Nicaragua, C.A.
rev. 2021.03.21