Search This Blog

Yesteryear

Friday, March 7, 2014

March 7, 2014


           I’ll discuss programming code in the addendum, which makes me wonder if I should call Friday a day off or a brain on. Fridays have been my most productive day for as long as I can remember. Then again, I’ve had amnesia for as long as I can remember. Little joke there, guys. But another idea cooking in my little brain. My foray into Qbasic shows the same defect in computer manuals as in electronic texts, but I didn’t connect the dots at first. Once again, the texts are written to sell books, not present the material in the best learning fashion. Their format is, here’s a piece, this is how it works, here’s a simplistic example or two, now move on. Hardly the best approach.
           See the photo. What I’ve got here is something you will rarely find in a computer book. The sketch is of some actual planning going on. See the uncountable corrections and erasures? And all this is doing is map out some locations at the edge of a standard 640 x 480 pixel computer screen. I’ve yet to see a text that gives this important phase more than token recognition. I say the planning phases should be emphasized and presented better. Here is one command at a time, and a whole series of examples that take it to it's own limits. That's how people really learn.
           So, how would my idea use this? Well, I still have that unfinished booklet on the resistor. The concept there was to take one component and explain it to death—a decidedly different approach to technical publishing. I wouldn't sell the book, I would sell the chapters and let you assemble your own book by choosing what you need. I suppose it has been done, but this time it would deliberate. I mean, I know one shitload more about computer commands than I do on resistors, and I only stopped that project when, as has happened before, I finally found it had already been done. However, I’ve read something like twenty times as many heavy duty textbooks on computers.

           And one of the reasons I did not create an eBook is because I could not get a straight and honest answer out of anybody on the Internet. The book I bought was produced by an idiot who tried to wing it and who gives more “advice” on how to write than how to get the book up and selling on the Internet.
           The Canucks are already packing up and leaving. Two this morning. Normally they stay until middle of next month. Not only that, the arrivals each year have an increasingly lean and hungry look to them. The lot can accommodate eight rentals, this year it was never full. The happy times are over. And today you get a collection of random reports, in the order they flashed into my brain or my life.

           My day off, and I’ve got lots to read, and this has nothing to do with my party spirit. I’d like to be out and having fun, but can anyone tell me where? Said “fun” activities in this town are totally dominated by the shallow-minded and money hungry. I’m old enough to remember when you could go tour all kinds of trade and art shows as a lookie-loo and nobody would put the squeeze on you. Today I tried to call up Mechanics Illustrated to get a subscription and it felt like the Inquisition. When they got antsy that I wanted the magazine sent to a different address than on my checks, I hung up. Enough is enough.
           What I’m reading is a detective novel, “Don’t Turn Your Back On the Ocean”. The book explains it, but so will I in case you don’t spot the context. You do not walk along the west coast shoreline at night or alone. Rogue waves have been known to sweep people out to sea, their drowned bodies found washed up weeks later. The undertows along the shallow beaches out there are treacherous bad. I further think they can be quiet killers, as I’ve seen overnight evidence of twenty-foot waves that I must have slept right through.

           This book is in the contemporary made-for movies style. By page fifty, you know what everybody is wearing, who they are related to, what restaurants they eat at, what they order, how it is cooked and by whom, and the origin of all the paintings on the walls. Some sharp author should start writing novels that stress the point of view of somebody besides the cops. I’m not saying the criminal side, but what goes on with the countless unwilling participants of these investigations.

           I’m referring to the people who are never charged or convicted but who have the bad luck to be a witness—in some cases they are outraged and stigmatized for life. You cannot plead the fifth if you are subpoenaed as a witness, but your life can be as equally devastated as the accused. I’ve read how the cops now use the threat of an embarrassing daylight raid on your house if you don’t “cooperate”. And they wonder why they don’t get any respect.
           Even Gibson now makes a cheap guitar. Fred got one in lieu of payment and it’s an Epiphone acoustic. I’d say maybe $150 brand new and he might see $40. It’s been dropped and there is a chunk taken out of the back panel, I mean broken right off and the wood is showing. But the action and tone are unaffected.

           The city has changed the traffic light patterns over on Federal. The lights are now super long, but I will admit when they are green things zip right along. It’s a tacit admission that most traffic is not local bound, something a few other cities nearby may someday figure out. But damn, when the light is red, the traffic backs up nearly the full mile back up the road, making access from any side roads an obstacle. Tough luck if you live there and just need a pack of smokes. That’s Florida, planning for the last war.
           I see AT&T is hiring technicians. I’ll look it up, you know I am still young enough to qualify for yet another pension with that company. Here it is, AT&T, Florida. I’m a trained Combination A, one of the few positions in the company where age is never a barrier. Let’s just say all the phone men you’ve ever seen, in the trucks, down the manhole, or up the pole are Combination B types. A clearer description would be “inside support technician”. Those guys in the field need somebody back at home base who knows what the hell is going on. When you are 28 feet in the air during a hurricane, you don’t want Fat Sally from marketing answering your cry for help with, “So why is it that you feel you need an ambulance?”

ADDENDUM
           Totally concerned with programming. I’ve been digging into the most hidden corners of the language and learning where the limitations are. Those who study program languages will know what that is all about, that not many sources will tell you what is wrong with a language. Because that won’t sell. Yet I find knowing the limits as early as possible helps you avoid dumb mistakes once your programs get longer than seventy or so lines. Why seventy? Experience, that’s why. Complete morons can write short programs, after that it takes brains just to keep organized.
           Forty lines of code already takes you to the intermediate level. By seventy lines, you are starting to get things done and find your working pace. There is only one mitigating factor, and that is the complexity of your lines of code. A C+ programmer would have no problem churning out hundreds of lines of wandering code.

           Here is a closeup of the random dots shown last day, but this time colorized. What I took to be single dots, if you can see this blurry enlargement, seem to be little square of four pixels. None of this was mentioned in the textbooks. I’ve found a number of limitations in Qbasic, the worst of which are limits in the code, not the performance of the machine. I’m saying that code which allows the programmer to take too many shortcuts is not, in my books, a very good invention.
           For example, Qbasic has no breakout command and allows fall-throughs. In a nutshell, for all the hype about good codes having no Go To commands, that command must be present in some form if only to “break out” of a loop. And a fall-through is one of those disgusting C+ operations where more than one condition can be true, for instance the number three is less than five, but it is also less than ten.

           Where a good programmer would hard code the two conditions to be mutually exclusive, the C+ operator would assume the computer will execute the first condition and ignore the second. That is, the code will "fall through" to the next valid command, a huge assumption. Such coders think doing this is clever--until the code needs to be edited or somebody tries to run it on a different computer. Oh yes, there is a predictable pattern to bad programming.
           Qbasic. I got it to run a series of flashing screens using the (by now) familiar random number generator. Lines, boxes, circles, all of varying sizes and colors. I’m now looking at how to animate these shapes, how to get them to move around the screen. My thinking is heavily influenced by a few AI (artificial intelligence) programs I painstakingly key-entered by hand back in the early 80s. That was the only way to get many programs back then. It involved the “fight or flee” scenario I’ve already described often enough. For all the talk of “new” computer languages, they all boil down to a set of around seven instructions.

           Here is a loop I ran with random circles. It is one line of code, repeated 5,000 times. From screen center, a circle is drawn at a random radius in one of 16 colors. I found that all Qbasic lines are a single “dot” wide. A thick line is a combination of thin lines put together. These circles actually look neat when running as the colors waver during execution. Without using the system timer, this exact same pattern would show up every time, as computers cannot generate truly random numbers. Does this look easy? Coding even something this simple requires ample observation and reasoning skill. For example, once the radius reached one margin, the remaining patterns are arcs, not circles. And that is a red herring.
           As my goal is animation, I am seeking to make a “radar” screen. Where a beam from the center rotates around like those radar screens in old movies. Can you guess which approach I will try first? Can you see why it won’t work really well? Hint, the “beam” would slow down to get around the corners. (I found out later the effect is imperceptible, but at least I was thinking, Hector.)