Friday, October 29, 2010

Architecture for small systems?

It is Friday afternoon and I'm allowed to have some wild ideas...

After a long e-mail conversation with one student of appropriate architectural styles to use in a project course I realised that his ending comment is spot on:
I think the course and it's literature are focused on large systems and seeing that we are new to this, especially with a new language in parallel, its difficult to not apply what we learn during the course.

In my opinion the patterns covered in the book left me half way with the idea that most architectures could fit into a pattern, within its own right.
I have been too blind when I teach, and not even my professional experience helped me to identify the problem:
Most (all) literature about architecture teaches solutions for big systems.
Is there a niche for information on how to architect small systems? Small in the sense of not having millions lines of code, or a large development team, or a long project. I know that the agile manifesto states that that one of twelve important principles are
The best architectures, requirements, and designs emerge from self-organizing teams.
But do a google search on "agile architecture emerge" and see what comes up, a lot of interesting reading that suggest that the issue is not that simple.

A lot of software systems are small, from a bittorrent client (the student project) to the software in the door control unit in a car, to a mobile app. And yet they would all benefit of having some though about what they must meet for non-functional needs that is addressed by a (simple) architecture. Should I write a book on architecting small systems? So that a team member is better prepared when he or she participates in a small project where the architecture "emerges"? You don't need to be an architect to benefit from doing thinking at an architectural "level".

Thursday, October 28, 2010

Quality attribute scenarios

Defining a quality attribute, a.k.a. non-functional requirement, is not easy. I know since i did that for a new platform at Volvo. When the verification and validation group comes back and says that it is not possible to verify this as a requirement I can only assume that I did not do a good enough job. But I have to agree with what George Fairbanks wrote in his blog:
Before you get too excited, you should know it’s easier to write these for quantitatively measurable qualities (e.g., throughput, latency) and harder for softer qualities (e.g., modifiability, usability).
There are two recent books that have a more agile approach to architecting: Lean Software Architecture by Coplien and Bjørnvig, and George Fairbanks' Just Enough Software Architecture: A Risk-Driven Approach. Unfortunately the latter isn't available in any Swedish internet bookstore, but as soon as I get hold of them I will post a review, as I have reviewed other books on software architecture.

Wednesday, October 27, 2010

The AutoExec Wheelmate Desk on Amazon

Heh. Check out the user photos here.

Review: Scosche motorMOUTH II Bluetooth

I was recently given a Scosche motorMOUTH II (model BTAXS)
bluetooth gadget to try out.*

The motorMOUTH II is an ingenious idea, one of those "why didn't they think of it sooner!" type things. It is basically a bluetooth headset combined with a stereo mini-jack. Instead of sticking it in your year (that would really hurt) you plut it into your car's aux input. It plays the audio from your phone call, or stereo audio via A2DP, through your car's sound system.

I have been using the gadget for a few days, and I think it is worth buying. If your phone rings, you just change your input to AUX, and press the button on the side to answer the call. You can also use the button hang up, redial, and voice dial (if your phone supports it). It isn't large or obtrusive, and while I didn't care for the shiny plastic microphone end, it isn't ugly. Since it can be plugged directly into a mini stereo jack, it can be installed without wires trailing all over.

Inbound sound quality is reasonably good. Streaming music from my iPod was decent, but not as good as a direct USB connection. I did find that the volume level was a little low, but I was able to compensate it on my head unit by increasing the gain on the AUX input. People I called on the unit told me that I sounded reasonably clear, but occasionally a little "robotic" or "tinny", which suggests that a high level of compression and noise cancellation is going on. My callers were able to understand me even with the car moving at highway speeds, and I didn't have to shout.

The design of this unit suggests an interesting unintended use. If you were to plug this unit into the input jack on your PC sound card, or another recording device, you could easily record telephone conversations, conference calls, or other audio streams that come through your bluetooth connection.

Pros:
  • Reasonably good incoming audio and A2DP sound quality
  • Good battery life
  • Plugs into your AUX port directly
  • Easy to use (like a bluetooth headphone)
  • Useful accessories included, such as Y adapter, extension cable, dash mount
  • Compact

Cons:
  • Unit resets when connected to power and drops bluetooth link temporarily.
  • Non-standard power connector, should be micro or mini USB
  • Outgoing sound quality mixed
  • You may need to increase your AUX volume
Overall, I think this is a great gadget, and I would buy one. It is more convenient than a stand-alone bluetooth speaker, or fumbling with an in-ear headset while in the car. And it is quite a bit cheaper, at around $70 (Amazon Link), than an add-on bluetooth module for your factory stereo, which will typically cost around $300.

You can find the PDF manual here.


*Note: a publicist for Scosche sent me a motorMOUTH II to review, I did not purchase this unit with my own money. But I would, because it is good.

Volt Spotting

I saw this Volt parked in Southfield today. A lovely dark red specimin.

Notice how GM is hiding the exhaust. Can you see a tailpipe? The muffler is that light gray thing on the left side. I can't tell where the tail pipe exits, it is well hidden. I'm not sure about the wisdom of the reverse lamp location, it seems like it would get grimy under there from road grime during the winter months.

Lindholmen software development day 2010

I held a presentation with the ambitious title The future of automotive software engineering at this years Lindholmen software development day.
The whole event was filmed so you can watch clips from me and the other presenters giving our talks when they are published (somewhere in the near future). Until then you can view my slides below, including the long list of references.

Tuesday, October 26, 2010

Architects as managers and leaders?

It is not often I write about management here, in spite of the title of the blog: "Managing..."'

I do believe that architects should not be people managers, at least not simultaneously.
However they should be leaders. An architect should have a vision of what he wants to accomplish and should lead by example. If the architect is successful it seemed like he did not do anything and everything was accomplished jointly by the developers, so don't expect too much credit as a leader...

Back to management: A former student of mine wrote about the difference between good and great companies to work for in his blog and directed me to this series of blog articles:12 Things Good Bosses Believe from Harvard Business Review.

Monday, October 25, 2010

Disappearing Drive Problem Solved

I have this problem on my Windows 7 desktop PC at home, that from time to time my secondary 1.5TB WD Caviar Green hard drive disappears from the system, as if it wasn't installed at all.

It turns out to be a bug in how Windows wakes up SATA drives--there is a time-out, and apparently some large SATA drives don't wake up fast enough, and are assumed to be missing.

There is a Microsoft hotfix for the problem here.

If your large SATA drive isn't the primary drive, then you won't see the BSOD or error messages, obviously.  Instead it will just be disappearing.

Thursday, October 21, 2010

Some Double Rainbows

There were some scattered showers this evening, with patches of blue sky, it was very striking. I caught these gigantic double rainbows with my (weak) cell phone camera.

Tuesday, October 19, 2010

Shocking News: Americans Won't Pay More For Electric Cars

From Edmunds Green Car Advisor:

About two out of three Americans say they wouldn't be willing to pay more for an electric car than for a comparable gas-powered vehicle, while just 17 percent said they'd pay more than a $5,000 premium for an EV, Nielsen Co. said, citing its September poll of more than 2,300 people.

I guess the good news is that about 30% of Americans would pay extra for an electric car--but most of them would not pay more $5,000.  

To me, the reason is obvious.  People are still mostly motivated by costs, not by environmentalism, and the reduced range of an electric vehicle is also a point of concern for the average person.  Now, if gas prices would stabilize around $4/gallon, I am sure the numbers would shift.

Project presentation

I presented my project at the yearly Volvo Industrial PhD program conference last week.

Monday, October 18, 2010

Mahindra Trucks... Still Dead

Despite some sputtering noises to the contrary, it appears to me that Mahindra's plan to import diesel light trucks into the U.S. is still quite dead.

In addition to jerking around the dealer network and potential customers, and creating ill will, Mahindra has to overcome a legal battle with its original distributor, Global Vehicles.

Also, not to pile on or anything, but while Mahindra may have certified its emissions for the EPA, I have not heard anything about NHTSA certification to FMVSS or crash testing.

Wednesday, October 13, 2010

E15: Good For Corn Farmers, Confusing For The Rest Of Us

EPA is announcing today that they are ready to approve E15 (15% ethanol) gasoline blends, but only for 2007 model year and newer vehicles.

That's silly.

Are gas station owners really going to set aside one or two pumps for E15, and label them?   Consumers would then be faced with 5 types of gasoline choose from: base, mid-grade, premium, E85, and E15.  Some people will be confused and put E15 in pre 2007 vehicles.  Others will be confused and shun E15.  

EPA should have waited to see if E15 was good for all "modern" vehicles, and then switched E10 to E15, since they are apparently required to enrich the corn farmers and ethanol refiners.

People running E15 should expect to see a small degradation in fuel economy.  Since ethanol is about 25% less energy rich than gasoline, switching from E10 to E15 should look like a 1.3% fuel economy reduction, or about 0.4 mpg in a car that averages 27 mpg.  Switching from E0 to E15 will cost about 3.8%, or about 1 mpg.

Tuesday, October 12, 2010

The Semiotics Of Volt: The Meaning Of "Direct"

GM's clarification about how the Volt powertain has an interesting statement:

There is no direct mechanical connection (fixed gear ratio) between the Volt's extended-range 1.4L engine and the drive wheels.

Note how GM defines "direct mechanical connection" as "fixed gear ratio".  However, to a technically minded reader this sounds like semantic squirming.   

Here is how it works.  There is a planetary gearset.  In the Volt, the outer ring is locked by a clutch, and is also connected to the gas engine and generator motor.  The generator can be used to recharge the battery, or to produce torque.  

When the ring gear is locked ("grounded") to the transaxle case (C1 locked), there is no torque path from the gas engine to the wheels, which are connected to the planetary gears.  If C1 is unlocked, C2 and C3 are locked, then torque flows from the gas engine to the wheels.

The point is, there is definitely a mechanical connection from the gasoline engine to the wheels, because the clutches can be commanded to send torque to the  ring gear and therefore out to the wheels.   




How attractive it is to work as a software architect...

A colleague sent me this link from CNN Money about how attractive it is to work as a software architect. Go figure...

Monday, October 11, 2010

Volt Frenzy, Part III

After doing some reading around, it does seem like the blogosphere overreacted to the news that the Volt's gasoline engine *gasp* can actually help push the front wheels.

My conclusion is that it doesn't really matter. Since a gasoline engine was put on-oard to charge the battery, the Volt was never going to be a pure electric car. From the very beginning, it was thought to be a "series hybrid" (gas to electric to wheels), but now we see that it is really a "series/parallel hybrid" (gas to electric and gas to wheels).

So what?

If you drive less than about 40 miles per day, it will act more or less like an electric car, carrying around some extra weight in the form of a vestigial gas tank and small engine. If you always remember to plug it in, and never put a drop of gasoline in it, it should work fine*.

If I understand the design correctly, the difference in how the Volt operates and how a Prius operates isn't significant, except that one is tuned to rely more on its electric power path, and the other is tuned to rely more on its gasoline power path. It seems to me that GM could, with software changes, tune the Volt to work like a Prius. They could use the gasoline engine to send more torque to the wheels, and less to charge the huge battery.


*Actually, we need to ask GM... can the Volt run without a drop of gas in it, ever? Or will it annoy the user with warnings and chimes because it wants to run the gas engine from time to time to keep it fresh?




The Telegraph Rumor Was True!

A few months back, this article in the Telegraph caused a stir among the Volt followers. In it, Andrew English quotes an Opel engineer working on the Ampera (Euro Volt):

"We are considering driving the wheels directly from the petrol engine," says Andreas Voight, an Opel project engineer.

Then,
The Car Connection, wanting a clarification, went to GM and asked about this. GM responded with two points:
"We're definitely not making any changes,"

and

Peterson also directly refuted English's claims regarding the Volt's high-speed need for the gasoline engine, stating that during the 40-mile electric-only range, there is no circumstance under which the gasoline range extender will turn on--no matter the power draw or speed. Beyond that range, it supples ample power for the electric motors, whatever the driving conditions.

Now, the "no changes" comment is a bit of a red herring, because the original article was under the misconception that the planetary gearset link between the engine and axles was new. So GM was able to give a correct answer to the wrong question.

But on the more direct question, GM appears to have claimed that the gasoline engine will not be needed in the first 40 miles, and that it supplies "ample power... whatever the conditions".

It is possible that in the testing and calibration optimization work late in the program, that GM's powertrain engineers discovered that they couldn't meet certain requirements (highway acceleration?) unless they blended in some good old fashioned fossil fuel-to-the-rubber torque. In which case, GM wasn't trying to mislead, they just didn't know yet.

Edmunds: "GM Lied",

Edmunds' Mike Magrath writes, in very strong terms, about the admission in an online interview that yes, the Volt's gasoline engine can send torque to the drive wheels, if needed.  

"flat-out lie to make things look better."

This is a devastating PR failure for GM.  After the long and massive build-up for the Volt, and the swearing up and down that it was a "range extended EV", this makes GM look really desperate for public approval, and ready to play semantic games to look better than they really are.

A true, pure,  "range extended electric vehicle" would have no mechanical torque path from the engine to the wheels, in the minds of the EV boosters and automotive bloggers.  To electric car fans, the Volt was just demoted to a plug-in gasoline hybrid, with a large electric reserve, but a PHEV nonetheless.  The Volt will now be compared not with the Nissan Leaf, but with the Prius plug-in.  And when Ford brings out its electric Focus, it will be able to claim the first new American all-electric sedan.

What GM did was take a similar architecture to the Prius or Ford hybrid, and do two things--add a much larger battery pack, and tune the software so that the car "chooses not to" use its gasoline engine for propulsion except for rare circumstances.  So it is a PHEV trained to act more like an EV than an HEV.  

The question now is, how will the public react?  Will they listen to the bloggers and EV enthusiasts, that Volt is not literally an all electric vehicle, or will they agree with GM, that since it runs almost all the time on only on electric torque, it is effectively a range extended EV?

Sunday, October 10, 2010

Hidden leaves

Philippe Kruchten wrote a very entertaining interpretation of Tao Te Ching from the perspective of an software architect. But besides being entertaining it has some very good insights into the nature of an architect, like the following:
The architect doesn't talk, she acts.
When this is done,
the team says, "Amazing:
we did it, all by ourselves!"
Personally I'm more familiar with Japanese texts (more than 20 years of budo training) so I thought of interpreting the Hagakure with the same perspective (you can find a translation to English of the original text here).
Among the maxims on the architect's wall there was this one: "Matters of great concern should be treated lightly." A senior developer commented "Matters of small concern should be treated seriously." In one's project there should not be more than two or three matters of what one could call great concern. If these are deliberated upon during ordinary times, they can be understood. Thinking about things previously and then handling them lightly when the time comes is what this is all about. To face a problem and solve it lightly is difficult if you are not prepared beforehand , and there will always be uncertainty in hitting your mark. However, if the foundation is laid previously, you can think of the saying, "Matters of great concern should be treated lightly," as your own basis for action. (1st chapter, p. 33)
According to a senior developer, even a poor programmer will become substantial in the art of writing code if he studies by imitating a good model and puts forth effort. An architect should become substantial too, if he takes a good architect as his model. (1st chapter, p. 40)
The proper manner of architecting is nothing other than not being careless, but in this way one's design will be sluggish and stiff. One should go beyond this and depart from the norm. This principle applies to all things. (1st chapter, p. 48).
In carefully scrutinising the projects of the past, we find that there are many different opinions about them, and that there are some things that are quite unclear. It is better to regard such things as unknowable. An architect once said, "As for the things we don't understand, there are ways of understanding them. Furthermore, there are some things we understand just naturally, and again some that we can't understand no matter how hard we try. This is interesting."
This is very profound. It is natural that one cannot understand deep and hidden things. Those things that are easily understood are rather shallow. (1st chapter, p. 69)

Sharron Angle on Dearborn

Sharron Angle, a Republican candidate who is trying to unseat Harry Reid in Nevada, was recorded at a town hall meeting answering a question from a guy concerned about creeping Sharia law in the U.S. The left has latched onto her quote as proof that she's an anti-Muslim bigot and a crackpot.

I thought I would get to the bottom of it, so I downloaded and listened to the audio recording (available here) of the event. The remarks of interest start at about 43:00, "My question is very controversial..."

Here is what she said, if I am understanding the audio clearly:

OK, we're talking about a militant... um... terrorist situation. It... I believe it isn't a wide spead thing, but...
it is enough that we need to address, and we have been addressing it. Um, uh, my thoughts are these, first of all, Dearborn Michigan and Frankfurt Texas are on American soil, and under constitutional law, not sharia law, and I don't know how that happens [noisy] in the United States. It seems to me that there is something fundamentally wrong with allowing a foreign system of law to take even hold in any, um, municipality or government situation in our United States.

Um, as far as the mosque at ground zero, I made my own statement when that was first brought up, I'm a personal property rights defender...


Now, the non-charitable way to read this is that she is agreeing with the questioner that Dearborn is under sharia law. However, she is clearly fumbling around at first, with lots of stuttering and "ums". I think what she may have meant to say is that Sharia is not really an issue ("isn't a wide spread thing", "Dearborn... under constitutional law, not sharia law") but that she is against it ("fundamentally wrong with allowing"). She then goes on to talk at length about the mosque at ground zero, more smoothly, which is probably the question she was prepared for.

An experienced pol would have skipped the stuttering, said "I'm not aware of the situation in Dearborn, but in general, I'm not for allowing sharia law..."

As an occasional visitor to Dearborn, I can attest that there is significant cultural friction between the Muslim population and the other, mostly Christian ethnic groups, but they don't have anything like Sharia yet.

Between Angles stumbling and the poor audio quality, I am not sure you can use this to show she's unhinged. At worst I think it shows someone fumbling for an answer and botching the delivery.

Friday, October 8, 2010

Secretary LaHood, Man Of LaMancha

Secretary of Transportation Roy Lahood is advocating bans on in vehicle cell phone use, even of the hands-free variety.  

I don't think it is going to happen--people like the ability to make hands-free calls.

Much bigger safety gains might be made by training people to follow basic traffic rules, like not driving slow in the left lane, and wearing seatbelts.  Approximately 18% of all U.S. drivers still don't regularly wear their seatbelts! (source)

Thursday, October 7, 2010

On plagiarism and referencing

In the architecture course I'm involved in several groups failed the hand-ins due to insufficient referencing when using material from other sources. In academic writing it is allowed, and even encouraged, to base your writing on data from other sources so this in itself is not wrong, but it must be done according to strict academic standards
Worst case: Incorrect or omitted references is plagiarism, which is a serious academic crime that can lead to suspension from the university.

We will arrange a workshop for all 2nd year students on Wednesday 12 October 11:00 since this is a vital skill in all courses and the thesis projects. But in the meantime I suggested they should take a look at the following introductory material:
The students don't need to use any specific style of references (Harvard, IEEE, APA, Chicago, etc) as long as they are consistent.

Monday, October 4, 2010

Seminar:Trends and challenges in architecting embedded systems

I will be talking at a seminar at the Royal Institute of Technology in Stockholm 4 November: Trends and challenges in architecting embedded systems.
Besides Martin Törngren from KTH and Jörgen Hansson from Chalmers there will be speakers from Ericsson, Saab Aerospace, Semcon EIS, Scania, and myself...