Sunday, January 12, 2014

An Engineer's Guide to Cats 2.0...

An Engineer's Guide to Cats 2.0...  Awesome!  Via my lovely bride...

Blast from the past...

Blast from the past...  Reader and friend Simon M. passes along this video of a news report from 1981, talking about the wonders of online news reading.

I don't recall ever seeing this particular news report, but it could have been about me: I was reading the news online in 1981, for the first time.  At that time, I was a big user of CompuServe, the then-giant of the online world (this considerably predates the Internet).

Back then, we connected to CompuServe through a 300 baud modem, faster than the 110 baud acoustic coupled modems shown in this video.  We also connected to privately-run, free “bulletin board services” (BBS), and on those we could connect as fast as 700 baud using a proprietary modem from a now-defunct company with a memorable name: Potomac Micro Magic Inc., or PMMI for short (image at left).  Their modems were S-100 boards crammed with discrete components, marvels of electronics ingenuity for their time.  I was amazed to find that the manual for that ancient thing is available online, and reading through it brought that board right back to life for me, along with some of the norms for the day.  Back then, we had to use FCC-registered “couplers” to legally connect a modem to the phone line; that was a hangover from the fully regulated telephone lines of just a few years earlier, when it was illegal to connect anything to the phone lines unless you bought it from AT&T.  Then I had to laugh at the extensive programming examples in the manual – in several flavors of Basic, and in 8080 assembly language.  What a different world back then!

Geek: some ARM cleverness for immediate operands...

Geek: some ARM cleverness for immediate operands...  I'm currently reading a lot on computer instruction sets, as I have a goal of building a computer from component parts.  I've chosen a simple architecture for my machine, based on my reading over the past few months: a 32 bit RISC machine.  The ARM family is good example of a successful RISC design, so I've been looking at it.  I'd never written ARM assembly language before, so the entire thing is new to me.  Yesterday I ran across this discussion of ARM's 12 bit immediate operand encoding, an ingenious approach to maximally exploiting those 12 measly bits.

If you're familiar with immediate values from other machine's instruction sets, you know that generally speaking they are simply constant values with a bit length shorter than the computer's word length (if the processor has fixed word lengths, as ARM does) or equal to the computer's word length (if the processor has variable instruction length, as the x86 does).  There are quite a few machines with variable-length instruction sets that implement both variations of immediate values.

The ARM, though, does something that is unique, so far as I'm aware: rather than use simple constant values, its 12 bit immediate value is divided into two fields: a 4 bit rotation specifier and an 8 bit integer.  The rotation specifier is internally multiplied by two, then used as a rotate right operand, with the result being 32 bits long.  For example, the immediate value 0x345 becomes 0x45 rotate right 6 = 0x14000001.  This mechanism allows that 12 bit immediate to encode quite a few values within a 32 bit space, including every possible single bit value – a very useful capability indeed, and without the need for a special bit level instruction.

Very clever, ARM folks!

PS.  The site linked above has a very nice interactive demonstrator for the ARM immediate value encoding...

California leads the way...

California leads the way ... to the abolition of private property.  What am I babbling about?  SB1 has been approved by both the California assembly and senate – it needs only the Moonbeam's signature to become law.  A careful read of the bill's text reveals something quite disturbing: the creation of a mechanism by which any private property could be defined as blight, and therefore subject to government taking under the doctrine of eminent domain.

More detailed analysis here, here, and especially here.  It's scary stuff.  We are so glad that we've already decided to leave this loony bin!

Overheard...

Overheard...  Yesterday Debbie and I stopped for lunch at a local institution (who is blameless, and therefore shall not be dragged into this).  As we tucked into our sandwiches, a pair of girls came in and sat at a table adjacent to us.  They looked to me to be in their 20s, but from subsequent overheard conversation it was clear they were high school seniors (and, we hope, younger than 20).  Shortly thereafter, a pair of boys came in and sat at a table adjacent to both us and the two girls.  From overheard conversation, it became clear that the two boys were also seniors, in the same high school as the two girls – all parties knew each other well.

One of the girls was trying very hard to keep a conversation going between the four of them.  She'd ask leading questions, obviously hoping to draw the boys into a conversation.  Considering her age, I thought she was actually quite skilled at this, and I was half-listening to the chatter mostly to admire both her skill and her persistence.  Then she asked the one question that sticks in my mind (well, actually, it's the answer that sticks).  She said, to one of the boys:
Hey, are you going to get a job after you graduate?
To which he replied:
No, I can get more money from unemployment.
Oh, my.  That's just wrong on multiple levels!

I have no idea what this boy's previous employment experience was, but if I'm reading the California eligibility requirements correctly, he'd have to have been employed within the past 12 months to be eligible for unemployment insurance (UI) at all.  However, I'm not at all confident that I'm reading them correctly (they are complex and poorly written), nor am I confident that our state government is smart enough to enforce such a requirement.

Then there's the question of the amount of money paid by UI.  Surely it's not equal even to minimum wage?  According to the previously linked document, the maximum UI rate is $450 per week (or $11.25 per hour for a 40 hour week).  Elsewhere I see that California's current minimum wage is $8/hour.  So yes, it is possible to make more money through UI than through full time employment at minimum wage.

So was this boy's assertion accurate?  I can't say for certain, but it does appear that it is possible that he was correct.  If so, that is just wrong – it makes no sense at all for any UI scheme to provide the perverse incentive of making UI more lucrative than a job.

Then there's the question of the boy's attitude, his moral stance: why does he think it's acceptable to make a choice like that?  Not only acceptable in a minimalist way, either – but acceptable enough that he was willing to proclaim it in a public setting, to a girl he obviously thought well of.  I find that quite shocking, a measure of just how far our society's fabric has torn in the period of my life.  My high school peers would have thought that choosing to go on UI instead of getting a job was shameful.  So shameful that they would have gone out of their way to keep that choice private and secret.  Making such a choice public would have had a severe stigma attached to it, a public shaming that nobody would have wanted to endure.  Contrast that with this boy's straightforward reckoning that choosing to go on the dole was more lucrative than a job, and therefore would be his choice.  From the chatter subsequent to his announcement of his choice, there didn't appear to be any shame attached to it by any of the four youths.  It was the logical, rational thing to do...

I sure hope that what I overheard yesterday was an aberration.  If it was not – if it's really an accurate reflection of our young people's attitudes – then I am much less hopeful about my country's future...