speed

Measuring Scrum team productivity/speed with Function Point Analysis

I bought my first copy of Agile Software Development with Scrum, by Schwarber and Beedle back around 2002, I think. I was just thumbing through it last night when I saw that they use Function Points as a metric to demonstrate the velocity that agile software teams achieve, and more specifically use it to show that some teams develop software much faster using Scrum.

I didn’t know about Function Point Analysis back in 2002 — I didn’t become a Certified Function Point Specialist until about two years later — so I probably just skimmed over that line then, but when I saw it last night I thought it was cool that they used function points as a metric for software team development speed.

A note about Scala/Java startup time

I was reading this post by Martin Odersky (Make the Scala runtime independent of the standard library) and came across this comment by Li Haoyi: “This would also make it more feasible to use Scala for tiny bootstrap scripts; current Mill’s launcher is written in Java because the added classloading needed to use scala.Predef (even just println) easily adds a 200-400ms of initialization overhead.” I haven’t written anything where the startup time of a Scala application was a huge problem, but that was interesting to read.

(Though I should say that I wish all Scala/Java command-line apps started faster. It’s one reason I occasionally think about using Haskell for small scripts, so I can compile them to an executable.)

“Every person in your company is a vector”

“Every person in your company is a vector. Your progress is determined by the sum of all vectors.”

That’s a quote from Elon Musk. In this context a vector is what I know about from my engineering background, a company of both a speed and a direction, something like this:

case class Vector(speed: Double, direction: String)

The correct thing about that quote is that the worst employees I ever had pulled in a direction that was somewhere around 180 degrees opposite of the direction we were aiming for. For example, if nine out of ten employees are rowing a boat that’s headed east, an employee that’s rowing towards the west is going to slow everyone else down.

Unfortunately I never had much success turning those people around, so they were always fired or encouraged to find other work. Over the years we had everything from people whose work had to be completely re-done to people who had agendas during the 8-5 work hours that had nothing to do with the company’s agenda.

A Scala method to run any block of code slowly

The book, Advanced Scala with Cats, has a nice little function you can use to run a block of code “slowly”:

def slowly[A](body: => A) = try body finally Thread.sleep(100)

I’d never seen a try/finally block written like that (without a catch clause), so it was something new for the brain.

In the book they run a factorial method slowly, like this:

slowly(factorial(n - 1).map(_ * n))

FWIW, you can modify slowly to pass in the length of time to sleep, like this:

def slowly[A](body: => A, sleepTime: Long) = try body finally Thread.sleep(sleepTime)