Wednesday, April 17, 2024

Interrupt Driven: Design and Alternatives

 

     It should not be surprising that there are many aspects of computer architecture which mirror how humans think and behave. Humans designed computers. Humans developed programming. Humans devise algorithms. Is there any way that the patterns of thinking and behavior for people could NOT have influenced the design of computer systems?

     Sometimes, you want to do multiple things "at the same time" or you want multiple programs to run "at the same time". As discussed in my blog on multitasking, this isn't really possible but, on a computer, it is possible to make it LOOK like it is doing multiple things at the same time. The computer can produce this illusion because of how quickly it can follow instructions. The speed at which it changes back and forth between programs is quick enough that humans cannot perceive the difference. It is different with humans -- the swapping of tasks is very noticeable and humans are not as good at it as computers.

     Sometimes it is possible to want to do one thing most of the time but, occasionally, need to do something else. Sometimes that "something else" is only ready to be done at unknown times. Sometimes that "something else" is just of lower priority than your main task but you still want to have it done when possible.

     This latter situation is usually done on computers by means of the operating system (Windows, iOS, Linux, ...) and using priorities of tasks as a criterion for when programs, or tasks, are scheduled to run. In the world of the human, it is an organization matter. It is still most efficient to continue on one task to completion and then change to a different task but it is possible to schedule the tasks to take different amounts of the day. You work on cleaning the house for two hours, then you watch your favorite serial streaming program for an hour, then you resume cleaning the house for another two hours, and so forth.

     The first situation -- where a secondary task is not always ready to be done -- has a couple of primary ways to be handled. One -- you can check on the readiness of the secondary task every once in a while (either at regular intervals or just "whenever you think about it"). This is called "polling". The other is you have some type of indication that interrupts you and tells you that the secondary task is now ready to be done. That is what doorbells are used for. Rather than checking the front door every few minutes to see if someone is present, you expect them to ring the doorbell when they arrive. (If someone arrives, and you are expecting to hear the doorbell, then there may be a long wait if the doorbell is broken or they don't feel comfortable pushing the button.)

     So, when do you do one method and when do you do the other? Polling has the advantage that it is done when you are ready for it (the secondary task may not be ready but you are ready to check). Being ready, you have no additional things to do before you go check the front door. Interrupts (as long as they are reliable to happen) have the advantage in that you go to the secondary task ONLY when it is ready so there is no added inefficiency of checking and having the secondary task not ready.

     Sounds as if interrupts are best? Ah, but there are a couple of problems. First, since an interrupt may arrive when you are NOT ready, you have to quickly do whatever you may need to do to become ready before you attend the secondary task (turn off the heat on your cooktop, put the ice cream back into the freezer, put a bookmark into (or within for an ebook) a book you are reading, and so forth). This is "save and restore" (when you leave to get the secondary task and when you return from the secondary task) and it can be significant overhead for being able to handle the interrupt. Second, sometimes it just is NOT a good time to be interrupted. Ever take a good soaking bath and have the doorbell ring? You can disconnect the doorbell before you enter the bathtub but then you risk missing someone arriving. (In the case of computer systems, you may miss some critical thing that MUST be worked with in a certain amount of time -- thus, you never turn off interrupts within a nuclear power console -- you just become ready to go to the control panel in your bath robe.)

     The decision as to whether you poll or allow an interrupt to trigger a response depends on many factors. One important one is -- how time critical is the second event? Can the secondary event wait five or ten minutes? Perhaps even a half hour? It is important to reduce the heat under a sauce after it is ready but it may allow five or so minutes leeway. But, if a smoke alarm goes off it is very important to check as to what is wrong very quickly -- if only to silence the alarm. A secondary task that is not time critical is a good candidate for polling (checking every once in a while). The smoke alarm generates its own interrupt in the form of an audible sound. Another factor is "how often is this going to occur?" Remember that unexpected interrupts have an overhead, an extra amount of work needed to prepare to handle the interrupt. If the event happens (and is ready) frequently then polling is a good way to monitor it (because the percentage of times you check and it is ready is a high percentage).

     Life will carry on. You will continue to get unexpected interrupts. You will occasionally get back to doing something too late and a pan may burn. But if you understand what is going on and how you can handle it you may be able to organize matters to optimize how you work with those events.

Friday, April 12, 2024

Transitions: A part of life

 

     Transitions occur as part of many aspects of life and business. On a personal level, transitions occur as we grow older and as we accumulate experience and start applying that experience in different ways. For a business, key personnel will come and go, products will be retired and new ones come into being, and events will bring about unforeseen changes -- perhaps very rapid changes.

     We all grow older. We make transitions from newborn to toddler to young child to older child, adolescent, early adulthood, etc. It is certainly possible to separate the phases differently. In some ways, the transitions are continuous. We each age a day per day. But, usually, there is a defining event to indicate a transition. In some cultures, there are specific rituals and customs to mark the occasion of moving from adolescent to young adult, but many have no such thing. The transition may be obvious -- first time walking unaided, for example.

     Although our specific futures are not available for us to know, we can sometimes prepare somewhat. A baby practices the movements, and exercises the muscles, needed to walk. But I am not convinced that we can really prepare for adolescence (when those hormones kick in and changes our moods, interests, and reactions). In the business world, we can prepare for known changes and, perhaps, improve skills and methods that will allow easier adaptation to unforeseen future changes.

     Similar to transition lenses versus bifocals, transitions may be gradual or abrupt. A gradual transition may seem like an easier one but it may lead to a situation when you pass from safety to danger without noticing the change -- it is easier to notice danger when the change is abrupt. Note the old tale of the frog who was put into a pot of cold water which was gradually heated up to a boil. Much situational training concerns being able to make plans quickly, and act upon them, when faced with a difficult (possibly dangerous) situation. This can apply to being charged by a tiger or a necessary supplier going out of business.

     The one thing you cannot do safely during a transition is to ignore it. A change in circumstances (which affect you) means there will be a need for changes in reactions, processes, and attitudes. (Of course, if the change affects only someone else you can still be there to listen or offer assistance.) Although it is not true that an ostrich will hide their head in the sand upon encountering approaching danger, the metaphor is valid. Perhaps the monkey triad of "see no evil", "hear no evil", "speak no evil" is better. It probably depends on the circumstances and the direction from which the transition occurs.

     Internal transitions are, by definition, not visible to others. This makes them hard for others to help. There is an additional difficulty that the person involved with the internal transition may, themself, not be able to properly describe the changes. These are likely to be among the more difficult of transitions.

     How can a person prepare for transitions (whether in personal lives or business)? The foundation element is that of recognizing that circumstances, needs, and goals change -- and can change in a moment. This is much easier for Myers-Briggs types "P" (process oriented) who are inherently not as fixed on a goal. The "J" (judicious) types must learn to be flexible and ready for change. Although Myers-Briggs is directly applicable to humans, some of the same behaviors are true about corporate cultures.

     Other preparations are to know how to determine the components of a change. Much easier said than done, especially with internal transitions. Even external transitions may have important parts of which no one is aware. You cannot know all of the components of a change before the change (though you may know many of them) -- you are wanting to learn how to identify those components.

     Once the components are recognized, it will be time to decide what responses need to be. It is very difficult to do this in advance as there are so many unknowns leading up to most transitions.

     We do know, however, that there will be transitions.

Friday, April 5, 2024

ROI: Methods and Pitfalls

 

     When at the company I co-founded (TeleSoft International), we had a lot of the components of success, but missed a number of crucial ones -- which eventually led to a dwindling and a slow death of the company. But one area that we did recognize (but likely did not do as well as needed) was that we needed to focus our limited resources where we had the best potential for income. This is the area that is called "Return on Investment" (which, I am sure, most of you already know) or ROI. The area of Investment includes labor, capital, goodwill, time, existing equipment, and (I'm sure) other aspects. Return on investment often is listed as a number -- the amount of income generated by use of all of the resources invested. But, in reality, income is not the only return that can be generated. "Goodwill" -- or a positive image and, perhaps, some later assistance -- is a completely valid return worth an investment.

     The first aspect of attempting to determine ROI (which is an art rather than a science, no matter what people may want to believe) is to adequately determine resources. How many people are available? What are their experience levels? What are their particular expertises? What can they do better than the average person at another company? How much money is easily available and for how long could it last before replenishment of capital is needed? Are there any areas (sales, marketing, distribution, quality control, testing, engineering, ...) that are not sufficiently staffed? If not, are there plans to get them staffed?

     Are processes in place to allow for growth? Can you handle a tripling of orders in a week or two? Can you survive success? If your growth curve started to become geometric rather than mildly linear, would you be screaming with success or with panic?

     Once resources are well known, you have the capability of comparing potential products against the amount of potential gain versus the amount of resources needed. It is not sufficient to just read about product notices and other industry press. Much of that is information trying to convince you that the products and services are important and needed. You need to know just what is being USED and what is in real upcoming budgets to be purchased. If you have access to huge unused resources then you can afford to take risks approaching potential market niches opening up. Most companies do not have such.

     So, you must focus on what is and what is being planned for. You need to be able to analyze other companies sales status and be able to actively network with people in other companies to exchange non-proprietary information that indicates direction of spending and growth. This was the primary area in which my company failed -- those in charge of gathering information did not like to go to conferences and other networking activities. The news from the ivory tower of publications and announcements were the primary indicators -- and they often were only wishful.

     You have your known resources and you have targets of development and expansion that can bring back revenue. Now you have to match them. Why should your company be working in this area? Does your expertise give you a learning curve advantage to allow you to take the lead in the market? Will people obviously turn to you with the expectation that you can provide what they need or do they need to be convinced? The former is definitely the preferred path. You must establish priorities. What resources need to be committed to what, and for how long? How do you determine a dead path -- when you should stop and devote your resources to other projects that still seem viable?

     You know your resources. You know what you would like to produce. You know what best matches between your resources and desired products. Now go to it.

     

Thursday, March 28, 2024

Biases and Prejudices: There is a difference

 

     It is always difficult to choose people on a jury. Every potential juror has a history, education, and daily life which influences their attitude towards everything. And this set of experiences varies from person to person. Show a person a red rubber ball and one person will smile, thinking about enjoyable times in the playground. Another person might grimace and say "get that thing out of here" because, for them, that ball is a reminder of being pelted in dodgeball in gym class and going home with circular welts on the body. Same red rubber ball, very different reactions.

     Considering that each person likely has a different perspective and history what are they to do in a court? First, of course, is whether the person has any direct knowledge of the people or events in the case. In such cases, they might be prospective witnesses but they should not be members of a jury. The prosecutor is going to want to find people who will come back with a verdict in their favor and the defense attorney is going to want to find people who will come back in their favor.

     This is a problem because everyone will have biases. A bias is a feeling towards something, a first impression and reaction towards something. But it is only the first feeling -- it may change as things happen or they learn more. A child is initially scared of a vacuum cleaner because it makes so much loud noise. As they get used to the noise and watch what is done with it, they may start to appreciate it when the floor becomes cleaner and the air fresher. It might go the other way and they may dislike it even more as they get older and they are given the task of being the person to push the vacuum cleaner from room to room. But show them a vacuum cleaner and make it clear that it is not there for them to use and they will be okay with its presence.

     A prejudice is what the word breaks down into -- a "pre" "judgement". You have made a firm reaction, or decision, with no direct interaction with the current situation or information around the event. Prejudices could conceivably be about a thing or a cause but the word is predominantly used about groups of people. A lot of people have prejudices about athletes. Some think that, because the athletes have better-than-average physical abilities, they must not have intellectual abilities. Even if given test scores, awards, and well-testified examples, the best outcome with a person with such a prejudice is that "that person must be an exception".

     So, in the case of a potential juror, everyone has biases. If they favor short people then, if possible, they will be glad to support short people. But, if they are given evidence that this particular short person has done something bad, they will not support them. Or vice versa, they don't like people who dress as if they are wealthy, but when the evidence indicates that this particular suited individual has not done any harm, then they will support them and their position.

     If a potential juror has prejudices then they will support, or oppose, no matter what the current circumstance or evidence. Whereas, with biases, they are open (perhaps not eagerly open) to being presented with evidence that will lead to a verdict either direction. The prosecution would love to have people prejudicial in favor of guilty and the defense would love to have people prejudicial in favor of not guilty. Each will try to eliminate jurors prejudiced in the other side's favor. Biases are less important but each would like people biased in their direction -- it would mean less effort to convince.

     The "fairest" trial would have all the jurors without prejudices or biases -- working to make a judgement solely on the evidence presented. But all people have a history so awareness is our best hope.

Friday, March 22, 2024

We Are All Influencers

 

     A couple of years ago, I wrote a blog on the effect of influencers within our society. All that is still actively happening but I started "taking a step back" to recognize that we are ALL influencers.

     To influence is to be noticed. You might be seen, heard, sensed, or noticed through the effects of your actions. Influence can be positive or negative -- though for remembering a name on a ballot, it seems that just the "name recognition" is the most important and whether that person is known for behaving well or poorly is of secondary importance. Positive influence generally encourages positive behavior on the part of the observer. We want to be like them and we want to be acknowledged as such. Negative influence is not as clear. Observation of someone, in a position of influence, doing negative behaviors may be interpreted as permission for the observer to do similar negative behaviors.

     A great teacher can help self-motivate a student for the rest of their educational ladder. A rotten teacher can knock them out of a groove -- but a good one, or great one, can put them back on their path. In all cases, the idea is to help the person internalize the feelings that occur when someone external acts as an inspiration or cheerleader. That person may be family, a friend of the family, a teacher, or a respected friend but the process is to lay the foundations to become our OWN inspiration and cheerleader.

     Most of the time, we do not know when we are being influencers. There are some, of course, who are deliberately trying to influence. But much of the most important influences upon our lives come from those who are just living their lives -- doing the best (or worst) that they see to do.

     A "foundation" of mores and behaviors is created in our very early years. A strong foundation is internalized quite early and can support the person throughout their lives. This foundation gives them strength to choose among later influences that will help mold their growth. But, in many different circumstances, the foundation may not get a chance to develop -- or for the person to internalize a set of values that can sustain them through the challenges of life.

     To the best of my knowledge and awareness, every person (unless raised in complete isolation) -- in the process of growing up -- is surrounded by a peer group and, as themselves, are a peer to others. Depending on the strength of their early foundation, the peer group can have a greater, or lesser, ability to impress upon someone growing up. Joining a gang can be choosing a specific peer group. based on perceived values, when a person's foundation is weak or absent.

     The purpose of a leader is to guide, inspire, and support. If they work hard, and we feel acknowledged and supported, then we work hard. If they are not seen/heard/known to do significant work, then their influence can become unimportant or even negative. If they are extremely highly paid and work only moderately then it does not inspire, and motivate, as it does when recompense is aligned with amount of work.

     Inspiration by leaders lets us have a reachable goal for our efforts --- having a poor example does not inspire our best efforts. It gives us a feeling that our efforts are not worthwhile. Working more than others and earning less than those people is not encouraging.

     The effect of influencing is not always such a "weighty" matter. A smile may be passed from one person to another -- lightening the heart of each that encounters it. A cheerful "hello" may mean much to someone -- even if their immediate reaction is to growl back at you.

     We are all influencers. We often do not know when we are influencing others. It is thus important to continue to strive to do our best and be the best example of which we are currently able to be. (And forgive ourselves when that "best for the moment" does not meet our standards.)

     

Wednesday, March 13, 2024

Herstory: part of the rest of history

 

     "Her story" is a supplement of the traditional "his story" or history. It is a matter of restoring what is missing.

     "History is written by the winners". There are a lot of excellent articles, and blogs, available about how history is there to be learned from -- or ignoring history means to repeat it -- or other related topics about the importance of history in making decisions for the present to prepare for the future. An excellent topic and I may write about it some day. But this is not that blog.

     In order to chronicle every single event that occurs in all of our lifetimes, it would be necessary to double the amount of time available. We would spend one half of the time documenting the other half. Although many of our various global national security agencies monitor (legally or illegally) and document our conversations, messages, program watching habits, books checked out, and so forth, they have neither the time nor the resources to examine all of them. They use algorithms to narrow down what they look at (accurately or not, relevant or not). One gains privacy only by being totally uninteresting.

     The point of the previous paragraph is that any history that is written will be incomplete. History is written by the winners is an accurate split of accounts of war. Winners write the primary histories and their "side" will be uplifted and the opposition downgraded. Commanding officers will be given the largest portion of credit (or blame) while the many ordinary fighting (and dying) soldiers may not even get a name on their grave.

     If an extraterrestrial alien obtained one of our history books, they would get a very sad view as much of history in textbooks are concerned with battles and war. Alas, there is rarely a period of time when a war is NOT going on so there is plenty of material. But what about all of those people who are NOT at war, who are living on a regular, day-to-day, basis? Very hard to find in the history textbooks. They just weren't "important enough" to keep track of.

     Emphasis on wars and battles from the viewpoint of the "winners". Concentration on the political, economic, and military elite. There is so much of life that is left unwritten in the typical history textbook.

     And this is while we make the (rarely true) assumption that history, that has succeeded in being written down, does accurately reflects that small slice of life being recorded. History has the danger of being rewritten at all times. Sometimes deliberately to hide what people would prefer to not be remembered. Sometimes accidentally through destruction of records and witnesses. But in all cases, due to the incompleteness of the histories, so much is not recorded that one can only see the rest of life in the shadows of those of whom the light is shone upon.

     So, what gets eliminated the most often? The poor, the non-dominant ethnic and religious groups, and the very existent but denigrated segments of population. Archaeologists are thrilled to come up with exciting old sarcophagi with jewels or the burial chambers of ancient rulers because those are the finds that generate sufficient excitement to obtain funding for further excavations. But historians are even more excited when evidence of, and material pertaining to, the excluded people are found. These masses -- composing the overwhelming majority of the population -- are the ones who really make life continue and, yet, so little is known about them from different ages and societies.

     The fact that history books, and classes, are incomplete (of necessity and of deliberation) is the reason why excluded segments work hard to get supplemental materials added to school and college curriculum and included as a part of our general knowledge of our history. In the case of the often excluded roles, actions, and events concerning women, such additions are sometimes called "herstory". These concentrate on "her story" rather than "his story". There are books, and classes, that concentrate on other denigrated segments such as the First Nation people within the US, Ainu in Japan, aborigines in Australia, and so forth all over the world, the many waves of immigrants into the US, and so forth.

     If one looks at these supplemental works, and courses, it is easy to say "these are not accurate" -- because they are, like mainstream history texts, incomplete. Because their focus is different from the mainstream histories which are widely available throughout the population, these supplemental materials can make people uncomfortable when they are presented with information of which they had been uninformed. Often there is a reaction to suppress this information which as been neglected over the years -- but this does not make that neglected information false.

     History is written by the winners about those people, and events, that those in power deem important. But there is so very much more to life than just that.

Thursday, March 7, 2024

Apathy: The Greatest Ally to Entropy

 

     Once upon a time (about 50 years ago), I was allowed to give a speech in front of my high school graduation class upon Commencement. Searching though my experiences (all of 17 whole years), I wanted to come up with a topic that, in my opinion, affected life the most. I decided upon the issue of apathy. I had been a letter writer to the local newspaper about wildlife issues and other issues made me believe that proactive behavior was the only way to make changes.

     I think I bored 90%, or more, of the audience. They probably don't even remember the talk. Kind of a peculiar situation where the reaction was evidence for the theme. The saddest thing, however, is that (assuming I could find the speech) I could give the same speech today without varying much of anything.

     So, what is apathy and why is it so important? It can take on a couple of different faces but each one is a matter of watching events continue on their course without trying to affect the direction, goals, or results. The stereotypical profile of apathy is sitting back on a couch eating a bowl of popcorn, and drinking a soda, and watching a television game show while your neighbors float down the street riding a mattress that has been washed out from their house during a flood that is going on. Just cannot be bothered or -- as our daughter might say -- "whatever".

     Apathy can exist within the business world as well as the personal world. If all you do is what you are told then it is possible you really are a "replaceable cog" in the machinery. To fight apathy, and entropy, you must be heard and make a difference. "Yes people" need not apply. Of course, especially within a business environment, it takes multiple people to be able to change. If your manager is not open to input then the only thing your words can do is to bore them or anger them. I had a manager who claimed to be fully open to input but had a "stream of consciousness" form of telling the staff what was going on and there was no opportunity, no break in the stream of words, to give input. In order to give input, one would need to take notes so they could be responded to -- out of context -- once the speech was completed.

     Note that apathy can also exist while being a participant. It is possible to be an active part of a group of people, a "movement", a political party, or event and still be apathetic because your existence is just a matter of another head. You nod "yes" to everything that is said or done without any reflection, research, or giving any input of your own. Acceptance, and following, without knowledge and awareness is yet another form of apathy. It is an apathy "in disguise" as you are swirling around in the midst of a series of rapids -- within the heart of a group of movement -- but not working with an oar or making any difference in the fate of the trip. Even on a roller coaster, if you are not contributing, then you still are just part of the environment.

    Entropy has a number of different definitions but one is that of a "general decline into disorder". This certainly happens in my son's bedroom. It gets cleaned up and then, over a period of days or weeks, one more sock hits the floor and, at the end, the floor is findable only with a shovel. Most of life works that way -- the leaves fall from the trees and cover the ground, dust coats the furniture and eventually is able to provide soil for new plants to grow.

     Apathy just leaves entropy alone. Only by challenging apathy does change happen and, for at least the time you are active, disorder gets moved back to some type of order. Challenging apathy? That's hard, as the first paragraph of this blog indicated. But there are ways...

Interrupt Driven: Design and Alternatives

       It should not be surprising that there are many aspects of computer architecture which mirror how humans think and behave. Humans des...