One More Learning Curve….Before I Sleep

rickard

I left the United States Navy in October of 1979 to begin a working career as a civilian. In the Navy, “computers” were rather simple devices made up of NAND gates and AND gates and OR gates, each of which occupied a chip, and some “core” memory – literally magnetic cores with two wires bisecting them that would store 1 bit per core. https://appsto.re/us/qSJNeb.i

If you couldn’t make it in analog signal processing, you could always troubleshoot “computers” because they were so simple to troubleshoot and repair. Everything was a 1 or a 0. A beeper probe would tell you which it was now on any pin of any chip. And so the lesser lights tended to wind up working on “computers” and we heroes devoted our time to operational amplifiers and signal processing, the ultimate being of course radar.

So we referred to the computer guys as “queens” and were rather dismissive of them.

But on leaving the canoe club, I found something interesting afoot – the home or “personal” computer. Kind of a new concept at the time. I ordered a “kit” from a guy named Clive Sinclair in the UK, soldered it together, and I have been waiting for something to load, something to save, or something to print ever since.

Along the way, a lot of learning curves. BASIC programming. Z80 Assembly language. C. Wordstar. Photoshop. Ventura Publisher. Quark Express.

Each new environment promised two things. An essentially impossible learning curve with poor or no documentation, and truly amazing things if you could master it – or even become basically non-incompetent in its use. Word processors. Spreadsheets. Databases. Programming languages. Each opened astounding worlds where productivity at some human activity was improved two orders of magnitude.

For a writer, word processors were miracles. They just altered the entire process of creating text for other humanoids to read. This ONE invention was so astounding, it could reduce a roomful of 300 technical writers to a small group of 20 over the course of two or three years. It enabled communication in writing to a far more astounding degree than Guttenburg’s clumsy little printing press.

But the cost was high. Rodney Zak’s book “Z80 Assembley” was over 1000 pages. I remember sitting there at 2:00 AM one morning with this thing in front of me and saying “I’m never going to get this. It’s just impossible. It is beyond me….” The despair and sour taste of utter failure in my mouth was an enormously bitter thing to face at a tender age of little confidence anyway, A wall too high, A mountain too steep. A bridge too far.

Of course four days later I’m cranking out 200 lines an hour, loading registers and saving registers, and doing arithmetic shifts left and right. At the end of two weeks I think I’ve invented the language. And a couple weeks after I’m looking at someone else’s code thinking “How can they think like that. This is the stupidest thing I’ve ever seen.”

Windoze took some learning. It just wasn’t right not to have C:\ in front of you. Leaving it gratefully behind a decade later, Linux just seemed impossible. Mac OSX IS a mess.

Along the way, at 24 the learning curve is pretty exciting because you yearn so much for the rewards. And they are not insubstantial. I call it transparency. At the point where you don’t really see the keyboard, don’t think about the keystrokes but simply pour the text on the screen entirely oblivious to what you are doing mechanically, you have achieved transparency. The tool literally DISAPPEARS and at the point the creative process is enormously empowered by the technology.

But at this point there have been a LOT of word processors come and go – each with their own learning curve. Wang. Wordstar. Word Perfect. Microsoft Word.

The same with page layout programs. Ventura Publisher let you simply place images and boxes on a screen and “pour” the text in around them. It was a miracle. Adobe Pagemaker more so. Quark Express, even better. Now I could pour DATABASES into page layout programs.

BUT at some point, you get a little jaded. In starting EVTV, I knew what I wanted to do an why I wanted to do it that way. In 2009, nobody could WATCH videos online – a tiny tiny fraction of those already online and cruising the web could download a video at all. HD video? Fahgitaboutit.

But it was as clear as a new dawn to me. Younger people didn’t read anymore. They watched TV. And video would subsume the world wide web to the point that text would simply be plate decoration, nearly pointers, to video.

And so I embarked on kind of triple simultaneous learning curves using Canon Vixia video cameras, Apple and then Amazon cloud storage, and worst of all Final Cut Pro. And at the point where my FIRST stumbling efforts were starting to pay off, Apple upgraded it to Final Cut Pro X. It was all COMPLETELY DIFFERENT.
film cliches
These were steep learning curves for a guy then in his fifties. But believe it or not, they have become reasonably TRANSPARENT tools for me now. I can “make video” really from a few scraps of raw video now in an hour or so. I can stack clips one on top of another and size them and add titles and do cross fades and scene transitions and adjust color and audio so quickly I can barely follow the steps I’m using to do it. I’m just grabbing scraps of video and images and sound from various places and weaving it together into a cloth.

But at some point, you just look at a new empowering technology and the prospect of ONE MORE learning curve just makes your knees weaken and your stomach churn in rebellion. Do I really want the gain badly enough to pay the price? Could I talk someone into doing it for me? Couldn’t just ONE cup pass these lips??? I really HAVE been waiting for something to load, something to save, or something to print since 1979….

As I may have mentioned, we recently came across some kind of new developments in a protocol for wireless data transmission called Bluetooth Low Energy. It is somewhat a case of less being more. Instead of a big negotiation and argument across the ether as a prelude to doing ANYTHING, you kind of decide on specifically WHAT information is crucial, and pass it in miniscule 23 byte packets, and then only when something changes and it matters. The two ends do all the work and have to know what to do about it. It is not a protocol for passing images or video or any kind of large stream of data. It’s more about how LITTLE can I get away with passing, how quickly can I pass it, and what can I get away with here.

Picture logging onto the Internet, and instead of entering a search term and getting 20,000 results, and then slogging through nine of those to find ALMOST what you were looking for, you didn’t ask any questions at all, and it passed you three 32-bit integers, and that was all the answers you needed for the next six weeks…. But the three integers would only be useful if you were under six foot tall, over 300 pounds, and had lost an ear.

Nordic’s nRF chip, and Adafruit’s Bluefruit LE Friend module, provide the bridge between Arduino and other embedded devices that actually do things in the world, and the Apple iPhone.

By extension all mobile devices.

We don’t need displays anymore. We already have them. We don’t need remotes and controllers. We already have a phone. The high resolution touch screen display that MADE smart phones seem so smart, have progressed every year to the point that they have outpaced all other displays except for the big-screen television.

And we always have it with us. It’s already in your pocket.

So for me, the gain is huge. But to face the learning curve of programming iOS 9.3 in XCode 7.3.3 using Swift 3.whatever at age 61 is just one more looming enormous mountain before me. I would rather give myself an enema with a corkscrew as they say. Or was that a root canal… Somezheimers….

I actually hired some programmers in India that pleaded that they were accomplished iOS programmers with deep experience in Bluetooth already and could do it in a month. I thought, ok, I’ll pay them to do an application, and then I’ll have the source code and can learn from looking at that.

10 weeks later, their efforts are gorgeous, but completely crash the phone anytime it encounters a Bluetooth characteristic they didn’t foresee. And along the way, I’ve had to actually write iOS code to debug BLE transmissions to learn how the newer descriptors work by inserting a brazillian print statements and just mulishly repeating the process over and over again. Then send them the code to put in the program they were supposed to write for me so I could learn to do this….

At this writing, I’ve pretty much given up on BLEGauges ever coming to pass. As I haven’t paid 60% of it and they haven’t delivered any of it that worked, I got away cheap.

But the point ever was to develop a diagnostics tool so you could SEE what the data you thought you were encoding in Arduino using the Nordic module actually shows up like at the phone end. John Shier of CocoaHeads had done a video showing how to list peripherals and services on iOS. So starting with that, I clubbed myself in the head for a month to get the characteristics, properties, and presentation descriptors I wanted going IN one end on the GEVCU and coming OUT the other end on the phone. And of course entering data on the phone end, that came out on the GEVCU end to control things.

IMG_0473

But it WAS ugly. Apple uses Objective C. It derived from one of the early object oriented efforts titled SmallTalk and it actually was developed for Steve Jobs NeXT computer platform – a Berkeley Standard Distribution (BSD) Unix variant.

There are two things I have a strong preference for in programming languages. The first is the object oriented model. You create code segments that can be accessed through just a couple or three methods or variables. Other code doesn’t need to see inside it or know how it does it. And so code can be written in very modular form and re-used a lot for a lot of different things. The objects kind of become extensions to the language. You just use them.

The second element is interrupt service routines. Real time programming is often really quite necessary, and it generally is the type of thing that will drive most people to lunacy and eventually they hang themselves. The way out of this, is interrupts. You let the world sort itself out timewise, and any time it interrupts your program, you don’t care. You write a program to take care of it. It interrupts your main program, which saves its state to the stack, and goes directly to another program you wrote to take car of that. When it finishes, the second program ends, your program fetches its state off the stack, and continues where it was. YOU don’t have to know WHEN it happened, how often it happened, or if it intends to happen again. And you don’t need to make any allowances for it in your program. You just write an interrupt service routine that does the minimum you can get away with to handle that interrupt situation.

Collin Kidder’s DUE_CAN library for Arduino Due is a superlative example of this. You set “filters” for different CAN message IDs and provide the name of the interrupt service routine you have written for EACH of those message IDs. The CAN hardware monitors the CAN bus, and IF it receives a message with an ID of interest, it processes it and passes the data on to the program along with a hardware interrupt. The CAN “frame” is passed directly to the routine, which does whatever we need to process that particular message, and then ends. There is NOTHING in the main program to deal with it at all.

IMG_0474

And so programmatically, you write one program (method) for each message ID of interest, and do with the data what you will. It “happens” when it happens. You don’t know. You don’t care.

Objective C has both of these features. It is object oriented and interrupt driven. They call it a “protocol” and interrupt service routines are called “delegates” and I think the whole concept now has become “callbacks”. All that loose terminology muddies a pretty simple concept – interrupts. We “interrupt this program to bring you this National Weather Service Center Alert…” And when we are done, “We return you to your regularly scheduled programming….” So to speak.

So I should LOVE Objective C.

I recently sold a DC-3 aircraft with a cockpit panel so full of gages and dials and switches and knobs, 99% of them having nothing to do with flying the plane, that I used to tell people that every pilot who had ever flown it had brought his own favorite switch or dial and demanded that it be installed before he flew it.

I don’t love Objective C. It looks like the cockpit of that DC-3. Impossibly bloated, convoluted, and wordy. I could type the encyclopedia Brittanica in the number of characters it requires to say “Hello World…”

None of it is at all simple or apparent. EVERYTHING is of a stilted nonsense syntax that never makes any apparent sense at all. And Apple has had so many people doing so much “improvement” to it over the years that it is just impossible.

So what they do to overcome this is Xcode 7. Xcode has a code completion function where anytime you touch the keyboard, a list of 60 things you might be trying to say pops up on the screen. You select one, and then it prompts you to fill in the required variable data to make that work. And that’s how people program it. They know the first couple of characters of what they are trying to do, and Xcode completes every thought with SOMETHING.

This is a recipe for disastrous code. Let’s play 20 questions and include ALL the guesses in the answer. Bound to cover something.

Acknowledging that they may have hit a wall with Objective-C, Apple has announced a solution – Swift. Swift is a code wrapper for Objective-C.

It allows you to be even more vaguely wordy about what it is supposed to be, and it really calls Objective-C routines to do that.

What a vainglorious mess. And to muck it up beyond ALL belief, they take Visual Basic’s concept of filling out a form with lots of little checkboxes defining what an object is really supposed to do, in a visual “storyboard” and graciously allowing you to access that in your code if you can just figure out how.

I suppose it is all for the good. It does improve your productivity. You have no control over anything, but you don’t have to write much code to do a lot- of something.

It makes Z80 assembly language look very clean, and very simple.

Despite actually feeling “slimed” by this particular learning curve, BLE is perfect for “callbacks” and “delegates”. You call a Bluetooth routine to “scan for peripherals” and you’re done. Then you provide a delegate to handle peripheral data if it finds any. It calls it if and when it finds any. Same with services. The same with Characteristics. And oddly it does the same with charactistic Descriptors as if they were somehow different from charateristics.

So you use what you discover in your delegates to call for more scanning, which uses more delegates, in kind of a cascading waterfall fashion with no clue whether any of it will produce anything.

You collect anything it does produce in some ordered piles, and then use those in your program.

IMG_0475

The thing that is killing my Indian programmers, and me as well except I’m so cynical at this point in life that it doesn’t actually surprise or bother me, is that Swift has extended the concept of a variable to allow for it not to every contain anything.
Rather than using 0 to represent nothing, they have invented their own nothing they call “nil”. And they make specific use of this to ALLOW variables to contain nothing or NIL. Then, if you ever attempt to “unwrap” a variable that DOES contain NIL, it fatally crashes the program. Why they would go to all this trouble to replace the 0, instead crashing the program, is a little beyond me.

So if you have a variable, that might or might not ever have anything in it, from some delegates that might or might not ever be called, you can be certain that if you open it and none of that happened, you fatally end the program…..kewelle.

I’m sure iOS programmers will go berserk at my unschooled description of their favorite environment. But I found it most distasteful after facing many many learning curves in the past. It is icky.

BLE Basics attempts to reduce all this to the minimal basics – while still handling a number of aspects of BLE 4.0 characteristics that just aren’t very commonly handled. We could find NO app that would actually deal with presentation descriptors, reliably let you subscribe to notifications and indications, and write data to simple WRITE type characteristics. Apple Developers guides DO mention them, but almost no information on how to deal with them or what they are for. You were supposed to read the 2000 pages of bluetooth.org specifications.

IMG_0476

And to try to kick the can down the street a bit, we’ve published this on my git repositories as open source code. https.//github.com/jrickard/BLEBasics/
I’m kind of hopeful that in doing so, others can pick this up a little more quickly and with less effort than I did.

Indeed, wrriting BLE programs shouldn’t be nearly as difficult as this program makes it. We’re looking for ALL the peripherals, ALL the services, and ALL the characteristics, and ALL the descriptors. We have to be able to handle them all.

In writing a useful BLE app, you will normally be looking for a SPECIFIC peripheral, a SPECIFIC service, and a SPECIFIC characteristic, and you will already have a pretty good idea what is in it, because you either have the description of all that from the manufacturer of the device (ie Texas Instruments SensorTag) or more likely your own Arduino/RaspberryPi/Beaglebone device with the Adafruit Nordic BLE module and your own code on that end as well.

Fox News Sunday was of course on this morning while I was trying to put this video together. Guess what the topic was? Donald J. Trump. I am fascinated by Trump, but most impressed with his ability to actually change the media, who actively hate him with enthusiasm and have abandoned all objectivity to mind control the population into voting for Hillerary the Clintonite. But Trump has managed to subvert it into being a 24 hour Trump news ALL CHANNELS. You can skip randomly through cable channels and at every stop it is Trump Trump Trump Trump Trump Trump Trump Trump. It never ends – 24×7 since June of 2015. Hillerary can’t get a word in edge-wise. Which is excellent because her voice is kind of like the old fingernails on the chalkboard thing.

Trust me, and this is HUGE, Hillerary cannot ever be elected President of the United States. TRUMP COULD CONCEDE and she still would not be elected. For two very serious reasons.

1. She reminds far too many men of their first wife.

2. She reminds far too many women – of their husband’s first wife.

But it strikes me that the media is on a constant quest for Trump’s “policies” and ideology on topics such as health care and immigration. They really only want these specifics so they will have something to distort, criticize, and morph into a Hillerary victory. I have explained they CANNOT HAVE ONE. It isn’t Trump. It’s Hillerary that is the problem.

But the inherent problem here is that Trump doesn’t have policies and ideologies. In fact, I think he rather eschews them as a virtue. In business, you don’t want to get too wed to your own bullshit. And so with every mission taken on, you kind of gather the smart people, gather the info, reach a decision, issue it, and follow up. It’s a process. And it must be frustrating for him to have people constantly asking how it came out, when he hasn’t been in the chair doing it yet. He hasn’t STARTED the process. He’s kind of vaguely defined the mission, which is to a great degree the job of leader. “Here’s what we want as an outcome…let’s work backwards from there. Who has some ideas?”

It’s actually a very good leadership technique and he has obviously done well with it. In this election cycle he has actually brought attention to a number of issues that were not predicted to be the important ones for this election. Immigration, terrorism, and globalism – all seemed largely ahead of their time when he first started talking about them. So as a VERY capable leader, he has early and often sensed the wind and located the important elements of a success in the future. Now they want to know what he is going to DO about them.

He doesn’t really understand the question. He’s going to DO what he always does. Handle it. He’ll gather the people, gather the info, shepherd them toward concensus, and then if push comes to shove, issue the final marching orders – for good or ill.

I’m onboard. And I think enough people are onboard that he will be elected President. Hillerary has a fractious coalition of minorities and LGBTQ and everything else probably to swamp the boat. But they are not going to show up in November. They will be so discouraged by her truly trashy and probably criminal behaviour, that they will till death continue to support her, but they ain’t standing in line to do it on a Tuesday. They’ll be with her in spirit….

A couple of examples.

During the primaries, we had 17 candidates all magpies on a wire over Obamacare and how each of them was MORE vociferous in their opposition to this despicable hateful piece of legislation. They chanted, they sang, they carried on something awful. It was never mentioned that OBamacare doesn’t need to be repealed in that it will inevitably fall to the ground in a great crash from its own ridiculous weight, probably before anyone is elected. But they are all chanting about how much they oppose it and how quickly they will repeal it with a wave of their hand. Trumps kind of standing up there looking big and looking blond and one of the moderators finally queried him. Oh yeah he was going to repeal it. It was going to be SO repealed. Trust me. It’ll be HUGE how repealed Obamacare is going to be. And then some others chanted in that it was just awful how all these people who couldn’t afford health care were getting it now at the expense of good Americans. And so in a follow up Trump was asked what he was going to do with all those who couldn’t afford insurance and so they were unable to go to the hospital and get emergency care. What? He didn’t know there was anysuch somebody.

Oh, EVERYBODY is going to get health care. We’ll see to it they get treated. No we’re not going to have any impoverished sick people unable to get health care. We’ll do something for them. We’re going to look at that.

A hush falls over the stage. Nobody even wants to take Trump on on this one. But they’re whispering among themselves – “Isn’t that what Obamacare is???”

More recent example is immigration. What will you do about the 12 million illegal immigrants who are here already? “Well they broke the law” Trump says. “They have to go. They have to be deported…”

“Twelve million of them?”

“Well yes. They broke the law. They have to go.”

IMG_0477

“Well what about the ones that have been here 20 years, worked hard, raised their kids, who are born here and are mostly grown now? Are you going to deport grandma?”

“Well no. There are some good people among them. There are really some GREAT people among them. And we’re going to find a way to work with those….”

“What do you mean work with them? You’re not going to deport them?”

“Well not the good ones. We’ll find a way to work with them so they can stay. They WILL have to pay their taxes of course. But we’ll work something out….”

Trump had never thought much about the “good” ones. He has identified immigration as a political hot button and a real problem. But he doesn’t OWN an actual ideology about this. He really has nothing against Mexicans. Nor against people who don’t have health care. Indeed, he and Bernie would have probably done well as running mates.

I’m not saying this to be critical of him. He just isn’t very heavily invested in any particular ideology or answer. Indeed, he would see this as a sign of weakness as a leader. You’ve already put your thumb on the scale and cannot think outside the box and optimize the approach our the outcome by having too many preconcieved ideas based on too few opinions and too little information. That’s the way he thinks. We’ll deal with that. As a priority. I promise you….It’ll be HUGE.

I can buy all that. I understand that most of his supposed “misspeaks” have been very effective tools to stay the ONLY topic of conversation for 14 months now. I think he would be a great leader.

But at this time, probably not the right president. No Hillerary, who is already disqualified as I said and a non-factor in the election, would be a disaster for the United States of America. But it’s never going to happen.

Gary Johnson of the Libertarian Party was on Fox News this morning.

Now hear me out. What’s wrong with Trump as President?

First, we have had 8 years with a Congress that just hated Obama and was going to work against him no matter what. So he’s been able to do nothing, making him one of the better Presidents we’ve had. He hasn’t hurt TOO much.

So we elect Trump. Now we have a Congress that almost half of them hate HIM and indeed a number of the Republicans don’t really like him either. What’s going to get done in the next eight years. I like the nothing answer. But I think the media and the democrats would make it a pretty miserable eight years pouncing on everything that comes out of his mouth, and everything that doesn’t get through Congress that probably should have.

What if we elected Gary Johnson. A libertarian. It is no secret that I DO have an ideology and that it is pronouncedly Libertarian. But I’m not of the Libertarian Party because aside from Ron Paul, they have been to a man a bunch of silly twits.

True Libertarians don’t BELONG to parties. Occasionally we host them. But we don’t belong to any. Too much power structure and authority. So the only ones who JOIN the Libertarian party, are by definition not LIbertarians at all, or they wouldn’t put up with all that party shit. Leaving us with a bunch of silly twit poseurs who THINK they are Libertarians.

But Gary Johnson was talking some interesting stuff this morning. Abolishing both the IRS and the income tax. Doing away with departments Homeland Security, NSA, Commerce, Education, HUD, and more. Relegating Marijuana laws, education, etc. to the individual states. Absolutely getting out of foreign intervention. Welcoming ALL the Mexicans. Free trade. I’m starting to feel the Bern again…. I like these ideas. Out of the box. Effective. Massive decrease in government spending. Massive increase in business activity. Millions of jobs. Hmmmm…..

So how can this happen? Well, you need 270 electoral votes to get the Presidency. Johnson/Weld are polling maybe 10% and 16% in a couple of states. So what happens if NEITHER Trump NOR Hillerary gets 270?

It goes to the House of Representatives. Talk about three monkeys trying to f**k a football on a wax tile floor – THAT would be a Texas Goat Rodeo.

The Republicans have a majority – EVEN if they lose the House. The CURRENT House would decide the election. But a lot of Republicans don’t like Trump. But NONE of them want Hillerary. She reminds most of them of their first wife….

And what would Democrats settle for? Well, Johnson ISN’T after all a true Republican. Fiscally conservative, but socially liberal. He would be better than Trump.

And from the Republican side – hell of a lot better than Hillerary.

And if he got it – what gets done gets done from consensus, not partisanship.

I already got burned once – that is how Bill Clinton got elected. Ross Perot got 19,750,000 popular votes, but NO electoral votes. But it all came out of George Bush and Clinton won.

It was the reason Kasich stayed in the Republican Primary, hoping that Trump and his little buddy would neither get the number and he would be the consolation prize. It didn’t happen either.

So it just isn’t possible…

But I have to tell you this has some attraction….

6 thoughts on “One More Learning Curve….Before I Sleep”

  1. I do not consider Johnson a Libertarian, sadly. What’s this he said about forcing inoculations/vaccinations. That’s just one comment off him.

    As for Trumpism… IF he forgave all the whistleblowers for upsetting the Fascists in control, seeing as no innocents were hurt. I would trust him. in fact I might just get to like him. I doubt I ever will.

    Killary for Prison. She is an out and out liar. Multiple murderer. Possibly too unhealthy for the job. Proven useless in office. Her “charity” is all about lining her power base.

    .
    I love the idea of one’s phone or tablet unlocking, activating the vehicle and providing all the goodness like speedo, maps, music, however,
    wouldn’t consider the iphone the tool for the job when so many cheaper and far more common android devices are available with so many popular programming languages with a broader acceptance of bluetooth devices.

    1. Way ahead of you there sparky. Android support is happening. You will be able to use any standard android phone or tablet that supports BLE. Android added BLE support back around 4.3 so a device newer than about 1.5 to 2 years old should work. But, it’s always a good idea to explore multiple options and see how things go. Technically I’m working on a cross platform option that should eventually cross over to iOS as well so if you want to use an $800 iPad as your dash you can.

    2. Apple iPHone: 800 lb gorilla
      Apple iPad: 400 lb gorilla
      Android Tablet: 100 lb gorilla
      Android Phone: 33 lb monkey

      That’s the pecking order of the universe. Merits argued or not.

      It is possible that for our purposes, the Android Tablet offers better value and utility for vehicle display purposes ultimately.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Verified by MonsterInsights