It unnecessarily runs the first three lines of code before checking a condition it could just as well check right at the start. You're right that it is clear that it is modelling a state machine, but it is doing it in a way that is concerned with the fact that is a state machine, rather than a representation of something which happens to be a state machine.
If I'd written that piece of code, I wouldn't love to bring it up at all. I'd blow up the source control server and deny all knowledge.
Visual Studio 2010, Expression Studio, Office Live Web Apps, SharePoint. Dynamics xRM, most of the SQL Server tools, all their websites and browser-based SaaS (Bing Maps, Hotmail, Spaces etc). Huge chunks of the Azure cloud platform. Most of the pre-installed applications on Windows Phone 7. In fact, these days it's used for pretty much everything except Windows, core Office and the SQL Server engine.
It unnecessarily runs the first three lines of code before checking a condition it could just as well check right at the start. You're right that it is clear that it is modelling a state machine, but it is doing it in a way that is concerned with the fact that is a state machine, rather than a representation of something which happens to be a state machine. If I'd written that piece of code, I wouldn't love to bring it up at all. I'd blow up the source control server and deny all knowledge.
Visual Studio 2010, Expression Studio, Office Live Web Apps, SharePoint. Dynamics xRM, most of the SQL Server tools, all their websites and browser-based SaaS (Bing Maps, Hotmail, Spaces etc). Huge chunks of the Azure cloud platform. Most of the pre-installed applications on Windows Phone 7. In fact, these days it's used for pretty much everything except Windows, core Office and the SQL Server engine.