Archive : April 2009

Remove/Cancel Bubbling for an Event in Flex3

fx_icon_special_100x100

I recently had an issue in flex where I needed the click event for a component in an ItemRenderer to not bubble up to the parent list. Since the click event was being dispatched by Flex SDK code, I could not directly do this by passing false into the event's constructor. I had hoped to find a property I could set on the object, something like "clickBubbles", which I could set which would accomplish this.

Either that property doesn't exist or I could not find it. My solution was to basically hijack the event and send an impersonator in its place.

Continue reading »

Topics: , ,

Visual Heuristics

spyglassHeuristic reviews are a great tool for finding usability issues in any existing interface, from web-based to desktop. It's a quick and relatively inexpensive way to uncover, document and prioritize usability problems.

From usability.gov:

The goal of heuristic evaluation is to find usability problems early in the design of a Web site so that improvements can be made as part of the iterative design process … The result of this analysis is a list of potential usability issues or problems.

While I use heuristic reviews and find the results to be very helpful, I've never been too thrilled with the final documentation. Even when formatted nicely, they’re nothing more than a laundry list with a bunch of words and numbers and no hints or ideas on how that information can be grouped together and translated over to an application. Quite frankly, after the second page my eyes do tend to glaze over. And if my eyes glaze over, I can't even imaging how it affects the client. So I was challenged to come up with something better.

My co-worker, John McCaffrey, wanted to give his client some ideas on how to improve their site -- a heuristic review but with a sort-of Cliffs Notes component that could highlight the value of the review but not induce eye fatigue. He was also looking for something more visual to grab the interest of the client and keep them there long enough to start looking at the data. He mentioned that he really likes our annotated wireframes and an idea was born. Create a mashup of annotated wireframes and heuristic evaluation.

Continue reading »

Fun with Math

Triple Orange Peel
Creative Commons License photo credit: fdecomite

Math is fun!

I never understand why people hate math so much.  I guess I hated history & literature as much as fans of those subjects hate math.  I remember always hearing that you would never use math in real life, which is just not true.  I use it all the time, and this post is about one of those times.

A coworker of mine is creating an iPhone app, and whenever he encounters tricky math, pulls me in, as he realizes I have fun with it.  His problem was:
given two points on a circle, find the shortest number of degrees between them
So given points at 4° and 20°, the result should be 16°.  Seems easy enough, except a few fun scenarios.  356° and 4° results in 8°, and 360° and 0° are the same.

I thought through it, and my original approach was going to figure out what quadrant each angle was in, and then do some calculations to adjust the distance to keep the answer <= 180°.  But then I realized that was going to be nasty, and then I remembered our good friend the radian.
Continue reading »

Topics: ,

UI Testing is easy with MVP

Developing an application with WinForms can lead to difficult testing scenarios.  There are a ton of  automated UI testing toolkits that essentially record workflows and replay them.  This can work, but leads to unwieldy tests, and makes it difficult to integrate them into automated tests and builds.  I recommend using the Model View Presenter (MVP) pattern for your application architecture to relieve this pain point.  Todd  Snyder from Infragistics has a nice blog entry explaining the differences between MVC and MVP patterns.  The gist is: you have a coordinating  Presenter that communicates with the View via its interface, and orchestrates the interaction between the View and the Model.  The important piece here is the View  interface.  This view interface can allow you to stub or mock the view in testing scenarios, to completely eliminate the need for any UI interaction.  As long as your UI code is used as a shell that does nothing but pass messages, this makes testing REALLY easy.

We recently built a project around the MVP architecture. Eventually we wound up creating a test harness providing us simple methods such as:
public void MouseUp(IDocumentPresenter presenter, int x, int y)
This simulated a mouse up event without actually requiring an input device or the UI that it acts upon. With simple method like these, you can build up some pretty complex tests that run quickly and don't require any special libraries to run.

Before embarking on your next GUI framework based application, be it WinForms or other, evaluate the MVP pattern and the ease of testing that it can provide. It's worked really well for us.

The Five Deadly Sins of Software Development

southparksatan

There's a list of deadly sins out there for just about anything related to information technology. Some have seven items, some have five, some even have nine. I haven't seen one with 21 deadly sins yet, but I won't be surprised if I do. Some focus on IT departments, some on unused software, some on agile software development, and quite a few on whatever they're trying to sell you.

We've seen a lot in our ten years of developing software at Pathfinder, and the list that rings truest is the shortest and pithiest, from the Standish Group:

  • Ambition
  • Arrogance
  • Ignorance
  • Fraudulence
  • Abstinence

Each of these is best illustrated by example:
Continue reading »

RailsConf 2009: The RailsConfening

In just over a week, I'll be headed off to RailsConf for my second visit.

Here's an overview of some of the sessions I'm looking forward to.

First, of course, is my own: Below and Beneath TDD: Test-Last Development and Other Real-World Test Patterns. It's at 2:50 on Tuesday, May 5, in Ballroom B. I'll be talking about how Test-Driven Development can fail, how to recognize failure patterns, and how and why to move back to a successful process. No matter what your level of comfort is with testing, I think you'll get something out of this talk. It's going to be fun, and I'm excited about the chance to present.

I'm also going to be giving out free copies of Rails Test Prescriptions (well, it's an ebook, I'll be giving out free licenses). I haven't quite worked out the exact details yet, but it'll be similar to last year's plan, and will involve seeing me or attending my session. Follow the book on Twitter for information about giveaways. Follow me on Twitter for general updates about the conference.

And come up and say hi -- I'd love to meet people who read this blog or the Rails Prescriptions book.

Other talks and sessions that I'm particularly interested in include:

Continue reading »

Topics:

The Starting Line

Companies (and people) new to software development tend to think that projects start with development, as in writing the actual code, as in here’s my idea … when can I see it and btw, why am I paying you for time that you’re not coding. Most are not aware of the upfront work needed to get to the point of coding or, perhaps, even the value of it. After all, they gave you the idea so let’s see less talk and more coding.

What is some of that necessary work that’ll drive us towards development? The upfront work definitely includes requirements — the details that allow us to start writing the code. But even before the requirements are started, long before diving into the wireframes and user modeling, features list or user stories, projects need to begin with a business problem and a blue-sky idea on how to solve that problem. In short, the product concept.
Continue reading »

Oracle and Sun: What it may mean for Open Source Landscape

The recent acquisition of Sun by Oracle, and not IBM, took the community by surprise. Open source Java developers have benefited immensely from Sun's Java and IBM's contribution to Java space. IBM has a generally favorable view from open source community since IBM has few significant open-source contributions including those to Apache software foundation and Eclipse. When I heard about IBM's talk of acquiring Sun, I was certainly bothered by the demise of Sun as a company but nevertheless hoped that whatever happens, Java and MySQL, and the strong community behind it, should stay largely intact. And I felt comfortable with Java landing in IBM's lap considering its largest contribution to Java community by any corporate vendor. Oracle is a strong and focussed company but its contribution to open source world is minimal. As open source developer or company, you are also concerned about the fate of mysql. Like everybody, I am trying to make sense of what this will mean for the open source developers.

Continue reading »

Topics: , ,

Deploying .NET Windows applications

nsis

I m sure many of the .NET programmers who have worked on building .NET windows applications must have had a chance to play around with the MSI/Deployment Project. This is the built-in project that the framework offers to build installers for deploying and installing windows applications. I think this project provides decent capabilities for packaging and installing windows applications but definitely has some limitations.

Continue reading »

Touch Screen Kiosk in Adobe Air

kioskscreensmall1

We recently launched a new Touch Screen Kiosk deployed in both Adobe Air and Flex. Touch Screen Kiosks pose some interesting usability challenges, some of which overlap with those for the iPhone. Take a look at a video demo or read the longer case study on the Pathfinder site.

Touch Screen Kiosk Demo

Static Typing and the Paranoid Style of Programming

I have kind of a long standing rant-thing about static languages vs. dynamic languages, defensive programming, exceptions, and the best use of a developer's time and effort. It's been dormant for a while, but Sharad's comments on static v. dynamic, which I largely agree with, and this short piece by David McLaughlin on defensive programming gave me an itchy ranting finger.
Continue reading »

Prototyping with Keynote

jenny @ 2.30
Creative Commons License photo credit: jcestnik

I've been using Keynote--Apple's version of Power Point--for at least a year now.  It provides multi slide functionality with an easy to use drag and drop interface for creating objects of pretty much any kind.  It also works great at any level of fidelity.  I can do quick sketches during the early phase of a project, and when the time comes I can also build complete full color, pixel perfect mockups of an interface.  Apple gives me more creative control over my objects with Keynote than Microsoft does with Power Point, which frustrated me to no end every time I needed to place something with precision, or build a custom shape.

Pretty much all of my design projects will include some sort of user testing.  It is at this point that I must transform the wireframes I've built into a clickable prototype.  Now this step can and frequently does get messy, at least the way I used to do it.  I used to create my wireframes, one slide for each screen, or state--which is much more common now as RIAs take over more and more of the landscape--and then export them to PDF.  I would then take that PDF document into Adobe acrobat, which has a hyperlink tool, thus allowing me to add the interactivity to the wireframes.  The problem is that the  workflow is slow and inefficient because the tasks involved require two different programs.  As long as the wireframes themselves are perfect, I have no problem.  I'm done with Keynote.  However, any time I want to make a change to a wireframe, I must go back into Keynote, make the change, re-export the entire document as a PDF, take the page or pages that I've changed and, one at a time, place them into my existing hyperlinked PDF.  Also, Acrobat is not great at making the process of replacing pages very usable.  I frequently have to double check whether a page replacement actually worked because it's not clear during the action.

Now, instead of using acrobat to add the interactivity, I simply use Keynote, which allows my to hyperlink any object to any slide number (or, for that matter any webpage, or even another Keynote slideshow).  That way I can make changes to both the underlying objects in the wireframes as well as the click-flow in the same program.  Keynote will automatically embed the hyperlinks into an exported PDF as well.  That way, the end user of the test needn't actually have Keynote.  The whole process is much more manageable as a result, especially since my prototypes typically involve dozens of individual wireframes.

Remain Static or Go Dynamic?

The age old debate between static and dynamic languages has only become more prominent with the advent and wider adoption of languages like Ruby, Groovy. Recently, Pathfinder was approached by a client for an unbiased opinion on what technology stack would be suitable for their next endeavour, which is a re-write of their 10 year old existing application. Looking at their existing system, which had no traces of unit tests and code coverage, I felt uncomfortable suggesting Ruby/Rails. Why? a dynamic language (like Ruby/Rails) requires more disciplined approach to software development and can become unmaintainable for large projects if not managed properly with right tools and processes. Yes, that is one big statement. While I may have found a few supporters in static-language tent, I held doubt about it myself. To say the least, it is not proven. So, I set out to find what others have to say about these assumptions:

Continue reading »

Mise En Place – Maximizing Programming Productivity

mise en placeThe knowledge and skill of a software developer are often the the most expensive, and therefor most valuable, part of a new development effort. As a professional, it's our duty to try to maximize our programming efforts to give the client a good return on their investment.  Unfortunately, our job entails much more that just that writing software. Going to meetings, answering email, working with vendors, participating in a code review and many other things come part and parcel.  In this blog, I'd like to share a couple ways I like to increase my productivity and efficiency when I get to do what I enjoy the most; code.

Recently I've been reading quite a bit of Anthony Bourdain, chef and host the Travel Channel's "No Reservations".  In discussing what it takes to be a profession chef, one that is going to crank out several hundred orders a night at a high level of quality in concert with a team of other chefs, he constantly comes back to a couple of important points.  Central is the concept of mise en place, translated to roughly  "everything in place", as in set up and ready for business.  All common ingredients are measured out, washed, chopped and placed in individual bowls. All utensils are washed and within easy reach. Its allows the chef to be able to accomplish things quickly and efficiently, and feel things are in orderly despite the chaotic atmosphere.  For him, there is a religious quality about it.

Continue reading »

What to Look for in a Hosting Environment: Part 1 – Monitoring

apache concurrent connectioins

Having built and managed data center environments, provided hosting and managed 3rd party hosted solutions, I have seen a very broad spectrum of hosting options, and the benefits and pitfalls of each. Sometimes there are deals that appear to be too good to be true, and many times they are.  Once you drill down into the details you can usually find where the corners have been cut to market to a certain budget.

These cuts and sacrifices are not necessarily a bad thing, but you need to ensure that you understand their impacts, and that if you are fine with them, you can save some $'s, but not necessarily avoid the headaches. You will find that you generally get what you pay for, and that if you make fully informed choices you will get the exact environment you need, for a reasonable budget.

Not many people have the time to drill down into the nitty gritty of each hosted solution, so I thought I would discuss what to look for, why it's important, and more importantly (to save your valuable time), what to ask in order tho get that information.

We’re going to look at five main areas to consider when evaluating a hosting environment:

1. Monitoring
2. Backup strategies
3. Hosting environment hardware and options
4. Security
5. Other topics of interest not covered by the above mentioned.

We’re not going to tackle cloud computing or specialized hosting, each of which deserve their own discussions.

Lets start with monitoring.  I hate getting late night calls for support. I'd rather either foresee a problem coming at me and avoid it in the first place, or at least know exactly what the cause of the issue is if I am called. A good monitoring system will provide all this and much, much more.

Continue reading »

Launch: Pathfinder Newsletter

    Get a monthly update on best practices for delivering successful software.

    Subscribe via email


    Subscribe via RSS      RSS icon

Topics

Search

WordPress

Comments about this site: info@pathf.com