Tuesday, December 11, 2012

Would you like a slice of Raspberry Pi ?


A friend on Facebook commented on one of his friend’s posting that showed a picture of the Raspberry Pi. My friend asked, “What is it?” Why, it’s a Raspberry Pi, my friend. A computer!
What can you do with Raspberry Pi? That’s the new $35 computer about the size of a credit card. It’s easy to understand why people were skeptical of the Raspberry Pi when it was first announced. A credit card-sized computer for $35 seemed like a pipe dream. Which is why, when it started shipping, the Raspberry Pi created a frenzy of excitement.
Demand outstripped supply for months and the waitlists for these mini computers were very long. Besides the price, what is it about the Raspberry Pi that tests the patience of this hardware-hungry mass of people? Before we get into everything that makes the Raspberry Pi so great, let’s talk about its intended audience.
Eben Upton and his colleagues at the University of Cambridge noticed that today’s students applying to study computer science don’t have the skills that they did in the 1990′s. They attribute this to -- among other factors -- the “rise of the home PC and games console to replace the Amigas, BBC Micros, Spectrum ZX and Commodore 64 machines that people of an earlier generation learned to program on.” Since the computer has become important for every member of the household, it may also discourage younger members from tinkering around and possibly putting such a critical tool out of commission for the family. But recently mobile phone and tablet processors have become less expensive while getting more powerful, clearing the path for the Raspberry Pi’s leap into the world of ultra-cheap-yet-serviceable computer boards. As the founder of Linux, Linus Torvalds, said in an interview with BBC News, Raspberry Pi makes it possible to “afford failure.”
When I was a small boy … don’t know, around 1957 I would say … I was ten-years-old or so … my grandparents got me the greatest geek gift ever … or at least that was available at that time. It was some kind of science kit that came in the mail every month for four or six months. In each little cardboard box was a set of “stuff” and instructions to make all kinds of different science projects. One month you got a bunch of cardboard tubes painted black and some lenses. You could put them together and make a telescope or a microscope or combine them with a metal box and a light bulb from an earlier kit and make a projector. There was even a dark filter that turned the projector into a black light. That was an experience I repeated again about ten years later with posters and paint … but I digress.
So each month I would wait, somewhat impatiently, for the mailman to arrive with my treasure box … that was before UPS. I would spend the next several weeks building the experimental stuff and combining and rebuilding all the wonderful gadgets and gizmos in the giant, road-map-like, fold out instruction manual. It reinforced my love of science and built the foundation for later experiments and projects based on Popular Electronics articles and other build-it-yourself adventures. There is no doubt that this contributed to exactly where I find myself today.
Even after learning electronics in the Navy and attending college studying engineering, I still was learning from kits. This time it was a Motorola 6800 microprocessor experimentation kit I got from Heathkit. That was where I sharpened my machine language skills. Just as Ham Radio Operators used to start with Morse Code so they understood the basics, and I would construct 100 milliwatt radio transmitters and connect them to window screens to operate in CW around the world, so my computer adventures started with the bare metal and the lowest level language.
Makes me wonder if today’s tinkerers using high level languages on powerful desktop and portable computers are getting the same experience. Like modern drivers who don’t know how to “drive a stick,” are they missing some of the fundamentals of the underlying machine insulated from their experience by interpreters and high level languages? What are they missing?
 It may not be the low level machine language experience that is lacking, but just the fun of “hacking hardware.” I don’t see many people of any age tearing their nice MacBook Pro or HP desktop apart to experiment with interfaces, drivers, and other hardware phenomenon. The Raspberry Pi returns you to that simple world of yester-year when you could hold bare circuit boards in your hand and solder and plug parts to make new things out of old parts. 
 
One of the great things about the Raspberry Pi is that there’s no single way to use it. Whether you just want to watch videos and surf the web, or you want to hack, learn, and make with the board, the Raspberry Pi is a flexible platform for fun, utility, and experimentation. Here are just a few of the different ways you can use a Raspberry Pi:
General purpose computing
It’s important to remember that the Raspberry Pi is a computer and you can, in fact, use it as one. After you get it up and running, you can choose to have it boot into a graphical desktop environment with a web browser, which is a lot of what we use computers for these days. It comes with a simple version of Linux, and you can load other operating systems onto the computer. Going beyond the web, you can install a wide variety of free software, such as the LibreOffice productivity suite for working with documents and spreadsheets when you don’t have an Internet connection.
Learning to program
Since the Raspberry Pi is meant as an educational tool to encourage kids to experiment with computers, it comes preloaded with interpreters and compilers for many different programming languages. For the beginner, there’s Scratch, a graphical programming language from MIT. If you’re eager to jump into writing code, the Python programming language is a great way to get started. I know experienced programmers at IBM that have spoken about “learning Python when they get a chance.” And you’re not limited to only Scratch and Python. You can write programs for your Raspberry Pi in many different programming languages like C, Ruby, Java, and Perl.
Project platform
The Raspberry Pi differentiates itself from a regular computer not only in its price and size, but also because of its ability to integrate with electronics projects. You can use the Raspberry Pi to control LEDs and AC devices and learn how to read the state of buttons and switches. The “Pi” has standard USB and Ethernet connections as well as other hardware interfaces to match most every port in a modern computer.
But wait, there’s more.
Media center
Since the Raspberry Pi has both HDMI and composite video outputs, it’s easy to connect to televisions. It also has enough processing power to play full screen video in high definition. To leverage these capabilities, contributors to the free and open source media player, XMBC, have ported their project to the Raspberry Pi. XBMC can play many different media formats and its interface is designed with large buttons and text so that it can be easily controlled from the couch. XBMC makes the Raspberry Pi a fully customizable home entertainment center component.
“Bare metal” computer hacking
Most people who write computer programs write code that runs within an operating system, such as Windows, Mac OS, or -- in the case of Raspberry Pi -- Linux. But what if you could write code that runs directly on the processor without the need for an operating system? You could even write your own operating system from scratch if you were so inclined. The University of Cambridge’s Computer Laboratory has published a free online course which walks you through the process of writing your own OS using assembly code. Now we’re really getting “down.”
Your typical computer is running an operating system, such as Windows, OS X, or Linux. It’s what starts up when you turn your computer on and it provides your applications access to hardware functions of your computer. For instance, if you’re writing a application that accesses the Internet, you can use the operating system’s functions to do so. You don’t need to understand and write code for every single type of Ethernet or WiFi hardware out there.
Like any other computer, the Raspberry Pi also uses an operating system and the “stock” OS is a flavor of Linux called Raspbian. Linux is a great match for Raspberry Pi because it’s free and open source. On one hand, it keeps the price of the platform low, and on the other, it makes it more hackable. And you’re not limited to just Raspbian, as there are many different flavors, or distributions, of Linux that you can load onto the Raspberry Pi. There are even a few non-Linux OS options available out there. The standard Raspbian distribution is available from Raspberry Pi’s download page: http://www.raspberrypi.org/downloads.
The core of the Pi is its microprocessor … the real brains of the outfit. At the heart of the Raspberry Pi is the same processor you would have found in the iPhone 3G and the Kindle 2, so you can think of the capabilities of the Raspberry Pi as comparable to those powerful little devices. This chip is a 32 bit, 700 MHz System on a Chip, which is built on the ARM11 architecture. ARM chips come in a variety of architectures with different cores configured to provide different capabilities at different price points. The Model B has 512MB of RAM and the Model A has 256 MB.
 I mentioned some of the other ports and connections:
 The Secure Digital (SD) Card slot. You’ll notice there’s no hard drive on the Pi; everything is stored on an SD Card. One reason you’ll want some sort of protective case sooner than later is that the solder joints on the SD socket may fail if the SD card is accidentally bent.
 The USB port. On the Model B there are two USB 2.0 ports, but only one on the Model A. Some of the early Raspberry Pi boards were limited in the amount of current that they could provide. Some USB devices can draw up 500mA. The original Pi board supported 100mA or so, but the newer revisions are up to the full USB 2.0 spec. In any case, it is probably not a good idea to charge your cell phone with the Pi. You can use a powered external hub if you have a peripheral that needs more power.
Ethernet port. The model B has a standard RJ45 Ethernet port. The Model A does not, but can be connected to a wired network by a USB Ethernet adapter (the port on the Model B is actually an onboard USB to Ethernet adapter). WiFi connectivity via a USB dongle is another option.
HDMI connector. The HDMI port provides digital video and audio output. 14 different video resolutions are supported, and the HDMI signal can be converted to DVI (used by many monitors), composite (analog video signal usually carried over a yellow RCA connector), or SCART (a European standard for connecting audio-visual equipment) with external adapters.
Status LEDs. The Pi has five indicator LEDs that provide visual feedback. ACT (green) – Lights when the SD card is accessed. PWR (red) Indicates connection to 3.3 v power. FDX (green) – On if network adapter is in full duplex. LNK (green) – Network activity light. 100 (yellow) – On if the network connection is 100 Mbps.
Analog Audio output. This is a standard 3.5mm mini analog audio jack, intended to drive high impedance loads (like amplified speakers). Headphones or unpowered speakers won’t sound very good; in fact, the quality of the analog output is much less than the HDMI audio output you’d get by connecting to a TV over HDMI. Some of this has to do with the audio driver software, which is still evolving.
Composite video out. This is a standard RCA-type jack that provides composite NTSC or PAL video signals. This video format is extremely low-resolution compared to HDMI. If you have a HDMI television or monitor, use it rather than a composite television.
Power input. On of the first things you’ll realize is that there is no power switch on the Pi. This microUSB connector is used to supply power (this isn’t an additional USB port; it’s only for power). MicroUSB was selected because the connector is cheap USB power supplies are easy to find.
General Purpose Input and Output (GPIO) and other pins. You can use these pins to read buttons and switches and control actuators like LEDs, relays, or motors.
The Display Serial Interface (DSI) connector. This connector accepts a 15 pin flat ribbon cable that can be used to communicate with a LCD or OLED display screen.
The Camera Serial Interface (CSI) connector. This port allows a camera module to be connected directly to the board.
P2 and P3 headers. These two rows of headers are the JTAG testing headers for the Broadcom chip and the LAN9512 networking chip. Because of the proprietary nature of the Broadcom chipset, these headers probably won’t be of much use to you.
You will need a few accessories to get the Pi fully operational.
A power supply. This is the most important peripheral to get right; you should use a microUSB adapter that can provide 5V and at least 700mA of current (500mA for the Model A). A cell phone charger won’t cut it, even if it has the correct connector. A typical cell phone charger only provides 400mA of current or less, but check the rating marked on the back. An underpowered Pi may still seem to work but will be flaky and may fail unpredictably.
With the current version of the Pi board, it is possible to power the Pi from a USB hub that feeds power. However, there isn’t much protection circuitry so it may not be the best idea to power it over the USB ports. This is especially true if you’re going to be doing electronics prototyping where you may accidentally create shorts that may draw a lot of current.
An SD Card. You’ll need at least 4GB, and it should be a Class 4 card. Class 4 cards are capable of transferring at least 4MB/sec. Some of the earlier Raspberry Pi boards had problems with Class 6 or higher cards, which are capable of faster speeds but are less stable. A microSD card in an adapter is perfectly usable as well.
An HDMI cable. If you’re connecting to a monitor you’ll need this, or an appropriate adapter for a DVI monitor. You can also run the Pi headless (no monitor).
A Powered USB Hub. A USB 2.0 hub is recommended.
Heatsink. A heatsink is a small piece of metal, usually with fins to create a lot of surface area to dissipate heat efficiently. Heatsinks can be attached to chips that get hot. The Pi’s chipset was designed for mobile applications, so a heatsink isn’t necessary most of the time. However, there are cases where you may want to run the Pi at higher speeds, or crunch numbers over an extended period and the chip may heat up a bit. Some people have reported that the network chip can get warm as well.
Real Time Clock. You may want to add a Real Time Clock chip (like the DS1307) for logging or keeping time when offline.
Camera module. An official 5 megapixel Raspberry Pi camera module will be available in early 2013. Until then you can use a USB web cam.
LCD display. Many LCDs can be used via a few connections on the GPIO header. LCDs that use the DSI interface will be available in 2013.
WiFi USB dongle. Many WiFi USB dongles work with the Pi; look for one that doesn’t draw too much power.
Laptop dock. Several people have modified laptop docks intended for cell phones (like the Atrix lapdock) to work as a display/base for the Raspberry Pi.
You’ll quickly find that you’ll want a case for your Raspberry Pi. The stiff cables on all sides make it hard to keep flat, and some of the components like the SD card slot can be mechanically damaged even through normal use.
The Pi contains six layers of conductive traces connecting various components, unlike a lot of simple microcontroller PCBs that just have traces on the top and the bottom. There are four layers of thin traces sandwiched in between the top and bottom; if the board gets flexed too much you can break some of those traces in a manner that is impossible to debug. The solution: get a case.
There are a bunch of pre-made cases available, but there are also a lot of case designs available to download and fabricate on a laser cutter or 3D printer. In general, avoid tabbed cases where brittle acrylic is used at right angles. It should probably go without saying, but it’s one of those obvious mistakes you can make sometimes: make sure you don’t put your Raspberry Pi on a conductive surface. Flip over the board and look at the bottom; there are a lot of components there and a lot of solder joints that can be easily shorted. Another reason why it’s important to case your Pi!
The Raspberry Pi runs Linux for an operating system. Linux is technically just the kernel, and an operating system is much more than that; the total collection of drivers, services, and applications makes the OS. A variety of flavors or distributions of Linux the OS have evolved over the years. Some of the most common on desktop computers are Ubuntu, Debian, Fedora, and Arch. Each have their own communities of users and are tuned for particular applications.
Because the Pi is based on a mobile device chipset, it has different software requirements than a desktop computer. The Broadcom processor has some proprietary features that require special “binary blob” device drivers and code that won’t be included in any standard Linux distribution. And, while most desktop computers have gigabytes of RAM and hundreds of gigabytes of storage, the Pi is more limited in both regards. Special Linux distributions that target the Pi have been developed. Some of the more established distributions are:
Raspbian
The “officially recommended” official distribution from the Foundation, based on Debian. Note that raspbian.org is a community site, not operated by the Foundation. If you’re looking for the official distribution, visit the downloads page at raspberrypi.org.
Adafruit Raspberry Pi Educational Linux (Occidentalis)
This is Adafruit’s Raspbian-based distribution that includes tools and drivers useful for teaching electronics.
Arch Linux
Arch Linux specifically targets ARM-based computers, so they supported the Pi very early on.
Xbian
This is a distribution based on Raspbian for users who want to use the Raspberry Pi as a media center (see also OpenELEC and Raspbme).
OtonPi
A distribution based on the Qt 5 framework.
If you’re going to get the most out of your Raspberry Pi, you’ll need to learn a little Linux. Raspbian comes with the Lightweight X11 Desktop Environment (LXDE) graphical desktop environment installed. This is a trimmed-down desktop environment for the X Window System that has been powering the GUIs of Unix and Linux computers since the 80s. Some of the tools you see on the Desktop and in the menu are bundled with LXDE (the Leafpad text editor and the LXTerminal shell, for instance).
Running on top of LXDE is Openbox, a window manager that handles the look and feel of windows and menus. Unlike OS X or Windows, it is relatively easy to completely customize your desktop environment or install alternate window mangers. Some of the other distributions for Raspberry Pi have different environments tuned for applications like set top media boxes, phone systems or network firewalls.
The real fun starts when you start programming. Although many languages are available on the Pi, I recommend playing a bit with Python. Python is a great first programming language; it’s clear and easy to get up and running. More important, there are a lot of other users to share code with and ask questions.
Guido van Rossum created Python, and very early on recognized its use as a first language for computing. In 1999, van Rossum put together a widely-read proposal called “Computer Programming for Everybody” that laid out a vision for an ambitious program to teach programming in the elementary and secondary grade schools using Python. More than a decade later, it looks like it is actually happening with the coming of the Raspberry Pi.
Python is an interpreted language, which means that you can write a program or script and execute it directly rather than compiling it into machine code. Interpreted languages are a bit quicker to program with, and you get a few side benefits. For example, in Python you don’t have to explicitly tell the computer whether a variable is a number, a list, or a string; the interpreter figures out the data types when you execute the script.
The Python interpreter can be run in two ways: as an interactive shell to execute individual commands directly from the Linux command line, or as a command line program to execute standalone scripts. The integrated development environment (IDE) bundled with Python and the Raspberry Pi is called IDLE.
So there you have it. This magnificent little device gives all the HW and SW tools you might need to play and play and play some more. Doesn’t this look much more interesting and educational than playing a video game on an Xbox? If only the kids today would get involved with something like this, then real careers would sprout from this fertile ground. America is still the land of opportunity and freedom, and it is my most sincere hope that schools around this country will realize the value of the Raspberry Pi and start building classes and clubs and organizations around this device like the old Ham Radio clubs of the 30’s and 40’s.
This is really neat stuff. Makes me wish I was a kid again. That and the pain in my right knee … didn’t have that when I was a kid either. So, happy computing and “live long and prosper."

Monday, December 10, 2012

Understanding Variation ... and Global Warming

I’ve written before about the many different jobs I’ve had over the years, the many roles I’ve played in industry, and the kinds of different things I accomplished. My last job or role was as the Technical Quality Leader of a company with two billion dollars in annual revenue. That’s a lot of dough, and my job was to make sure our pies were the best.

I performed various tasks to accomplish that goal from recommending and deploying best practices for software development to keeping engineering and service apprised of the quality of our products in the field to setting targets for new products. Key to all of those activities was explaining and interpreting results for everyone from individual programmers and engineers to the company’s vice presidents and CEO.

As the lead statistician, I was often called upon to explain the numbers. Key to those explanations is understanding variation. You see, the numbers always varied. How to make a cohesive message out of results that were always changing was the challenge. How to predict trends and “averages” based on values that would be high one month and low the next called upon all my skills at presenting, and during my tenure I developed several key charts that would display different values and indices together so you could see the causes and effects more clearly over time.

I became know as “Mr. Charts” and “Dr. Numbers,” and I even had marketing use my data and data representations to sell customers on the quality of our products. That was very difficult because we wanted to be careful just how much information we gave to our customers for fear some facts would put us in a bad light.

One of the aids I used to teach the understanding of variation was a book by Donald J. Wheeler called quite appropriately “Understanding Variation, the Key to Managing Chaos.” I found the book so useful and so accessible, I actually bought a copy for everyone on the management committee with my own personal funds. Fortunately the book cost a very reasonable $29.00 and I bought a dozen copies to distribute to the executives that I worked with directly.

Let’s take a simple scenario. Suppose you have a goal to produce a product with a certain “mean time to failure.” “Mean” is a fancy mathematical word for “average,” at least a particular average called the “arithmetic mean.” And a failure is when something goes wrong with one of our big printers and we have to send out someone to repair it. They would replace a failed part or possibly make some adjustments or alignments and then the printer would be printing again.

On an engineering basis you would probably measure such a failure in some time measurement. We operated on a monthly measurement cycle and whenever a repairperson had to go fix a machine that was called an “RA” or “Repair Action.”

We had a metric called RA per MM or RA/MM. An “MM” is a machine-month. That is, one machine running for one month. Every month we would add up all the machines of a particular type in the field and divide that into the total number of repairs done on that type of machine that month. That was the RA/MM. Notice this is actually an average: the average number of repairs on a particular design or machine type per month.

Now imagine something as large and complicated as an airliner. One of those big Boeing jobs that flies coast to coast. Now they are not perfect machines and they need to be repaired and maintained on a regular basis. They might have to be maintained after every three days of flying, for example. Well then that would be an average of about 10 repairs a month for, say, a 747.

Our big printers were also complicated machines that needed regular maintenance and repairs. Some as often as two or three times a month. Notice how this is different than you personal automobile. It may only need repairs or an oil change every five months. Our smaller printers were like that. Some only needed repair once every three or four years on average. But our largest printers were more like that airliner, and sometimes the IBM service person had a permanent office at the customer location doing nothing but maintaining a dozen or more big printers at that facility.

It was these largest printers that we were very focused on because these down time and repair actions cost us a lot of money (we were operating with maintenance agreements … basically a full warranty that the customer pays for each year) and customers wanted to print, not have the printer down for repairs.

We tracked lots of things like how many hours were spent in repair and the cost of replacement parts, or even how often we had to return a second time to fix something that should have been fixed in the first visit, but the RA/MM was our most important measurement.

Suppose the expected number of repairs was two a month. Well then one extra repair increases that metric by 50%. These are events in statistics that we call “small numbers.” Since statistical analysis works best with large numbers, it was a struggle to make sense of these variations.

Suppose the target is 2.35 RA/MM. Further suppose one month the actual number is 2.17. Hurrah … we met target … exceeded it in fact. Unfortunately, the next month, the average is 2.58 RA/MM. Oh, oh … over target. Now what. Do we panic? Do we ask engineering to develop an action plan to correct the target miss and for service to develop a mitigation plan to deal with higher than expected repairs? NO!! At least that was what I was trying to get across to executives.

It is normal for these kinds of measurements to vary slightly from month to month. That is especially true of the kinds of small number measurements we were making. A few outliers … that’s a bad machine at a bad location that had some bad parts installed and ended up with 7 RAs in a month … can really skew the data. Plus, all the machines needed regular replacement of consumable parts like the photoconductor that wears out like the tires on your car … only a lot faster. So there were very few machines getting less than at least one RA in a month. That further skewed the data. A bad machine could get 10 RAs, almost 8 over target, while a great machine could only be 2.35 under target with a total of zero RAs in the month.

What to do? Well, to a statistician, the answer is simple. Keep a running average of the average RAs. I would use moving twelve-month average as a better indicator of the quality of the machines over time, but even that isn’t perfect. But I think you can see the point. Things that vary can be measured and managed with some mathematical measurement of central tendency … what laymen call “averages.” Further, you can do averages of averages or “running averages.”

Mathematical warning … averages of averages can be very misleading unless you are very careful. I won’t get into the math, but it is a good idea to never do averages of averages unless you really know the underlying math and just what is being measured and how. For example, it would not be correct to add up the individual monthly values and divide by 12. No, no, no. That is not the correct method and, under certain circumstances, can be really wrong, wrong, wrong. No, instead you sum up the total RAs for the entire year and divide that by the sum of all the machine-months for the entire year.

Then, each month, you move the average “to the right” by using the previous twelve months. I did this entire simple math in good old MS Excel. I then used the charting function to graph the 12-month average line and the individual monthly values. The twelve-month running average was much smoother (that means the variations are less from month to month). The graph was interesting with the monthly results some times less than the running average (driving the running average downward) or greater than the running average (forcing it up). The running average was the trend line and it actually held more information because it integrated or averaged out the variations.

You could do analysis such as “if the monthly value is above the running average for four months in a row” then that required action because, obviously, the trend was upward, which we didn’t want. Good quality on this chart was a low number.

In my example, as long as the total number of machines in the field was relatively constant and old machines were replaced with new machines at a fairly constant rate and there was no seasonal variation and … about another twelve considerations … then my rolling averages was a good way to go. You do have to understand the context of all data.

The idea was that good months and bad months would average out and you would get a valid indication of the underlying quality of the machine. When you got nervous was when the trend line started moving up. That meant the bad months were outweighing the good months and the machines were actually getting worse … or the repair people were not as effective and fixed machines broke more often … or the fleet of machines were aging … or the amount of printing in an average month was increasing … or the paper or toner / ink quality was … OK. It is never easy, and you always used more than one chart to really measure a process or a product.

But the idea of trends of averages to measure variation is a solid concept.

Now let’s change gears. Suppose you want to measure “climate.” Now, in a mathematical sense, “climate” is just an average over time of “weather.” Take temperature for example. You can talk about an average high temperature in the summer in Chicago. Take one hundred years of Chicago summer temperatures and do the math. You will see they vary, as some years are warmer or colder than other years. That’s normal.

But if you track the trends and see the average summer temperature in Chicago is trending upward, you might think you’ve found some effect and look for a cause. If it were global temperature you’re interested in, then you would average Chicago and New York and Denver and L.A. … plus Honolulu, Tokyo, Moscow, Berlin, London, Cape Town, Melbourne, Buenos Aires … etc.

If you combined all the averages for summer and winter and fall, etc., temperatures of the cities all over the world, you would get a so-called “Average Global Temperature.” You could plot that temperature on a graph. Of course seasonal variations are typical when you are measuring weather. You might choose to track average summertime temperatures, or winter temperatures, or just average the whole year.

Now this is the point I want to get to. Scientists have set up a method to calculate the average global temperature and have the data for over 100 years. So what happens when you graph the current temperature averages against that long-term average? The trend is up.

In fact, the annual average has been above the 100-year average for every one of the last 25 years. If you are younger than 25, then you never lived through a “below average” temperature year.

According to an article in Scientific American (July 26, 2010), there have been exactly zero months, since February 1985, with average temperatures below those for the entire 20th century. (And those numbers are not as dramatic as they could be, because the last 15 years of the 20th century included in this period raised its average temperature, thereby lessening the century-long heat differential.) That streak -- 304 months and counting -- was certainly not broken in June 2010, according to the U.S. National Oceanic and Atmospheric Administration (NOAA). That month saw average global surface temperatures 0.68 degree Celsius warmer than the 20th-century average of 15.5 degrees C for June -- making it the warmest June at ground level since record-keeping began in 1880.

Not only that, June continued another streak, it was the fourth warmest month on record in a row globally, with average combined land and sea surface temperatures for the period at 16.2 degrees C. The high heat in much of Asia and Europe as well as North and South America more than counterbalanced some local cooling in southern China, Scandinavia and the northwestern U.S. -- putting 2010 on track to surpass 2005 as the warmest year on record. Even in the higher reaches of the atmosphere -- where cooling of the upper levels generally continues thanks to climate change below -- June was the second warmest month since satellite record-keeping began in 1978, trailing only 1998.

"Warmer than average global temperatures have become the new normal," says Jay Lawrimore, chief of climate analysis at NOAA's National Climatic Data Center, which tracks these numbers. "The global temperature has increased more than 1 degree Fahrenheit [0.7 degree C] since 1900 and the rate of warming since the late 1970s has been about three times greater than the century-scale trend."

So what does the near future hold in terms of heat waves and record-breaking highs? Depending on how quickly La Niña conditions strengthen in the Pacific Ocean (and a host of other factors), this year could surpass previous records or at least take its place as one of the warmer years on record.

Now the first principle for understanding data is that “No data have meaning apart from their context." So how do we analyze this data? Again, from Wheeler, a rule: “The best analysis is the simplest analysis.”

I suppose you could break this down into two questions. The first is “Is the global climate warming up?” and then the second would be “Why?” I think the data is very clear. Even with the notoriously varying weather, charts that show the running average on the increase for over two decades should end the debate. Never mind secondary effects such as melting ice and glaciers or tertiary effects like increases in storm intensity and other measured changes. The evidence should be very clear … the earth is warming … and that isn’t really a good thing for most of us that live here.

Why is it warming? Well, one obvious answer is the increase in green house gasses in the atmosphere. Certainly you could hypothesize many causes of global warming from increased output of the sun to a change in the Earth’s orbit to internal heating or even a heat ray from the planet Mars. But it is clear from measurements that none of those things happened, while the amount of CO2 and other green house gasses has increased in the last century. I think we've found the cause. Levels of several important greenhouse gases have increased by about 25 percent since large-scale industrialization began around 150 years ago. One of the causes could be cow farts ... but you could also ask why there are so many cows. No, it appears that the increase in greenhouse gasses is due to man-made causes, so it follows that global warning is caused by man. (That still leaves open the question of what to do about it, but the first step in problem solving is to identify the problem.)

Further, secondary effects from that increase of heat will likely further increase green house gas emissions such as emissions from melting swamps in the north emitting methane gas. We may be in for a very rough time ahead.

It is a simple cause – effect. It is a scientific fact that carbon dioxide increases the amount of heat trapped in the Earth’s atmosphere -- the green house effect. It is a scientific fact that the amount of CO2 and other green house gasses is increasing in the atmosphere. And the effect of “global warming” (or the more accurate “global climate change since the effect can actually lower temperatures in some regions due to changes in ocean currents or air currents) is measurable and real.

So what is there left to deny other than science itself. Of course, some people deny science … yet they believe in the science of aerodynamics by flying in airplanes or the rules of electrodynamics by using electric lights and telephones and TV and radio. Or they believe in chemistry by using glues and plastics and other man-made materials. Like I said, “What is there to deny?” Just do the statistics. It isn’t that hard to eliminate the variation and arrive at the long-term trend.

I have a co-worker who doesn’t believe in global warming. He says that science said margarine was better for you than butter, and then they reversed themselves and said butter is better. So he doesn’t believe in science any more. He also says that it wasn’t long ago scientist thought the earth was cooling and we were headed toward an ice age. I suppose all that is true. Science isn’t exactly “an exact science,” you could say. Science is a lot of trial and error … and data that requires interpreting. But, at some point, the data becomes so clear that all but the most stubborn don’t agree.

I’ve looked at the data and analyzed the trends. I’ve read the articles from several different journals and news magazines. I think the answer is clear, but you don’t have to believe me. Just do the math yourself.

Sunday, December 9, 2012

What does congress know about engineering -- NOTHING!

The recent drilling platform explosion and subsequent major leak in the Gulf of Mexico is a bad thing, no doubt about that. Stopping the leak and figuring out what happened are challenges for the engineering community and many of its disciplines.

As any engineer knows, the underlying and fundamental cause of a problem, whether large or small, is often several steps down the chain from the apparent problem, and is typically not easily found. First impressions are often wrong, or at best incomplete. True root cause analysis of most problems show the cause was not a single mistake, but a combination of faults, misconceptions, circumstances, and other specific causes.

What aggravates me about the oil spill and similar catastrophes is the large number of instant experts that appear immediately after the occurrence.

I cringed as I watched the congressional hearings into the spill. The lawmakers on both sides lectured with phony fluency and a sanctimonious tone about deep-sea drilling, underwater concrete, safety and shut off valves, and similar complex engineering subjects as if they knew what they were talking about. They may have known the nomenclature, but they lacked any real understanding of the subject. Remember, congress is full of lawyers, not engineers!

I just can’t fathom what these people really know about drilling down on the ocean floor: the incredible pressure, the corrosive affects of salt water, hydraulics, pumps, pipes, and underwater remote-control robotics. This is a sophisticated engineering effort, and should be the subject of engineering peer review and analysis.

The truth is obvious, these congress members know pretty much nothing. What’s worse is that they don’t feel that ignorance should stop them from talking before there is a technical investigation done by technically qualified people representing various reputable organizations. We saw this same rush to judgment by the know-nothings after the Space Shuttle Challenger explosion in 1980.

To me, all this is just another manifestation of the sad, ironic reality that engineers have made the incredibly difficult look way too easy. Everyone thinks engineering’s accomplishments are all no big deal and not very hard, so it’s easy to be an expert. This is happening in nearly all engineering and scientific disciplines. The only technical area in which this hasn’t happened to the same extent in medicine.

Can you imagine any member of congress asking a doctor at a hearing, “After you cut through the pericardium layers, why didn’t you insert the stent from the left side, instead of the right?” The questioner would look like a fool. But expounding about deep-sea drilling technology; why that is all OK!

I’d like to know how the medical profession has managed to maintain this well-deserved, hard earned protective aura around its expertise. We could use some of that in the rest of the engineering world.

Now I am not commenting on the required debate about off-shore drilling, energy independence, and renewable energy sources, although – again – I wish we could evaluate those things as engineers and not as politicians. These are policy decisions and the correct realm of government, but I object to these congressional “fact finding” sessions that are not about facts at all.

Certainly the general public has a stake in these discussions, but this rush to judgment and political posturing is not an effective strategy for either the left or the right. Most people feel their minds are made up, and they don’t need the facts. I just wish we would be more sensible and seek out these facts.

The corporations, the environmentalist, the government, they are all jumping to conclusions without a true understanding of what is going on. What can the engineering community do to restore order and logic to such a chaotic process? Journalist, how can you help? Friends, countryman, what can you do?

Engineering is hard, and involves that nasty subject that everyone hates: math. Encourage your local neighborhood engineer. Tell him or her you love them and appreciate them. And write a letter to congress telling them to seek out facts, not photo opportunities and sound bites.

In this age of instant analysis and 24 hour cable news, it is tempting to take immediate action. Certainly swift action is called for to both protect the environment and stop the leak, but long term policy decisions and rule making regarding oil-drilling in coastal areas should be done against a background of facts, not just headlines.


Originally written on May 24, 2010.

Microsoft and Innovation


MS is not really a consumer company. They are a very profitable “enterprise customer” company. Their consumer plays, like Bing, are giant money pits, losing millions of dollars. Meanwhile they quietly make hundreds of millions on enterprise software.

Zune (iPod knock-off), Danger (acquisition that was a part of Microsoft's Premium Mobile Experiences (PMX) team and now discontinued), Kin (new touch screen cell phone for social networking developed by Microsoft and now discontinued), MS Mobile or “Pocket PC” (original phone OS) are all failures. Yet they continue to pour money into them. X-box isn't bad, but it loses money too! But their embedded software, database software, and web server apps are money machines. Plus Win7 is preinstalled on about 90% of all PCs.

Yet they want so bad to succeed with consumers and beat Apple. Sort of like the nerd trying to get a date with a cheerleader.

MS CEO Steve Ballmer at the company’s Financial Analyst Meeting Thursday, “No one is asleep at the switch….We have got to make things happen. Just like we had to make things happen on netbooks, we have to make things happen on Windows 7 and slates.” ("Windows 7" confusingly is not the new operating system that replaced Vista, but rather the new phone OS which is meant to challenge the iPhone – again ((after Danger, and Kin)). Slate is MS speak for the iPad. Steve Balmer = idiot! Just sayin'.)

Remember, MS is being totally whipped in the smart phone market with iPhone, Google Android, and RIM Blackberry kicking their butt, not to mention a good product from Palm which was purchased by HP and should start to appear in HP phones. (HP is another PIM pioneer looking to recover their former glory as PIMs morphed to smart phones).

(PIM is an old acronym for "Personal Information Manager. In 1992, Apple coined the term "PDA" or Personal Digital Assistant for the Newton. I prefer the older term and give most credit to Palm, the company that really popularized the PDA or PIM. I further think that, besides Blackberry, the Palm phones were really the early foundation and implementation of what we now call smart phones. Technology is an evolution ... not a revolution. You can't believe everything you read in the advertisements!)

As I mentioned before, MS Servers & Tools Division had a great quarter with Windows Server, SQL Server, and System Center growing in double digits. Meanwhile, Online Services Division saw growth with Bing capturing market share, but they continue to bleed red ink. MS Business Division Revenue is off the charts, while Entertainment and Devices (phones, Zune, etc.) is down from last year. OEM revenue is up (Windows 7 preinstalls), but is that really a consumer success or is that just PCs being sold at Best Buy, HP, and Dell? Hmmm. Is MS going the way of IBM and becoming a business and enterprise computing company? I think so -- heck, I know so!

Only Balmer seems confused. Did he even get a date for the prom, or did he take his cousin? And now the big question: when are they going to dump Balmer? The guy needs to be "flushed”!!

Originally written on August 1, 2010.

Senior Executive Shuffle


As a senior member of the IEEE (Institute of Electrical and Electronics Engineers), I am a member of a high powered community. In the following narrative some of the behind the scenes shuffling and rumors are described.

I have never met any of these senior engineers, although I did work in the same division with Mark McDermott when I was in General Products Division working on disk drives for the IBM PC, and I did know many of the early founders of Cyrix when I spent time in Austin working on AIX software.

I am a long time fan of Palm, having owned two Palm Pilots and the Treo smart phone before I got my iPhone. I was very impressed with Palm's new OS and it is possible HP will make a comeback into mobile devices now that they have purchased Palm.

In addition, I've followed Apple's ventures in microprocessors very carefully since they used the IBM PowerPC and then switched to Intel and then started purchasing their own chip foundries.

I think it is very interesting following the intrigue and shuffling at these high engineering executive levels. Not that I'm at the level of senior vice president, or even vice president, but I do report directly to a vice president in a position that requires I advise and consult on technical topics — in my case related to quality. So I often follow all this industry insider news and prognostication.

In addition, I've used HP test equipment since the sixties and I have high respect for HP instruments. I was saddened when HP spun off their test equipment and instruments division to become Agilent. (Sort of like IBM spinning off their Printing Systems division to become InfoPrint Solutions.) In addition, once IBM sold its PC Division to Lenovo, I started buying HP computers.

Beyond that, I don't really have any skin in this game, but I was interested in what was going to happen after Mark Hurd was fired as CEO of HP, since he had led HP growing bigger than IBM by adding consulting services — right out of the IBM playbook. As an ex-IBMer I follow all this intrigue with interest.

So, if you are interested in senior engineers and their influence on technology companies and their products, here is a little tale and rumor mongering for you to follow. Read on...

The name of at least one senior engineering manager may be on the short lists for a senior management slot at both Apple and Hewlett-Packard — Jon Rubinstein. Ruby, as he was known in Apple circles, could be sought after as a replacement for Mark Papermaster who reportedly left his job as senior vice president of devices hardware engineering at Apple after less than 16 months on the job. Rubinstein may also be among candidates to replace Mark Hurd, chief executive of HP who left the company Aug. 6 following a sexual harassment investigation.

Perhaps the most likely scenario for the 52-year-old engineer is that he will stay on in his current role as head of a new mobile devices group at HP. Rubinstein joined HP in April when it acquired Palm where he was chief executive.

Rubinstein's charter is to reinvigorate the smartphone business for the Palm group as part of HP and to extend that business into new product categories such as tablets. Given Palm's recent struggles and how far HP is behind in the burgeoning field of tablets, ebooks, and smartphones, he has his hands full in what is one of the most strategic fields for HP's future.

For that reason alone, HP would be advised to keep Rubinstein focused on the mobile job before him. Indeed, HP needs more of a generalist who can grapple with the company's broad range of businesses that range from desktop printers to data center servers, networking gear and services to run them.

But that doesn't mean Apple would not want back the man who helped drive success for Jobs. Reports from both the New York Times and Wall Street Journal indicated Papermaster lost after just 16 months his post in part due to a fall out with Jobs.

Winning Rubinstein would be a double coup for Apple. Not only would it get back an executive with a long track record working under Jobs, it would steal away from a top competitor the man charged with building an Apple-like position in the market.

Rubinstein is far from the only name on either company's short list. In April, Apple hired Mark McDermott as a senior director as part of its acquisition of circuit-design specialist Intrinsity. McDermott has a long pedigree playing senior director roles in microprocessor design at Cyrix, IBM and Intel.

McDermott's LinkedIn page says Apple is "looking for the best and brightest chip heads" at its Lonestar Design Center in Austin, born in part of the Intrinsity acquisition. (LindedIn is sort of like Facebook for Engineers.) Indeed, Apple has been adding top semiconductor design talent since it acquired low-power processor maker P.A. Semi in April 2008.

According to reports, Apple has already filled Papermaster's slot by giving his responsibilities to Bob Mansfield, senior vice president for Macintosh hardware engineering. Indeed Mansfield, not Papermaster, appeared on stage at a July 16 press conference to talk about antenna problems with the iPhone 4.

Reports said Papermaster's departure from Apple could be due in part to the Antennagate issues around the iPhone 4. Mansfield previously managed work on the Apple A4 processor, the retina display and touch screens used in the iPhone 4.

Originally written on August 23, 2010.


In the Fall, a young man’s fancy turns to microprocessors.

Intel’s headquarters are in California, but its biggest operating hub is Washington County. This county includes the suburbs of Portland on the west side such as Beaverton, Hillsboro (where my dad lives), Forest Grove (where my mom and dad used to live), and even far west Banks. The tech giant employs about 15,000 in Oregon. Two Intel engineers live next door to my dad, and we always enjoy visiting with them and learning what the latest offerings from Intel are all about. The most recent suit of chips from this microprocessor giant includes the easy to remember Core i3, Core i5, and Core i7 families.

I particularly like the pedigree of the new, “smokin’” i7-980X. This $999, 3.33GHz (with automatic overclocking to 3.6GHz) processor is Intel’s flagship offering in the consumer market. It’s the first desktop-grade CPU with six physical cores, but hyper threading yields 12 virtualized ones. The six cores share 12 MB of integrated L3 cache. The end result is a measurable performance boost. A 32-nanometer design, the 980X is fully compatible with existing X58-chipset motherboards running an LGA 1366 socket. X58-based motherboards use Intel’s quickpath interconnect (QPI) architecture. QPI replaces the front side bus design of the now antiquated Core 2 chips (what my high end HP computer runs), for faster and greater bandwidth for routing communications between the motherboard, system components, GPU, and the central processor.

There are more 32-nanometer chips to come from Intel including the Sandy Bridge CPU family. But 22-nanometer chips are on the horizon with the announced Ivy Bridge designs from Intel. Look for the GPU to be integrated on the same silicon as the CPU and a new Advanced Vector Extension instruction set for Nehalem processors which should boost media encoding, 3D modeling, and video and audio processing performance. AMD has big plans too including CPU/GPU mashups and DirectX 11-compatible GPU designs which will continue the Turbo Core overclocking that has been so successful so far — although very power hungry.

Intel splits its mainstream desktop and mobile CPU offerings into three sections: The Core i7, Core i5, and Core i3 lines, representing, respectively, high-end, midrange, and entry-level products. That doesn’t always mean that a Core i5 chip will be slower than a Core i7, nor does it mean all Core i7 chips always have four physical cores. Making sense of all these specifications and building a complete system that truly optimizes the performance is key. Of course, the AMD Anthlon II chips are also high performance silicon, but my vote is on Intel.

Well, then what can a poor boy do; except to sing for a rock ‘n’ roll band? Think I might take a trip back to Fry’s, buy me an X58 motherboard, and start rolling my own. After my recent poor quality experiences with HP (failed NVROM led to motherboard replacement), Compaq (problems with battery and keyboard), Sony (don’t ask — it’s a piece of crap), and even Dell systems (although not my Dell), maybe it is time to try a homebrew. I can’t do worse than those outfits. Wallet: check; Visa card: check; full tank of gas: check. Time to head for Fry’s.

Maybe I need to move our here to the “Silicon Forest” and try my hand at processor architecture … or maybe I should just retire and get out of the way of these new, young engineers. Hmmmm, what can a poor boy do?

Originally written on September 9, 2010.

New Apple product announcements are bad news for Intel.

More from my conversations with Intel engineer neighbors at my dad's house in Hillsboro, OR.

With its latest product announcements, Apple has spread its A4 microprocessor across all of its non-computer products, lowering its hardware and software design and manufacturing costs. Intel takes a big hit in the move, losing three sockets in the AppleTV and seeing the chance for future non-computer design wins slip further away. Apple is using the A4 in the newest iPod touch and its relaunched AppleTV product. The chip had already claimed slots in the iPad and iPhone 4.

(The Apple A4 is a system-on-a-chip (SoC) designed by Apple and manufactured by Samsung. It combines an ARM based CPU with a PowerVR GPU with an emphasis on power efficiency. The A4 processor is the first chip produced for Apple by their new acquisition. P.A. Semi (originally "Palo Alto Semiconductor") was a fabless semiconductor company founded in Santa Clara, California in 2003 by Daniel W. Dobberpuhl who was the lead designer for the DEC Alpha 21064 and StrongARM processors. The company employed a 150-person engineering team which included people who had previously worked on processors like Itanium, Opteron and UltraSPARC. Apple acquired P.A. Semi for $278 million in April 2008.)

The previous AppleTV was effectively a PC using an Intel Pentium M-class processor and two supporting chips: an Intel memory controller with embedded graphics and an I/O chip. The three chips had cost $60 to $65 and consumed nearly 1000 square mm on the circuit board. The A4 replaces all three chips with one device that is estimated to cost Apple $15 to $20 and uses only one quarter the space.

There’s phenomenal reuse for lowering manufacturing and design costs here,” said Jeff Brown, vice president of business intelligence at UBM TechSights. Now Apple can “develop using one operating system (iOS) on all those products; that’s a big benefit."

On the downside, the A4 apparently is not up to decoding MPEG-4 H.264 video at the full 1080p resolution that today’s best TVs support. The new AppleTV costs $99, but only supports 720p video. The resolution would not be a big issue for gamers if they could use the $99 box to tap into Apple’s existing library of low-cost games for the iPhone and iPad. It’s not yet clear whether AppleTV will be able to run games or applications on a TV. Whether this limit to resolution will impact TV viewing purchases of AppleTV is also an open question. I know that Tivo resolution does not match my Comcast DVR with HD, but I'm not really a user of Tivo or AppleTV and don't know just what is the latest and greatest available technology in competition with AppleTV. Maybe someone reading this note has some insight.

Bluetooth wireless controllers exist for gaming and could be a next step for AppleTV. Apple is likely reusing a lot of the components from the iPhone on the new AppleTV and iPod Touch products. The recent addition of multi-tasking with the iPhone 4 is a step toward making this software platform a viable replacement or at least alternative for Apple's UNIX based OS.

All these changes give hints to the direction Apple is planning for future products, and a move into lower price tiers. Most observers were pleasantly surprised by the prices for the iPad compared with Apple laptop computers. Lower development and manufacturing costs will support more price drops, while maintaining profitability. It's win — win for consumers and stockholders alike.

Originally written on September 13, 2010.