Sunday, 20 April 2014

Another book from Packt


Packt asked me to review another book for them; this time on Review Board.  "Getting Started With Review Board" by Sandeep Rawat. Maybe they didn't actually read my previous review of the QtCreator book. After I replied that I would be happy to write an actual review, that would probably be bad,  rather than just an endorsement I didn't hear back from them

Review Board is a great tool. I have been using at work now for several years. It is a free open source tool for code review. In the very early days the setup required installing several packages but for several versions now the setup/upgrade process has been made trivially easy. It uses the python easy_install tools so normally the install, including all the pre-requisites can be done with a single command. It also has great online help and installation instructions. It is also very easy to use. I find that new users in my team just need a 5 minute explanation of the main features and they are good to go.

Which brings me to the Pack book. It is described on their web page as
This book is a concise, to-the-point guide with a practical walkthrough of the code review workflow using the features present in Reviewboard. 
Based on the table of contents and the sample chapter what this means is that the book is simply a very short description of what reviewboard is. The sample chapter on "Reviewing Code Review Requests" was simply a description of the Review Board features that are not only easy to figure out for yourself they are also described fully in the free help with the program. The book will also be out of date very soon since Review Board 2.0 is about to be released.

So I don't really understand the point of this book. Why would anyone want to spend $12  for the eBook or $22 for a paper book for something that is not really needed and available for free online.

What would actually be useful is a book on how to do code reviews. Karl Wieigers "Peer Reviews in Software: A Practical Guide" is one of the best books on the subject that I have found. Smart Bear also have a free eBook on code review available (requires registration) which while obviously meant to advertise their code review tool does discuss code review in general. However, there are not so many books that cover code reviews.

The publisher of the book is often a good indicator of the quality of the book. Some publishers, like The Pragmatic Programmers are always reliable.  I think I will be avoiding Packt books in the future.

Sunday, 2 February 2014

Application Development with Qt-Creator


Packt sent me a copy of their new book on using Qt-Creator "Application Development with Qt-Creator"  by Ray Rischpater.  It is very clearly targeted at beginners and anyone with experience of other IDEs would probably find it too light. However, if you are completely new to programming it covers some of the basics of using Qt-Creator, but not really enough to create an actual application.

This is not a book for learning C++ or Qt. The code samples are very simple. There is section on how to use Qt's signals and slots but many of the topics needed for non-trivial applications are not even mentioned (for example the more advanced widgets such as lists, tables, combo-boxes or event handling.) Fortunately, Qt has comprehensive documentation that covers most of this.

The biggest problem that I had with this book was what was missing. Many of the functions that I use the most while programming were not mentioned at all. One of Qt-Creator's strengths is the C++ code model that allows fast navigation. You can find all the places a function is used (Ctrl+U), follow a symbol to where it is declared/defined (F2) and switch between header/source files (F4). This makes navigation in a large code base fast and easy. But these functions did not seem to be covered. Also, the following basic topics are not covered:

  •  Search and replace
  •  The different views in the left hand pane (class view, open documents etc)
  •  Splitting the main editor window to view two files at the same time
  •  Editor functions such as commenting out a block of code
  •  Shortcut keys
  •  Refactoring functions for renaming symbols / extracting functions
  •  Code snippets

For anyone familiar with an IDE these are all straight forward and easy to use. However, if you are new to programming (and are therefore in the target audience for this book) then you might want a bit more explanation and description of the available functions.

The really big omission is a description of the location function (Ctrl+K). This function is central to using Qt-Creator and, for me, what makes Qt-Creator stand out as an IDE. The location field in the bottom left of the screen has many functions. Just typing a filename allows quick opening of any file in the project. It also gives access to the help system, the source control functions, lists of classes and member functions.  Since this is something that sets Qt-Creator apart it almost deserves a whole chapter by itself, but it is not even mentioned.

The lack of coverage of major functions actually suggests that the author has not actually used Qt-Creator for any serious development and has not used Qt significantly either. Slots can be private (or protected) contrary to what is claimed in the book.

The overall impression is one of a professional writer who has not actually used Qt-Creator for any real development. So the writing is clear and easy to follow but the coverage of the topic is very superficial.

If you just want to quickly learn how to setup Qt-Creator, for example to complete a class assignment, then this book covers what you need.  For professional developers on larger projects this book is missing coverage of too many functions.




Tuesday, 5 November 2013

Installing ReviewBoard on RHEL-5

ReviewBoard is a great free code review tool which we have been using for several years now. We run it on a Redhat server and it is connected to our Subversion repository. With the 1.7 release of ReviewBoard support for Python 2.4 was dropped and unfortunately that is the standard Python on RHEL-5. So I have been putting off upgrading for some time.

Finally decided to upgrade and switch from using the SQLite database to MySQL. Since we have a small team we have not had any performance problems with SQLite, except where the source code in a review is split across multiple pages when changing the page with an open review causes the DB to get locked and requiring a restart of Apache. The ReviewBoard docs do warn about using SQLite but we have been using ReviewBoard since before version 1 when the install process and DB support was not nearly as good as it is now.

So first task was to get a newer Python. Fortunately this turned out to be much easier than expected since the Extra Packages for Enterprise Linux (EPEL) contain the rpms for Python 2.6 so it was as easy as

    yum install python26

Now installing ReviewBoard should be extremely easy. On my Fedora box at home, I could just type

    easy_install ReviewBoard

and ReviewBoard and all its dependencies were installed. Trivially easy. Unfortunately the server is behind a proxy server. Setting the http_proxy environment variable and the values in yum.comf were enough to get yum to work, but not easy_install. That kept on giving errors.

After several frustrating hours trying to different proxy server settings I eventually stumbled on the solution: Our proxy server seems to require that https_proxy is set in addition to  http_proxy. So setting both:

   export http_proxy=http://192.168.1.1:80
   export https_proxy=http://192.168.1.1:80

and it installed!  The Google search for easy_install proxy problems never mentioned this. So I don't know whether this is an easy_install problem or our peculiar proxy server.

Of course, it still wasn't that easy. While setting up the site MySQL was not available because the install of the pymysql had failed because the MySQL devel package was not installed and there was no error message visible during the easy_install.

However, finally it works. Unfortunately, there is no easy way to migrate the old SQLite data to MySQL.


Sunday, 23 September 2012

Developer Summit 2012 in Kansai



The DeveloperSummit was a free one day conference (in Japanese) for developers held in Kobe, Japan.  It is nice to see more of these events taking place in Kansai rather than just in Tokyo. This event was very popular with several of the sessions being completely full.

The keynote presentation was from Oikawa Takuya, one of the Japanese developers on the Google Chrome team. The main theme was the changes in project management style required when developing for “the cloud.” Out is the old style product lifecycle with releases every few years and in is the “versionless” development with very frequent or “continuous” releases.  Also, the use of open source and the challenges that brings to development when contributions from many people must be integrated. This was an interesting presentation giving some insight into the how Google develops some of its software and Chrome in particular.

The first presentation on the “Agile” track was from a Microsoft evangelist entitled “Continuous value delivery to the next decade.”  This presentation also discussed the differences between waterfall and agile development and how development is done at Microsoft. However, the whole presentation seemed like an advert for TFS. The main point seemed to be the advantages of using a single tool for project management, bug tracking version control etc rather than several different tools. And Microsoft just happens to have such a tool. This seemed to me like agile for those who want to say they are doing agile but don’t want to change too much. The process seemed to be more like a series of mini-waterfalls backed up by comprehensive tools.

Following the Google and Microsoft promotions we had an advertising spot for JIRA (the bug tracking system from Atlassian) given by Suzuki Yusuke, an engineer from Growth xPartners which seems to be an Atlassian partner in Japan. This was less a less subtle promotion since the presenter even included a price list for JIRA in one of the slides. After yet another description of waterfall and agile processes (the third so far) the presenter stressed the importance of collaboration and communication in Agile development.  I would not argue with that, but I am sure that there is more to communication than a bug tracking system. The middle part of the presentation described how “Agile is implemented in the bug tracking system.” The idea seems to be to use JIRA to hold the list of tasks to be done and to act as the communication medium for the team.

We use JIRA as a bug tracking system and it seems to be one of the best bug trackers available. However, I often see it as blocking rather than enabling communication. Instead of direct communication between individuals, communication is via comments on an issue. This leads to misunderstandings and delays. Also because it is so easy to create an issue the “backlog” quickly becomes an unmanageable black hole into which requests and improvement suggestions are sent to be forgotten.

I suppose that not surprisingly, from a company selling the bug tracker there was no suggestion that the use of a bug tracker is itself actually a symptom of a bigger problem.  A truly agile team would probably have no use for a bug tracker.

The presentation that I was most looking forward to was that by Wachi Yukei on “The evolution of test driven development.” He is one of the translators of “GrowingObject Oriented Software Guided by Tests”, the Japanese version of which was just released on the same day as the developer summit. This presentation gave an overview of GOOS. The description of Mocks was fairly hard to follow and my Japanese colleagues who were not familiar with mocks did not seem to understand it at all.  Actually the biggest problem seemed to be the direct transliteration of English expressions into Japanese, such as “walking skeleton.” This is not a problem for me as an English speaker – in fact it makes it easier – but makes it hard for non-English speakers to understand. However, the presentation did include a lot of good stuff from GOOS such as the need for end-to-end tests and thin slices of functionality. I am not quite sure on the relevance of the photo of David Cameron.




Many of the presentations are on SlideShare (in Japanese)

Continuous value delivery to the next decade:

Collaboration in enterprise development – how to connect the development team with customers using JIRA

The evolution of test driven development



Saturday, 15 September 2012

Visual Studio 2012 breaks VS2010

StackOverflow just rescued me again from yet another Microsoft problem. It seems if you try to install Visual Studio 2012 when you already have a Visual Studio 2010 installation then the 2010 installation gets broken.

Fortunately MS have released a SP to 2010 which fixes the problem. But it should not happen in the first place. Unless you do everything on a virtual machine when you try a new program like VS2012 you will want to keep your existing environment working. Did they not test installing VS2012 onto a machine with VS2010? I can't believe that they did not, which means that they must not care about breaking existing environments.  There was no warning message that it would happen and the Update for 2010 was only available after installing 2012.




Saturday, 11 August 2012

The knowledge jigsaw




Most of my colleagues don’t  read books.  They are software developers in desparate need of improving their skills yet they try to get by with muddling through with what they already know or relying on the boss to provide the information they need. This has puzzled and frustrated me for some time. If they were using some other means to learn – blogs, personal contacts, seminars then I could understand but they don’t do that either. Yet when I talk to them they all profess to wanting to improve their skills and knowledge.

One common aspect that came up in conversations is that they seem to expect a book to be both directly relevant to them and to answer whatever specific problem they are having at the moment.  Of course, this is rarely the case. When they read one book, do not understand the context and can’t apply whatever the book describes directly they dismiss it as not relevant and a waste of time. This then puts them off technical books in general.

To try and explain why they should read I now use the metaphor of a jigsaw puzzle. Reading an article or book is like picking up a single piece of the puzzle. Sometimes you  can see something recognizable on the piece and see how it fits. More often the picture on the piece only makes sense when it is seen in the context of the surrounding pieces.

To understand most technical books you need to understand the context. You get the context through experience and through reading widely. 

Thursday, 29 December 2011

Windows SDK Woes

Finally got a Windows 7 PC at work. Installing the Microsoft Platform SDK kept on failing with a not too helpful error message.


Installation of the "Microsoft Windows SDK for Windows 7" product has reported the following error: Please refer to Samples\Setup\HTML\ConfigDetails.htm document for further information.


The log file is not too helpful as it contains many errors, but most of them seem to be spurious.


It seems that if a more recent version of the "Visual C++ 2010 x86 Redistributable" (vcredist_x64.exe) is installed then the SDK install fails. The solution is to first unistall the redistributable package then install the SDK.

Since the redistributables are updated with windows update I expect that this is a common problem. MS could at least put a note on the download page for the SDK about this.