Tuesday, 11 October 2011

Object-Oriented Software Construction Review

This post is a review of the book Object-Oriented Software Construction by Bertrand Meyer.

Where to start with this massive tome? Weighing in with other 1200 pages and some pretty deep content, OOSC isn't a quick and easy read. The author bio describes Bertrand Meyer as equally at ease in the software industry and in the world of academic computer science" and his book also straddles the 2 disciplines. There's plenty of interesting material for academics and those interested in the theory, yet the book also contains much practical, useful information which software engineers can use in their day to day work.

Usefully the book uses a new language written by Meyer and others to demonstrate the concepts explained in the book, which makes them much clearer and allows Meyer to show the concepts in their purest form. The book comes with a CD with an environment for using this language (and an electronic version of the book), so you can play around with it to check your understanding of the concepts.

There are some points of controversy in the book regarding which direction is more object-oriented and Meyer acknowledges opposing choices to his and backs up his choices with well though out arguments. By choosing a strict object-oriented viewpoint in the main part of the book, you miss out on details that would be usable in a more common language than the one presented. Mayer addresses this with a section towards the end of the book about object-orientation in different languages, namely Ada, Simula, Smalltalk, C++ and Java as well as extensions for LISP and C. Though as you can see from the list of languages, the books suffers a little here from being originally published in 1994 with the second edition (the version reviewed) published in 2000.

Here are some of the points that I found most interesting or were new to me, there are a lot! (I didn't start taking notes til the 9th [of 36] chapters so there's nothing here from the first 8 chapters):
  • You want 3 things from a garbage collector:
    1. Soundness - Collected objects are unreachable
    2. Complete - All unreachable objects are collected
    3. Timeliness - known average and upper bound on time from unreachable to collected
    Problems in garbage collection occur when passing arguments to functions in other languages.
  • Inheritance and type parametrisation (genericity) are 2 perpendicular ways to be more generic. Reliability (type safety) and reusability (single language element covering different variants) are conflicting but can be solved by type parametrisation. Static typing gives you errors at compile time as opposed to at run time with dynamic typing and because the earlier an error is detected the cheaper it is to fix, this is an advantage of static typing (though does this rule really apply here?). Because of their unspeficiedness, generic parameters in functions can only be used in assignments, equals and calls to other functions that take generic parameters.
  • For a component to be considered reliable, it must perform to it's specification and also handle cleanly, cases outside it's specification.
  • There are only 2 legitimate responses to an exception: retrying or reporting a failure to the caller. If failing the catch block or equivalent must first restore the object to a steady state.
  • An overlooked aspect of reusability is that a language should allow you to access code written in a different language. OO is more about the modular organisation of a system that the line to line coding.
  • From the perspective of types, inheritance is specialisation, from the perspective of a module, inheritance is extension.
  • Types can be useful when the code is being read by a human for showing intent (though in languages where you do not declare types, this information could be encoded into the variable name).
  • When architecting a system, classes can be broadly classified into 3 types:
    1. Analysis classes - from the problem/domain space
    2. Design classes - architectural choice, in solution space
    3. Implementation classes - low level, in solution space
  • Use cases can lead to a sequentially biased analysis and also model existing behaviour rather than coming up with new behaviour. (To counter this Mastering the Requirement Process recommends deciding where the boundaries of the work lie before working out use cases).
  • Functions should be split into commands and queries, commands should not return a result and queries should not make change that are visible to clients of the class.
Towards the end of the book in the chapters covering concurrency and databases, the amount of general information starts to tail off as the text becomes quite specific to the solution used in the language that accompanies the book.

Overall, this is a very interesting book for fans of the theoretical side of software engineering. Readers who are solely looking for practical tips to improve their code, will find them but they may lose patience due to the massive amount of other information in the book.

      Tuesday, 4 October 2011

      Mastering the Requirements Process Review

      This post is a review of the book "Mastering The Requirement Process" by Suzanne and James Robertson.

      The book describes a process for gathering and validating requirements based on the similar processes used and observed by the authors from many software projects. There are many forms and templates in the book to aid the process. The process described does seem a thorough way of gathering and recording requirements though I don't have any experience of other well-documented requirements processes to compare it to. On a first flick through the book, some agile enthusiasts may be put off with the large amount of forms described and process description but the authors very sensibly describe in each chapter, how they would adapt the chapter's contents depending on the agility of the team using the process and as the authors repeatedly state, regardless of how agile you are, if you don't find the correct requirements you won't be making the right product.

      Here are some of the points that I found most interesting or were more abstract than the majority of the book:
      • The book defines 3 types of requirements; functional - things the software must do; non-functional - qualities it must have; and constraints - global issues that shape what can and can't be done. It's a useful mini checklist to use for inspiration, as the initial excitement of a project is normally about the functional requirements, so a reminder that you need to plan for other things is welcome.
      • Another repeated point of the book is that all requirements should be testable. Obviously some requirements are going to be easier to test than others but the authors aren't afraid to suggest such ideas as testing whether 90% of a panel of potential users can complete a simple task in 10 minutes, as a way of quantifying usability requirements which are the normally the hardest requirements to turn into measurable goals.
      • Requirements can be reused between projects. As with code, it is suggested that there will have to be some adaptation but you can imagine that reuse of usability requirements would be very possible in products that target the same group of users for example.
      • You need to strip away the current technology to get to the essence of the work. This often leads to products which are much simpler to use than their predecessors and can lead to innovative products which do the work in a very different way.
      • Some useful suggestions are made for finding potentially missing requirements. Firstly a requirements to cover what happens when expected external events do not happen. Secondly, for every data class (obviously, I mean class in a high level sense) in the application, if there are requirements that describe reading, writing of updating it, then to check that there is a requirement covering creating of instances of that class.
      In conclusion, I would say that the book is most useful to have as a reference rather than for explicitly learning too many high level concepts. The checklists and forms in the book provide a very thorough framework for capturing requirements. I can see the book being very useful for people working on their own projects, where it will help make you consider the product from other perspectives, and on the other extreme, also useful for people working in large organisations who need a strict framework and process for gathering requirements for large products. I am planing on using the process described in the book for a personal project, so I'll update this review when I have some feedback on how that worked.

      Link to buy the book on Amazon.com

      Friday, 5 August 2011

      Weekly download statistics

      So rather than going through the week totals for every week since I last did an update I'm just going to compare last weeks downloads agains the downloads from the 21st-27th May, which were the last ones I published.

      App 21st-27th May 23rd-29th July
      Get Mick Home Free NA 98
      Seesaw Saga Free 190 51
      Zort Ball Free 1337 161
      Grovr Folder Sizes Trial 422112
      Blackjack Free 27191363
      Word Find Free 538249
      Charades Free 425108
      Video Poker Free 26034989
      MultiSMS Free 11790*
      Kitchen Timer Free 425195
      Interval Timer Free 420198
      Lyrics Quiz Free 715151
      Pause on Disconnect Trial 5035
      Pause on Disconnect10
      MultiSMS Pro 30*
      Kitchen Timer Pro 11
      Video Poker Pro 2020
      Blackjack Pro 1211
      WordFind Pro108
      Charades Pro 20
      Lyrics Quiz Pro12
      Grovr Folder Sizes386
      Interval Timer Pro 123
      Zort Ball Pro 10
      Seesaw Saga Pro 00

      *MultiSMS Free and Pro have been removed from the Ovi Store by Nokia because it "facilitate SMS or Email spam attacks" which is pretty much all it does (though not intended to be used in a malicious way) so I think that's fair enough of Nokia.

      Monthy money statistics

      Sorry it's been so long but I've been on holiday for a month and since then I've been busy making my new game Munch Them (available now) and porting games to Meego using the N950 Nokia have loaned me.

      MonthIncome from advertising Income from app sales Total
      Jan 2011£110.56£75.15£185.71
      Feb 2011£81.08 £67.28£148.36
      Mar 2011£257.62£114.92£372.54
      Apr 2011£221.74£124.15£345.89
      May 2011£255.44£207.38£462.82
      June 2011£245.09£150.13£395.22
      July 2011£228.21£158.30£386.51

      Making £395 in June when I was on holiday the entire time is really nice and it's nice to see income is pretty level even when I haven't got new products in the market.

      I'll be posting my latest download statistics soon.

      Wednesday, 1 June 2011

      Weekly download and Monthly money statistics

      Here are the weekly Ovi Store download statistics for the week of the 21st May to 27th May

      App 14th-20th 21st-27th
      Seesaw Saga Free 134 190
      Zort Ball Free 671 1337
      Grovr Folder Sizes Trial 1011422
      Blackjack Free 31852719
      Word Find Free 1122538
      Charades Free 313425
      Video Poker Free 31092603
      MultiSMS Free 7801179
      Kitchen Timer Free 265425
      Interval Timer Free 355420
      Lyrics Quiz Free 545715
      Pause on Disconnect Trial 11050
      Pause on Disconnect11
      MultiSMS Pro 43
      Kitchen Timer Pro 01
      Video Poker Pro 2420
      Blackjack Pro 712
      WordFind Pro1710
      Charades Pro 22
      Lyrics Quiz Pro01
      Grovr Folder Sizes4138
      Interval Timer Pro 912
      Zort Ball Pro 11
      Seesaw Saga Pro 00


      MonthIncome from advertising Income from app sales Total
      Jan 2011£110.56£75.15£185.71
      Feb 2011£81.08 £67.28£148.36
      Mar 2011£257.62£114.92£372.54
      Apr 2011£221.74£124.15£345.89
      May 2011£255.44£207.38£462.82


      So May is now my most succesful month ever and it's nice to see that app sales account for a larger part of the income, which means people think my apps are worth spending there hard earned cash on :)

      This is the last one of these posts for a while as I'm going to be on holiday until July, but I'll post back all those statistics when I get back.

      Monday, 23 May 2011

      Weekly download statistics

      Here are the weekly Ovi Store download statistics for the week of the 14th May to 20th May

      App 7th-13th 14th-20th
      Seesaw Saga Free 112 134
      Zort Ball Free 488 671
      Grovr Folder Sizes Trial 2751011
      Blackjack Free 22903185
      Word Find Free 14201122
      Charades Free 351313
      Video Poker Free 32463109
      MultiSMS Free 933780
      Kitchen Timer Free 345265
      Interval Timer Free 660355
      Lyrics Quiz Free 627545
      Pause on Disconnect Trial 90110
      Pause on Disconnect01
      MultiSMS Pro 34
      Kitchen Timer Pro 60
      Video Poker Pro 2724
      Blackjack Pro 77
      WordFind Pro3617
      Charades Pro 22
      Lyrics Quiz Pro10
      Grovr Folder Sizes1441
      Interval Timer Pro 89
      Zort Ball Pro 01
      Seesaw Saga Pro 20

      Wednesday, 18 May 2011

      Weekly download statistics

      Here are the weekly Ovi Store download statistics for the week of the 30th April to 6th May and 7th May to 13th May

      App 23rd-29th 30th-6th 7th-13th
      Seesaw Saga Free 315 82112
      Zort Ball Free 206 138488
      Grovr Folder Sizes Trial 10675275
      Blackjack Free 166115832290
      Word Find Free 3584551420
      Charades Free 186142351
      Video Poker Free 460333663246
      MultiSMS Free 202249933
      Kitchen Timer Free 9290345
      Interval Timer Free 210242660
      Lyrics Quiz Free 206169627
      Pause on Disconnect Trial 435690
      Pause on Disconnect210
      MultiSMS Pro 313
      Kitchen Timer Pro 036
      Video Poker Pro 202027
      Blackjack Pro 357
      WordFind Pro91536
      Charades Pro 402
      Lyrics Quiz Pro211
      Grovr Folder Sizes2514
      Interval Timer Pro 1058
      Zort Ball Pro 110
      Seesaw Saga Pro 002

      .
      Quite an encouraging set of figures in terms on sales, I'm certainly looking forward to totting up this month's income totals.