Embedded Muse 194 Copyright 2010 TGG April 19, 2010
You may redistribute this newsletter for noncommercial purposes. For commercial use contact email@example.com. To subscribe or unsubscribe go to http://www.ganssle.com/tem-subunsub.html or drop Jack an email at firstname.lastname@example.org.
EDITOR: Jack Ganssle, email@example.com
- Editor's Notes
- Quotes and Thoughts
- Book Review - An Arduino Workshop
- Book Review - Book Review - Hello World
- Tools and Tips
- Joke for the Week
- About The Embedded Muse
Are you happy with your bug rates? If not, what are you doing about it? Are you asked to do more with less? Deliver faster, with more features? What action are you taking to achieve those goals?
In fact it IS possible to accurately schedule a project, meet the deadline, and drastically reduce bugs. Learn how at my Better Firmware Faster class, presented at your facility. See http://www.ganssle.com/onsite.htm .
The Embedded Systems Conference is April 26-29 in San Jose, CA. I'll be there most of the week - be sure to say hi!
Quotes and Thoughts
DO-178B is an avionics standard for software that's widely used. There are 5 levels, A-E, with A being the toughest to achieve. According to "DO-178B Costs Versus Benefits" (Vance Hilderman, HighRely Inc), the cost of DO-178B is:
Level D: Level E + 5%
C: Level D+30%
B: Level C+15%
A: Level B+5%
(that is, level A is 65% more expensive than level E.)
Book Review - An Arduino Workshop
Have you heard about Arduino? Not me, at least not till Joe Pardue sent me a copy of his new book (An Arduino Workshop). To quote the website: "Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments."
Yeah, another board. But this one is targeted to people like artists who want to harness a bit of computing to build unusual interactive exhibits, as well as to anyone wanting to use an embedded system without going through a lot of development hassle. And the Arduino community does replace some of the computer science lingo with their own artsy words - a program is a "sketch," for instance. "Compile" gives way to "verifying the sketch."
If you remember those Heathkit and Radio Shack introduction to electronics kits, this book will tickle your memories. It's really an intro to embedded systems, and I do mean a basic start-from-square-one sort of work. The writing is crystal-clear and just irreverent enough to be fun.
Unlike a lot of books that front-load readers with the basics, by page 23 you're already loading a simple program onto the board. The author teaches, first, simple programming using Arduino's very C-like lingo by making the reader interact with the board. Less than 20 pages later one is constructing simple circuits on Arduino's prototyping breadboard and learning the basics of electronics. One will not earn an EE degree, but by the end of the book you're using opto-couplers, interrupts and have even built and programmed a motor speed controller with feedback. Each project is simple, fun, and can be done in an evening's playtime.
Part of the genius of this book are the proliferation of beautifully-drawn sketches that show how to hook up the electronics, both in schematic form and pictorially. They're downright artsy, in keeping with the Arduino philosophy, and so clear a techno-adverse artiste could assemble the circuits.
I found only two faults with the book. First, the title is awful and analogous to calling a book that teaches driving "The Ford Fiesta." Second, the 200 page paperback lists for $50 on Amazon, which narrows the target market. Tack on the $90 development kit and things are getting a little pricey.
That market does, of course, include starving artists. But many of us know kids who are curious about computers and even embedded systems (though they may not know the term). This book is an ideal entry point for them. It's so accessible a middle-schooler would have no problem with it, and I bet even a precocious 7th or 8th grader could master it.
All in all one of the best basic hands-on books I've seen.
Warren and Carter Sande's "Hello World - Computer Programming for Kids and Other Beginners" is also another introductory book, but aims for the broader audience of programmer-wannabes, rather than firmware jockeys. Also a hands-on book, "Hello World" involves the reader in writing code very early on. That code is all in Python, which is a bit foreign to most embedded systems people, though the language is certainly gaining in popularity outside our narrow niche.
Though the book does a good job at revealing the nuances of the Python language, pick a different tome if you're a pro and want to learn Python. This volume is more targeted to learning to program in general.
The book is very "modern" in that it makes ample use of white space, sidebars, and nifty chip art. Some of the latter is very good; I especially liked the authors' use of railroad tracks to illustrate the nesting of multiple conditionals.
Each chapter ends with a quick summary - which I like a lot - and questions. Even better, the appendix has answers to the questions.
Like "Arduino," "Hello World" is also aimed at the rank novice programmer who needs to be carefully shepherded through the learning the elements of programming. This, though, is a much larger book and covers much more of the ideas that are important to programmers, like sorting and linked lists.
Occasional asides titled "Thinking Like a Programmer" introduce important concepts - like careful use of names - in just a paragraph or two.
In the olden days books like this used Basic as it was very accessible. (And hard as it is to believe, people even wrote real programs in Dartmouth Basic.) Python is an analogous choice today as it is free and is interpreted, and it supports modern concepts like OOP.
All in all a very good book to bring a novice up to speed.
Tools and Tips
Thomas Pircher wrote: "For your list of tools, I'd suggest having a look at pycrc. It can calculate any CRC and generate C/C++ source code. The used CRC variant can be chosen from a fast but space-consuming implementation to slower but smaller versions especially suitable for embedded applications. pycrc is available at http://www.tty1.net/pycrc/
"Also useful if you need to look-up a particular set of CRC parameters is: http://regregex.bbcmicro.net/crc-catalogue.htm"
Ray Keefe had a number of recommendations: "We use Beyond Compare and it is a fabulous tool. It also does file syncing and I use it for moving code and other documents between networked and non-networked computers. It can even be used for backups in 'Mirror files' mode and you can set up rules too so it only handles the files and subdirectories you want it to.
"For complete system snapshots we use Shadow Protect from Storage Craft http://www.storagecraft.com/ . We have set it up to do full system snapshots weekly and 2 hourly incremental backups. The recovery console lets you map the repository as a drive and you can browse it so it is also great if a file gets trashed and you just want to go back to a version from more than 2 hours ago. This is useful for files not in our revision control system such as installed executables that get trashed by an upgrade that goes wrong.
Let me know if you're hiring firmware or embedded designers. No recruiters please, and I reserve the right to edit ads to fit the format and intents of this newsletter. Please keep it to 100 words.
Joke for the Week
Something in the way it fails,
Defies the algorithm's logic!
Something in the way it coredumps...
I don't want to leave it now
I'll fix this problem somehow
Somewhere in the memory I know,
A pointer's got to be corrupted.
Stepping in the debugger will show me...
I don't want to leave it now
I'm too close to leave it now
You're asking me can this code go?
I don't know, I don't know...
What sequence causes it to blow?
I don't know, I don't know...
Something in the initializing code?
And all I have to do is think of it!
Something in the listing will show me...
I don't want to leave it now
I'll fix this tonight I vow!
About The Embedded Muse
The Embedded Muse is a newsletter sent via email by Jack Ganssle. Send complaints, comments, and contributions to me at firstname.lastname@example.org.
The Embedded Muse is supported by The Ganssle Group, whose mission is to help embedded folks get better products to market faster. We offer seminars at your site offering hard-hitting ideas - and action - you can take now to improve firmware quality and decrease development time. Contact us at email@example.com for more information.