News for hackers. Stuff that matters.
Re:Toyota's killer firmware: Bad design and its consequences... by imglorp on Sunday April 26, 2015 @11:03AM (#9441976)
I'm going to go out on a huge limb here and am prepared to get shot down. I've seen this first hand as inheritor of spaghetti firmware.

The limb is: don't let EE's lead a firmware group.

It's a natural division of labor. The hardware guys are familiar with all the component datasheets and the bus timings and all the other low level details. If the prototype is misbehaving, they'll grab a scope and figure it out. They're probably the only guys who can. Software is an afterthought, a "free" component.

Those same EE's who have performed that role get promoted to buck stoppers for hardware production. They're familiar with hardware design, production, prototyping, Design for Manufacturability, and component vendor searches. They might cross over with production engineering and that six sigma goodness. They're wrapped up in cost-per-unit to produce which is direct ROI. Software remains a "free" component; you just type it up and there it is.

The culture of software design for testability, encapsulation, code quality, code review, reuse, patterns, CMM levels, etc etc is largely orthogonal to hardware culture.

Re:Toyota's killer firmware: Bad design and its consequences... by sliverstorm on Sunday April 26, 2015 @11:17AM (#9442006)
As a hardware designer I agree that hardware people are typically not very good software engineers.

I find we can reliably write small programs that will do everything they need to. But as the program grows, we are not adept at managing the explosion in complexity.

However I don't believe that's because hardware culture doesn't value software or anything like that. We just have no proper education in software engineering.

Speaking for myself, I grasp most fundamental software concepts. Memory structure, search algorithms, that sort of thing. I appreciate the value of abstract code qualities like testability, simplicity, reusability, etc.

I just have no actual education in how to design large programs from scratch that will achieve those goals.

Re:Toyota's killer firmware: Bad design and its consequences... by yason on Sunday April 26, 2015 @12:15PM (#9442207)
I don't think it's about education. It's just that software isn't what hardware people mostly work with and you only get experienced in what you mostly work with. And when you're experienced, you gain some insight into how things will work.

I know some basics of EE but I have no gut feeling of how to build or analyze any hardware for real. It's just something I've read and made my mind to understand but it's not something I know.

Conversely, I've been writing software on the lowest to highest levels for decades and I have a hunch of how to start building something that will eventually grow really big and complex. I don't know exactly how I do it but depending on what I want to achieve I have, already at the very beginning, a quite strong sense of what might work and also what will definitely NOT work.

My take on hardware is that it's mostly a black box that usually does most of what's advertised (but workarounds are regularly needed, and I guess it must be really difficult to build features into silicon and have it work 100% as designed), and these quirks had better be encapsulated in the lowest levels of the driver so that we'll get some real software building blocks sooner.

This would be no basis to design hardware. I would make such a terrible mess out of it that even if I managed to design a chip and make it appear to work somewhat, it would fail spectacularly in all kinds of naive cornercases that a real EE would never have to solve because s/he would never venture to build any of them, just because s/he would know better from the start already.

Re:Toyota's killer firmware: Bad design and its consequences... by kabdib on Sunday April 26, 2015 @11:56AM (#9442127)
Oh yeah.

Corollary: Don't let EEs hire your firmware engineers. They have no idea what to look for.

Re:Toyota's killer firmware: Bad design and its consequences... by lambdaelite on Sunday April 26, 2015 @12:22PM (#9442233)
> The culture of software design for testability, encapsulation, code quality, code review, reuse, patterns, CMM levels, etc etc is largely orthogonal to hardware culture.

I'm confused by this statement. Substitute say ASME for CMMI and the rest of this sounds like good engineering practices in general. What, for example, about "hardware culture" is orthogonal to testability?

Re:Toyota's killer firmware: Bad design and its consequences... by imglorp on Sunday April 26, 2015 @12:52PM (#9442346)
Well, for one thing, every instance of mission critical hardware needs a full test, because hardware is messy and stuff happens. You wouldn't want someone hurt because a gate on a chip got a stuck-at fault or one of your vendors had a little extra variation etc etc.

Software only needs testing when the tools or inputs change. So design for testability of software is driven by the needs of a development group (eg simulators, debug statements), while hardware (at a minimum) is aimed at a post production group (eg JTAG, test fixtures).

I agree there are many parallels, but I think the culture is different.