ACCU Meet-up: Lies, Damn lies and Estimates, Seb Rose

Seb Rose gave an excellent presentation on the difficulty of providing estimates in the software industry. He debunked some myths, including the shape of Cone of Uncertainty, and recommended several books on the subject for further reading:

The Leprechauns of Software Engineering 20141021-143907.jpg

A few other points to take away:

  • We are best at estimating small tasks, so split them into 1, 2 or 3 days tasks
  • Express estimates as a range with a confidence level – 90% confident that will take between 2-3 weeks
  • Communication with stakeholders is most important – assess the impact on upstream and downstream systems

I’ve downloaded the Leprechauns eBook – it’s main intention is to persuade the reader that several views that are taken for granted have not been proven in the literature – such as the Cone of Uncertainty as projects progress (the further into a project, the less error in estimates) and the 10X Programmer (some programmers are ten times more productive).

For what it’s worth, my view on the 10X Programmer issue is that, whilst it’s hard to gather the necessary evidence to compare performance across real world projects, there’s little doubt that some developers add much more value to a project than others. This is true of any human activity – queuing in a coffee shop with a handful of baristas serving while the queue barely moves, it’s usually possible to tell the one person who’s actually getting any work done. On holiday, I watched at a cycle hire place while one guy served at least three times as many families as any other.

It may not be 10X productivity in programming, but a star developer will: eliminate swathes of work by adopting a suitable 3rd party library; consistently check-in code that works (unlike his unproductive colleague who always breaks the build and leaves edge cases untested); produce intuitive user interfaces, reducing the hours of support to train new users.

I have Waltzing with Bears on order – PeopleWare by the same authors was excellent, so looking forward to this one.

Leave a comment

Filed under Meetup, Programming, Soft skills, Technology

Heart rhythm-based Password Band

Gigaom reports that Bionym have begun shipping its heart-rhythm-based password band to developers.

A day is nearing where you will be able to open a door or access your laptop based on your unique heart rhythm. Bionym, maker of the Nymi wristband, began shipping units to developers today so they can create applications for the unusual password system. Bionym originally intended to ship the bands to consumers earlier this year, but has been delayed.

There’s a video accompanying the announcement – what really interested me isn’t just the claim that heart-rhythm is individual enough to be used as a secure identifier. It’s also that they see the wrist band being used to interact with devices via gestures – in the video, “Steve” opens his car boot and car door with gestures, and also interacts with the computer in his hotel room via the wrist band:

20141017-191655.jpg

Whilst 3D body gestures are unlikely to have the granularity of a mouse or stylus, it’s interesting to combine identification and interaction in this way.

Leave a comment

Filed under Technology

Japanese broker makes £380 billion fat finger trade

Here is the city reports that a Japanese broker made a massive order by mistake.

The biggest order was for 57% of Toyota – 1.96bn shares of the world’s biggest carmaker

Fortunately he got away with it:

The unidentified broker was able to cancel the trades because they were made through the over-the-counter (OTC) market, which gives traders time to cancel before completion.

Leave a comment

Filed under Uncategorized

Book Review: Foundation and Chaos, Greg Bear

20141005-141505.jpgFoundation and Chaos is the second in a trilogy of books written after Isaac Asimov’s death by distinguished Science Fiction writers. The first was Foundation and Fear, which was okay but included lengthy passages concerning Voltaire and Joan of Arc which I didn’t really follow. This book is much better and centres on the growing populations of mentalics, humans with an assortment of mental powers (like persuasion). It also includes Hari Seldon’s trial as a traitor against the Empire (his prediction of the fall of the Empire being seen as treachery). The debate between rival bands of robots (the Giskardians led by R Daneel and the Calvinians), differentiated by their adoption of the zero’th law or otherwise, is fascinating.

Four stars

Leave a comment

Filed under Book Review

Bruce Dawson – crash investigator

Another great post from Bruce Dawson,
with some valuable tips to check compiler flags in Visual Studio to aid debugging of an entire class of crashes.

/GS, /NXCOMPAT, /DYNAMICBASE, /analyze and all its associated labors – plus actually fixing the bug – took a lot of time, but it was definitely worth it. Most of these changes were trivial and had huge payoffs. Running /analyze was by far the biggest task but, like other smart programmers, I am convinced that it was invaluable. Entire classes of bugs – serious crashing bugs and crazy logic errors – that use to show up quite frequently are now entirely extinct. It is not often that you get to entirely eradicate dozens of types of bugs and doing this definitely increased developer productivity and product reliability.

I’ll certainly check these are set for the projects that I own.

Leave a comment

Filed under C++, Programming

How to achieve pattern matching in C++ using boost::regex

Suppose you are parsing text input and need to handle the string representation of a field that could have several formats. In that case, using regular expressions is appealing because you can try a number of patterns sequentially (taking the most likely first) and exit when you get a match.

When I tried to do this in C++, I found it hard to find an easy example to follow. Here’s the way I’ve been doing it, based on a simple example to parse a length that could be in any of several units of measure:

    #include <boost/algorithm/string_regex.hpp>

    void parse( const std::string& candidate )
    {
        boost::smatch value;

        if ( boost::regex_search( candidate, value, boost::regex( "(.*)ft(.*)in" )) )
        {
            auto feet = atol( value[1].str().c_str() );
            auto inches = atof( value[2].str().c_str() );
            std::cout << "Matched " << feet << " feet and " << inches << " inches\n";
        }

        if ( boost::regex_search( candidate, value, boost::regex( "(.*)m(.*)cm" )) )
        {
            auto metres = atol( value[1].str().c_str() );
            auto centimetres = atof( value[2].str().c_str() );
            std::cout << "Matched " << metres << " metres and " << centimetres << " centimetres\n";
        }

        if ( boost::regex_search( candidate, value, boost::regex( "([0-9]+)mm" )) )
        {
            auto millimetres = atol( value[1].str().c_str() );
            std::cout << "Matched " << millimetres << " millimetres\n";
        }

        throw std::runtime_error( (boost::format( "Failed to match candidate '%1%' with ft/in, m/cm or mm" ) % candidate).str() );
    }

This only uses a fraction of what can be done with regex – the point is to show how to use boost::regex. One gotcha is that, as per the code above, the string matches that are written into value are indexed from 1 – for some reason, the zero’th index accesses the whole candidate expression. Another gotcha is that boost::regex is one of the few boost libraries that isn’t just implemented using templates in a header file, so you also have to add the appropriate .lib into the linker inputs.

1 Comment

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

Usability woes

When working remotely, I am able to log into my desktop machine and work pretty much as if sitting at my desk in the office. Unfortunately, though, whoever wrote the remoting layer thought that “SHIFT+F3” would be an inconspicuous shortcut for logging out immediately, without even a confirmation dialog box.

20140922-093736.jpg

My main applications include Visual Studio and Excel – so I log myself out several times a day when in-the-zone and either searching code or editing functions respectively.

I’ve resorted to taking the key out to avoid the reconnection penalty every time this happens.

Leave a comment

Filed under Musing, Programming

Book Review: The Reversal, Michael Connelly

20140921-105043.jpgThe other day I watched The Lincoln Lawyer, featuring main character Micky Haller as a defence lawyer. I’d read the book long ago and hadn’t realised that Michael Connelly wrote about a second character (having read several Harry Bosch books). Better still, Haller and Bosch are half-brothers and both feature in this book.

The plot is that Haller is asked to appear as an independent prosecutor in an unusual case – a man found guilty 24 years ago faces a re-trial following some new evidence. Haller appoints his ex-wife as co-counsel (yes, really) and Harry Bosch as his investigator. I found it interesting how chapters written in the first person are told from Haller’s point of view, whereas other chapters are narrated in the third person, typically when describing action concerning Harry Bosch. Of course, in Harry Bosch thrillers, his own chapters are in the first person, so it’s clear the focus is on Micky Haller in this one.

I enjoyed this book – the blurb on the cover referred to the threat to Bosch and Haller’s own families which I didn’t think was explored as much as it could have been, but otherwise it was a good read.

20140921-110000.jpg

Leave a comment

Filed under Book Review

Book Review: Inferno, Dan Brown

20140921-102242.jpgThis is another in Dan Brown’s series of Robert Langdon escapades, and follows the usual formula. There’s a brilliant, female co-conspirator who seems to cast aside all her initiative and insight on meeting Langdon, becoming merely a foil for Langdon to show off his knowledge of history of art and symbology. And there’s a peculiar, driven assassin – in Da Vinci code it was an albino monk, here it’s a blond biker with spiky hair, but the character is largely the same.

Dan Brown’s books frustrate me greatly – there’s no doubt that the formula is successful and this book is a real page-turner – but there’s no depth to it. As an example, take Robert Langdon. We’re told he always wears the Harris Tweed jackets and the same make of shoe, has done for 20 years. As a wearer of Berghaus outdoor pursuits equipment, I respect that. Yet within minutes of trying an Italian suit and shoes (surely a case of product placement by the company, Brown mentions the maker so many times for no good reason) he makes a mental note to buy the new brand in the future. What?! So much for brand loyalty.

20140921-103814.jpg

Leave a comment

Filed under Book Review

Flow – the secret to happiness?

Interesting TED talk on “Flow”, that sometimes elusive state in which you feel incredibly productive, in which hours fly by and seem like minutes, and when the activity in which you’re engaged is a joy.

20140914-215717.jpg
It appears that when Sony was founded, they got the idea of flow and set up the company to best achieve it for their engineers. This slide is also interesting:

20140914-215810.jpg
It claims that flow is only possible for high skills, high challenge tasks. That would explain why I regularly achieve a flow state for harder development tasks that require an extensive skillset, yet a more mundane period of bug fixing is less challenging and so is unlikely to lead to flow.

1 Comment

Filed under Musing