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?

Saturday, September 25, 2010

"Encourage the USPTO to stop issuing software patents; deadline September 27" 2010. Bilski v. Kappos

Readers of the patent section of the Software Safety Website know that Software Patents are bad.

Software Patents stifle innovation and raise the specter of Lawyers showing up.

I generate a lot of code, unfortunately I'm afraid to publish most of it. I'm afraid that I will accidentally stumble into a Software Patent that should have never been implemented in the first place. Anything that raises the specter of lawyers is bad.

With short notice (Deliberately so We The People could not comment and the big company lawyers could?) the United States Patent Office is seeking guidance on how Software Patents should be handled in the future.

The Free Software Foundation has the details of how to submit your comments, which must be in by this Monday Sept. 27th 2010.

When was a Software Patent issued to a little guy or gal like you or I? They all seem to be to the Mega. Corps. that just want to kill competition. The language R++ is a perfect example of this. If Software Patents where in effect as today then the world would not have C++.

Get your comments in now.

All of this came to a head with the Bilski v. Kappos decision in June of 2010.

Saturday, September 11, 2010

PSGroove unexpected consequences. Guilt by Association?

I participate in several Open Source projects, for example AVR-LibC, gEDA/PCB (mostly PCB), wxWidgets (Even got my name in the wxBook) and LUFA 'Lightweight USB Framework for AVR'.

LUFA is a project of Dean Camera's, which makes a clean API for Atmel USB parts. Dean's code makes it easy to get a Atmel USB project up and going.

I had recently submitted some bug findings and fixes to Dean, for which he acknowledged me by name on his blog in several different places.

What neither of us saw coming was the PSGroove project for the Sony Play Station 3 [TM].

In early PS3 systems Sony allowed "other operating systems", typically meaning Linux, to be booted on the PS3. For reasons known only to Sony, they removed this "other operating system" option to the dismay of many. The PSGroove project was a way to restore the functionality that many had paid for, that Sony removed.

While some code is actually meant to be stolen like this package from Netrino, most code is not. Unfortunately the PSGroove project could be exploited to aid software piracy. So I wanted to be clear that neither Dean nor I support software piracy.

The Business Software Alliance is one of the few independent organization that actively fight software piracy, if you want to help stop what damages us all.

"One of the consequences to all this is that every single bleeding USB AVR in the world (which were already in short supply) have been snapped up, either by board houses trying to pump out some boards to sell to gamers as quickly as possible, or by the gamers themselves as pre-made development boards."

Sony rapidly responded to this vulnerability rendering this attack inert (I'd use an other word here, but it would set off Family Filters).

Now that PSGroove is no longer useful, can I get some Atmel AT90USB1287 again?

Atmel has really been screwing my company over on delivery times, so maybe I'll bump into you at Renesas DevCon Conference 2010?

MISRA tutorial and seminar announcement. Standards or Guidelines?

If you are a world traveler, The Motor Industry Software Reliability Association (MISRA) just announced a tutorial and seminar:

"A tutorial and seminar in collaboration with the Safety-Critical Systems Club (SCSC) will be held on 24 and 25 November 2010 in London, UK. On the first day there will be two half-day tutorials, on the MISRA C and MISRA C++ guidelines for the use of these languages in critical systems. The second day will be a seminar that will consider how the MISRA guidelines support safety-related systems development in various industry sectors, and we are particularly keen to feature presentations of case studies. If you would like to speak at this seminar, please discuss your idea with me in the first instance.

Further details of the programme will be available in due course.

There will also be a small exhibition on the second day. Details of the exhibition are available from Joan Atkinson at the SCSC

____________________
Dr David Ward
MISRA Project Manager
Article:

http://www.misra.org.uk/forum/viewtopic.php?f=210&t=1058&p=2032#p2032"

For those not familiar with MISRA, MISRA publishes a set of 'Guidelines' on 'Best Practices' for the languages C and C++. For example what languages constructs are bug prone and should be avoided in embedded systems used in vehicles. Many companies outside of the automotive industry have adopted the use of these guidelines, to help keep bugs out of their products.

Netrino also has a similar set of guidelines, with some links to some real world tips: Embedded C Coding Standard.

A technical semantic nit I want to pick is that these are guidelines. Standards are set by recognized bodies like IEEE and IEC - International Electrotechnical Commission. I frequently see things like "MISRA Standard". The distinction is a subtle one, but could be important to a product liability suite. Which is not to say that a company can not set 'internal standards' for coding practices. English is such a wonderful language... :-(

IEEE P730 Standards Software Quality Assurance, IEEE/EIA 12207.0 Standard for Information Technology - Software Life Cycle Processes, and IEC 61508 Functional safety of electrical/electronic/programmable electronic safety-related systems, are all example of standards used in Embedded Systems. There are more examples at my Software Safety site.