Development processes at Microsoft

This article provoked a lot of discussion about software development and architecture where I work.

With a few more weeks for managing the transitions between the phases of development, some extra time for last-minute fixes to both the beta and the final build, and a few weeks to recover between versions, the result was a two-year development process in which only about four months would be spent writing new code. Twice as long would be spent fixing that code.

For me, this paragraph sums up where multi-year release cycles are just plain wrong:

In addition to making the Visual Studio team enormously unresponsive, this development approach wasn’t much good for team morale. A feature developed during the first development phase wouldn’t properly get into customer hands for the better part of 18 months. For Windows and Office, with their three-year cycles, the effect is even worse. A developer could be waiting more than two years before the work they did would ever make it to end users. Most developers actually want their software to be used; it’s just not that satisfying to know that you’ve implemented some great new feature that nobody will actually use for years. With Microsoft’s long development cycles, a developer may not even be on the same team—and may not even be at the company—by the time their code makes it to desktops.

Leave a comment

Filed under Programming

Brain-Inspired IBM Chip Puts Traditional Computers To Shame

Article from NBC news on IBM’s new computer chip. Apparently it has 5 billion transistors on a single chip.

Leave a comment

Filed under Technology

Book Review: Hell’s Kitchen, Jeffery Deaver

Hell's Kitchen, Jeffery DeaverIn this book, Deaver introduces yet another new character, John Pellam (that’s along with Lincoln Rhyme and Kathryn Dance who are both sort of investigators). It took a while to get to know John Pellam, unlike the others, to whom Deaver cleverly introduces the reader in each other’s books. He’s not the typical star of a thriller – he works in the movie business, yet this book isn’t set in Hollywood or even on a film set, so the book plodded along until the real plot emerged. Fortunately, Pellam turns out to have experience as a stunt man, just as the action gets tough and he needs to roll with the punches.Three stars

Leave a comment

Filed under Book Review

Book Review: The Redeemer, Jo Nesbo

The Redeemer, Jo NesboThe quality of writing by Jo Nesbo (or possibly the translator?!) hits you as soon as you begin his books – this one is every bit as good as The Redbreast. Whilst some of the Harry Hole books are grisly, this one doesn’t rate too high on the bloodthirsty scale (although one incident with a vacuum cleaner isn’t for the squeamish).Five Stars

Leave a comment

Filed under Book Review

Book Review: The Concrete Blonde, Michael Connelly

The Concrete BlondeThis is another book in the Harry Bosch series from Michael Connelly. There are strong connections to another book in this series, The Dollmaker, so best to read that first. I particularly liked that we followed two story lines, the first being a court case with Harry Bosch unusally appearing as the defendant, the second being a new investigation into a murder. On the personal level, we found out some more about Harry’s relationship with Sylvia – but, strangely, no mention of Harry’s daughter at all (in other books, she lives with him and is quite significant in the story). Four stars

Leave a comment

Filed under Book Review

F# equivalent of C++ ‘Most vexing Parse’

I first read of the C++ “Most Vexing Parse” in the Scott Meyers Effective C++ series. For reference, here’s the code:

double aDouble;
int i(int(aDouble)); // This doesn't do what you think

The commented line actually declares a function i that takes a single integer parameter and returns an integer. Now, today, I saw something similar in F# that made me scratch my head and I think is similar:

let func a b c =
    return a + b + c

let main () =
    let sum = func a b
    // use sum
    0

The symptom was that my function (here, called func) wasn’t being called. Yet stepping through in the debugger, I could break on the line that called it – yet it wouldn’t step into the function! Of course, by missing one of func’s parameters in the function call, I’d actually declared sum to be a new function taking one parameter (or to use functional terminology, I’d curried a and b).

This is hard to spot when the calling code and function declaration are in separate files and when you’ve added a new parameter to the function and it still compiles but doesn’t do what you expected!

Leave a comment

Filed under Programming

Birthday Paradox

Nice write-up of The Birthday Paradox on the BBC today.

It’s puzzling but true that in any group of 23 people there is a 50% chance that two share a birthday.

Some bright spark noticed that, with exactly 23 players in each World Cup 2014 squad, here was a topical example with which to test the theory, by which at least half of the 32 squads are expected to have a shared birthday.

Using the birthdays from Fifa’s official squad lists as of Tuesday 10 June, it turns out there are indeed 16 teams with at least one shared birthday – 50% of the total.

Leave a comment

Filed under Musing

How to get file names under a folder in C++

As per my earlier post How to transform between a double date-time and std::string in C++, some things are surprisingly hard in C++, especially compared to writing in a .NET language. I recently tracked down this useful snippet of code on the internet in order to recursively build a list of files matching some file extension under a folder. This only compiles on Windows – if you want something cross-platform, look at boost (I wanted to avoid bringing the boost filesystem library into my project as yet another dependency).

void accumulate_files(
  const std::string& folder,
  const std::string& extension,
  std::vector<std::string>& file_names )
{
  std::ostringstream oss;
  oss << folder << "\\";
  std::string search_path = oss.str();

  WIN32_FIND_DATA fd;
  HANDLE hFind = ::FindFirstFile( search_path.c_str(), &fd );
  if( hFind != INVALID_HANDLE_VALUE)
  {
    do
    {
      std::string file_name = fd.cFileName;
      std::ostringstream full_file_name;
      full_file_name << folder << "\\" << file_name;

      if ( boost::algorithm::ends_with( file_name, extension ) )
      {
        file_names.push_back( file_name );
      }
      else if ( file_name != "." && file_name != ".." && !file_name.empty() )
      {
        // Recursively call into next directory
        accumulate_files( full_file_name.c_str(), extension, file_names );
      }
    }
    while( ::FindNextFile(hFind, &fd) );

    ::FindClose(hFind);
  }
}

For production code, you’d also want to wrap the file handle in a smart pointer to ensure it gets closed properly for exception safety.

4 Comments

Filed under C++, C++ Code, Programming

cpplinq – functional style for C++ using lambdas

I’ve just tried out CppLinq, a C++11 library that brings LINQ-style syntax into scope for C++ programmers that are used to writing code in a functional style. I’ve been using C++11 lambdas with STL algorithms like foreach, transform, accumulate – but this syntax using where, for_each, sum and ‘>>’ to chain commands together is so much neater. In fact, it brings C++11 style very close to the succinct F# piping style that is so popular.

To use cpplinq, you can just download a single header file and include it in your code. Awesome – having just battled for hours to use some other 3rd party library which required multiple libs, source files and compiler switches, this is so easy by comparison.

This Dr Dobbs article has several code examples which act as an simple tutorial.

1 Comment

Filed under C++, Programming

Book Review – Riding Rockets, Mike Mullane

Riding Rockets, Mike MullaneHaving first read An Astronaut’s Guide to Life On Earth by Chris Hadfield I was interested to see how this book by another space shuttle astronaut would compare. It’s every bit as good, but in a completely different way. Whilst Chris Hadfield impressed me with his professionalism and values, someone you’d want on your team, Mike Mullane came over as more of a laugh and a guy with whom you’d enjoy a beer. But behind the terrible jokes and politically incorrect attitude, the book reveals a man with great pride, a drive to be the best and a lot more sensitivity to his colleagues and family than I first suspected. Coupled with the author’s insight into historical events concerning NASA and the shuttle program, this is a brilliant book.
Five Stars

Leave a comment

Filed under Book Review