Cost Accounting with Scrum

Here is another in my occasional series on the finer points of scrum.  See also Sprint Planning with Time Separation.  Cost accounting seems inimical to scrum, philosophically, and also infeasible.  We use story points for a reason, and then we let the team discover its velocity through experience.  Neither of these numbers is readily convertible into dollars, but that’s exactly what we’re going to do.

If the latest sprint delivered 70 story points, those points are worth $402 each.

Our goal is to calculate how much was spent to develop a certain feature.  This can be to support a cost-benefit analysis, to track development as a capital investment, or to claim an R&D tax credit.

The team’s velocity is the number of story points it can complete in one sprint, typically two weeks.  Velocity changes from one sprint to the next, but the key is – we know the velocity of the most-recent sprint, and that’s the one we need to account for.

We also know how much it costs to run a sprint.  Let’s say that we have a seven-person scrum team with an aggregate base salary of $677,500.  Adding an 8% burden rate and dividing by 26, we calculate that the cost per sprint is $28,142.

So, if the latest sprint delivered 70 story points, those points are worth $402 each.  Now, let’s say that two capital projects absorbed 65 of the 70 points, plus a stray five-point story that fixed a bug or something.  It was a regular expense.  Here is the cost allocation:

It’s easy enough for the scrum master to load these figures into an accounting system at the end of each sprint, but it does require each user story to be tagged with the project it represents.  If you’re using Jira, it’s best to group the stories into epics, which represent new features, and include the capital project identifier (i.e., an account number) on the epic.

Rethinking Electric Cars

While battery-electric (BEV) vehicles may help reduce atmospheric greenhouse (GHG) gases, their production damages the environment in other ways, including water pollution.  Furthermore, BEV production is so energy-intensive that, on a lifecycle basis, they produce almost as much carbon emissions as traditional internal combustion (ICE) vehicles.

The lithium-ion battery in an Audi e-Tron weighs 1,500 pounds, making this “green” vehicle heavier than a Dodge Ram pickup truck.  The same goes for Tesla.  Upscale electric cars are monstrously heavy, with minimum 1,000-pound battery packs.  It’s easy to see how this extra weight must entail extra mining, milling, and manufacturing.

More plebeian vehicles, like the Chevy Bolt, still carry 400 pounds of battery.  Depending on the battery type, this might include 10-15 pounds of lithium, similar amounts of cobalt and manganese, and maybe 100 pounds of aluminum.  These elements all come from nasty, toxic, open-pit mines in places like Mongolia, Chile, and the Congo.

“In Chile’s Atacama salt flats, mining consumes, contaminates and diverts scarce water resources away from local communities”

Sixty percent of the world’s cobalt comes from “artisanal” mines in the Congo.  That’s a fancy way of saying that African children dig for it in the mud.  If you don’t believe me, believe the photos from Amnesty and the UN.  The Katanga region has been named one of the world’s ten most polluted areas.  As one Twitter wag put it, “electric cars transfer pollution to poor communities and sanctimony to rich ones.”

Lithium is produced either by mining or from brine evaporation.  The latter process is cheap and effective, but uses roughly 500,000 gallons of water per ton of lithium.  This has been a problem for local farmers in Chile.  Apart from direct water consumption, both processes have the potential to leak toxic chemicals into the water supply.

Lithium production has been growing rapidly to meet the demand for electric vehicles, and now stands at 100,000 tons per year.  Demand forecasts to 2030 range from 2 to 3 million tons – that is, 20 to 30 times current production capacity.

The mine at Thacker Pass in Nevada sheds some light on the economics.  Lithium recently hit a record $71,000 per ton.  Producing one ton of lithium entails strip mining 500 tons of earth, and Thacker Pass has the potential to produce 60,000 tons of lithium per year.

You may think that we have no choice but to despoil the planet in search of battery metals, because climate change is the greater threat.  Consider, though, how much diesel fuel is burned by all of these mining operations.  On a lifecycle basis, electric vehicles barely improve upon the GHG emissions of a traditional ICE vehicle.

“We estimate the GWP from EV production to be 87 to 95 grams carbon dioxide equivalent per kilometer (g CO2-eq/km), which is roughly twice the 43 g CO2-eq/km associated with ICEV production”

An electric vehicle begins its service life with roughly double the carbon footprint of an ICE vehicle.  Thereafter, it will produce less GHG depending on the local power source.  As of this writing, 60% of electricity in the U.S. is generated from fossil fuels.

Lifecycle emissions for the BEV break even with the ICE vehicle around 80,000 miles of use.  Here is a recent research note placing the breakeven point at 124,000 miles, and here is an ambitious study which calculates the total global warming potential (GWP) along with other forms of ecological damage.

Below is the chart from the study.  You can see that the various electric vehicles improve slightly on ICE vehicles for GWP, but look at those other metrics!

In case you don’t have the legend in front of you, those four metrics where the electric vehicles far exceed ICE vehicles are:

  • Human toxicity
  • Freshwater eco-toxicity
  • Freshwater eutrophication
  • Mineral resource depletion

It’s the water pollution that bothers me.  Water scarcity is one of the principal threats from global warming, already a clear and present danger, and yet here we are polluting tons of it to make batteries.

The great hope here is recycling.  To the extent that minerals can be reclaimed from batteries at the end of their service life, this could reduce demand for new mining.  Unfortunately, current capabilities for recycling are not great.  They have low yields, and they’re energy-intensive.

So, it’s that catch-22 again, where we burn a load of fossil fuel to recycle our “green” batteries.  If car makers really had faith in recycling, they would not be pressing the government to relax environmental protections around lithium, cobalt, and nickel mining.

The tragedy is that ICE vehicles were making good progress toward the fabled circular economy.  When I worked for BMW, there was a goal to make cars 95% recyclable.  Our engineers designed everything to be removed, refurbished, and recycled into new cars.  If someone ever figures out “net zero” recycling, I’m sure it will be BMW, but meanwhile we are facing a growing pile of battery waste.

I have kept this post short by focusing only on the ecological dangers of battery-electric vehicles, and overlooking other challenges, like grid capacity.  Nor have I discussed alternatives, of which there are many.  There are social solutions, like mass transit and remote work, as well as engineering solutions.

“Electrification is a technology chosen by politicians, not by industry.”

In this interview, Carlos Tavares alludes to EV hybrids.  Other solutions, like fuel cells and hydrogen combustion, have received a fraction of the attention and investment given to electric vehicles.  As Tavares says, this is a result of politicians’ need to be seen taking action, even if that action is ill-advised.

With mandates in one hand, and billions of incentive money in the other, politicians are stampeding the industry toward their chosen technology.  This is not the right way to stimulate innovation.  Regulators should specify a carbon-emissions target, taking the full lifecycle into account, and then allow industry R&D to find the best solution.

The Power of Experience

I have been rereading Gary Klein’s landmark book on decision-making, Sources of Power.  Klein’s genius was something other sciences take for granted: field work.  Klein and his team spent years studying how experts make high-stakes decisions in real life.  This is truly “what they don’t teach you in business school.”

The short version is that formal methods for decision making are rarely used in real-life conditions.  Indeed, the people studied by Klein were not even conscious of making decisions.  They just knew what to do.  When a surgeon must make a snap decision, with someone’s life on the line, there’s no time for a weighted-factor analysis.

Most research on decision-making bleaches out the importance of prior experience

Klein points out that most psychology research, in an effort to produce controlled conditions, bleaches out the importance of prior experience.  If you do all your research in a laboratory, then you will only learn how people make decisions in a laboratory – not in combat, say, or a forest fire.

Like his better-known colleagues Kahneman and Tversky, much of Klein’s research was funded by military organizations.  They would like their gunners and squadron leaders not to make fatal blunders under fire.  Also included are doctors, firefighters, and nuclear power plant operators.

The power of experience seems obvious enough, but Klein figured out exactly how it works, in a framework called the Recognition-Primed Decision Model.  This consists of using imagination plus experience to generate possible courses of action, and then conducting mental simulations to predict the likely results.

Sources of Power

Various “sources of power” follow from the model:

  • Expert Intuition
  • Mental Simulation
  • Finding Leverage Points
  • Detecting Anomalies
  • Reasoning by Analogy
  • Anticipating Intentions

What we think of as intuition is really expert recognition.  One firefighter recounted a narrow escape because he’d had a “premonition” the building he was working in was about to collapse.  This might have been a warning from God – or it might have been the million subtle cues he was unconsciously observing.

This may seem like a different realm from business, where we have ample time to make decision trees, compute expected values, perform cost-benefit analyses, and – there’s always time for one more Big Four consulting study.  This is an illusion, however.  Whether they know it or not, managers are under constant pressure to make decisions and take action faster than their competitors.

A good plan, executed right now, beats a perfect plan executed next week.

My mentor at AutoNation, Kevin Westfall, had a plaque in his office with this quote from General George S. Patton, “a good plan, executed right now, is far better than a perfect plan executed next week.”  Kevin and I had both arrived from our previous employer with some impatience over their decision protocols.

Recognition-Primed Decision Making

In an area that could easily devolve into pop psychology, I was impressed by Klein’s scientific rigor.  Every study is cross-checked, blind, double-blind, sanitized, etc.  Every result is turned into a training program, and then the trainees are tested.  In one project, his team redesigned the user interface for a computerized weapons system, making its operators 20% more effective.

Since experience is so powerful, Klein takes up the question of how best to gain it.  That is, what are the key lessons from the old-timers in various domains?  In the infantry, this might mean knowing how fast your squad can move over terrain, what their best range is for engagement, and being able to gauge those distances by eye.

The cornerstone of the book is the RPD framework, and then Klein spends a chapter on each “source of power,” plus his research methods and training programs.  If that sounds like too much psychology for you, skip the text and just read the case studies.  They’re amazing.

Paying Bills for American Motors

My first Big Six consulting engagement, right out of MBA school, was solving a catastrophic failure in the Accounts Payable system of American Motors Corp.  You may recall AMC, they produced the Gremlin and the original Jeep.  This was right around the time of their acquisition by Chrysler, a sensitive time for the company.  The building still wore the red, white, and blue AMC logo, but the Chrysler employee newspaper was on the stand in the cafeteria.

It was on me to figure out what in hell had caused this popular and bulletproof software to fail. 

They were also just about to launch two new assembly plants in Canada, at Brampton and Bramalea, Ontario.  The launch, and maybe even the acquisition, was jeopardized because AMC had suddenly lost the ability to pay its suppliers’ invoices.  They had devolved to a purely manual process, paying months late, and their suppliers were threatening to cut them off.  Without a functioning A/P system, there would not be many parts shipping to the new plants in Canada.

The classical A/P function revolves around the “three-way match.”  Starting with the invoice, you must locate the purchase order for the goods and the slip from the receiving department showing that the correct goods had arrived.  As you can imagine, a giant manufacturing company cannot possibly perform this task on paper.  American Motors had been running the McCormack & Dodge suite of accounting software, and that was the proximate cause of the failure.  My assignment was to diagnose and fix the failure.

The Director of the A/P department had collected all of the invoices, receivers, and purchase orders into file boxes on tables in a huge room.  This had been a big conference room, maybe, or a gymnasium, and he had hired a platoon of “account temps” to run around the room looking for three-way matches.  Once someone found a match, they would run down the hall to the cashier and authorize payment of the invoice.  It was like a demented Chuck Barris TV game show.

The mad rush to pay months-old invoices was destroying any organization that might once have existed.

For me, as a programmer, this provided a stunning visualization of what this work must have looked like in the dark days before computers.  Of course, in those days, they would have been prepared for it.  Here, the mad rush to pay months-old invoices was destroying any organization that might once have existed in the file boxes.  The A/P director’s job was on the line and, over the weeks of my engagement, he aged ten years.  This poor devil was my client.  I could see the dark circles and the grey hair progressing as I greeted him each morning.

I should note that a new consultant doesn’t get a big job like this on his own but, as “senior schmuck onsite,” I was running the engagement.  Occasionally, higher-ranking consultants would show up to offer an opinion, not do any actual work, and bill four hours to the job.  Also, as the only one with any computer skills, it was on me to figure out what in hell had caused this popular and bulletproof software to fail.

Our method had two prongs of attack.  First, we brought in several junior, not yet CPA, staffers from our audit practice, and put them to work matching invoices.  This was basically the same process as in the gym downstairs, only our people were going to be smarter and look for patterns that might provide some clues.  Plus, we could bill for them at 100% realization.

Meanwhile, I would learn everything I could about the failing A/P system and its friends, the Purchasing system and the General Ledger system.  I read all three APRMs (Application Programmer’s Reference Manual, pronounced “A-Parm”) from cover to cover.  I read all the Job Control Language, the job streams, and much of the COBOL source code.

The only people dumber than the A/P department are these consultants!

I also got invited to defend our work at an executive meeting on the top floor of the AMC building, where I met the Vice President of Purchasing.  This was a big bull of a man, obviously some kind of ex-jock with a lot of red meat in his diet.  He pounded my guy mercilessly, and the preliminary stats from our auditors were no defense.  “The only people dumber than the A/P department,” he roared, “are the consultants hired by the A/P department!”

Eventually, I traced the failure to one specific job running one specific program, P1X030, the “matching module” itself.  All data flowing into, out of, or around this module were good, except that something like 90% of invoices went unmatched.  I called my manager up from Detroit and we went over the results.

I enjoyed working with Ken.  Back in those days, computer skills were considered déclassé.  I was the only consultant who could write a lick of code, and Ken was our only “technical” manager.  Eventually, the firm would get rid of Ken, and then me, in favor of a more golf-oriented practice.

“What about the exception report?” Ken asked, “is it dummied out?”  I checked the JCL.  Systems programmers would often streamline an implementation by suppressing some of its printouts but, no, P1X030 was faithfully printing a list of its reasons for rejecting 90% of the invoices.  “Let’s go for a walk,” Ken said.

We walked about half a mile, the length of the big, mainframe computer facility.  There, lying on the output table, was P1X030’s exception report.  Ken rapped on the window of the control room and spoke with the operator.  The report spooled off his printer every night, and then lay unclaimed on the table.  The operator had been collecting the old reports, and he was relieved to the be rid of them.  This was line-printer paper, boxes of it.  I waited while Ken went to find a hand truck.

The problem, printed mechanically line after line, was that the Purchasing department had been neglecting the important task of generating proper purchase orders.  They had been ordering the suppliers, probably in the same tones I had heard in the boardroom, simply to ship now and worry about the numbers later.

Purchasing had evidently instructed the suppliers to invent random P.O. numbers.  Our auditors had found a few clinkers, like 12345678 and 00000000, but mostly we had no clue.  If anyone had thought to ask a supplier, they would have been afraid to admit it and, anyway, it would have been the Purchasing department doing the asking.

I wrote up our findings and Ken presented them to AMC management.  He wheeled his hand truck into the boardroom and, for dramatic effect, read off the first few variants of “missing or invalid purchase order number.”  We included a report from P1X030, tabulating the various ways in which its safety features had been defeated.

There was no system failure for me to fix, so that concluded our engagement.  As to the failure we did find, management seemed eager to fix that one on their own.