Category Archives: productivity

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

Buying a lean, mean, compiling machine

Nearly two years ago I wrote an article about speccing my ultimate development PC. Somehow there was always something more pressing to do. But I finally took delivery of my shiny new PC this week, partly spurred on by the fact that I wanted tried and trusted Windows 7 for the OS. Also my current development PC is getting increasingly crufty after 5 years of continual use.

I emailed my requirements to the top 3 custom PC companies in the UK as rated by PC Pro magazine : Chillblast, Cyberpower and CCL:

Hi,

I’m looking for a PC for developing software. Prime requirements in order of decreasing importance:

1. reliability
2. cpu + disk speed
3. quiet
4. value for money

Here is my wishlist of components:

-i5-3570K CPU
-an SSD (at least 128 GB) + 2 fast and reliable HDDs (7200 rpm, at least 1 TB each)
-ASUS, Gigabyte or EVGA motherboard supporting USB 3.0 and SATA/600.
-16 GB of fast RAM
-Windows 7 64 bit professional
-quiet is good, open to suggestions on sound insulation, fans and/or passive cooling
-AMD Radeon HD 6850 graphics card
-at least 2 USB ports on the front and 2 USB ports on the back (ideally more, ideally including USB 3.0)
-DVD drive
-Gigabit ethernet
-full size case
-kensington security slot, so I can lock it to the ground
-I don’t need a monitor, keyboard, mouse etc
-I don’t need WiFi
-It has to be *super reliable* – I want reliable SSD + HDDs, good quality motherboard, good quality branded power supply etc.
-target price, not more than 1,500 inc VAT, less is better obviously

Can you build something to meet this spec or get close? Please send me the spec and your price (including UK delivery).

Both Chillblast and Cyberpower sent me quotes for a system fairly close to what I wanted within 1 working day. I then spoke to their sales people and went online to tweak their suggested systems using their web based system ‘configurators’. In the end I chose Chillblast over Cyberpower due to:

  • higher rating from PC Pro readers
  • cheaper for a comparable system
  • better warranty
  • better online configurator (I found the number of choices on the Cyberpower online configurator a bit overwhelming)

However there really wasn’t a lot in it. CCL took nearly 2 whole working days to respond to my initial email,  so I discounted them as insufficiently responsive.

Following some suggestions made by the sales people I spoke to, this is the spec I ended up with:

  • Chillblast Fusion Longbow
  • Windows 7 Professional 64 bit
  • Onboard High Definition Audio
  • Corsair CX 750W 80 PLUS Bronze Certified PSU
  • Sony 24x DVD-RW Drive
  • Seagate Barrcuda 2TB 7200RPM Hard Disk
  • AMD Radeon HD 6850 1024MB Graphics Card
  • Intel 120GB 520 Series Solid State Drive
  • 16GB Corsair PC3-12800 1600MHz DDR3 Memory
  • Asus P8Z77-V LX Motherboard
  • Akasa Venom Voodoo Ultra Quiet CPU Cooler
  • Intel Core i5 3570K Processor 3.40 GHz (No Overclocking)
  • Fractal Design Define R3 Low Noise Case – Black Pearl – USB 3.0 Edition
  • Total price: £1089.80 + VAT (inc MSOffice Home Edition)

I take security fairly seriously. I have a motorbike style ground anchor in my office and I want my shiny new box physically locked to it. But I was told that almost no PC tower cases have a Kensington lock slot. This seems crazy to me. My current Dell tower has one and the cost of one tiny little extra slot in the chassis must be pennies. So I had to buy a lock adaptor kit. It’s not the most elegant solution, but it works fine.

I ordered the system on 02-Oct and it arrived on 22-Oct. Here are a couple of photos of the new system with the side panels off.

The PC took a few days longer than the originally advertised time to arrive. This wasn’t a big issue in my case. But I only found out it was going to be late when I emailed them after the expected completion date. It would have been a lot better if they had been more pro-active and emailed me first. Other than that I am fairly satisified with the service from Chillblast so far.

There are a few issues with the case, which aren’t really Chillblast’s fault. It looks rather lovely in its big, black, minimalist sort of way, a bit like an obelisk from ‘2001 a space Odyssey’. But the case scratches rather easily if you lay it down to change a component on my laminate floor. The side panels are also a bit fiddly to get on and off (my old Dell PC is better in this regard). Worst of all, it has rubber grommets (is that the right word?) that fall out into the case (and potentially into the fan or heat sink) if you even look at them funny. This means lying the case down to retrieve them, struggling with the side panels and more scratches. I have had to do this at least 4 times so far. It seems that they have made them of rubber that is far too soft for the job. Grrr.

How fast is the new PC? It certainly feels very snappy. I benchmarked it against my old Dell development PC (Dual Core 2.13 Ghz, 4GB RAM) building my event table planner software from scratch. This is 83k executable lines of C++ according to SourceMonitor:

Build time Old PC New PC
Debug build 6 minutes 56 seconds 1 minute 32 seconds
Release build 6 minutes 23 seconds 1 minute 28 seconds

So it is more than 4 times faster than the old PC at its key task – building software. Admittedly it isn’t a ‘fair’ comparison of the hardware. The older machine has a different version of Visual Studio, a different OS and probably some unnecessary services running in the background. But it is the best I can do in the circumstances and I doubt a ‘fair’ test would be much different. Despite the fact that I only went for a mid-range graphics card, the new PC can also handle playing Half-Life 2 on full 1920 x 1200 resolution without any noticeable issues. Hopefully the faster build times will give a significant boost to my productivity (as long as I don’t play too much Half-Life 2).

The new PC is also eerily quiet. I would guess more than 4 times quieter than my old PC. Even when it is doing a build, all you can hear is the faint whir of a fan.

Only time will tell how reliable it is.

Pivot Tables demystified

pivot tablesOnline businesses generate a lot of data. Sales data, marketing data, traffic data etc. Pivot tables can be a useful tool for analysing and extracting useful information from this sea of data. A lot of people seem to have heard of Pivot Tables without understanding what they are or how to use them. Despite the slightly cryptic name they are really just a way of summarizing tables of data. Nothing to be intimidated by. I’m going to try to demystify them here with a simple example.

Let’s imagine you have got an Excel spreadsheet with a month of (fictitious) sales transaction. It looks like this:

sales spreadsheet

You want to find out:

  1. The total value of sales of each product
  2. The number of sales of each product
  3. The total value of sales of each product by country
  4. The total value of sales of each product by day of the week

How would you do it? You can crunch the numbers using a calculator, but that is very tedious and error prone. If you are a programmer you can export the data to a .csv file and write a small program in your favourite language to read it in, crunch the data and write the results out. You probably think you can do it in 10 minutes, but I bet it will take you at least an hour to get it working and debugged. I did all the above in 1 minute and 20 seconds using Excel pivot tables.

Here is how you can do it (screenshots from Excel 2007). You can download the spreadsheet if you want to try it yourself.

Select all the data, including the header (A1 to D222).

Click on Insert in the Excel Ribbon bar.

Click on PivotTable.

pivot table 1

The Create Pivot Table window will appear. Click OK.

pivot table 2

The PivotTable Field List will appear. We want to find the number of sales for each product. Drag the product field to Column labels and the value field to Values. This gives us the total value of sales by product.

pivot table 3

To change this to the number of sales pull down the Sum of value drop-down list and select Value Field Settings….

pivot table 4

Change Summarize value field by from Sum to Count and click OK.

pivot table 5

The number of sales of each product are now shown.

pivot table 6

Now drag the country field to Row labels. Then click on Count of value, select Value Field Settings…, change it back to Sum and click OK. The total value of sales of each product by country is now displayed.

pivot table 7

We now need to add a day of the week column. Click on Sheet 1 and add a new column as shown.

pivot table 8

Now select all the data from A1 to E222 and insert a new pivot table, as before.

pivot table 9

Drag the fields as shown to get the total value of sales of each product by day of the week.

pivot table 10

(We’ll quietly ignore the fact that the number of days aren’t divisible by 7 in the data.)

We can even display by product, day of the week and country with one more drag.

pivot table 11

Excel also supports pivot charts if you prefer your results in graphical form.

pivot chart

Obviously this is a very simple example, but pivot tables can be used to quickly analyse much larger and more complex data sets. Next time you have got some data to analyse consider whether you would be better using pivot tables or pivot charts.

Is it possible to run a successful software business with a 4 hour work week?

Tim Ferriss’ ‘Four Hour Work Week’ is a thought provoking, but controversial, book. One of the central ideas he promotes is that you should be able to use outsourcing to create a money making business (‘muse’) that you can run in only a few hours per week. Leaving you with enough free time and income to travel the world, learn to tango or otherwise amuse yourself. But I am highly sceptical that anyone can sustain, let alone grow, a software business long term, working only 4 hours per week. I have run my own business working less than 10 hours week for a month or two at a time while travelling or doing house renovations. But it only gave me enough time to keep things ticking over. I wasn’t able to improve my product or marketing. I am sure my business would decline in the face of technological changes and hungrier competitors if I kept this up for too long. I have spoken to other owners of small software businesses and they were of a similar opinion.

So I was interested to see a case study on the Four Hour Work Week blog from someone running a software business. Brandon Pearce owns musicsteachershelper.com, a slick-looking web based app for music teachers.

He says that after 5 years he is making $25k in sales per month with $10-12k in expenses per month[1] and no employees[2]. So that is a net profit of around $168k per year. That’s not too shabby, especially when you consider that he lives in Costa Rica and says he works just 5 hours per week. That’s nearly $650 per hour!

But he doesn’t say how many hours per week he worked to build the business. He also says in the case study:

With a complex web application, you can’t write it once and be done; you need to continue making enhancements and listen to user feedback in order to have a successful product.

I couldn’t see how this squared with working only 5 hours per week. Even if you are outsourcing everything you still need to manage the outsourcing, which can be time consuming in itself. I emailed him for some clarification and he was kind enough to give some more details:

It’s hard to give an average time worked over the past five years, since it’s changed so much. The first two years I was also working full-time as a programmer, but spent most of my free time working on the site – probably 10-20 hours per week. Once I quit my job (years 3-4) I worked probably 40 hours per week on the site. The past year or two, it varies from week to week. Some weeks I’ll only work 2 hours on it, some I’ll work more like 15, if I’m preparing for a new feature, special offer, or doing a big launch of some kind. But these days I’m averaging about 5 hours per week, and it’s been that way for well over a year.

Yes, I can definitely sustain and improve profit levels at this number of hours. The business is a well-oiled machine, and I have teams that are working to help continue to improve and grow the business in various ways, largely without my constant supervision. The business continues to grow every month, regardless of how much I work.

What do I spend these 5 hours doing? Mainly reviewing the new features or bug fixes the programmers have been working on, the requests from customers that the support team has submitted, and determining which items I want the programmers working on next. I also spend a little time handling some of the more difficult support or billing issues, paying my workers, managing a few PPC campaigns, answering e-mails, and checking stats. Recently, I’ve also been writing the scripts for some new video tutorials, and finding people to help produce the videos, too.

So, pretty much everything I do at this point could also be outsourced, allowing me to work even less, but at this point, I still enjoy this work, and it allows me to keep some important aspect of control on the business. Some day I may decide to work even less, but I’m pretty happy with 5 hours at the moment. :)

So, unsurprisingly, it took a lot more than 5 hours per week to reach this point. And only time will tell whether he can continue to maintain (let alone grow) this business with such minimal input. It will be an impressive achievement if he can. But I think Brandon is the exception rather than the rule. Perhaps he is particularly talented or lucky. Very few of the successful software business owners I know work short hours for extended periods. Also I have no way to verify Brandon’s numbers. So I would recommend viewing Brandon’s case study as something to aspire to, rather than a likely outcome.

Brandon has a blog and is writing a book about his experiences creating MusicTeachersHelper.com “in the hopes that it will help others who want to do something similar”. It should be an interesting read. Given all the spare time he has it shouldn’t take him long to finish it!

Further reading:

http://brandonpearce.com/2009/02/i-lived-a-4-hour-work-week/

http://brandonpearce.com/2009/04/how-i-spend-my-time/

[1] He mentions the expenses in the comments.

[2] He does use several contractors, some of whom work full time.

Where I program

whereiwrite.org is a photographic project showing science fiction writers and their offices. I started wondering what the offices of other microISVs and small software companies look like. Were they Zen temples of minimalism, with just a desk, a chair and a laptop? Or were they mad scientist labs, piled to the ceiling with obsolete equipment and empty pizza boxes? I rather hoped it was the latter, so I wouldn’t feel so bad about my own cluttered little office. I asked for photos of offices on some forums frequented by independent developers. I got a great response. Click the images to see larger versions.

oryxThis is my own cluttered office. The image comprises 6 photos stitched together using Autostitch to simulate an ultra wide angle lens. This makes it look bigger than it is. My unexciting view of suburban Britain is enlivened by regular sightings of Red Kites. I resisted the temptation to tidy up, beyond emptying the overflowing wastepaper bin. The garage is full of envelopes and CDs and there are lots of programming book’s in my son’s room. We are in the process of selling the house, partly so we can buy a house with a bigger office. I like the idea of a treehouse office – one where I pull up the ladder when I need some peace and quiet.

divider

whereiprogram-steve

“In my office, I kind of try to separate the digital and analog worlds.  Some days I’ll be coloring with my kids at the oval, English partners-desk in the center and helping with homework, but most days I’m doing software development to the right.  I love it here in the Pacific Northwest; if I’m awake early enough I can catch a beautiful sunrise over the lake right outside my office, and even go for a swim by afternoon in the summertime if it gets too hot.”

Steve Murch, www.bigoven.com

divider

rv-office“This is my temporary office while on the road. I use the TV as a monitor for the second computer (Windows 7). The normal monitor can be switched between either computer. I sometimes miss the third monitor, lazerjet printer and other stuff but not often.”

A roving microISV, who doesn’t want his customer to know he (temporarily) has no fixed abode

divider

DSC_6544“Living in Hong Kong, where residential and office space is so scarce and expensive, I work in a small corner of my small apartment. However, I have everything I need: my trusty two years old MacBook Pro, a not too comfortable chair, and a couch where I can take as many naps as I want. Oh, and a nice view of the mountains outside!”

Cesar Tardaguila, www.bambooapps.com

divider

alwin-at-work

collectorz-programmers-at-work“This is me at my desk at the Collectorz.com HQ. As you can see, I am a Nintendo gamer, vodka drinker and Porsche fan. Now I must say that this not a real ‘where I program’ pic, because I don’t do a lot of programming any more. Check the 2nd pic for my developer team.”

Alwin Hoogerdijk, www.collectorz.com

divider

iPhone June 23 2009 132“I *hate* having clutter on my desk. You’ll notice that I didn’t show the rest of the office. It’s pretty messy! I started with two monitors several years ago and then moved straight to 4. I can’t live without at least 3 and the 4th makes a nice place to stash IM windows while I’m working. My music computer is on the left side (yes, it’s a Mac!), and I’m not sure that it isn’t the most important computer I own since I could never work without music playing.”

Mitchell Vincent, www.ksoftware.net

divider

myroom“As you can see the office is as crammed as possible, and the distractions are pretty obvious — the wine is waiting for its place in the cellar, and there is a bottle of whiskey on the shelf.  Oh, and there are two Commodores C-128 behind the desk (invisible on the photo, they worked the last time I checked) along with 1081 monitor and a Playstation or two. And yes, there is a guitar behind the chair. The bad news is that the plans for the new house are ready and the next office will be four times as big! Regarding the workplace as such — I have two 19′ monitors and a computer box under the desk. I spent a lot of time making it silent, which really improves work comfort, especially during quiet night shifts.”

Piotr Kuzora, www.powerkaraoke.com

divider

ofi-shots-117

ofi-shots-150“This is my home office, in the city center of Vitoria-Gasteiz. Nowadays I spend as much time, if not more, at the J1CK office, my other entrepreneurial project, but this office is great for ViEmu and Codekana work: a lot of light, and the irreplaceable Dell 2408WFP in vertical position. The chair and the table are from Ikea, nothing fancy there.”

Jon Beltran de Heredia, www.viemu.com and www.codekana.com

(who can apparently control his own opacity)

divider

MJT_Marcus_Office_small“This is in my office looking out on the larger office area.  Our office is in a modern, purpose built office complex just outside the beautiful historic Saxon hilltop town of Shaftesbury in rural Dorset.”

Marcus Tettmar, www.mjtnet.com

(under monitors – where obsolete technical references go to die)

divider

home_office_tekblues_small“My home office is a large basement, it has windows and good light, but it’s very cold. I am a very messy person, it’s full of books, boxes, old computers and even toys my kids left there. Luckily, it doesn’t show in the photo but my dog left some bones under my desk in the morning!!”

Javier Rojas Goñi, www.tekblues.com

divider

GreentramDesk“Melbourne city skyscrapers in the background – I’m 26 floors up. I should have done this yesterday when the sun was shining.”

Tony Bryer, www.greentram.com

divider

IMG_6740_small“There is one thing that is missing in the photo. That is my two year old daughter. She likes to sit on the table and pull out the books from the rack. Unsurprisingly, her favorite is ‘MicroISV From Vision to Reality’ by Bob Walsh. Somehow she enjoys tearing papers off from the book while her father is busy coding.”

Prasanth, www.simfatic.com

divider

20090624dayoffice

20090625nightoffice“I recently cleaned up my office so I took these photos… but my office is slowly returning to the big mess that it usually is. I need to do a tidy-up before things get out of hand again. I really like my Vornado 542B that’s clipped to a bookcase and set to blow air on me! Really cools me off. I have it on a remote control so I can easily turn it on and off from my desk. I am near Dallas, Texas.

Albert Wiersch, www.htmlvalidator.com

divider

gurock_office“This is one of the offices at Gurock Software here at the Technology Park in Paderborn, Germany (that’s Tobias in the picture). When we originally looked for office space, we wanted bright rooms with enough space to accommodate large desks and small reading corners. Getting our new office space (and 3×24″ monitors ) was easily the best investment we’ve made productivity-wise.”

Dennis & Tobias Gurock, www.gurock.com

divider

Dokix2_smallTim Haughton, www.homedocumentmanager.com

divider

antair_office_1

antair_office_2“This space suits us perfectly. It fits everyone very comfortably. It’s very, very bright, with lots of natural sunlight. The outdoor patio is perfect for morning group breakfasts and afternoon lunches when it’s warm. And … there’s a great pub downstairs to celebrate the days when we ship a new software product or a major update release.”

Andrey Butov, www.antair.com

divider

office“My office is a mess because I’m a very passionate person.  I love my work and when I’m not doing that, I’m out doing something else I really love.  I have no love of cleaning and organizing though.  In fact, 99.9% of the time I prefer chaos.  The other .1%, I purge my mess and the cycle starts again.  I know this isn’t a good system, but for now it works.”

Ian Drake, www.notifywire.com

divider

ian_1 “My office is never really very messy… sorry.”

Ian Landsman, www.helpspot.com

divider

officedog2“Here’s where a real code monkey works.”

Dan Hite, www.spellquizzer.com

divider

office2

view“I work with specialized hardware for my software and there’s a school bell and a siren/strobe light flashing on the desk.  On the far right side of the desk, I have a couple of IP phones and an IP speaker. I want some additional monitors.  The two I have are a 23″ and a 24″, both at 1920×1200.  I also use a second room as an office in my house and have another PC and a Mac. Below is the view from the window. The trail behind the house connects into a 300 acre park and there are usually mountain bikers and hikers on the trail on the weekends.”

Danny Weidig, www.acrovista.com

divider

DN_office1_small“Mine’s a bit messy. I stare out the window to distract me from it.”

Doug, who doesn’t want his blue chip clients to know he works from a messy home office

divider

SAIG+Office3_small

SAIG+Echidna+outside+Office_small“The 16th fairway of the golf course is just through the trees. The group of 3 trees on the left is actually one tree and it is a magnificently old (opinions vary from 100 to 600 years) Moonah Tree. Below is an Echnida which waddled past on Monday.

Neville Franks, www.surfulater.com

divider

Not had enough yet?:

Mitch Haile’s home office

Scott Hanselmann’s home office

Home office snapshots

divider

I am not sure which is more diverse, the offices or the software that gets written in them. Thank you to everyone that contributed.

Have you got a bigger, smaller, untidier or more stylish office than any of the above? Do you have a better view out of the window? Add a link to your photo in the comments.

Lazy instantiation marketing

lazy instantiationIt is often hard to know what sort of additional services customers will be interested in. Might they be interested in:

  • a yearly subscription instead of a one-off payment?
  • hosting their own server?
  • paying extra for 24 hour support?
  • a port of your product to Mac OS X?

You can implement the new service and then offer it to customers. But this can be a huge waste of time and money if it turns out nobody wants it. An alternative approach is to borrow the idea of “Lazy instantiation” from programming (also called RAII – Resource Acquisition Is Initialization).

Programs need to initialise various system resources, such as databases, files and hardware devices. It is generally considered good practice to only initialise these resources as they are needed. This is called “lazy instantiation” and results in faster start-up times and no wasteful initialisation of resources that turn out not to be needed. For example in C++ (glossing over various details of cost, smart pointers, copy constructors, error handling etc to keep the example code simple):

lazy_instantiation

So we can only access the resource by calling MyClass:getResource(), it will get initialised on first use and it will be cleaned up when MyClass goes out of scope. This much more elegant, efficient and less error prone than always initialising the resource at start-up or adding lots of checks throughout the code to see if the resource is already initialised.

A similar approach can be applied to marketing. For example, instead of spending days sorting out the intricacies of subscription payments, you just add the following to your purchase page:

Please email support@acme.com if you are interested in purchasing an annual subscription instead of making a one-off payment.

This will take you a few minutes. If someone emails you that they would prefer a subscription you reply along the lines of:

Thank you for your interest in purchasing Acme server via an annual subscription. We are currently assessing the commercial viability of a subscription approach. We will contact you if and when we decide to make Acme server available through annual subscription. But, for now, you can only purchase Acme server through a one-off payment, as detailed on our purchase page. … etc

If you get enough interest you go ahead and do the work to implement subscription payments. If you don’t – well, you didn’t waste much time on it.

MyClass::MyClass()
{
   myResource = NULL;
}

Programming with your feet

footI started feeling a mild burning sensation in my left wrist a few weeks ago. This is a classic early sign of Repetitive Strain Injury.  Uh-oh. I had an email exchange not long ago with someone who now has to use voice activation because typing is too painful. I can’t imagine how frustrating that must be. I decided to ignore Jane Fonda’s advice to “feel the burn” and looked for a way to alleviate the problem.

One approach is to reduce the amount of typing I do. But that is tough when you are running a microISV and writing a blog. I already use the text expander capabilities of the excellent Direct Access software to save a lot of typing (it tells me that it has saved me 51 hours of typing so far). I decided to try an ergonomic keyboard.

I bought myself a Microsoft 4000 Ergonomic keyboard. This is shaped to allow more natural positioning of the forearms and elbows.

microsoft_natural_keyboard_4000

Microsoft Natural Ergonomic Keyboard 4000

For more comfortable wrist positioning it also has a built-in wrist rest and the front of the keyboard is higher than the back.

microsoft_natural_keyboard_4000

Note the front of the keyboard (right) is higher than the back (left)

I was quite surprised how physically large it was when it turned up. The shape of the keyboard felt very strange to start with and it took me a few days of slow typing to get used it. The feel of the keys is nothing special and I haven’t yet used the extra gizmos, such as the integral zoom button. But I feel it is an improvement in comfort over the conventional keyboard I had before.

An unexpected advantage of the new keyboard is that it has improved my typing. If you watch a good touch typist, their hands hardly move. I (unfortunately) never learnt to touch type, I just didn’t have the patience. The clearer separation between keys for the left hand and keys for the right hand on the new keyboard made me realise that I was moving both hands left and right, more like a concert pianist than a touch typist. I am now moving my hands less and I think my typing speed has improved as a consequence.

I didn’t feel the new keyboard on it’s own was going to solve my impending RSI problems though. The major problem seems to be the continual Ctrl-C, Ctrl-V, Ctrl-A, Windows-D, Windows-E and Alt-Tab key combinations I do with my left hand, hundreds of times a day. Using the right hand Ctrl key instead of the left one helped a bit. But it occurred to me – why are my hands doing all the work? My legs are doing so little that I often feel stiff when I stand up from a long programming session. Why not put them to use?

I Googled for foot pedals for computers. After wading through lots of hits for music and dictation foot pedals I finally found the Savant Elite Triple Foot Switch. This is a programmable 3-pedal foot-switch that plugs into a USB port.

savant_elite_foot_switch

Savant Elite Triple Foot Switch

At £86.00+VAT it isn’t cheap. But what price do you put on your health? I ordered one.

When it arrived I wanted to program the pedals to map to the Ctrl, Shift and Windows keys. But I couldn’t install the device driver to program the pedals. After a call to the retailer it turns out the device driver doesn’t work on Vista, despite assurance on the website that the pedals could be used with “virtually any computer”[1]. Grrrrr. How long has Vista been out? I finally managed to program the pedals using my wife’s laptop – my last remaining XP box.

So now I can type using my feet for most of the modifier keys. I am using the pedals as I type this. I am still getting used to them, but the burning in my left wrist has definitely reduced. I think I can also type a little faster, but I am too lazy to do the speed tests with and without the pedals to verify this.  On the negative side:

  • Working out where to put your feet when you aren’t typing can be a little awkward.
  • The pedals tend to move around the carpet, despite being metal and quite heavy. Some small spikes might have helped.
  • Although the travel on the pedals is small, they are surprisingly stiff.

When I told a friend about the pedals he asked – why stop there? I could also be using my elbows, knees and head like a one-man-band. I could be working-out and typing at the same time. It is an intriguing prospect.

I just hope I don’t end up with burning ankles.

[1] System requirements have since been added to the website.

CoverageValidator v3

The nice folk at Software Verification have done a major new release of Coverage Validator, and the new version fixes many of the issues I noted in a previous post. In particular:

  • The instrumentation can use breakpoint functionality to get better line coverage on builds with debug information enabled.
  • Previous sessions can be automatically merged into new sessions.
  • The default colour scheme has been toned down.
  • The flashing that happened when you resized the source window has gone.
  • It is now possible to mark sections of code not to be instrumented. I haven’t had time to try this yet, as it was only introduced in v3.0.4. But it should be very useful as currently I have a lot of defensive code that should never be reached (see below). Instrumenting this code skews the coverage stats and makes it harder to spot lines that should have been executed, but weren’t.

There are still a few issues:

  • I had problems trying to instrument release versions of my code.
  • It still fails to instrument some lines (but not many).
  • I had a couple of crashes during testing that don’t seem to have been caused by my software (although I can’t prove that).

But the technical support has been very responsive and new versions are released fairly frequently. Overall version 3 is a major improvement to a very useful tool. Certainly it helped me find a few bugs during the testing of version 4 of Perfect Table Plan on Windows. I just wish there was something comparable for MacOSX.

Choosing a development ‘stack’ for Windows desktop applications

beauty_parade.jpgI have have heard plenty of people saying that desktop software is dead and that all future development will be done for the web. From my perspective, as both a buyer and seller of software, I think they are wrong. In fact, of the thousands of pounds I have spent on software in the last three years, I would guess that well over 90% of it was spent on software that runs outside the browser. The capabilities of web based applications have improved a lot in recent years, but they still have a long way to go to match a custom built native application once you move beyond CRUD applications. I don’t expect to be running Visual Studio, PhotoShop or VMWare (amongst others) inside the browser any time soon. The only way I see web apps approaching the flexibility and performance of desktop apps is for the browser to become as complicated as an OS, negating the key reason for having a browser in the first place. To me it seems more likely that desktop apps will embed a browser and use more and more web protocols, resulting in hybrid native+web apps that offer the best of both worlds.

So, if Windows desktop apps aren’t going away any time soon, what language/libraries/tools should we use to develop them? It is clear that Microsoft would like us to use a .Net development environment, such as C#. But I question the wisdom of anyone selling downloadable off-the-shelf software based on .Net [1]. The penetration of .Net is less than impressive, especially for the more recent versions. From stats published by SteG on a recent BOS post (only IE users counted):

No .Net: 28.12%
>= .Net 1.0: 71.88%
>= .Net 1.1: 69.29%
>= .Net 2.0: 46.07%
>= .Net 3.0: 18.66%
>= .Net 3.5: 0.99%

Consequently deploying your app may require a framework update. The new .Net 3.5 framework comes with a 2.7 MB installer, but this is only a stub that downloads the frameworks required. The full set of frameworks weighs in at eye watering 197 MB. To find out how much the stub really downloads Giorgio installed .Net 3.5 onto a Windows 2003 VM with only .Net 1.0 & 1.1. The result: 67 MB. That is still a large download for most people, especially if your .Net 3.5 software is only a small utility. It is out of the question if you don’t have broadband. Microsoft no doubt justify this by saying that the majority of PCs will have .Net 3.5 pre-installed by the year X. Unfortunately by the year X Microsoft will probably be pushing .Net 5.5 and I dread to think how big that will be.

I have heard a lot of people touting the productivity benefits of C# and .Net, but the huge framework downloads can only be a major hurdle for customers, especially for B2C apps. You also have issues protecting your byte code from prying eyes, and you can pretty much forget cross-platform development. So I think I will stick to writing native apps in C++ for Windows for the foreseeable future.

There is no clear leader amongst the development ‘stacks’ (languages+libraries+tools) for native Win32 development at present. Those that spring to mind include:

  • Delphi – Lots of devoted fans, but will CodeGear even be here tomorrow?
  • VB6 – Abandoned and unloved by Microsoft.
  • Java – You have to have a Java Run Time installed, and questions still remain about the native look and feel of Java GUIs.
  • C++/MFC – Ugly ugly ugly. There is also the worry that it will be ‘deprecated’ by Microsoft.
  • C++/Qt – My personal favourite, but expensive and C++ is hardly an easy-to-use language. The future of Qt is also less certain after the Nokia acquisition.

Plus some others I know even less about, including: RealBasic and C++/WxWidgets. They all have their down sides. It is a tough choice. Perhaps that is why some Windows developers are defecting to Mac, where there is really only one game in town (Objective-C/Cocoa).

I don’t even claim that the opinions I express here are accurate or up-to-date. How could they be? If I kept up-to-date on all the leading Win32 development stacks I wouldn’t have any time left to write software. Of the stacks listed I have only used C++/MFC and C++/Qt in anger and my MFC experience (shudder) was quite a few years ago.

Given that one person can’t realistically hope to evaluate all the alternatives in any depth, we have to rely on our particular requirements (do we need to support cross platform?), hearsay, prejudice and which language we are most familiar with to narrow it down to a realistic number to evaluate. Two perhaps. And once we have chosen a stack and become familiar with it we are going to be loathe to start anew with another stack. Certainly it would take a lot for me to move away from C++/Qt, in which I have a huge amount of time invested, to a completely new stack.

Which Windows development stack are you using? Why? Have I maligned it unfairly above?

[1] Bespoke software is a different story. If you have limited deployment of the software and can dictate the end-user environment then the big download is much less of an issue.

Coverage Validator

coverage_validator.pngThe sink is full of washing, I am wearing odd socks and I haven’t been out of the house in days. It must be time to put out that new release. But how can I be sure my testing hasn’t missed a hideously embarrassing bug? Maybe I introduced a major bug when I made that ‘cosmetic’ change at 2am?

In an ideal world I would just run a comprehensive automated regression test suite. Unfortunately it is difficult to automate graphical user interface (GUI) testing and the majority of lines of code in most applications are GUI. I estimate that the code for my own table planner software is at least 75% GUI code (not including generated code, which would push it even higher).

So I try to manually execute every line of my application before I release it. If I have to make any changes to the code, I start over again. This is very dull, but at least I have a tool to help me: Coverage Validator. Coverage Validator instruments code and shows, in real time, which lines have been executed. Click a few buttons on your application and watch the executed lines of code change colour from pink to yellow. Execute every line in the file and all the lines change colour to cyan. No recompilation or relinking is required and it doesn’t slow down the tested application too much. This real-time feedback is incredibly powerful for testing.

code_coverage_small.gif

Unfortunately it also has a lot of shortcomings:

  • The usability isn’t great. There is a confusing plethora of options for instrumenting your code that I would rather not have to know about.
  • It isn’t able to ‘hook’ (instrument) all the lines of code. Whole blocks get missed out for reasons I don’t fully understand. Single line branches are particularly likely to be missed.
  • The GUI isn’t great. For example, the display flashes horribly if you resize it.
  • The automatic results merging is just plain weird. At the end of a session it can merge your coverage results into a previous session. This information isn’t much use to me at the end of a session. I want to merge previous results at the start of a session so I know which lines I haven’t tested.
  • The GUI is quite ugly. They really need to update those tired old icons.

However being able to see line coverage information in real time is just so incredibly useful that I am prepared to put up with the many shortcomings. I just run my application alongside Coverage Validator and, file-by-file and function-by-function, I try to turn the lines of code yellow (or, better still, cyan). Every time I have used Coverage Validator I have found at least one potentially embarrassing bug that I hadn’t discovered by any other means. The support has also been responsive. It is just a pity about the flaws, without them this would be a ‘killer app’ for testing.

Coverage Validator works with C++, Delphi and VB on Windows NT4, 2000, 2003 and XP[1]. A single licence costs $199. A free 30-day evaluation licence is available.

[1]I am using it on Vista currently, and it seems to work fine.