Category Archives: tools

Getting Qt 5.9 working on Windows (eventually)

I have had Qt 5.5 and 5.6 installed on my development machines for some time. Now that I have purchased a new Mac development box (an iMac with a lickably beautiful 27″ screen) I thought it was a good time to update to a more recent version of Qt. I went for Qt 5.9, rather than Qt 5.10, as 5.9 has been designated as an LTS (long term support) release. Upgrading turned into a real chore. I am quickly writing it up here in the hope that it helps someone else, and as a reminder to myself a few years down the line.

I like to build Qt from source. Because then I know it was built using the same compiler, headers, SDK etc as I am using to build my product. And I have more control over how Qt is configured. Also I can patch the source and rebuild it, if I need to. But I have had problems building Qt on Mac before. So I decided to install the pre-built binaries on my new Mac. I installed the latest version of XCode and then the Q5.9.4 binaries. This was a couple of big downloads, but it all went pretty smoothly.

I successfully built Qt 5.5 from source on my Windows machine previously, so I decided to try that for Qt 5.9. I have Visual Studio 2010 installed. This isn’t supported for Qt 5.9.4, so I downloaded Visual Studio 2017. I unzipped the Qt source into C:\Qt\5.9.4, ran ‘x86 native tools command prompt for VS 2017’, made sure Python and Perl were in the path and then:

cd C:\Qt\5.9.4

set QTDIR=C:\Qt\5.9.4\qtbase

set PATH=%QTDIR%\bin;%PATH%

configure -opensource -confirm-license -opengl desktop -nomake tests -nomake examples -no-plugin-manifests -debug-and-release -platform win32-msvc -verbose

nmake

Note that you are told by the nmake script to do nmake install at the end of this. But it tells you somewhere in the Qt Windows documentation not to do this, unless you have set the prefix argument (confusing, I know)

The build failed part way through making qtwebengine. Something to do with a path being too long for Perl or Python (I forget). It seems to be a known problem. Odd as the root path was just C:\Qt\5.9.4. I don’t need qtwebengine at present, so I deleted everything and tried again with -skip qtwebengine:

configure -opensource -confirm-license -opengl desktop -skip qtwebengine -nomake tests -nomake examples -no-plugin-manifests -debug-and-release -platform win32-msvc -verbose

nmake

It seemed to complete ok this time. But using this version of Qt to build Hyper Plan I got an error:

Unknown module(s) in QT:svg

On further examination the SVG DLL  had been built, but hadn’t been copied to the C:\Qt\5.9.4\qtbase\bin folder. Similarly for a lot of the other Qt DLLs. I couldn’t find any obvious reason for this looking through logs, Stackoverflow and Googling. I could possibly do without the SVG functionality, but I wasn’t sure what else was broken. So I decided to give up on bulding from source on Windows as well.

I download the Qt 5.9.4 binaries for Visual Studio 2017. This seemed to go ok, but then I discovered that I could only build a 64-bit application from these. No 32-bit version was available for Visual Studio 2017. Many of my customers are still on 32 bit versions of Windows. So I need to be able to ship my product as a 32 bit executable + DLLs[1].

So I uninstalled Visual Studio 2017 and installed Visual Studio 2015. I then got an error message about Visual Studio 2017 redistributables that I hadn’t uninstalled. So I had to uninstall those and run a repair install on Visual Studio 2015. That seemed to work ok. So then I download the 32-bit Qt 5.9.4 binaries for Visual Studio 2015. I had to download these into a different top level folder (C:\Qtb), so as not to risk wiping existing Qt installs that I had previously managed to build from source.

Eventually I managed to build Hyper Plan and PerfectTablePlan on Mac and Windows. What a palaver though! Qt is an amazing framework and I am very grateful for everyone who works on it. But I wish they would make it a bit easier to install and upgrade! Has anyone actually managed to get Qt 5.9 built from source on Windows?

[1] I don’t bother shipping a 64-bit executable on Windows as the 32-bit executable works fine on 64-bit versions of Windows (my software doesn’t require excessive amounts of memory). I only ship a 64-bit executable on macOS as almost no-one uses 32-bit versions of macOS now.

Tracking your sales pipeline

The purpose of marketing is to generate prospects. People who are interested in your product and might buy it. The purpose of sales is to try to convert these prospects into customers. The key difference between these activities is that marketing is one-to-many and sales is one-to-one. Each sales prospect is going to have different questions depending on their requirements, timescales and budgets.

For low cost products there is generally very little selling. You simply can’t afford to spend significant amounts of time engaging with someone who may or may not buy a product with a $30 lifetime value. But for higher price products (typically B2B), sales becomes more important. Sales activities might take the form of answering questions by email or phone, video conferences, quotes, online demonstrations and perhaps even site visits.

Many of my customers purchase from my website without any active selling. But organizations who wish to buy more expensive licences typically have questions about licensing, pricing, functionality, upgrading etc before purchasing. I characterise the stages of selling to these companies as:

  • Enquiry – Someone has expressed an interest in one of my products and typically has questions about functionality, licensing and/or pricing. Initial contact is usually by email.
  • Qualification – I answer the prospect’s questions. If my product isn’t a good fit for their requirements I let them know, as I don’t want to waste my time or theirs or end up with unhappy customers.
  • Quoted – If the prospect looks like a good fit and is still interested I send them a quote.
  • Verbal agreement – The prospect expresses an interest in buying the product. There may be some negotiation over number of licenses, discounts, payment methods, tax etc.
  • Won/Lost/Cold – I either win or lose the sale, or the prospect stops responding (goes cold).

This step-by-step process is known as a ‘sales pipeline’ or ‘sales funnel’.  Different companies use different terminology and a high-value enterprise sale would probably have more stages. But the process is the same in principal – your marketing (SEO, PPC, word of mouth etc) feeds people into the pipeline at one end and a certain proportion will drop out at each stage. Some will end up as customers.

You can take a very ‘hands-off’ approach to sales and only respond to communications that the prospect initiates. But this is not going to get you the best conversion rate from prospect to customer. People are busy and have lots of conflicting demands on their time. One of your response emails might get lost. Their initial contact might leave the company. It seems a pity to let a prospect slip away, just because you can’t be bothered to send a few follow-up emails.

I don’t really want to do a 30 minute online demo if I think I am only going to sell $50 of software (unless I think the feedback might be particularly valuable). But the more a sale is likely to be worth, the more effort I am prepared to put into it. I have found that I can make a pretty good guess at how much a sale is likely to be worth based on the organization they belong to and the initial questions they ask. And these guesses becomes more accurate as they travel along the pipeline.

Note that I am not trying to cajole or pressure the prospect into buying. I am simply trying to provide them with the information they need so they can make the right choice. If I don’t hear anything for a while I will email them something along the lines of:

Did you make a decision regarding purchasing ? Please let us know if you need any further information. We would be happy to call if you would prefer to discuss it on the phone.

If they reply that they aren’t interested or don’t reply after 2 or 3 emails from me, then I stop chasing them. No need to be an asshole about it.

I’m confident that I could increase my conversion rate by following up prospects by phone, instead of emailing them (most B2B prospects include contact details in their sig or are easy enough to Google). But that isn’t something I can summon up enthusiasm for, so I don’t do it. If I was less secure financially, I would be on the phone a lot more.

The issue is then, how to track the various sales prospects so you can follow them up as appropriate? Initially I just tracked sales by having a ‘prospects’ folder in my email client. I would put email from prospects in this folder. Occasionally I would go through the folder and email prospects who hadn’t replied in the last few weeks. If they didn’t reply to a few emails I would move them out of the ‘prospects’ folder. It wasn’t very efficient and there were all sorts of questions I couldn’t easily get answers to, including:

  • What stage was each prospect at?
  • How long was it since I last contacted a prospect?
  • Was there anyone I needed to follow up today?
  • How many prospects were there at each stage in the pipeline? What did I think those prospects might be worth?
  • How were the sales divided into industry sectors (e.g. businesses vs charities vs government)?
  • What proportion of sales was I winning and losing?
  • How did the sales breakdown between new customers and upgrades? Direct sales and resellers?

But it just so happens that my own Hyper Plan product is excellent as sales pipeline software.

I now add a card into Hyper Plan for each prospect that I think might realistically purchase $200 of software or more.

sales pipeline software crm

Store any data about your prospects in custom fields.

I can then very easily slice and dice the data in any number of different ways. For example:

sales pipeline software

Active prospects are automatically arranged by sales pipeline stage and coloured by estimated value. Won/Lost/Cold cards are hidden by a filter. The card with the red highlight is overdue a follow-up call.

sales pipeline visualization

Active prospects are automatically arranged by when we last contacted them (column), when they last responded (row) and coloured by sales pipeline stage.

sales pipeline chart software

Charting the number of prospects at each stage of the sales pipeline.

Sales pipeline statistics software

Charting the number of prospects at each stage of the pipeline, by sector.

This has given me a lot more insight into how I am doing at sales and made me a lot more organized at following up prospects.

A few random things I have learnt about sales over 13 years of running my own software business:

  • Some organizations will buy on the same day they first contact you. Other may take years. Generally the bigger and more famous the organization and the bigger the order, the longer it takes.
  • Organizations sometimes ask for changes to my licensing agreement. I always refuse as it just isn’t worth the expense and stress of getting a lawyer involved. They usually buy anyway.
  • Don’t give additional discounts to ‘value subtracted resellers’. It almost certainly won’t make any difference to whether they purchase or not.
  • Sometimes it is quicker and more effective to talk on the phone, rather than sending lots of emails. But I will generally ask if it is ok by email, before calling.
  • Trying to get video conferencing to work so you can demo your product can be a real headache. Every organization seems to have a different preferred video conferencing solution.
  • Once you are confident your product is the right one for a prospect ask for the sale (‘close’). ‘Would you like to talk about licensing?’ is a not-to-pushy way to move the conversation onto money.
  • You don’t have to be dishonest or pushy. Just give prospects the information so they can make the right decision.
  • Prospects generally won’t tell you that they aren’t interested. They just stop replying to emails.

Hyper Plan is available for Windows and Mac. The Home edition, which has everything you need for sales pipeline tracking, is just $40. Download the free trial and start tracking your sales pipeline.

Hammer For Mac static website generator

I prefer static websites to a CMS for simple product websites because:

  • Static websites are fast.
  • I have more low-level control over the HTML/CSS.
  • I don’t have to worry about the very-real threat of a CMS being hacked.

Obviously writing every page separately in raw HTML/CSS would go against one of the cardinal rules of development, Don’t Repeat Yourself. But you can avoid this using a static website generator such as Hammer for Mac.

hammer

Hammer uses a simple syntax embedded in HTML comments to ‘compile’ a website from source files. I have now used Hammer to create several static HTML/CSS websites, including my perfecttableplan.com and hyperplan.com websites.

I like the simple syntax of Hammer. For example:

I can put the HTML for a page header in an _header.html file and then each page just needs to start with:

<!-- @include _header.html -->

I can define and use variables:

<!-- $current_year 2016 -->
..
<p>Copyright <!-- $current_year -->.</p>

And I can let Hammer work out relative paths:

<img src="@path image.png" />

If Hammer can’t make sense of a source file (e.g. it can’t find the image file), it generates a compilation error.

Because everything is text based I can easily manage all the source in a version control system. Also, if I have to move away from Hammer, it should be relatively straightforward to change the syntax to another static generator (or even write a replacement for Hammer!).

Overall I like Hammer. But it does have a number of shortcomings:

1. The user interface is very limited. Hammer shows you a list of source files and you can click on a source file to see the compiled version or edit the source. But the source files are listed in the order they were edited and you can’t filter or sort the list. This seems such a simple and basic feature, that I can’t understand why the developers have omitted it.

2. Hammer takes a dumb, brute force approach to compilation. If you change any file in a source folder, it recompiles *everything*, without checking if other source files include that file. This is a pain if you have 100+ source files. Surely it wouldn’t be that hard to work out which files depend on which and only recompile the files that need recompiling?

3. You can’t nest variables. For example you can’t do this:

<!-- $current_year 2016 -->
<!-- $copyright_message Copyright <!-- $current_year --> -->

This might sound minor. But it limits the expressiveness of variables significantly.

4. The vendor doesn’t do email support. If you want to communicate with them you have to use Slack or Twitter. I am old fashioned, I like email.

5. It only runs on Mac OS X (the clue is in the name).

At one point Hammer looked like abandonware, but owner riothq.com sold it to beach.io and active development has resumed.

Currently Hammer is priced at £15.39 (and presumably some round number of US dollars). That seems way too cheap. I wish they would price it a bit higher and fix some of the issues above.

 

Pretty printing C++ with Clang-Format

I use some of the code generation and refactoring tools in QtCreator. These save a lot of time, but they don’t format C++ code how I like it. For example they produce C++ code like this:

void MyClass::foo(int *x)

But I like my code formatted like this:

void MyClass::foo( int* x )

The differences may seem minor, but they are a source of significant irritation to me. I like my code how I like it, goddammit! And consistent formatting enhances readability. However re-formatting it by hand is time-consuming and tedious.

What I need is a tool that can enforce consistent formatting in the style that I like, or something close. I have tried to use automatic C++ formatting (pretty printing) tools in the past, but I couldn’t get them to produce a format that was close enough to what I wanted. But I have finally found the tool for the job. Clang-Format.

Clang-Format is part of the LLVM family of tools. It is a free, command-line tool that reformats C++, Objective-C or C according to the settings in a config file. As with many free tools, it isn’t terribly well documented. Some of the documentation on the web is out of date and some of it is incomplete. But I have managed to find out enough to configure it how I like it.

To run it you just need to place your options in a .clang-format file, make sure the clang-format executable is in the path and then run it:

clang-format.exe -i -style=file <C++ file>

Here are the settings I am currently using in my .clang-format file:

Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
  AfterClass:      true
  AfterControlStatement: true
  AfterEnum:       true
  AfterFunction:   true
  AfterNamespace:  true
  AfterObjCDeclaration: true
  AfterStruct:     true
  AfterUnion:      false
  BeforeCatch:     true
  BeforeElse:      true
  IndentBraces:    false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Allman
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
ColumnLimit: 0
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 0
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IndentCaseLabels: true
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
PenaltyBreakBeforeFirstCallParameter: 100
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 10000
PointerAlignment: Left
ReflowComments: true
SortIncludes: false
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: true
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: true
SpacesInParentheses: true
SpacesInSquareBrackets: true
Standard: Cpp11
TabWidth: 4
UseTab: Never

It took me a few hours of fiddling with the settings to find the best combination. It would be really useful if someone could write a tool that would analyze your C++ code and create a .clang-format file for you. You would probably only want to do this once though, so I don’t think it has much potential as a commercial product.

There are only two things I couldn’t get quite right in the formatting:

  1. I couldn’t get it to add a blank line after public, protected and private declarations. I fixed this with a quick Perl hack (see below).
  2. I couldn’t get it to indent continuation lines how I would like (ideally indented 1 or 2 spaces from the first line). It is a small price to pay and I am just putting up with it for now.

Perhaps there are options to do these and I just didn’t find them.

Here is the Windows .bat script I used to format all the C++ files in a folder.

for %%f in (*.h *.cpp *.inl) do (
clang-format.exe -i -style=file %%f
)

for %%f in (*.h) do (
clang-format.exe -i -style=file %%f
perl -p -i.bak -e "s/public:/public:\n/g" %%f
perl -p -i.bak -e "s/protected:/protected:\n/g" %%f
perl -p -i.bak -e "s/private:/private:\n/g" %%f
perl -p -i.bak -e "s/    Q_OBJECT/Q_OBJECT/g" %%f
)

del *.bak
del *.tmp

No doubt there is a more elegant way to do the Perl, but it works.

I now just run this batch periodically to keep my code beautiful and consistent.

My new product : Hyper Plan

scrum kanbanI have just launched a new product. First some back story. A few years ago, my wife and I were renovating the house we live in now. Trying to schedule and track all the different tasks, tradesmen and quotes was a real pain. We stuck Post-it® notes onto a whiteboard to try to keep on top of it all. The Post-it notes represented the various jobs that need doing. We placed them in columns (representing what stage they were at: needs quote, accepted quote, scheduled, doing, done) and rows (representing the various trades: plumbing, roofing, electrical etc). It worked, but it was far from ideal:

  • I wanted to see status vs trade, status vs room and room vs trade. But changing the layout was a pain, so I had to pick one layout and stick with it.
  • Colours were useful for extra information. But we were limited to just the few colours that Post-it notes come in.
  • There was only limited space to write on the note.
  • My wife couldn’t read my handwriting.
  • We had to use a separate spreadsheet to track the budget.
  • Post-it notes would fall off and get lost after being moved a few times.
  • I ran out of Post-it notes.

That is when the idea of Hyper Plan first occurred to me. It has been burning a hole in my brain for the last 5 years. Now I have finally got around to implementing it.

Hyper Plan is Post-it note style planning, implemented in software. In software you are no-longer limited by the number of Post-it notes you can afford, the amount of wall space you have or the number of colours Post-it notes come in. You can even change the layout and colours with a mouse click. All with animation and easing curve loveliness.

The sorts of planning you can use it for include:

  • project planning
  • planning what is going into your next software release
  • event planning
  • Kanban / Scrum / Agile
  • planning a holiday
  • to do list (I know!)

Anything where you have discrete tasks that you want to be able to categorize (e.g. by person, status or type), schedule or track in a visual form.

Here is a 2:42 minute overview in video form (with audio):

Hyper Plan videoCan’t see the video? Try this mp4 version (10.7 MB).

Hyper Plan is quite different to anything else I have seen. That could be a good thing or bad thing. I am putting out an early beta to try to find out.

Hyper Plan is not currently for sale. I don’t want to take the time to set up all the payment processing and licensing until I am confident someone might actually buy it. The current beta version will run completely unrestricted until 17-Jan-2015. There are Windows and Mac versions. Hopefully a commercial version will be available for sale by the time the beta expires. If not, I will release another free version.

Currently it is very much an MVP (minimum viable product).

  • The UI is a bit rough around the edges.
  • The logo was done in 5 minutes in Word.
  • The documentation is just a quick start guide.
  • Some important features are not implemented yet (e.g. printing, exporting and undo).

But I have tried to follow my own advice and resist foul urges to spend months polishing it (which is hard!). What is there is pretty robust though, and I think it demonstrates the concepts. Hopefully I will know in a few weeks whether it is worth taking the time to polish it to commercial levels.

I would love to know what you think. Particularly how useful you find it for ‘real’ planning tasks. Even responses of the form “I wouldn’t use this because…” are helpful. Please also email a link to anyone else you think might be interested. Particularly if you have ever seen them sticking Post-it notes to a wall or swearing at Microsoft Project! My contact details are here.

buttonFAQ

Q: Why is it desktop, rather than SaaS/mobile?

A. I think stories of the death of desktop software are exaggerated. Also:

  • I can build a minimum viable product much quicker for desktop.
  • Differentiation. Some people prefer desktop apps, e.g. because they don’t have reliable Internet or don’t want to store their data on third party servers.
  • Less competition. Everyone else seems to be doing SaaS/mobile.

I might add SaaS and/or mobile versions later, if there is enough demand. Note that DropBox (or the Google, Microsoft or Apple equivalents) allow you to easily sync a Hyper Plan file across multiple computers.

Q: So it’s Trello for desktop?

A. Not really. I had the basic idea before I ever saw Trello. And I’m not stupid enough to compete with a free tool from the great Joel Spolsky! Trello is great at what it does. But Hyper Plan is different in quite a few ways. In Trello the emphasis is on collaboration and workflow. In Hyper Plan the emphasis is on visualization and planning. Hyper Plan allows you to present your information in lots of different ways with a few mouse clicks. It also has a built in ‘pivot table’ type feature that is much easier to use than Excel pivot tables. This is really useful for totalling effort and expenditure by different categories.

Post-it is a registered trademark of 3M.

The scrum photo is licensed under creative common by Logan Ingalls.

80 useful tools and services for software businesses

tools and servicesSome of the most useful nuggets of information I come across in blogs and podcasts are mentions of tools and services used by other people to better run their software businesses. So I have put together my own list of useful tools and services to run a software business.

Feel free to recommend your own favourites in the comments below. Please include your relationship to the tool/service (e.g. customer, user, employee or owner). You can also comment below about your experiences (positive or negative) with any of the tools and services listed. Anonymous comments will be treated with suspicion and may be deleted

The imminent demise of Google Reader

Sadly, Google is killing Google Reader on 01-July-2013. If you are reading this blog using the RSS feed via Google Reader, I suggest you start looking for another RSS reader. I have been trying feedly. It is ok, but so far I prefer Google reader. What is your favourite Google Reader alternative?