Saturday, October 30, 2010

Watts Humphrey, 1927 - 2010 may he Rest In Peace

Anyone with an interest in Quality Software, or Software Quality, knows the name Watts Humphrey, who was founder of the Software Process Program at the Carnegie Mellon Software Engineering Institute (SEI), and recipient of the National Medal of Technology.

I regret to inform you that he died Thursday, October 28 2010 at his home in Sarasota, Florida. He was 83.

Details may be found here.

I have a couple of his many books on improving the quality of software on my own bookshelf, worth your time to check them out for yourself if you have an interest in improving the quality of the software that you write:


The Coming Lithium Battery Shortage

Politicians are never slow to let a accident or a crises go to waste:

"WASHINGTON (Associated Press) By JOAN LOWY, October/27/2010

Safety advocates have warned for more than a decade that someday an air shipment of lithium batteries like those used in cameras, cell phones and countless other products would catch fire, causing a plane to crash and people to die.

That day may have arrived last month.

A United Parcel Service cargo plane with a fire raging on board, and carrying a large quantity of lithium batteries, crashed near Dubai in the United Arab Emirates on Sept. 3, killing both pilots. The cause of the accident isn’t likely to be determined for months, but investigators suspect the batteries were either the source of the fire or contributed to its severity. The Federal Aviation Administration was concerned enough by the accident to warn air carriers about risks posed by lithium battery shipments.

The accident has given new urgency to a high-stakes lobbying struggle under way in Washington. Pilot unions and safety advocates are urging the government to treat air shipments of lithium batteries as hazardous materials. But rules proposed by the Obama administration are opposed by many of the nation’s top retailers, electronics manufacturers, battery makers and cargo airlines, including UPS.

...

"

To avoid the wrath of Copyright Lawyers you can find many variations of the full text here, some more detailed than others.

The investigation into the UPS airliner crash will not be completed for months, but regulators are taking this opportunity to increase the costs of Lithium Batteries significantly. Better stock up now.

There already are significant regulations about the shipping of Lithium Batteries, in the form of UN Manual of Tests and Criteria, Part III, SubSection 38.3 Lithium Batteries) and Hazardous Material Shipping - Hazard Class 9: Lithium Battery.

Did you know that since January 1, 2008, you may not pack spare lithium batteries in your checked baggage?

I looked into doing a custom Lithium Ion battery pack at one time. There was several thousands of dollars involved just to cover the cost of dealing with the UN shipping regulations.

Less you think that you might be able to use Super Capacitors as a substitute, there are already new regulations on shipping these high farad value capacitors, where the shipping fees exceed the costs of low volume quantities of the capacitors themselves. For example the following is taken from Shipping Information for Maxwell Boostcap® Ultracapacitor Products from Mouser:

Maxwell Boostcap® Ultracapacitor products employ an organic electrolyte, quaternary salt (tetraethylammonium tetraflouroborate) with an organic solvent (acetonitrile).

The following shipping restrictions and fees apply:

The organic solvent acetonitrile is classified as flammable and is subject to shipping restrictions in quantities as outlined in Maxwell Technology's document "Shipping information for transportation of Ultracapacitors".

Ground Shipments to the 48 contiguous United States: Shipped by UPS Ground only. Shipping costs and $25.00 USD hazmat fee will be applied to each box. [As of today October/30/2010.]

Air Shipments to the US and to eligible countries: Shipped by FedEx only. Shipping costs and $110 USD hazmat fee will be applied to each box. [As of today October/30/2010.]

FedEx Customer Reference: http://www.fedex.com/us/dangerousgoods

BatteryUniversity.eu will introduce you to the many regulations.

Soon you and I will not be able to afford the regulation that we must meet to ship products. I'm Taxed Enough Already aren't you?



Take note of the TSA's response to the XKCD 'Bag Check' cartoon shown above; place Mouse Pointer over above image if it is to small. [Note that some XKCD cartoons may be offensive to some, and not recommend for those under 18 years of age.]

Sunday, October 24, 2010

Renesas Devcon2010 was a blast!

For the last eight years or so I've used almost exclusively Atmel AVR chips, and their supporting DataFlash memories. Atmel decided they were not going to deliver DataFlash chips to anyone but "a preferred customer". Keep in mind they told Arrow this, not my company. Arrow has far more volume that I do. If Arrow is not a preferred customer then what am I, and what are you in Atmel's mind?

Mike Scott of Catalyst Sales the regional rep. for Renesas heard of our pain. So he graciously paid my expenses to spend four days at Renesas's four day long Devcon 2010 event near Disneyland in California.

Murray Slovick blogged live from Devcon, while "David L. Jones filmed the highlights:

From my involvement with the Open Source project gEDA and PCB, Dave's focus on those in Day #3 is of particularly interest to me. Pick up the software and do the "Open Hardware with Open Tools" class at home from here. Get the instructions for building the Open Source GCC based tool chain here. Also with the gEDA logo on my shirt, I was put to work manning the Open Source Booth for a couple of hours so that Brandt and DJ of Redhat could spend a bit of time checking out the reset of the exhibits on the show floor on Day #1.

On Day #0, after the nearly eight hour flight, I spent the evening with DJ Delorie, of the DOS port of GCC fame. DJ showed me the Rulz Boards that he designed, that every attendee at Devcon received when they registered, and explained some of the background. For example the LED Blink code was based on Bresenham's line algorithm. That link also shows off the photo-realistic rendering mode of PCB. Did you think those were real boards? They are not.

DJ does a lot of work on GCC as part of his Day Job, and we got into some interesting discussions on 'volatile'. We have discussed volatility of the C keyword volatile before here and here among others in the past.

We got in to the volatile discussion because I commented on a busy loop:


 while( counter-- )
 {
 }

that in AVR's implementation of GCC would have been optimized out of existences. In RX GCC the loop would remain, because you do want the 'counter' function to be optimized "and RX GCC is smart enough to know what is going on there".

For portability add an empty asm("") which is volatile. Note that asm("..." : ...) is not volatile, but asm volatile ("..." : ...) is volatile.

 while( counter-- )
 {
 asm("")
 }

DJ commented on the C standards idea of 'volatile' verses a test-and-set instruction. The standard tells us that there must be explicit read and write operations for such a instruction, which completely negates the purpose of the indivisible test-and-set instruction in the first place.

One thing AVR GCC has over RX GCC is better documentation. DJ referred me to the GCC source code (gcc/config/rx/rx.md and gcc/config/rx/rx.c) to find out how volatile worked, where AVR-LibC documents and FAQ tells us.

Anyone that has used the Atmel AVR for any length of time knows that AVR Freaks is the main community around the parts. Renesas has its own equivalent community called Renesas Rulzs. At Devcon Renesas launched the RX Microcontroller $110,000 Design Contest, which is now the hottest topic on Rulzs.

Something that I found of interest because of having to deal with world wide Paper Pushers (Regulators) is the Outstanding Electromagnetic Immunity of the RX600 Microcontroller Family.

I keep bringing up the RX Family because Renesas intends it to be their "ARM Killer".

Renesas Interactive has Dr. Micro. tips and introductions to the family of parts, and an extensive library of software.

I ran in to Jean Labrosse of Micrium, Inc. again. We bump into each other in person about every five years it seems. Back in 1999 I worked with Jean on his then new uC/OS-II system. If you come across the First Edition of the book, you find my name in the credits. Back then we discussed my idea for a different scheduler, one based on process aging to prevent task starvation, but Jean said things were to far along. Looks like ~ten years later some of those ideas are now in uC/OS-III. I got Jean to autograph my new uC/COS-III book that covers the RX62N board being given away to the attendees first to arrive. This is the same board the RX Contest is based upon.

Something that took me a bit by surprise are the comments I've seen, for example in Dave's eevblog, that people have never heard of Renesas. Renesas is the merger of the old Hitachi (Remember the H8300?) and Mitsubishi microcomputer divisions, several years ago. Also in April of 2010, NEC Electronics and Renesas Technology merge to form Renesas Electronics Corporation.

On the way out of the conference on the last day, I over heard two Renesas people walking by: "What do you think this all cost?" "It was in the seven-figures." Renesas intends to make their presence known in the American Market in a big way.

As Devcon wrapped up at 1PM on Thursday, and my flight back to Pittsburgh was not until 6:45AM Friday morning, I walked the short one mile distance to Disneyland, and spent the afternoon walking around Downtown Disney. Downtown Disney has free admission, unlike the rest of Disney in that area. My frugal nature would just not let me spend $72 to walk around the main park. I rode the free parking-tram to the parking lot, and rode it back, just so I could say I rode a ride at Disneyland. :-) Only money I did spend there was at Jamba Juice drinking a nice healthy Orange Juice Smoothy. I was so impressed that I'd start one of those myself if there was a good location for such a business around here.


In closing here are some Devcon events in the trade press:

Maybe I'll see you at the next Devcon in 2012?

Saturday, October 23, 2010

Test Driven Development Embedded C with James Grenning Nov 30th to Dec 1st 2010 in Cleveland

It is rare that anyone of interest comes to the Pittsburgh/Cleveland region to speak, on any subject at all. They might make Philadelphia, but never Pittsburgh, sadly for those who live in this part of the world.

Nick Barendt has gotten James Grenning to give a three day class at The Lean Dog boat in Cleveland Ohio, November 30-Dec 1, 2010, on Test Driven Development for Embedded C.

$1495 After 11/11/10. $1195 Early Bird Price until 11/11/10. Register here.

I covered James upcoming new book Test Driven Development for Embedded C [Nov./2010] in my blog about Makefile tip #0 on automatic serial numbers to be embedded in C code.

Test Driven Development is a powerful technique for building embedded software. This hands-on course teaches the practice of Test Driven Development in the challenging environment of C. In this course you will learn how TDD helps overcome some of the challenges embedded developers face including: unpredictable schedules, poor quality, and the problems that follow. In addition, embedded software developers must conquer the realities of concurrent hardware/software development, scarce target hardware availability, long download times, high deployment costs, as well as the challenges of testing embedded C.

TDD leads to better designs, towards more object oriented approaches to C. In this call you will also learn some of the design principles that can help to guide engineers to better designs.

Most of you have existing legacy code. In this class you will learn valuable techniques for dealing with legacy code. You will see incremental approaches to getting control of the legacy code with tests making improvements to the design less risky.

Test-Driven Development, a key agile practice, helps software developers improve schedule predictability and product quality and can do the same for embedded developers. TDD is valuable even outside of agile development methods.

This course describes the problems addressed by TDD, as well as the additional challenges and benefits of applying it to embedded software. You will learn the test driven techniques as well as specific design approaches to make your C code to testable today, maintainable tomorrow, and ready for a long useful life.

This course will get you and your team well on the way to applying TDD for Embedded C in your development efforts.

Saturday, October 2, 2010

Cleveland/Pittsburgh region Firmware Engineers of Northeast Ohio Get Together Oct. 12th.

For any blog readers in the Cleveland/Pittsburgh region, you might find this event of interest:


I had been asked to lead one of the 'Open Space' table discussions, alas I won't be able to make it myself due to a scheduling conflict.

Coming up the last day of November and the first couple of days of December, Nick Barendt has James W. Grenning of Test Driven Development fame coming to Cleveland to give us a class on TDD. Maybe you'll be able to make it?