Today’s Activity

Sometimes it’s not about the computer, management, analysis, or much of anything else.

Posted in Life | Tagged | Leave a comment

Update

A while ago I wrote about a museum exhibit featuring a large number of creative, custom-made iron implements that were displayed in a little museum in northwestern Montana. Today, as I’m circumnavigating much of North America, I went hundreds of miles out of my way to get a picture.

When I got there, in the picturesque hamlet of Troy, the museum turned out to be closed. I went over to the hardware store next door, asked when the museum was supposed to be open (Friday through Monday, today is Wednesday….), and told them my story. The very nice lady called over to city hall (possibly an over-glamorized title for a town of 957), and told me someone would come over and open it up for me. A very nice gentleman did come by and open it up for me, giving a few other passersby a chance to get inside as well, and what did I find?

The museum was laid out somewhat as I remembered it, complete with a second room oriented about as I remembered, which was, in fact, filled with various tools and farm implements, but this was totally not the right museum. I took some pictures (I’ll post a couple when I have time), thanked my host profusely, made a generous donation, and headed across the street for a lunch that included huckleberry ice cream.

Now, either my memory, ten years removed, is faulty, the implements were in the caboose displayed out back (with a lovely new paint job, I might add), or they are in a completely different museum. All of the implements I saw in this museum were quite comprehensible and seemingly ordinary.

If I succeed in locating the display I’m thinking of via Google or the dim recesses of my brain I’ll be sure to let you know. In the meantime you can be assured that I’m willing to go out of my way to accomplish a mission I’m passionate about.

Posted in Life | Tagged , , | Leave a comment

On Process Discovery, Domain Knowledge Acquisition, and Subject Matter Expert Interviews

This is a weird but true story … A complaint was received by the Pontiac Division of General Motors:

This is the second time I have written you, and I don’t blame you for not answering me, because I kind of sounded crazy, but it is a fact that we have a tradition in our family of ice cream for dessert after dinner each night. But the kind of ice cream varies so, every night, after we’ve eaten, the whole family votes on which kind of ice cream we should have and I drive down to the store to get it.

It’s also a fact that I recently purchased a new Pontiac and since then my trips to the store have created a problem. You see, every time I buy vanilla ice cream, when I start back from the store my car won’t start. If I get any other kind of ice cream, the car starts just fine.

I want you to know I’m serious about this question, no matter how silly it sounds: ‘What is there about a Pontiac that makes it not start when I get vanilla ice cream, and easy to start whenever I get any other kind?'”

The Pontiac President was understandably skeptical about the letter, but sent an engineer to check it out anyway. The latter was surprised to be greeted by a successful, obviously well educated man in a fine neighborhood. He had arranged to meet the man just after dinner time, so the two hopped into the car and drove to the ice cream store. It was vanilla ice cream that night and, sure enough, after they came back to the car, it wouldn’t start.

The engineer returned for three more nights. The first night, the man got chocolate. The car started. The second night, he got strawberry. The car started. The third night he ordered vanilla. The car failed to start.

Now the engineer, being a logical man, refused to believe that this man’s car was allergic to vanilla ice cream. He arranged, therefore, to continue his visits for as long as it took to solve the problem. And toward this end he began to take notes: he jotted down all sorts of data, time of day, type of gas used, time to drive back and forth, etc. In a short time, he had a clue: The man took less time to buy vanilla than any other flavor. Why? The answer was in the layout of the store.

Vanilla, being the most popular flavor, was in a separate case at the front of the store for quick pickup. All the other flavors were kept in the back of the store at a different counter where it took considerably longer to find the flavor and get checked out. Now the question for the engineer was why the car wouldn’t start when it took less time.

Once time became the problem — not the vanilla ice cream — the engineer quickly came up with the answer: vapor lock. It was happening every night, but the extra time taken to get the other flavors allowed the engine to cool down sufficiently to start. When the man got vanilla, the engine was still too hot for the vapor lock to dissipate.

Moral of the story: even insane-looking problems are sometimes real.

This classic story has been floating around for years. There are many reasons why a process analyst may be called to work with a customer. First, the customer may already know what the problem is, but they don’t know how to solve it. Next, the customer may know there’s a problem but they don’t know what the problem is. In this case they’ll want help identifying it. Sometimes the customer doesn’t have a problem at all, per se, but simply wants to improve the way they do things, either in terms of quality or volume of output. In other cases the customer doesn’t have a specific problem but their process needs to be documented, quantified, simulated, or something else, possibly as part of a larger program.

While process analysts do want to bring their skills, intelligence, experience, and tools with them to learn about customers’ problems so they can work on solving them, and while they can apply numerous formal and ad hoc techniques to analyze those problems, the process always begins and ends with listening to the customer.

In all of these cases you have to listen carefully. Even if you have your own expertise in a field the customer will know more about their specific processes, issues, conditions, and contexts than you will. It’s up to you to learn as much about that background as you can. The more you respect the customer, the more you ask them questions, the more you show interest and appreciation for what they do, the more information and cooperation you will get. That applies to managers, subject matter experts (SMEs) you may interview, line personnel, and every other person you encounter. The principles described in Dale Carnegie’s How to Win Friends and Influence People may seem cliché at this point but they aren’t. (Nor are they cliché when dealing with family, friends, salespeople, colleagues, or anyone else, but that’s a different conversation.) The purpose is never to beat people over the head trying to demonstrate how smart you are, but to learn as much as you can so they’ll get their problems solved, you’ll get paid, and everyone will be happier. Besides, they’re much more likely to recognize your brilliance when you actually solve their problem. That’s a lot easier if you get cooperation by concentrating on other people and their needs. A lot of people, including Harry Browne have included similar observations and advice in their own works.

I’ve worked in all of these contexts and probably some others. I’ve definitely done the wrong thing at times, especially when I was starting out, but when I’ve been able to listen carefully I’ve been able to achieve my ends much more effectively. These days I’m consciously trying to improve my awareness of these principles so I can not only solve communication issues, but try to prevent them in the first place. That is, I’m applying my best analytic skills to an area that is a critical — and pervasive — problem all its own. I’ll leave you with another story, this one guaranteed to be true, that shows some of the possible confusion, even if everyone is on their best behavior. The problem is hard enough. Imagine how hard it becomes when people aren’t on their best behavior.

Many years ago my uncle, a retired Coast Guard officer, was explaining how to open a petcock valve to drain water from the fuel line of a small outboard motor. He told me to turn the valve clockwise to open it which for some reason inspired me to ask whether the direction was based on looking down at it or up at it. He thought for a moment and observed, “ships have been lost for that reason.”

Posted in Life | Tagged , , , | Leave a comment

Reproducing A Clever Animation Product, Part 26

I got the basics of the fountain effect working. I defined forty elements, gave them random characteristics in a loop, set a delay of 1.5 seconds from the end of the previous animation element, then set the forty elements to begin flying on a 1.45 second setback following by a jump back 1.5 seconds. This has the effect of launching a new element every 0.05 seconds (twenty per second) for two seconds, with the elements all clearing after a further 1.5 seconds minus.

It could probably be tweaked a hair, but I hope you’ll agree that this is a respectable emulation of the effect shown on the Greensock home page. Again, I have no idea whether I’ve done this the same way they did, but it works well enough.

Here is the initialization code. The handle006 element was already in place, but I added a clear instruction with a 1.5 second delay, as described above.

I’ll work on looping back at a later date, since I’m currently doing a very long road trip to clear my mind before coming back home to get back at it. Please feel free to contact me as I’m traveling.

Posted in Tools and methods | Tagged , , | Leave a comment

Reproducing A Clever Animation Product, Part 25

I sat down to add in the mods that would allow me to reproduce the fountain effect I’ve described, building on yesterday’s work, and immediately identified some issues. Those will have to be sorted out before proceeding.

The animation capability I’ve built up so far is based on pre-calculating the full state of every object for every time step. With that in mind, here are a few questions and thoughts that occur to me:

  • Should the objects be created by hand or automatically?
  • The motions and appearance of the objects should be slightly randomized (implicitly if elements are created by hand, explicitly if elements are created automatically).
  • Should all elements be created and used once or should elements be recycled?
  • If elements are recycled, how automated should the process be for doing so?
  • It’s probably desirable to have a continuous rate of object creation, and ideally one that would distribute evenly over the sixtieths of seconds taken for each animation step.
  • What if the goal is not an effect that lasts for a fixed duration, but one that can run continuously?
  • It would be a simple enough matter to set the clock back to create a continuous effect, but how can the jump back be made so that the effect appears continuous?
  • Doing that seems to require a large number of elements (say, twenty per second for some number of seconds) with a jump back defined between identical states (or identical plus one animation step).
  • Each time an element is recycled it should follow the same path as it did before.
  • Each element is currently visible for just under two seconds. If we want about twenty elements visible at a time that changes the creation rate to about ten per second.
  • The point to jump back to is one where the full complement of elements is visible, so that has to be a least two seconds into the animation.
  • The animation would have to run at least a further two seconds to get to a point where it can replicate the original state.
  • In theory, therefore, the whole thing could possibly be pulled off with as few as twenty elements.
  • How could a meta-time be specified that would allow the loop to run for a longer but finite duration, skip the jump backwards, allow all the elements to disappear from the viewing window, and allow a new animation to start?
  • Should the meta-time be specified in terms of time (e.g., seconds) or number of repeats?
  • If the number of repeats is used to govern the process, how does that affect the placement in time of subsequent events, if any?
  • Looking at the example that I’m emulating again, I see that the elements appear to stay on screen for only about one second each rather than two. That means that elements should be created at the rate of about twenty per second instead of ten and the loop may only need to be half as long.

I could probably go on, but this line of thinking suggests at least an initial course of action, which I’ll pursue going forward.

Posted in Tools and methods | Tagged , , | Leave a comment

Reproducing A Clever Animation Product, Part 24

Today I added a new effect and applied it to a top tween that makes up the latest addition to the animation. The effect is based on this equation from the first class you take in physics:

x = xo + vot + at2/2

where:

x = location
xo = initial location
vo = initial velocity
a = acceleration (due to gravity in this example)
t = time (in animation steps)

Note that when working in screen coordinates, positive numbers increase going down. Here’s the code I added to the processEffect function.

I had to tune the values for the initial velocity and acceleration so the path of the moving element covered most of the designated screen area and most of the designated time. It should be possible to invert the equation so that the extents of the desired path and time span are specified and the values for initial velocity and acceleration are back calculated to achieve the desired results.

Here’s how the effect is defined by the user. I added a simultaneous sideways motion to make the text look a bit like a projectile (think of a cannonball). I initialized the affected element to start just below the bottom of the demo window and the element finished somewhere below the bottom of the demo window as well. If I put a bunch of these together in the right way I can replicate the fountain-like effect on the Greensock home page (it starts at about the halfway mark).

Posted in Tools and methods | Tagged , , | Leave a comment

Reproducing A Clever Animation Product, Part 23

Today I changed the form of specifying a tween effect. It was originally specified as a string (e.g., “linear” or “vibrate_right”) but now it is defined as an object literal. The first member field of the object has to be effect and its value specifies the effect to be used. If the effect requires additional parameters then those may also be provided within the object literal, but defaults are provided for all values so they aren’t strictly necessary.

Here is the code for the processEffect function I described yesterday. As noted in the comments it’s kind of annoying to have to peel the effect description objects apart every time this routine is called, but that can be improved later by creating some external state variables. Whether you as a developer would want to pursue that course of action is a matter of taste. Do you want more speed or to use less memory?

Now that this is in place it can (theoretically) be used to modify a wide variety of tweens. The code for each type of modification need only be written once.

Here’s the animation with a new block showing that the vibrate effect works as intended. There are a lot more twists I could put on this thing but the basics are working for now.

Posted in Tools and methods | Tagged , , | Leave a comment

Reproducing A Clever Animation Product, Part 22

I want to make the handling of the mMethod parameter in the bcDefineWhateverTween function more flexible and modular. As you can see in the code below, the parsing of the different types of methods or applied effects has to be handled in every tween definition. Even worse, the code all has to be peeled apart and processed in every individual case.

Therefore, I’m going to try to define a wrapper function that takes the mMethod parameter, and the values for pStart, pEnd, alpha, omega, and i, and return the desired output value for that animation step. I think we’re giving up the need to peel apart the mMethod during every call in order to get a more streamlined expression where the animation step values are assigned and the ability to have to only use a single copy of the code in all tweens.

Note that this approach is expected to work for numeric tweens. It is not necessary for tweens that merely change state in a single step (like the display CSS parameter). This approach may or may not prove troublesome for other types of tweens.

I’m thinking the new version of the bcDefineWhateverTween function should look like this:

Note that in the first example, in the code as it currently exists, that the left parameter is incremented in the linear case and set absolutely in the vibrate_right case. We therefore have to come up with a consistent treatment for generating results with the proposed processEffect function. I believe it will be preferable to generate the result in a form that can be used in an absolute assignment.

Posted in Tools and methods | Tagged , , | Leave a comment

Reproducing A Clever Animation Product, Part 21

The last subject I wanted to explore was animation effects, which is to say defining tweens that proceed from beginning to end in a fashion that is other than linear, which is the default I’ve been using to this point. The tweens are defined using the addTransformToList function, as shown in multiple instances below.

If, instead of defining a linear tween, we wanted to define one that behaved differently, we’d have to provide an alternate string or object literal. The information would have to include as many parameters as required to govern the desired effect. Here’s one I did for an animation on one of my intro pages; it simply specifies a string and the details are hard-coded in the tween function (in this case a bcDefineLeftTween function).

The idea is that the element would start in a given spot, get kicked to the right by some specified amplitude, vibrate back to the original position in a sine wave pattern, with a vibration having a specified period, and with a specified decay (during which the vibration gets smaller and smaller). I used parameters to govern the amplitude (the 100.0, in pixels), period (the 0.3, modifying the cumulative angle), and decay (the (omega-i) / (omega-alpha) term) so I might define an object literal of the form:

If I wanted the vibrate starting to the left I would just change the sign of the last term in the first line of the relevant block like this:

This would make the tween start in the original location but as the quantity i – alpha began to increase the cosine value would first go negative instead of positive.

The tween definitions here aren’t bad but we’d certainly want to implement something more modular. We wouldn’t want to have to embed all that specialized code in each function that defines a tween, we’d probably want to use a functional parameter that gets its parameters set in one place, then is called in the tween function using a standard-looking interface that takes only the alpha, omega, and i values as inputs. Any other method would involve too much duplication of code.

If you are wondering, this is implemented in the Greensock product in a very powerful way. They’ve created a page which lets you see how it all works in detail, here. As I’ve stated before, the folks who’ve created this product have done such a nice job with it, and their licensing terms are so easy, that it would be crazy to try to reverse-engineer or duplicate the whole thing.

One type of effect I do want to create involves simulating gravity, so that when you give an element an initial velocity moving upward, a downward velocity increment is added during every animation step. Combined with a modest leftward or rightward movement, an object can be made to “fly” in a natural-looking arc. A bunch of objects animated together in this way could be made to look like a fountain of sorts. See here (the effect starts about halfway through the title animation) for the inspiration for this exercise, which will begin next week.

Posted in Tools and methods | Tagged , , | Leave a comment

Reproducing A Clever Animation Product, Part 20

Today I added the capability of adding a rotation tween, which I applied to a fourth element at the end of the previous animation. The tween definition is here:

Here’s the code added to handle rotations in the addTransformToList function. The only interesting bit is ensuring the default starting value is properly initialized.

Here are the initializations for the elements and animations.

The animation works as expected.

Posted in Tools and methods | Tagged , , | Leave a comment