Tangential comments about Software Development

Wednesday, September 02, 2015

My Gift to the Consulting Community

We tried a new metaphor in discussing ideas. I found it helpful, so I open-source it to the world. If you come across it in a consultant's presentation, it's all down to me, your hear? Me!

"Will this idea fly?" said a colleague. "Interesting, I thought, let's apply the four forces in aviation."

Thrust is the effort we're putting in
Weight is the cost of the people involved
Lift will be the sales income, but in a start-up phase it's products, prototypes, maybe just enthusiasm
Drag will be barriers, distractions, doing the wrong thing, pessimism

The way I'd use this metaphor is to say that we can make a project "fly" by increasing thrust or lift, or decreasing weight or drag. If everyone's working for free for ever, then weight is zero so when there's some lift it will fly.

At other times, I'd discuss progress in terms of what was providing lift, what was providing drag, and ask ourselves it we can increase one or decrease the other.

It's a nice metaphor, because everyone can relate both to the image of soaring into the air, and to huffing and puffing along without take-off.

By the way, I designed the image on an iPad using Canva - worth checking out.

R-membering How To Code

It's an interesting exercise to see if you can still code in a language that you haven't used for a while. It's been three years since I used the R language for statistical analysis. I knew it was the right choice for my monthly analysis of my London Bus usage so yesterday I downloaded a copy, built a script (see below) and ran it.

It all went well. Admittedly, it was a case of Computer Programming To Be Officially Renamed 'Googling Stackoverflow' as there was almost nothing I remembered straight off. But it was quicker to re-learn the right tool rather than push myself to make an Excel-based solution or to write a C# program from scratch.

Of course, you're dying to know the results. Over ten months I have taken 652 bus journeys on 54 different routes. There are 12 routes I have used ten or more times, with the 45 bus (Camberwell to Farringdon) the most frequent at 131 times.

# ctrl-L to clear console
rm(list = ls(all.names = TRUE)) 

files = list.files(path="c:/documents/oystercard/", pattern="*.csv")
files <- paste("c:/documents/oystercard/",files, sep="")
all ="rbind", lapply(files, function(x) read.csv(x, stringsAsFactors = FALSE)))

y <- all[ substr( all$Journey.Action, 0, 11 ) == "Bus journey", ]
y <- droplevels(y)

# y$Route = factor(substr(y$Journey.Action,20,23))
y$Route = substr(y$Journey.Action,20,23)
y$Month <- factor(substr(y$Date,4,6))
y$Year <- as.integer(substr(y$Date,8,11))
y$Year[ y$Year < 2000 ] = 2000 + y$Year

y$M <- match(y$Month,
y$YM <- y$Year * 100 + y$M

summary <-$YM))
colnames(summary)[1] <- "YM"
colnames(summary)[2] <- "Journeys"

s2 <-$YM,y$Route))
s2 <- s2[ s2$Freq > 0, ]
s2 <-$Var1))
colnames(s2) <- c( "YM", "Routes")

summary <- merge( s2, summary, by="YM" ) 

ByRoute <-$Route))
colnames(ByRoute) <- c( "Route", "Freq" )

PopularRoutes <- ByRoute[ ByRoute$Freq >= 10, ]

stats <- NULL
stats[ "Number of journeys" ] = nrow(all)
stats[ "Different routes" ] = nrow(ByRoute)
stats <-

PopularRoutes[ with( PopularRoutes , order( -Freq ) ), ]

ByRoute$Route = as.numeric(levels(ByRoute$Route))[ByRoute$Route]
ByRoute[ with( ByRoute, order( as.numeric(Route) ) ), ]