Search This Blog

Yesteryear

Sunday, September 13, 2015

September 13, 2015

Yesteryear
One year ago today: September 13, 2014, storms, Gainesville, co-ops.
Five years ago today: September 13, 2010, enforced charity & bad computers.
Six years ago today: September 13, 2009, a million, you say.

MORNING
           Finally, as the mornings cool down, I’m back to regular coffee and a refill. Today you get information, mostly details of the Sunday goings-on around the old homestead. Take a look at this oblong tomato. Some don’t like them, preferring the ketchup-bottle round tomato. In taste tests for me, there is no difference. But these tomatoes are firmer, keep slightly longer and you get more center slices.
           At the club meeting, the most recent conclusion is that the “99Mega”, as the counting project is now tagged, could still be a candidate for science fairs if it had a decent training manual. Hmmm, that manual would probably take a semester to learn, yet if I recall, that is the length of time we were traditionally given way back when.
           I also met a gal from Arizona, formerly from Jacksonville. Owns a small pub out west in Punkin Center. I’ve repeatedly driven past the turnoff, because it goes through hilly territory and I was pulling a trailer. But with my new light-weight camper, there would be no such hesitation. I’m probably over-cautious, as I hauled the original 400 pound model through slush and snowdrifts near John Day.
           Back to the digital counter, the quirks with PNP transistors have been ironed out and today I will rewire the components to cut down on the number of wires that cross over each other. This also assists in taking photographs should I decide to try and market it as a learning kit. Even the streamlined new circuit has close to sixty wires, compared to the usual Arduino project with less than eight.
           It should be pointed out the learning going on is that wiring. Nothing makes those finicky integrated circuits with their absurd pin-out patterns more comprehensible is trying to hard-wire an alternative like this puppy. Taken in stages, it is a doable eye-opener, although I have not yet decided whether any part of the kit could or should be pre-fabbed. I’ve written manuals before and this kit could probably market for $200 including the [Arduino] microcontroller. That’s all pie-in-the-sky at this time.

NOON
           If anybody ever tells you that your ego is too big, tell them they’ve definitely never heard of Josephine Pepa. Dot com. She can’t go five sentences without mentioning how multi-talented she is, and do go to her Facebook page because she says she has “a nice tush”. I was working on my scooter and listening to NPR. How did we know NPR on the side of the illegals? How sympathetic they are to illegals, but not at all to the people whose homes and towns are being overrun. Screw them, they’re rich by comparison so they deserve to be assimilated whether they like it or not. That’s NPR.
           And like the weakest specimens her trade, Josephine is screwing the guitar player. How original. How unique. Nope, I don't find her pretty, she has that "severe" look. I took the time to listen to her music. God, that is terrible. It’s full of those Elton-esque piano riffs that emulate guitar picking. Gag me with a spoon.
           My carefully crafted custom halogen scooter headlamp quit working. Likely a loose connection, I found in practice the bulbs have an up and a down position. That’s a factor few consider, since the factory bracket holds it in the correct orientation. I’ll fix that as well, since we know I build adjustability into what I build, a lesson learned the hard way. That is also partially why I’m in no rush to fabricate my own printed circuit boards. Mistakes over there get costly in a hurry.
           There was an astounding ad on-line by an acoustic guitarist looking for solo work. I could have written that myself. He spells it out, repertoire, preferences, audience age, I was so impressed I wrote a note saying if he ever considers a duo, to call me first. Next, I made a closer inspection of the pickup in the housing ads, which usually does not happen in September. It didn’t take long to see it is people dumping dozens of bad deals and derelict housing as fast as they can. And they are priced $10k higher than last year.
           I repaired the headlamp, fixed the gas tank bracket, changed the oil, replaced missing bolts on the carry basket, realigned loose body panels, repaired the starter bypass (that I installed last time rather than pay for a new solenoid), and tried to realign the seat latch keyport. This required three hours and thirteen different tools. And was mostly successful. I can’t open the seat latch. I’ll drill it out later.

EVENING
           For fun, I tackled the coding for the 99MegaCount. I’ve got it to count backwards, and it misses the digit 9 sometimes, but other than that, it’s making headway. The nested loops are 13 layers deep, not for those who have trouble focusing on fine detail for less than an hour at a stretch. From here on it, it is wiring and power supplies with minor code adjustments.
           Curious? What are all those loops? Loop 1 is the necessary void loop common to all C. Next, loops 2 through 9 populate the variable, with the slowest moving digits on the outer loop (the ten millions) to the fastest digits toward the inner loop (the ones). All these eight digits read the same table, albeit at different rates and times. And by now, things are really moving.
           Then loop 10, the flash refresh rate to fool the human eye into seeing patterns. Loop 11 loops through the Arduino pins that light the LEDs, loop 12 is the loop that fires the transistors that light each “number” in rapid sequence. And loop 13 is the subroutine that positions the array pointer according to which variable that digit has reached and reads the seven zeros or ones that control the on/off of the segments.
           Yes, I’ll publish a segment of the code when it is done, but not before I clean it up. I am old school which means the code also has to “look” organized and follow patterns so apparent that all but the most untaught will recognize that logic has been applied. The lack of this as a requirement in C code goes a long way to explaining the mess and confusion of most “modern” applications—and why the code has to be continually updated, rewritten, and goes obsolete without constant support. Blame it all on the shortsightedness of C and the people who use it.

           Do I offer a solution? Yes, for a fraction of the same effort, a few more command levels could have been introduced to a decent computer language, like Cobol or BASIC, and all the same functionality could have been attained without the headache-inducing punctuation marks, the time-consuming searches for local variables and head-scratching over mysterious library commands.
           There is also another advantage to languages that require a structured approach. Such programs that work are portable between devices and platforms because there is always one best approach. When good coders converge toward those practices, the code actually looks similar no matter who produced it. C languages are the opposite in that intelligence is secondary to cranking out code. There is no incentive toward congruency.
           It’s the MicroSoft strategy. As long as the squadrons of C coders can operate their madhouse atmosphere of throwing together anything that works faster than the smart guys, that crap is what gets to market first. An entire generationh as grown up never knowing any better. The more ethical C coders often plan on but never actually go back later to see if it was the right thing to do. Instead, they learn to just crank out more code, fearful of losing their place in line. Java, C++, Perl, CSS, Ruby, MicroSoft Basic, Apache, Processing, VBScript, Kaleidoscope, they are all the same regurgitated mess.
           There are something like 66 of these contrived languages, not one of which has ever introduced a new programming concept and all their “innovations” can be traced back to the same 7 techniques pioneered by BASIC in 1964. They’ve bent it, twisted it, and in the case of C++ I’m certain they pissed on it too, but between the lot of them they’ve never come up with a single really new innovation. It is their mentality to make things more complicated.

ADDENDUM

           The counter is working, but there is a quirk. The individual LEDs are not turning off completely for a moment between numbers. Yes, that too has to be programmed. We are getting close. Here is the promised sample of the working code, but just the number populating loops. The rest will cost you. Regular C code does not have this kind of style to it, this is a pattern imposed by yours truly to make it more readable.


           The “bracket” comments are also optional, placed there to keep track of the maniacal C punctuation system. For those who follow the logic, the innermost loop at the bottom is the one that executes most often. In this case it rolls over 900 million times faster than the outermost loop. Actually, that's wrong. I changed the code at the last minute, so it is 1 billion times faster.
           There are actually ten loops in the picture. (It is a picture, not the actual code.) One "void" loop, nine "for" loops. I told you it was pretty. Well, prettier than Josephine and it didn’t take half as long as her on a daily basis to make it that way.



Last Laugh


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Return Home
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++