Author Archives: Andy Brice

KONICA MINOLTA DIGITAL CAMERA

How much code can a coder code?

Lines of code (LOC) is a simple way to measure programmer productivity. Admittedly it is a flawed metric. As Bill Gates famously said “Measuring programming progress by lines of code is like measuring aircraft building progress by weight”. But it is at least easy to measure.

So how much code do programmers average per day?

  • Fred Brooks claimed in ‘The Mythical Man-Month’ that programmers working on the OS/360 operating system averaged around 10 LOC per day.
  • Capers Jones measured productivity of around 16 to 38 LOC per day across a range of projects.
  • McConnell measured productivity of 20 to 125 LOC per day for small projects (10,000 LOC) through to 1.5 to 25 LOC per day for large projects (10,000,000 LOC).

It doesn’t sound a lot, does it? I’m sure I’ve written hundreds of lines of code on some days. I wondered how my productivity compared. So I did some digging through my own code. In the last 12 years I have written somewhere between 90,000 and 150,000 C++ LOC (depending on how you measure LOC) for my products: PerfectTablePlan, Hyper Plan and Keyword Funnel. This is an average of round 50 lines of code per working day. Not so different from the data above.

I also looked at how PerfectTablePlan LOC increased over time. I was expecting it to show a marked downward trend in productivity as the code base got bigger, as predicted by McConnell’s data. I was surprised to see that this was not the case, with LOC per day remaining pretty constant as the code base increased in size from 25k to 125k.

loc

Some qualifications:

  • I give a range for LOC because ‘line of code’ isn’t very well defined. Do you count only executable statements, or any lines of source that aren’t blank?
  • My data is based on the current sizes of the code bases. It doesn’t include all the code I have written and then deleted in the last 12 years. I have just spent several months rewriting large parts of PerfectTablePlan to work with the latest version of Qt, which involved deleting large swathes of code.
  • It doesn’t include automatically generated code (e.g. code generated by the Qt framework for user interfaces and signals/slots code).
  • I only counted code in products shipped to the user. I didn’t count code I wrote for licence generation, testing etc.
  • All the code is cross-platform for Windows and Mac, which makes it more time consuming to write, test and document.
  • Programming is only one of the things I do. As a one-man-band I also do marketing, sales, QA, support, documentation, newsletters, admin and nearly everything else. I have also done some consulting and training not directly related to my products in the last 12 years.

Given that I probably spend less than half my time developing (I have never measured the ratio), my productivity seems fairly good. I think a lot of this may be the fact that, as a solo developer, I don’t have to waste time with meetings, corporate bullshit and trying to understand other people’s code. Also writing desktop Windows/Mac applications in C++ is a lot easier than writing an new operating system with 1970s tools.

50 lines of code per day doesn’t sound like a lot. But the evidence is that you are unlikely to do much better on a substantial project over an extended period. Bear that in mind next time you estimate how long something is going to take.

If you have data on LOC per day for sizeable projects worked on over an extended period, please post it in the comments. It will only take you a few minutes to get the stats using Source Monitor (which is free).

 

 

 

 

 

 

dsc_3806

Choosing a market for your software

The efficient market hypothesis states that “asset prices fully reflect all available information”. If the efficient market hypothesis is true, then you would expect actively managed funds (where fund managers pick the stocks) to do no better than index funds. That does seem to be the case:

“Numerous studies have shown that index funds, with their low costs and ability to closely mimic the returns of markets both broad and narrow, steadily outperform the returns of most actively managed funds.” Wall Street Journal

Unless you have some sort of insider knowledge (which it might be illegal to exploit), you might as well invest in index funds or get your cat to pick your stocks as pay someone else to do it.

But I am interested in a different sort of market efficiency. If you have to pick a vertical market to start a software business in, does it matter which vertical market you pick? If the market is perfectly efficient for businesses, then each vertical will have a level of competition proportional to the size of the market. In that case you should have an equal chance of success whether you decide to write a game, a developer tool, an anti-virus product or a CRM system.

From lots of reading and talking to other software business owners I have come to the conclusion that the market is highly inefficient for businesses. The market vertical you pick has a big effect on your chances of success. It seems to me that the three worst verticals are: games, developer tools and consumer mobile apps.

Games are fun! Writing a game sounds like a blast. Much more exciting than writing software for boring businesses. It has also been getting easier to write games due to the ever improving tools. Consequently, the market for games is totally saturated. The outlook for independent games developers looks grim. Today on the Steam platform there are 12,971 games listed. Even some of the big and famous games developers only seem to survive by forcing their staff to work vast amounts of unpaid overtime.

Pretty much every software entrepreneur has considered creating a software development tool at some point. I know I have. It is a market that we all understand (or think we do). But consequently it is saturated. Software developers are also pretty horrible customers. They are used to using lots of free software. And that tool you spent years developing? They think they can write something better over a weekend.

“Thousands of people used RethinkDB, often in business contexts, but most were willing to pay less for the lifetime of usage than the price of a single Starbucks coffee (which is to say, they weren’t willing to pay anything at all). … Developers love building developer tools, often for free. So while there is massive demand, the supply vastly outstrips it. This drives the number of alternatives up, and the prices down to zero.” Why RethinkDB failed

I wrote back in 2010 what a horrible market the iPhone app store is for developers. Since then the number of apps has increased tenfold to 2.2 million, the average paid app price is a measly $1.01 ($0.48 for games) and some 90%+ of apps are free or freemium.

You should be wary of markets with no competition. But the really high levels of competition in these three markets drives down prices and makes it very hard to get noticed. Obviously not everyone in these 3 markets is failing. It is possible to create a product in one of these markets and be wildly successful (Indie game developer Notch of Minecraft fame springs to mind). But I think the odds are very much stacked against you.

So what market should you pick to maximize your chances of commercial success? Aside from the obvious factors (e.g. something you are interested in and knowledgeable about, something that solves a real problem etc) I suggest avoiding anything considered ‘sexy’ by other developers.

Here is a radical idea – create a software product aimed at women. The vast majority of software is written by men and consequently it tends to cater for men. 50% of the world’s population are women and they buy software too!

Just because a product is not in a ‘sexy’ market doesn’t mean that it has to be boring to create. I have found plenty of interesting usability, optimization and visualization problems to solve while developing my own seating planning and visual planning software products.

Here is a thought experiment. Imagine you are talking to another software guy at a conference and explaining what you product does. If your imaginary software guy says “that sounds cool”, then it’s probably a tough market to create a commercial product in. But if they look a bit surprised or their eyes glaze over, then you might be on to something.

Giving a shit

Sturgeon’s law states that “90% of everything is crap”. He was probably an optimist. Here are some recent examples of the sort of crap I come across day to day:

The school selection website

My wife and I had to select which secondary school we want out son to go to, an important decision for our family. We had to do this via a website created on behalf of Swindon council. I won’t bore you with all the painful details, but only an impressive combination of incompetence and apathy could have produced something so egregiously awful. At the end of the process we got an error message and the promised confirmation email never arrived. We were left feeling confused and angry. Every other parent we spoke to had a similar experience.

The ATM

Feast your eyes on my local ATM:

ctnybk8wiaaqkza-jpg-large

Yes, that’s right, the buttons aren’t correctly aligned with the screen, so they have added some shonky visual cues in a feeble attempt to compensate for it. They failed – I have pressed the wrong button more than once. If they couldn’t move the buttons, why didn’t they just change the text positions in the software? I would like to know what sort of horrific set of bad decisions and sloppy planning led to this laughably bad design.

The in-flight meal

Check out this British Airways in-flight meal I was served:

IMG_1083.jpg

Behold, the cutlery is in a sealed plastic bag in the pasta. To get at your cutlery you have to open a slippery plastic bag covered in sauce with your fingers, which are now also covered in sauce. Who could have possibly have thought this was a good experience? You might as well just eat the pasta with your fingers. Or stick your face in the plate. Maybe the subliminal message is: if you won’t pay for business class we are going to make you eat like an animal.


You don’t have to look very hard to find crappy design. Badly designed parking buildings, confusing ticket machines, painful to use Sat Navs, packaging that is almost impossible to open, web forms that won’t let you use a space or a dash in a telephone number. I could go on, but I’m sure you could come up with plenty of examples from your own life. The most frustrating thing is that these issues could have been avoided with a little bit of thought and care. I doubt it would have added more than an extra 1% more effort or cost to get them right.

Crappy products and services make everyone’s life worse. Hold yourself to a higher standard. Take pride in your work. Do usability tests. Get feedback from your users. Fix things that are broken. Keep improving. Above all, give a shit.

sales sites and bundles

Promoting your software through 1-day sales and bundles

Hyper Plan, my visual planning software for Windows and Mac, has now been for sale for a bit less than 2 years. Given that I am (by choice) doing all the development, marketing and support for both Hyper Plan and my other product, PerfectTablePlan, I have had a limited amount of time to promote Hyper Plan. But Hyper Plan is in a  competitive market, where it is hard to get noticed using traditional promotional techniques such as SEO and PPC. So I have been experimenting with promotion via 1-day sales sites and bundles.

I did several promotions through both bitsdujour.com and macupdate.com promo. These were 50%-off sales for 1 day (sometimes extended for another day). The site takes 50% commission on the sale, so I only got $10 of my normal $40 ticket price. But I also got exposure to a whole new audience I wouldn’t normally reach.

I also included Hyper Plan in bundlehunt.com and macupdate.com software bundles. In these bundles customers purchased some 10 items of software at a big discount. The promotions lasted for a few weeks each. I am not at liberty to divulge how much I got for each licence, but a quick calculation based on the price of the bundles and the number of items in the bundle tells you that it was a lot less than $10!

My hopes related to sales sites and bundles were:

  1. A worthwhile amount additional sales revenue.
  2. Increased feedback, giving me more insight for improving the product.
  3. Making money further down the line from major upgrades (e.g. v1 to v2).
  4. That I wouldn’t be swamped in support emails from people who were paying me a lot less than the standard price.
  5. More word-of-mouth sales after the discount has finished.

On analysing the results, the first 4 turned out to be true.

I had previously tried promoting my PerfectTablePlan table planning software on bitsdujour.com, but the results were disappointing. It just wasn’t a good match for their audience. However Hyper Plan is a more general tool and it did a lot better. The bundles also sold in impressive volumes. The source of Hyper Plan sales revenues to date after commission (but not including upgrades) is show below.

sales-revenue-source

So the extra sales were certainly significant from a revenue point of view, bearing in mind that Hyper Plan is a relatively young and unknown product.

I also got some very useful feedback from the bitsdujour comments section.

I released v2 of Hyper Plan in March 2016. I have crunched the numbers to see how many v1 customers to date have paid for upgrades to v2.

percentage upgrades

I expected that the 1-day sale customers who had paid $20 for the initial licence would be less likely to pay $16 to upgrade to v2 than those who had hadn’t purchased at a heavy discount. I was surprised that the opposite turned out to be true. I don’t have a good theory why.

I don’t have any figures for bundle customer upgrades, as the bundles happened after v2 was released. Given that bundle purchasers probably only wanted a subset of the software in the bundle, I expect the upgrade percentages to be a lot lower than above.

I wasn’t swamped in support emails. In fact things were surprisingly quiet during the bundles, which makes me wonder how many people who purchased the bundle were interested in Hyper Plan.

There were no sustained jumps in traffic or sales after the 1-day sales or bundles ended.

Best of all, the 1-day sales and bundles don’t cost anything, apart from a modest amount of time to set-up.

I know some vendors promote these 1-day sales and bundles to existing customers. But I don’t understand why you would do that. The whole point of these channels is to reach new audiences. Also you risk annoying customers who have paid list price. If you already have an audience you can promote a sale to, then you don’t need 1-day sales sites or bundles. Just email them a discount voucher.

I had one complaint from an existing customer on a forum who had paid full price and then saw Hyper Plan in a 1-day sale. I offered to refund the difference back to them, but they didn’t take me up on it.

In conclusion, the sales and bundle sites brought in useful spikes of additional sales (especially when you include upgrades later on) and feedback, without a big jump in support burden. But they didn’t lead to a noticeable long-term increase in traffic or sales. Obviously every product is different. But if you have a product that needs exposure, isn’t too niche and doesn’t require a lot of support, it may be worth giving 1-day sales and bundles a try.

costa-rica-nikon-957

Google CPA bidding goes wild

I have been using Google’s AdWords Cost Per Action (CPA) bidding for a number of years. I set the maximum I was prepared to pay for a conversion  (e.g. a successful install of my software). AdWords then set the bid price to try and get me conversions at that price or less. It worked pretty well for a number years and it saved me a lot of time tweaking bid prices. But Google recently phased out Maximum CPA bidding and forced me to switch to Target CPA bidding. From this point I could only specify the average price I was prepared to pay per conversion. This is where it all started to go wrong.

AdWords started to bid crazy prices. Check out the screenshot below. You can see that in each case the average Cost Per Click (CPC) is more than the CPA price. For example, in the first row I have set £0.50 as the price I am prepared to pay for conversions from the ‘seating charts’ ad group. Typically about 10% of people who click on one of my Adwords ads will install the software and trigger a conversion (which is fairly standard). So a £0.50 CPA means that AdWords should be bidding somewhere around £0.05 per click. Google knows this, because they have vast amounts of data from my AdWords account (11 years worth). But the average price for the last 3 clicks was £1.17 per click. WTF Google – that’s my money!

Given that the base version of my software costs £19.95 (one time fee) there is no way I can make a profit at £1.17 per click. Not all the bids are this crazy. But there are enough crazy bids to put my whole AdWords campaign into a tailspin. So I have been forced to switch back to manual CPC bidding. If you have also been forced to switch from Maximum CPA to Target CPA bidding, then I suggest you keep a careful eye on your cost per click.

Costa Rica Nikon 135

How to make difficult decisions

When you run a business (even a small business like mine) you have to make a lot of decisions. Many of these decisions are complicated and have to be taken with incomplete information. But you can’t take too long over them, or you will never get anything done. Here are 3 techniques I use to help with difficult decisions.

Break it down

This is a very simple method for breaking a difficult decision down into smaller parts using a spreadsheet.

  • Decide the criteria that are important for the decision. Add a row for each.
  • Add a weighting column. Assign each criteria a weighting in the range 1 to 10, depending on its relative importance to you.
  • Add a column for each option you are considering.
  • Set each criterion/option cell a value in the range 0 to 10, depending on the extent to which the choice for that column fulfils the criteria for that row.
  • Calculate the weighted sum for each column.
  • Choose the outcome with the highest weighted sum.

Here is an example for choosing between 3 different types of hosting:

making difficult decisions

It’s not particularly scientific, but it does force you to systematically break down the problem into smaller parts and justify your decision.

Take the long view

It sometimes helps to stand back and look at the bigger picture. I can think of no better way to do that than to ask a hypothetical (hopefully elderly) future me, lying on my deathbed, which option they approve of. For example, given the choice between adding an innovative new feature to my product or improving the conversion funnel by a few percent, I think future me would be happier that I chose to add the innovative new feature. It is also a useful reminder that many decisions probably aren’t all that important in the grand scheme of things.

Flip a coin

Sometimes you need to make a decision, but you don’t have enough information or the time taken to get that information is going to cost you more than making the wrong decision. In that case, don’t agonise over it. Just roll a dice or flip a coin and move on.

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.