The purchase order system you need to build should be easy.
All the user has to do is select a supplier from the list of registered suppliers that you deal with, then enter a series of parts, descriptions, and quantities, and you're done. Print it off, mail it, wait for the order to be delivered.
You write the code in a week, and you sit back, waiting for praise and thanks to shower on you for the wonderful job you did.
What showers down on you, instead, is fifty shades of batshit
Users get half-way through entering an order, then notice a mistake on one of the earlier lines. But you gave them no way to go back up the screen so they have to scrap it and start again.
Users start, then realize they need to look up a product code, but they can't leave an order half-finished. They have to scrap it and start again.
It gets worse if you do reach the end of your order, because there's no opportunity to review it before it gets automatically printed off, or electronically faxed if the supplier is set up that way. Because you were being quick and efficient and decided to save them precious time. Orders are flying out the building with mistakes in them, that your company is being invoiced for by your suppliers.
And just because an order was correct at the time doesn't mean it will stay that way. One supplier is out of stock so you need to re-order either an alternate part or from a different supplier. But your system is expecting all goods ordered to be delivered. There's no means to cancel an order once placed.
Then the supplier only delivers five of the eight items ordered. The rest will follow next week, but you assumed it would all be delivered together and didn't think of part shipments.
All this adds up to one simple lesson...
Coding the happy path is typically less than 10% of the work in developing a system. If you only work on the happy path to save time, you'll be in a world of hurt later on.
Dealing with the unhappy paths should be the lion's share of your effort, and doing so gracefully marks the professional from the amateur.
Wednesday, April 24, 2013
Tuesday, April 23, 2013
T is for Training
Today's software is intuitive! Anyone can use it without any kind of training.
Can't they?
Bullshit!
Why does this myth persist?
Well, the cynic in me says that companies like Microsoft have done a superlative sales job in convincing us that their interfaces are intuitive. And company executives happily buy into it because it means they can get away without training their staff. But I contend that this is nothing more than vacuous sales talk with no real substance.
But, they argue, user interfaces these days are graphical. Pictures are easy to understand. So the interface is easy.
Oh, really?
As I type the draft of this post in MS Word, in the toolbar at the top of the screen are two icons that are almost identical. They consist of what looks like a sheet of paper with a magnifying glass on top of it.
Any guesses? And no cheating! If the symbol really is intuitive you should be able to tell me right away what it represents.
OK. If pressed, I'd have said they were something to do with zooming in or magnifying part of the page. But no. One is "Print preview". One is "Navigation pane". Two very different meanings for almost identical icons. Neither of which has anything to do with a magnifying glass.
The truth is that most icons are little better than arbitrary pictures with an assigned meaning. The icon means this because I say it does.
The reason the "intuitive" myth persists is not that it's in any way true, but that many of the common symbols in use have become largely standardized and have entered our common lexicon as a computer-literate population.
That doesn't make them intuitive. They've been learned!
The reason I am dwelling on this is that it might be reasonable to depend on learned meaning for widespread software, but when you write your business applications you'd better plan on training your users. No matter what you may think, what you put in front of them will not be intuitive, it will need to be learned.
On top of this, if you are doing anything worthwhile for your business sponsor, it ought to involve a serious re-think of the way the business works, and a significant expansion on the capabilities of the business. You will need to train people not just in the technicalities of the user interface, but also in the ways to get the best business value from the software.
If you fail to do that, all the investment on your part in building the best darned asset management system in the universe will be precisely for naught, because they won't use it to its full potential.
And, after all your hard work, wouldn't that be a shame?
Monday, April 22, 2013
S is for Separation of concepts
This year, for the A to Z Blogging Challenge I'm posting alphabetically on topics related to software development...
Many years ago, when I was a fresh-faced programmer, I worked on a replacement for an old payroll system.
In this old system, employees were all flagged with a "pay type", which was either "M" or "W".
"M" type employees were paid monthly on a salary. Each month they received one twelfth of the annual amount for their pay grade, and their salary was paid straight into their bank account.
"W" type employees, by contrast, submitted timesheets each week from which their pay was calculated on an hourly rate, and each Friday they got an envelope with cash in it.
This innocuous "pay type" rolled three entirely distinct and separate concepts into one field: How often you get paid, how your pay is calculated, and how it gets paid out.
At the time, this probably seemed like an obvious and direct translation of the business need into computer code. Clean and simple.
In more enlightened times, this approach is a Very Bad Thing.
Sadly, though, this is a very easy trap for business users to fall in to. They are used to expressing "what is", and in their minds, two or three independent concepts easily get intertwined through unvarying usage. They might even say, "But weekly paid means time sheets, that's just how it is." Or the habit of thought might be so ingrained that they don't even articulate it. It's an unspoken, unwritten rule.
Worse, as a software developer it's easy to get intimidated into accepting this state of affairs. But your job, as a software developer, is to get your surgical scalpel out and separate these conjoined twins.
In this example, the "pay type" in the new payroll system became a "pay cycle" field whose only job was to determine when people got paid. The method of calculating pay was determined by which pay scale you were assigned to, and how you got paid was an entirely separate "pay method" field.
The concepts got separated.
The benefits were immediate.
Manual workers could now be paid into their bank accounts, which used to be the preserve of white collar staff. We could easily accommodate new agreements with different pay cycles, like different groups being paid on different days of the month, or paid every two or four weeks rather than weekly. And it became possible to mix payment calculations so that salaried employees could, on occasion, submit timesheets for overtime, or weekly employees whose agreement included a fixed element on top of the timesheet hours.
Separating concepts like this gives you enormous flexibility. When you go into Subway for a sandwich, they don't say you can only have chicken on toasted whole wheat, or ham on white. They allow you to mix and match filling, topping, bread etc. to suit your taste.
And the killer argument for separating out concepts like this: divide and conquer! It's almost always easier to program that way!
Who can possibly say "no" to that?
Many years ago, when I was a fresh-faced programmer, I worked on a replacement for an old payroll system.
In this old system, employees were all flagged with a "pay type", which was either "M" or "W".
"M" type employees were paid monthly on a salary. Each month they received one twelfth of the annual amount for their pay grade, and their salary was paid straight into their bank account.
"W" type employees, by contrast, submitted timesheets each week from which their pay was calculated on an hourly rate, and each Friday they got an envelope with cash in it.
This innocuous "pay type" rolled three entirely distinct and separate concepts into one field: How often you get paid, how your pay is calculated, and how it gets paid out.
At the time, this probably seemed like an obvious and direct translation of the business need into computer code. Clean and simple.
In more enlightened times, this approach is a Very Bad Thing.
Sadly, though, this is a very easy trap for business users to fall in to. They are used to expressing "what is", and in their minds, two or three independent concepts easily get intertwined through unvarying usage. They might even say, "But weekly paid means time sheets, that's just how it is." Or the habit of thought might be so ingrained that they don't even articulate it. It's an unspoken, unwritten rule.
Worse, as a software developer it's easy to get intimidated into accepting this state of affairs. But your job, as a software developer, is to get your surgical scalpel out and separate these conjoined twins.
In this example, the "pay type" in the new payroll system became a "pay cycle" field whose only job was to determine when people got paid. The method of calculating pay was determined by which pay scale you were assigned to, and how you got paid was an entirely separate "pay method" field.
The concepts got separated.
The benefits were immediate.
Manual workers could now be paid into their bank accounts, which used to be the preserve of white collar staff. We could easily accommodate new agreements with different pay cycles, like different groups being paid on different days of the month, or paid every two or four weeks rather than weekly. And it became possible to mix payment calculations so that salaried employees could, on occasion, submit timesheets for overtime, or weekly employees whose agreement included a fixed element on top of the timesheet hours.
Separating concepts like this gives you enormous flexibility. When you go into Subway for a sandwich, they don't say you can only have chicken on toasted whole wheat, or ham on white. They allow you to mix and match filling, topping, bread etc. to suit your taste.
And the killer argument for separating out concepts like this: divide and conquer! It's almost always easier to program that way!
Who can possibly say "no" to that?
Saturday, April 20, 2013
R is for Robustness
© Photographer Stephanie Raines | Agency: Dreamstime.com
Robustness is a quality that saves your application from crashing and burning every time the unexpected happens.
And, believe me, in business software you should expect the unexpected.
Frequently.
Many of the things I have or will cover in this series will naturally lead to more robust applications. Things like defensive design stop your code being tripped up by unexpected data, and validation helps stop bad data appearing in the first place. Insulation and separation help break down a monster meal into bite sized chunks. Small chunks are easier to code and test, and to be confident they are working properly.
Even with all the above, your code will choke sometimes. It might not even be your fault. Servers crash. Network connections fail. What happens next depends on you.
Suppose your user is entering the final line of a fifty line purchase order when the system crashes. Good robust design will ensure that the user has lost as little work as possible if the worst happens. This means keeping track of what's been done up to the most recent point possible - in a way that it can be resumed later. In this example, you don't want to have to start off again at line one. You really want to find everything held safe at least up to line forty nine, leaving you to finish off what you were doing before the gremlins struck.
This is not rocket science. In fact, why only cater for system-generated gremlins? Users sometimes need to "crash out" of long and complicated tasks too. Forgot some of the details you needed to enter? Need to go and check something out half-way through? Phone rings and you really need to deal with it, which involves abandoning your transaction to do something else? Urgent need for the washroom? Allowing your users to leave a complicated task half finished, do something else, and come back later is a darned useful design feature. One that adds inherent robustness to your system.
This is all about bullet-proofing your application. I've more to say about bullet-proofing your business function too, which will come in a later post about Unhappy Paths.
Friday, April 19, 2013
Q is for Quality
This post is a bit of a grab bag of brief thoughts on Quality.
What does it mean?
When you mention quality, people usually think immediately of high-end superlatives: The Ritz, filet mignon, Rolls Royce.
That is only a narrow concept of quality. I find it more useful to think of quality as being the best fit for purpose. After all, how useful do you think a Rolls Royce would be for delivering two tons of concrete to a muddy building site?
What is good quality in one context might be appalling in another. The trick is to understand what constitutes quality for the application you are building. Not all applications need high-end security, or hot failover redundancy, or real time transaction responses.
When is it important?
When you mention quality, most developers think of testing, and stop there. But quality should be a mind set throughout the development process.
Yes, testing code is an important part, but so is confirming the quality of other products along the way. You don't build a house without good foundations. Equally, what good is building quality code if your requirements aren't clear, or if the design is dodgy? Every step in your development process should have its own quality checks and quality assurance methods applied.
What is the purpose of testing?
This is a question I like to pose to developers when I need them to up their game.
Most will tell me that the purpose of testing is to find and correct any bugs in their code.
Wrong!
The purpose of testing, in my opinion, is to demonstrate that the code is working correctly.
It's a subtle difference in emphasis, but if you write code with that perspective in mind your attention is far more focused on getting it right than expecting others to pick up your mistakes.
What does it mean?
When you mention quality, people usually think immediately of high-end superlatives: The Ritz, filet mignon, Rolls Royce.
That is only a narrow concept of quality. I find it more useful to think of quality as being the best fit for purpose. After all, how useful do you think a Rolls Royce would be for delivering two tons of concrete to a muddy building site?
What is good quality in one context might be appalling in another. The trick is to understand what constitutes quality for the application you are building. Not all applications need high-end security, or hot failover redundancy, or real time transaction responses.
When is it important?
When you mention quality, most developers think of testing, and stop there. But quality should be a mind set throughout the development process.
Yes, testing code is an important part, but so is confirming the quality of other products along the way. You don't build a house without good foundations. Equally, what good is building quality code if your requirements aren't clear, or if the design is dodgy? Every step in your development process should have its own quality checks and quality assurance methods applied.
What is the purpose of testing?
This is a question I like to pose to developers when I need them to up their game.
Most will tell me that the purpose of testing is to find and correct any bugs in their code.
Wrong!
The purpose of testing, in my opinion, is to demonstrate that the code is working correctly.
It's a subtle difference in emphasis, but if you write code with that perspective in mind your attention is far more focused on getting it right than expecting others to pick up your mistakes.
Thursday, April 18, 2013
P is for Presentation
This year, for the A to Z Blogging Challenge I'm posting alphabetically on topics related to software development...

© Photographer Dana Rothstein | Agency: Dreamstime.com
Sorry to appear so shallow and superficial, but, ya know, presentation matters!
You can go a long way by paying attention to little things, like sticking to a consistent presentation style - fonts, colors, spatial layout, lining up labels and edges of fields (up to a point, you can actually get too pedantic about making things line up that really shouldn't).
If you think that's just unimportant nit-picking, think about this. Give users two applications, one with a clean and professional interface, and one that looks like it's been thrown together by a five-year-old, and guess which one they'll prefer? More importantly, see how they talk about it. One will be blamed for everything that goes wrong, and will be seen as less reliable and more error prone - even if the two applications are actually identical under the covers.
It's just as easy to do it right as to make a mess of it, but doing it right (as with most things) takes a bit of thought up front.
OK, so presentation matters, but that doesn't give you license to go overboard. Flashy graphics might lighten things up and enhance the user experience, but they can also go horribly wrong.
No user is going to forgive you if your over-eager presentation style slows them down. If the system is slow to respond, it had better not be because it's taking time to load your irrelevant images or paint that pie chart in 3-D with digitally-rendered pie crust. If it is, I suggest you pack your bags and leave town before anyone notices.
And don't - ever - let needless presentation gimmicks actually intrude on your user's work, and especially don't force them into unnecessary clicking or typing.
Remember Clippy, the never-lamented MS Office assistant? Enough said.
© Photographer Dana Rothstein | Agency: Dreamstime.com
Sorry to appear so shallow and superficial, but, ya know, presentation matters!
You can go a long way by paying attention to little things, like sticking to a consistent presentation style - fonts, colors, spatial layout, lining up labels and edges of fields (up to a point, you can actually get too pedantic about making things line up that really shouldn't).
If you think that's just unimportant nit-picking, think about this. Give users two applications, one with a clean and professional interface, and one that looks like it's been thrown together by a five-year-old, and guess which one they'll prefer? More importantly, see how they talk about it. One will be blamed for everything that goes wrong, and will be seen as less reliable and more error prone - even if the two applications are actually identical under the covers.
It's just as easy to do it right as to make a mess of it, but doing it right (as with most things) takes a bit of thought up front.
OK, so presentation matters, but that doesn't give you license to go overboard. Flashy graphics might lighten things up and enhance the user experience, but they can also go horribly wrong.
No user is going to forgive you if your over-eager presentation style slows them down. If the system is slow to respond, it had better not be because it's taking time to load your irrelevant images or paint that pie chart in 3-D with digitally-rendered pie crust. If it is, I suggest you pack your bags and leave town before anyone notices.
And don't - ever - let needless presentation gimmicks actually intrude on your user's work, and especially don't force them into unnecessary clicking or typing.
Remember Clippy, the never-lamented MS Office assistant? Enough said.
Wednesday, April 17, 2013
O is for Open ears, eyes, mind
This is the other end of the spectrum from my last post on developers' egos.
A business system is all about the end users, and from behind your desk you have no idea what their world is like. To get beyond itemized requirements listed in a dry document and become truly useful, nothing beats getting out from behind your desk and walking a mile in their shoes.
Literally.
Walk with the stores clerk taking a stock count, and see what the real working world looks like. When he says he sometimes wants to count an item out of sequence he's not being awkward. The stores are forever getting rearranged, and the walk order recorded in the system can take weeks to catch up with reality.
Sit with the cashier taking payment from a confused octogenarian, and you appreciate the need for flexible payment options, and why that thirty second security timeout is driving them nuts.
Go out into the field with a forester and try reading your data entry screen through the scratches and mud splatters on his ruggedized tablet.
Do that with an open mind, think like an end user, not like a developer, and some odd-sounding requirements suddenly become clear.
And here's a little carrot to sell you on the benefits of getting to know their world. Once you can see thing from your users' perspective, you are in an enviable position to let your creativity loose once more. This is no longer with a view to showing off digital coolness to fellow geeks. You can now suggest solutions that the business community would never have dreamed of. Cool solutions that they really will thank you for. That's got to be worth a few field trips away from your cozy cubicle.
A business system is all about the end users, and from behind your desk you have no idea what their world is like. To get beyond itemized requirements listed in a dry document and become truly useful, nothing beats getting out from behind your desk and walking a mile in their shoes.
Literally.
Walk with the stores clerk taking a stock count, and see what the real working world looks like. When he says he sometimes wants to count an item out of sequence he's not being awkward. The stores are forever getting rearranged, and the walk order recorded in the system can take weeks to catch up with reality.
Sit with the cashier taking payment from a confused octogenarian, and you appreciate the need for flexible payment options, and why that thirty second security timeout is driving them nuts.
Go out into the field with a forester and try reading your data entry screen through the scratches and mud splatters on his ruggedized tablet.
Do that with an open mind, think like an end user, not like a developer, and some odd-sounding requirements suddenly become clear.
And here's a little carrot to sell you on the benefits of getting to know their world. Once you can see thing from your users' perspective, you are in an enviable position to let your creativity loose once more. This is no longer with a view to showing off digital coolness to fellow geeks. You can now suggest solutions that the business community would never have dreamed of. Cool solutions that they really will thank you for. That's got to be worth a few field trips away from your cozy cubicle.
Subscribe to:
Posts (Atom)
