Friday, April 5, 2013
E is for Error Messages
Translation: I've screwed up and you've just lost your afternoon's work.
Usually followed by that smug little "OK".
No, it's flippin' well not OK!
As an application developer, the best thing to do is to make sure these little beauties don't happen in the first place, of course. But, equally of course, computers will screw up from time to time, and when they do, the least you can do is make sure they do so gracefully.
So it's...
NO - to the cryptic techno-babble that the average end user won't even begin to comprehend.
NO - the end user will not want to debug the code. Don't even go there.
NO - the end user should not be left in limbo wondering what they should do next, or panicking that they've single-handedly brought the company system to its knees.
Things you can do
If possible, notify the help desk - behind the scenes - and log the technical details of the error somewhere a technical support person can get at them. The previous company I worked for used these measures very successfully. Often, by the time the user reported trouble, we were already working on a solution.
Keep the mumbo jumbo out of the visible message and instead tell the user what they should be doing next. Don't just leave them hanging. If you need them to stop work and report it, say so. If it's OK to log back in again and resume work, say so.
These are all talking about where the application chokes out of control. Then there's a whole class of errors that the end user will trip up over in the normal course of their work. Typing the wrong thing into a field, for example. These things should be detected by the application and the user informed in a way that is helpful and meaningful. Don't just spit out "Invalid input," say why it's not valid and what is expected instead.
Going the extra mile in handling errors will pay dividends in user satisfaction, and the extra effort in design and programming will repay you handsomely in the workload on your help desk.
Thursday, April 4, 2013
D is for Defensive design
This year, for the A to Z Blogging Challenge I'm posting alphabetically on topics related to software development...

© Photographer Illreality | Agency: Dreamstime.com
So far, we've been pretty high up in the stratosphere, talking about architecture, business requirement, and core concepts. In contrast, this post can apply at all levels of design and development, but it is most at home down in the weeds of the code.
You reach a point in your program where you have a decision to make. A fork in the road. If the answer to a certain question is "Yes" you do one thing, if it's "No" you do something else.
The average programmer will likely code something that says: If "Yes" do one thing, otherwise do something else.
Notice the difference?
Where did "No" vanish to?
"What's the difference?" Average Joe-Coder protests. "It can only be yes or no, so if it isn't yes, it must be no. I'm just being efficient."
Sure, but you're not being defensive.
A defensive programmer will write code along the lines of: If "yes" do one thing, if "No" do something else, otherwise tell a bloody human that someone's f****d up!
"That's mad," Average Joe-Coder says. "Why code for something that can never happen?"
Fair point, if that were a true statement. But, despite Joe's insistence, it will happen ... some day. Trust me. You're relying on logic to ensure the only possible answers are yes or no, and that logic has been written by human beings - with all that implies. And computers are physical machines. They glitch sometimes. What went onto the disk as a nice clean "Yes" or "No" might overnight morph into "Whatever".
And, you might remind Joe, the more unlikely it is to happen, the more important it is to tell someone when it does.
If a stranger wanders into a public library, nobody cares. It's expected behavior, not a problem.
If a stranger wanders unchecked into the loading dock of the local supermarket, it's not expected, but plausible. There's no locked doors to stop it happening. A member of staff will likely ask, "Can I help you?" and it's not a big deal.
If a stranger walks unchallenged into the Queen's bedroom at Buckingham Palace, you can bet it will be a big deal and the authorities will want to know about it. Because that should be impossible.
But it has happened.
Defensive design makes no assumptions.
Face the unthinkable. Decide how to handle it, and act accordingly.
© Photographer Illreality | Agency: Dreamstime.com
So far, we've been pretty high up in the stratosphere, talking about architecture, business requirement, and core concepts. In contrast, this post can apply at all levels of design and development, but it is most at home down in the weeds of the code.
You reach a point in your program where you have a decision to make. A fork in the road. If the answer to a certain question is "Yes" you do one thing, if it's "No" you do something else.
The average programmer will likely code something that says: If "Yes" do one thing, otherwise do something else.
Notice the difference?
Where did "No" vanish to?
"What's the difference?" Average Joe-Coder protests. "It can only be yes or no, so if it isn't yes, it must be no. I'm just being efficient."
Sure, but you're not being defensive.
A defensive programmer will write code along the lines of: If "yes" do one thing, if "No" do something else, otherwise tell a bloody human that someone's f****d up!
"That's mad," Average Joe-Coder says. "Why code for something that can never happen?"
Fair point, if that were a true statement. But, despite Joe's insistence, it will happen ... some day. Trust me. You're relying on logic to ensure the only possible answers are yes or no, and that logic has been written by human beings - with all that implies. And computers are physical machines. They glitch sometimes. What went onto the disk as a nice clean "Yes" or "No" might overnight morph into "Whatever".
And, you might remind Joe, the more unlikely it is to happen, the more important it is to tell someone when it does.
If a stranger wanders into a public library, nobody cares. It's expected behavior, not a problem.
If a stranger wanders unchecked into the loading dock of the local supermarket, it's not expected, but plausible. There's no locked doors to stop it happening. A member of staff will likely ask, "Can I help you?" and it's not a big deal.
If a stranger walks unchallenged into the Queen's bedroom at Buckingham Palace, you can bet it will be a big deal and the authorities will want to know about it. Because that should be impossible.
But it has happened.
Defensive design makes no assumptions.
Face the unthinkable. Decide how to handle it, and act accordingly.
Wednesday, April 3, 2013
C is for Core concepts
Yesterday, I talked about business needs. They are important, but to get a feel for the shape of an application, I find it helpful to distil the core concepts out of the mass of detail.

© Photographer Dana Rothstein | Agency: Dreamstime.com
Core concepts get to the heart of what is most important. It's essential to identify them because they will start shaping your solution very early on.
A good starting point is a high level data model. This highlights the most important things that the application deals with.
In an accounting application, for example, these might be accounts, transactions, and accounting periods. In a customer ordering system, core concepts might include customer, order, and inventory item.
At this point, you don't want to itemize every piece of data. The core concepts are the mountain peaks in the data landscape.
Another group of core concepts relate to function. What do you do with the things in your application? Again, you want to identify the really important things here, so maybe ask your business expert to describe in one sentence what is it the application does.
In a help desk system, the core of the system might be workflow - moving a call through different people's hands to fix an issue for the customer. A stock control system might revolve around movements in stock levels and forecasting future needs.
More subtle, and what people often overlook, are other qualities that might be important enough to affect your early architectural decisions. In a global application, maybe time zones, multi-lingual presentation and multi-currency accounting are important, whereas in an otherwise identical application for a local business these wouldn't matter. A booking system for a large airline or hotel chain might bring volume, performance, and high availability to the fore.
Core concepts may also arise from design choices. For example, security and privacy might be a primary business requirement. In response to this, you might decide that all data requests will go through an information access layer that enforces security policy. This design choice isn't a business requirement, but it is a crucial design concept that will fundamentally affect how the application is built.
So, picking out a handful of core concepts helps visualize what is most important, and helps de-clutter an unmanageable mass of information. You can then build the rest of your design around these concepts.
© Photographer Dana Rothstein | Agency: Dreamstime.com
Core concepts get to the heart of what is most important. It's essential to identify them because they will start shaping your solution very early on.
A good starting point is a high level data model. This highlights the most important things that the application deals with.
In an accounting application, for example, these might be accounts, transactions, and accounting periods. In a customer ordering system, core concepts might include customer, order, and inventory item.
At this point, you don't want to itemize every piece of data. The core concepts are the mountain peaks in the data landscape.
Another group of core concepts relate to function. What do you do with the things in your application? Again, you want to identify the really important things here, so maybe ask your business expert to describe in one sentence what is it the application does.
In a help desk system, the core of the system might be workflow - moving a call through different people's hands to fix an issue for the customer. A stock control system might revolve around movements in stock levels and forecasting future needs.
More subtle, and what people often overlook, are other qualities that might be important enough to affect your early architectural decisions. In a global application, maybe time zones, multi-lingual presentation and multi-currency accounting are important, whereas in an otherwise identical application for a local business these wouldn't matter. A booking system for a large airline or hotel chain might bring volume, performance, and high availability to the fore.
Core concepts may also arise from design choices. For example, security and privacy might be a primary business requirement. In response to this, you might decide that all data requests will go through an information access layer that enforces security policy. This design choice isn't a business requirement, but it is a crucial design concept that will fundamentally affect how the application is built.
So, picking out a handful of core concepts helps visualize what is most important, and helps de-clutter an unmanageable mass of information. You can then build the rest of your design around these concepts.
Tuesday, April 2, 2013
B is for Business needs
The purpose of software is to be useful to the people who use it.
Right?
So why is there so much crap out there?
All too often, software is designed with only minimal reference to the people actually using it. Worse still, a lot of software seems designed more for the aggrandizement of the writers than the use of the users - look how cool this feature is!
The point of software is not to show off how technically gifted you are. You can show me that by giving me something that does what I need it to do, reliably, without fuss, and without expecting me to know how it works.
And how can you possibly know what I need, unless you ask me?
The traditional software development lifecycle kicks off with Business Requirements. Good start! But gathering requirements isn't just about ticking off boxes full of dry jargon. To make software really useful, you need to dig beyond requirements. Requirements are what ivory tower dwellers say they need. A whole world apart from what the business, and the people in it, really need.
You need to dig. Keep probing. Keep asking "Why?" Ask at all levels, not just the bosses They don't have a clue. Sit with the people doing the job. Walk a mile in their shoes. See the world through their eyes.
For example, "The Requirements" might state that an order entry clerk needs access to a list of inventory. Great. Got enough to design the system? Off you go, then. You give them a spanking new screen that lays out the entire company's inventory any which way you can think of. By product category, by warehouse, search by name, by price, by color ... You spent days on it. You are proud of your job.
And the order entry clerks hate it.
"Why?" you ask them, "how unreasonable can you get? I put all this blood, sweat, and tears into this screen and you ungrateful chimps just don't appreciate the heartbreaking genius that went into it, with its predictive auto-completion and intelligent history-based searches."
"But," they say, "I already know the product number, I just need to see which is the nearest warehouse that has it in stock ... and I need to do that from within the order screen where I've already filled out half the order."
Oops. You didn't know that because you didn't talk to them about what they need.
The moment you catch yourself thinking, "Wow, everyone will love this new feature!" ... beware!
Right?
So why is there so much crap out there?
All too often, software is designed with only minimal reference to the people actually using it. Worse still, a lot of software seems designed more for the aggrandizement of the writers than the use of the users - look how cool this feature is!
The point of software is not to show off how technically gifted you are. You can show me that by giving me something that does what I need it to do, reliably, without fuss, and without expecting me to know how it works.
And how can you possibly know what I need, unless you ask me?
The traditional software development lifecycle kicks off with Business Requirements. Good start! But gathering requirements isn't just about ticking off boxes full of dry jargon. To make software really useful, you need to dig beyond requirements. Requirements are what ivory tower dwellers say they need. A whole world apart from what the business, and the people in it, really need.
You need to dig. Keep probing. Keep asking "Why?" Ask at all levels, not just the bosses They don't have a clue. Sit with the people doing the job. Walk a mile in their shoes. See the world through their eyes.
For example, "The Requirements" might state that an order entry clerk needs access to a list of inventory. Great. Got enough to design the system? Off you go, then. You give them a spanking new screen that lays out the entire company's inventory any which way you can think of. By product category, by warehouse, search by name, by price, by color ... You spent days on it. You are proud of your job.
And the order entry clerks hate it.
"Why?" you ask them, "how unreasonable can you get? I put all this blood, sweat, and tears into this screen and you ungrateful chimps just don't appreciate the heartbreaking genius that went into it, with its predictive auto-completion and intelligent history-based searches."
"But," they say, "I already know the product number, I just need to see which is the nearest warehouse that has it in stock ... and I need to do that from within the order screen where I've already filled out half the order."
Oops. You didn't know that because you didn't talk to them about what they need.
The moment you catch yourself thinking, "Wow, everyone will love this new feature!" ... beware!
Monday, April 1, 2013
A is for Architecture
Before we start this year's A to Z Challenge, participants have been asked to say a big (and surprise) Thank You to Arlee Bird at Tossing It Out for starting this Challenge.
This year, for the A to Z Blogging Challenge I'm posting alphabetically on topics related to software development...
To kick things off, I want to be clear about one thing. This is not a geek series about programming. It doesn't even say much about technology. It is about the process of software development from a human perspective, and some habits of thought that I believe lead to good, robust, and useful software.
This first post is about architecture, which I think encapsulates the whole series.
When you say "architect", most people think of buildings.

© Photographer Galina Barskaya | Agency: Dreamstime.com
No problem. What I'm talking about here is the essence of architectural thinking. That essence holds true in any field where your aim is to build something, be it a house, a three-course meal, or a piece of software. This essence, the thing that distinguishes an architect from a builder, is the use of deliberate planning and thinking skills to achieve a well-built end result that serves its purpose, is a pleasure to use, and which you are proud to be associated with.
In traditional building architecture, you may start with a blank slate, the big picture, and work things out from the top down. An empty field. What do you need to incorporate? Lay out the major elements and gradually fill in finer and finer detail.
Or you may start with one key idea and build out from there. The entrance hall. An imposing atrium. A courtyard with fountains. A shape.
Or you may start with some peculiar constraints. An unusually long and narrow plot. A steep hillside. The use of a particular material.
Wherever you start from, one thing that distinguishes good from poor architecture is that, although the dominant idea may be visible or even deliberately conspicuous, it won't dominate to the exclusion of all else. A breathtaking atrium may wow visitors to your headquarters, but the office space around it still needs to be useable. You don't get to skimp on ventilation, or disabled access, or fire safety, just because those pesky elements interfere with your grand vision.
Whatever your starting point, good architecture will arrive at a sound and coherent whole, where everything works and clearly belongs together.
The same applies in software development. You need to balance function (what it does) with a whole host of other constraints like useability, performance, security, auditability, availability, scalability, maintainability, and cost, to name a few.
A beautiful building doesn't happen by chance, and neither does beautiful software. In both arenas, there are deliberate and expert disciplines that need to be applied. These disciplines are your craft. You need to master them in order to produce good results reliably.
In other words, architecture is the art of doing things right by conscious design rather than purely by accident.
This year, for the A to Z Blogging Challenge I'm posting alphabetically on topics related to software development...
To kick things off, I want to be clear about one thing. This is not a geek series about programming. It doesn't even say much about technology. It is about the process of software development from a human perspective, and some habits of thought that I believe lead to good, robust, and useful software.
This first post is about architecture, which I think encapsulates the whole series.
When you say "architect", most people think of buildings.
© Photographer Galina Barskaya | Agency: Dreamstime.com
No problem. What I'm talking about here is the essence of architectural thinking. That essence holds true in any field where your aim is to build something, be it a house, a three-course meal, or a piece of software. This essence, the thing that distinguishes an architect from a builder, is the use of deliberate planning and thinking skills to achieve a well-built end result that serves its purpose, is a pleasure to use, and which you are proud to be associated with.
In traditional building architecture, you may start with a blank slate, the big picture, and work things out from the top down. An empty field. What do you need to incorporate? Lay out the major elements and gradually fill in finer and finer detail.
Or you may start with one key idea and build out from there. The entrance hall. An imposing atrium. A courtyard with fountains. A shape.
Or you may start with some peculiar constraints. An unusually long and narrow plot. A steep hillside. The use of a particular material.
Wherever you start from, one thing that distinguishes good from poor architecture is that, although the dominant idea may be visible or even deliberately conspicuous, it won't dominate to the exclusion of all else. A breathtaking atrium may wow visitors to your headquarters, but the office space around it still needs to be useable. You don't get to skimp on ventilation, or disabled access, or fire safety, just because those pesky elements interfere with your grand vision.
Whatever your starting point, good architecture will arrive at a sound and coherent whole, where everything works and clearly belongs together.
The same applies in software development. You need to balance function (what it does) with a whole host of other constraints like useability, performance, security, auditability, availability, scalability, maintainability, and cost, to name a few.
A beautiful building doesn't happen by chance, and neither does beautiful software. In both arenas, there are deliberate and expert disciplines that need to be applied. These disciplines are your craft. You need to master them in order to produce good results reliably.
In other words, architecture is the art of doing things right by conscious design rather than purely by accident.
Thursday, March 28, 2013
It's nearly April...
And you know what that means.
It's time for the A to Z Challenge 2013.
As I mentioned earlier this month, I will be posting alphabetically on topics related to software development.
This series is about development in a broad sense. It is not about programming. It is not about technology as such, but about how to get ourselves back in the driving seat and get technology working for us, rather than the other way around.
I have compiled a series of topics which I believe are good habits of thought in the software development process, that should help us build good and useful software.
Although these habits are (IMHO) good practices in any software endeavor, I'm especially thinking about the kind of software that underpins many businesses around the world.
All those applications that pay you, manage your stock room, take orders from your customers on the web. All those applications that armies of people use, day in day out, to keep the business world ticking over. I don't care whether they are swish web applications, mainframe green screen, or cobbled together in MS Access or a raft of spreadsheets. If you ever string together lines of code and calculations to achieve a business goal, then listen up!
Why do so many of these applications make you feel like you're battling an octopus just trying to get through the day's work?
Why do so many of them suck?
This series says it doesn't have to be that way.
It's time for the A to Z Challenge 2013.
As I mentioned earlier this month, I will be posting alphabetically on topics related to software development.
This series is about development in a broad sense. It is not about programming. It is not about technology as such, but about how to get ourselves back in the driving seat and get technology working for us, rather than the other way around.
I have compiled a series of topics which I believe are good habits of thought in the software development process, that should help us build good and useful software.
Although these habits are (IMHO) good practices in any software endeavor, I'm especially thinking about the kind of software that underpins many businesses around the world.
All those applications that pay you, manage your stock room, take orders from your customers on the web. All those applications that armies of people use, day in day out, to keep the business world ticking over. I don't care whether they are swish web applications, mainframe green screen, or cobbled together in MS Access or a raft of spreadsheets. If you ever string together lines of code and calculations to achieve a business goal, then listen up!
Why do so many of these applications make you feel like you're battling an octopus just trying to get through the day's work?
Why do so many of them suck?
This series says it doesn't have to be that way.
Saturday, March 23, 2013
From Seattle with love
As a follow-on to my last post, there were many things that made our brief trip to Seattle enjoyable, but I wanted to offer a few special acknowledgements.
The Westin Hotel was an excellent choice to stay. Ideal location, central downtown with plenty of shopping and eating within a few blocks, and right alongside the monorail and light rail stations. The room was comfortable, it was great to relax in the pool after a day on our feet, and the staff were welcoming and helpful.
Tutta Bella Pizzeria served up mouth-watering pizzas. Half-way through, Megan realized hers had a bit of a chilli bite to it and she started to struggle, torn between melting deliciousness and unaccustomed heat. When our server cleared the table, Megan mentioned this and he apologized, and suggested a gelato to cool her down. On the bill, we found:
Gelato $2.50
Love -$2.50
How sweet was that?
The pizza was really for Matthew, so the next (and our final) night was Megan's choice. She fancied tacos. We found a nearby Mexican restaurant online, but when we got there it was closed. More online searches directed our feet along a few streets, by now looking for anything vaguely hospitable. Most places seemed either shut or shutting for the night, or uninvitingly empty...
*crickets* ... not a good sign!
Getting hungry, we stumbled by accident on Space Taco. Clearly it was meant to be. Wonderful newly-opened restaurant. Warm atmosphere, delicious food. Megan was happy, Matthew was happy, we were happy, and the owners introduced us to horchata, a delicious rice drink that we are going to try at home.
We sailed down to Seattle on the Victoria Clipper. When we checked in for the return journey, they canceled the sailing due to strong winds making the sea dangerous for the little catamaran.
This is where travel companies usually fall down. No matter how good the travel experience when things go right, what really counts is how you handle your passengers when things go wrong.
Victoria Clipper staff were wonderful. They confirmed immediately that they would get us to Victoria that day. They kept us regularly updated on progress, and were open about what they didn't yet know (e.g. which port we would be sailing from and when we'd arrive). It took them time to line up a couple of coaches, then they drove us across the border to Vancouver, where we caught a BC ferry. All the while, the accompanying staff checked in with us and talked through what was going to happen next, at the border crossing, and on the ferry. Yes, we arrived home a few hours later than planned, but the way we were treated made it an excursion rather than an ordeal. In those situations, honest information is vital. Kudos, Victoria Clipper.
The Westin Hotel was an excellent choice to stay. Ideal location, central downtown with plenty of shopping and eating within a few blocks, and right alongside the monorail and light rail stations. The room was comfortable, it was great to relax in the pool after a day on our feet, and the staff were welcoming and helpful.
Tutta Bella Pizzeria served up mouth-watering pizzas. Half-way through, Megan realized hers had a bit of a chilli bite to it and she started to struggle, torn between melting deliciousness and unaccustomed heat. When our server cleared the table, Megan mentioned this and he apologized, and suggested a gelato to cool her down. On the bill, we found:
Gelato $2.50
Love -$2.50
How sweet was that?
The pizza was really for Matthew, so the next (and our final) night was Megan's choice. She fancied tacos. We found a nearby Mexican restaurant online, but when we got there it was closed. More online searches directed our feet along a few streets, by now looking for anything vaguely hospitable. Most places seemed either shut or shutting for the night, or uninvitingly empty...
*crickets* ... not a good sign!
Getting hungry, we stumbled by accident on Space Taco. Clearly it was meant to be. Wonderful newly-opened restaurant. Warm atmosphere, delicious food. Megan was happy, Matthew was happy, we were happy, and the owners introduced us to horchata, a delicious rice drink that we are going to try at home.
We sailed down to Seattle on the Victoria Clipper. When we checked in for the return journey, they canceled the sailing due to strong winds making the sea dangerous for the little catamaran.
This is where travel companies usually fall down. No matter how good the travel experience when things go right, what really counts is how you handle your passengers when things go wrong.
Victoria Clipper staff were wonderful. They confirmed immediately that they would get us to Victoria that day. They kept us regularly updated on progress, and were open about what they didn't yet know (e.g. which port we would be sailing from and when we'd arrive). It took them time to line up a couple of coaches, then they drove us across the border to Vancouver, where we caught a BC ferry. All the while, the accompanying staff checked in with us and talked through what was going to happen next, at the border crossing, and on the ferry. Yes, we arrived home a few hours later than planned, but the way we were treated made it an excursion rather than an ordeal. In those situations, honest information is vital. Kudos, Victoria Clipper.
Subscribe to:
Posts (Atom)

