If you ever need a random-number generator for values between 0-100, don’t bother with any of the standard libraries or websites to provide them.
Just look at the weather forecast for Michigan.
Thus I was: by day the heat consumed me and the frost by night, and my sleep fled from my eyes.
Genesis 31:40
Posted in Technical | No Comments »
I set my phone screen to lock so that it won’t rotate. I know people put effort into the fancy sensors and software so the phone can have that feature, but it needs one more enhancement before I’ll use it.
Here is my use case – I’m lying on my side (on a couch, in bed, whatever) and I’m holding the phone. What should the phone do?
Here is the feature as the phone companies tout it (look! the phone screen knows which way is up!):
But here is how it works for me:
As you can see, when I lie on my side, the screen no longer matches me. Now I have to tilt my head awkwardly. Or disable screen rotation so that the phone doesn’t think it is smarter than I am (no, trust me – this is what you want, even though you don’t want it).
My proposal: Use the secondary camera match the screen orientation to the user, not to gravity
The new phones these days have cameras that can see the user. And they have facial recognition algorithms that should be able to know the angle of the person’s head. If the phone is tilted and the user’s head is tilted the same amount and direction, then don’t rotate the screen.
Bryan Logan, make it so.
P.S. – see about a NASA grant, because this technology would also apply to zero-gravity situations when the phone’s sensor can’t tell which way is up.
When they moved, they went in any of their four directions without turning as they went; but they followed in the direction which they faced, without turning as they went.
Ezekiel 10:11
Posted in Technical | 1 Comment »
Warning: Engineering / computer science discussion ahead. Proceed with caution. Actually, it’s not that bad. Non-engineers might also appreciate this post, as long as they are familiar with the 80s.
I was given the assignment at work of providing a summary of RTOS (real-time operating system) differences. We use 3 different types of embedded operating systems in our various modules, and management was looking at another one to meet customer requirements.
For this application, there is a regular RTOS and a safety (or safe) RTOS for critical equipment. (If you are unfamiliar with those options, here are search results for safe RTOS so you can get more details.)
My summary is that a normal RTOS runs the expected tasks in one common environment, whereas the safety OS runs different tasks in different threads so they are isolated from each other memory- and context-wise.
If that’s still not making sense, maybe this will:
You can task if you want to
You can leave your threads behind
Because your threads don’t task
And if they don’t task
Well they’re no threads of mine
Safety
OS
I’m hoping management wants me to present my summary at the next department meeting so I can put that on a slide.
He pursues them, passing on in safety,
By a way he had not been traversing with his feet.
Isaiah 41:3
Posted in Technical | No Comments »
Quick Quiz:
Of what is this a picture?
If you said “a desktop computer from around 2004” you are correct.
If you said “not a Mac” you are also correct.
If you said “Some Guy’s computer” you are also correct.
Thursday night, after all the non-festivities of the day, my wife started the computer but the screen was misbehaving. The picture was choppy and repeated and pixels were not where they should have been. I shut it off and figured I’d look at it the next day.
The next day, there was no picture at all. The monitor told us “No Signal”.
So I replaced the video card. I went from this:
to this:
No, I did not mix up those photos. The desktop computer had a fancy graphics card. I had to add the cooling system (heat sinks! heat-transfer tubes! a fan!) after the card kept resetting during Command & Conquer. That was years ago.
On Saturday, I pulled a video card out of one of my previous computers and plopped that one in the current desktop. Other than having to grab a VGA cable because the old card doesn’t support DVI, I had no problems.
Here’s how the cards compare:
I can’t run CnC anymore, but at least I know what I want for Christmas now.
For the Lord God of hosts has a day of panic, subjugation and confusion
In the valley of vision,
A breaking down of walls
And a crying to the mountain.
Isaiah 22:5
Posted in Technical | 2 Comments »
In case there are students who are struggling in the beginning circuits course, I am providing this little jingle to help you remember stuff.
You should be able to figure out the tune once you start reading.
Verse 1
Ohmic Donald had a circuit.
E-I-E-Diode
And on that circuit he had a …
… resistor!
E-I-E-Diode
With a voltage drop here and a voltage drop there.
Here a drop, there a drop, everywhere a drop-drop.
Ohmic Donald had a circuit.
E-I-E-Diode
Verse 2
Ohmic Donald had a circuit.
E-I-E-Diode
And on that circuit he had a …
… capacitor!
E-I-E-Diode
With a stored charge here and a stored charge there.
Here a charge, there a charge, everywhere a charge-charge.
Ohmic Donald had a circuit.
E-I-E-Diode
Verse 3
Ohmic Donald had a circuit.
E-I-E-Diode
And on that circuit he had a …
… inductor!
E-I-E-Diode
With magnetic flux here and magnetic flux there.
Here a flux, there a flux, everywhere a flux-flux.
Ohmic Donald had a circuit.
E-I-E-Diode
Verse 4
Ohmic Donald had a circuit.
E-I-E-Diode
And on that circuit he had a …
… transistor!
E-I-E-Diode
With a switch-switch here and a switch-switch there.
Here a switch, there a switch, everywhere a switch-switch.
Ohmic Donald had a circuit.
E-I-E-Diode
Any other components that a young student of electronics should know?
And yes, I know that inductors deal more with Faraday’s Law than with Ohm’s Law. If we stuck only with Ohm’s Law, there would not be very many verses.
Its rising is from one end of the heavens,
And its circuit to the other end of them;
And there is nothing hidden from its heat.
Psalm 19:6
Posted in Technical | 1 Comment »
In C, we call functions:
"Hello, is function there?"
If we have something to tell the function, we pass arguments to the functions:
value = GetValue("did not",
"did too");
And if there are many arguments, we will group them and then pass pointers as arguments to the function:
value = GetValue("he did it",
"no, he did it",
"yeah, but he started it");
I don’t like confrontation, so I prefer the term “parameter” instead of “argument”.
“Present your case,” the LORD says. “Bring forward your strong arguments,” The King of Jacob says.
Isaiah 41:21
Posted in Technical | 3 Comments »
In setting up a new page on Social Biblia, I had to provide profile photos for Midianite soldiers.
The Midianites were not exactly friendly people. The image that came to mind when I pictured unfriendly soldiers was the orcs from Warcraft. Not this fancy online World of Warcraft, but its grandfather – the old-school Warcraft II.
Back when games were games and ran on DOS.
Which was a problem because DOS-based games don’t like to run on Windows 7 laptops.
But I’m getting ahead of myself a little – let me rewind a bit.
(more…)
Posted in Technical | 2 Comments »