Friday, 26 June 2015

Worth a read: UX is not UI

I love UX and spend hours thinking about how to make a great UX (no really).
So when I read this article I just had to share.
UX has become a neologism. When something has “good UX” it is an implied meaning of having the core components of UX (research, maybe a persona, IA, interaction, interface, etc etc…). It’s not really necessary or desirable to tack the word design onto the end anymore. It’s a distraction and leads people down a parallel but misguided path… the path to thinking that UX = User Interface Design.
See: http://www.helloerik.com/ux-is-not-ui  and the graphic from the article here.

Tuesday, 9 June 2015

Cool Tool of the Day: OutlookGoogleSync

A nice little tool to get your work outlook appointments into your Google calendar.

http://outlookgooglesync.codeplex.com/

It only pushes data from Outlook to Google but for those like me who only want an update on my phone it is more than enough.
 
According to the project it is a...

A small tool to keep the Google calendar in sync with the Outlook calendar (one way: Outlook -> Google).
Doesn't need admin rights and works behind a proxy.
Works with Outlook 2003 and newer.

There is an alternate http://calendarsyncplus.codeplex.com/

Thursday, 4 June 2015

The lost world of java.nio

The O'Reilly book on the subject
I was ask today to help some colleagues with a comms issue on a Telephony application.
When they ask a whole set of questions and problems started to come to mind. What happens with the Garbage Collect, how fast is the code, does it mess packets.

So I had a little look around for some information on Java NIO, it seems to have been kicking butt since Java 1.4 and we have all ignored it.

Indeed for Java 7 it has a new friend … java.NIO.2.

I promised to do some research so here are my results:

Good bye commons-io. You’ve served me well, but I have a new ‘friend’!
In fact if you look at the Channels package (http://docs.oracle.com/javase/7/docs/api/java/nio/channels/Channels.html) it will allow you to convert to your familiar Stream classes while still sending data via the nio classes to your socket (AsynchronousSocketChannel).

And if we really-really want to know how to do this stuff:


NIO.2 Cookbook - http://www.javaworld.com/article/2882984/core-java/nio2-cookbook-part-1.html

I may never use Java.IO again!

A good book : Software Measurement and Estimation: A Practical Approach

Estimating the size of a software development is a black art.
This book attempts to put some science onto the topic.

It attempts to give you methods for determining how big your project is compared to others, what is your code quality like and how efficient are your developers.

It contains many gems such as the relative inefficiencies of coding in different languages. For example VB has a "gear ration" of 42 while java & C# have a GR of 59 which means you must write 40% (59/24=1.41) more code to perform the same task in C# or Java. Which shouldn't come as a surprise to any one.

It even suggests that once you get a couple of projects into a development you might be able to develop a ratio between your specification size (user stories) and the number of NLOC (none-commented lines of code). A wooly estimate but perhaps a usefull one if pushed for an estimate, by a manager.

It goes on to argue that while LOC can be measured easily it is Functional Point Analysis (FPA) which will perhaps yield the best estimation results.
To me this is a better approach as it ties in with the Agile use of User Stories which can be estimated into their relative difficulties. However in Scrum the developers tend to use planning poker which is a method I am not personally in favor of as I prefer a more empirical approach and the use of historical data (see this post on using historical data).

The next stage this book suggests is then converting your Functional points to LOC (which is useful if parts are using different tech) and comparing it to your historical results ie your productivity.

The point here is DON'T GUESS!

Work it out!


"When you can measure what you are speaking about, and can express it in numbers, you know something about it; but when you cannot measure it, when you cannot express it in numbers, your knowledge is of a meager and unsatisfactory kind." - Lord Kelvin


"Science/It works bitches." - xkcd

Finally some tools to calculate LOC:
And some books:

Software Quality Metrics Overview

Implementing Automated Software Testing - Continuously Track Progress and Adjust Accordingly

A final thought on functional point estimation.

In my experience, the size and complexity of a project is a function of a quite limited number of parameters, that compares from a project to another, whatever the sector or domain area.

Each application usually has a bit of specificity in some way (workflow complexity, external connection challenges, dynamic user interfaces, customized advanced business calculations or multi-tenancy for SaaS applications), so you can determine the impact that element has in terms of development cost is relatively constant from a project to another.

When determining the complexity of the project you combine several complexity factors, you may also find ratios that help you deal with this complexity and you should be able to evaluate a project based on the following numbers:
  • number of entities
  • number of simple business rules
  • number of advanced business rules (cross-entity for example)
  • number of user interface elements (screens, web pages)
  • number of reports
  • number of external interfaces
  • number of batch calculations or processes
  • number of technology variations for components (rich-client, web page, mobile, database providers, cloud systems
These numbers must then be combined with an uncertainty level to create a range for use with three point estimation.

But more on that an other day.!



Estimation by stuffing things into boxes

I liked this article by Johannes Brodwall so much I thought I would steal it.
The original is here.

I’ve (sic:Johannes Brodwall) started using an approach for software project estimation that so far is proving to be fairly transparent, quick and reliable. I’ve observed that within a reasonable degree of variation, most teams seems to complete about one “user-relevant task” per developer per calendar week.
There are so many theoretical holes in my argument that there’s no point trying to cover them all. The funny thing is that it seems to work fairly well in practice. And to the degree that it’s dirty, it’s at least quick and dirty. The only thing I will address is that one of these “user relevant tasks” is smaller than a typical application feature.
Most importantly: Most teams never get it right on the first try. Or they spend too long gold-plating everything. Or both.
This article shows an example of estimating a fictive project: The Temporary Staffing System.

The high-level scope

Let’s say that our organization has come up with the following vision:
For a temporary employment agent who wants to match candidates
to client needs, the Temporary Staffing System is an
interactive web application, which lets them register and
match candidates and positions. Unlike competing systems
this lets us share selective information with our clients.
We come up with the following flow through the application:
  1. A new company wants to hire a skilled worker for a temporary position
  2. Administrative user adds the client details to the system
  3. Administrative user adds client logins to the system
    (perhaps we also should let the clients log in with LinkedIn etc?)
  4. Client logs into the application and completes new position
    description, including skill requirements
  5. Temp agency adds a worker to the system
  6. Temp agency proposes the worker to a position registered by a client
    (in the future, the worker may register themselves!)
  7. Client gets notified of new proposals (via email)
  8. Client views status of all open positions in the system
  9. External to the system: Client interviews candidate, request further
    information and makes a decision whether to hire or not
  10. Client accepts or rejects the worker in the system
  11. As worker performs work, they register their time in the system
  12. At the end of a billing period, the system generates billing information
    to accounting system
  13. At the end of a salary period, the system generates salary information
    to the accounting system
Some of these steps may be one user story, some may be many.

The top of the backlog

We choose some of the most central parts of the scope to create the beginning of the backlog. In order to accommodate for the learning as we go along, the first draft of our backlog may look like this:
  1. Experimental create open position
  2. Experimental list positions
  3. Simplified create open position
  4. Simplified list positions
  5. Complete create open positions
  6. Complete list positions
An “experimental” version of a story is a functionality trivial version that touches all parts of the technology. In the case of these two stories, perhaps we have the application leave the logged in client as a hard coded variable. The story may only include writing some of the fields of the positions, maybe only title and description.
The Simplified version may add more complex properties, such as skills from a skill list or it may add filters to the list.
The complete version should be something we’re prepared to put in front of real users.
By revisiting a feature like this, we have the chance to get the feedback to create a good feature without gold-plating.

Continuing the backlog

We add enough of the other stories to the backlog to cover an interesting part of the scope:
  • Basic create client account
  • Complete create client account
  • Basic login admin user
  • Basic login client user
  • Complete login client user
  • Basic add worker
  • Complete add worker
  • Basic propose worker for position
  • Complete propose worker for position
  • Complete confirm worker for position
  • Basic enter timesheet (in this version temp agency enters on behalf of worker)
  • Experimental billing report
  • Basic billing report
  • Basic salary report
This functionality should be enough to have a pilot release where some clients and workers can be supported by the new system. Or we may complete the backlog with complete versions of all functionality, worker login and perhaps a polished version of a feature or two.

Adding the non-functional tasks

There are some tasks that we want to plan some extra time for. I generally find that many of these tasks are tasks that customers understand quite well:
  • Attend training on CSS (the team is rusty in design skills)
  • Basic layout and styling of web pages
  • Complete layout and styling of web pages
  • Polished layout and styling of web pages (they want it really nice)
  • Locate slowest pages and make some performance improvements
  • Deploy solution to target platform
  • Deploy demo version to wider set of stakeholders
  • Deploy pilot version
  • Exploratory test of complete flow

Planning the project

In this example project, we have five team members plus a coach/project manager on half-time. Since our team will be working in pairs, we want to work on three functional areas per week. This way, we can avoid huge merge conflicts. The team agrees to plan for five stories per week, but only three the first week, because things generally go slower. Here is the top of the completed backlog:
  • Week 1: Experimental create open position
  • Week 1: Experimental list positions
  • Week 1: Attend training on CSS
  • Week 2: Simplified create open position
  • Week 2: Simplified list positions
  • Week 2: Basic create client account
  • Week 2: Basic layout and styling of web pages
  • Week 3: Basic login client user
  • Week 3: Deploy solution to target platform
  • Week 3: Basic add worker
  • Week 3: Basic propose worker for position
  • Week 3: Basic enter timesheet (temp agency enters on behalf of worker)
  • Week 4: Experimental salary report
  • Week 4: Complete layout and styling of web pages
  • Week 4: Complete create open positions
  • Week 4: Complete list positions
  • Week 4: Deploy demo version to wider set of stakeholders
  • Week 6: Exploratory test of complete flow
  • Week 7: Deploy pilot version

Presenting the plan

Working through the list gives us a complete timeframe of just over 6 weeks for full feature set for the pilot release. To cover realities of life, we probably want to plan for at least one week of slack or even more, depending on the strength of our commitment and the consequences of being wrong.
This gives a plan indicating 7 weeks times 5 people at 40 hours per week plus a 50% project manager at 20 hours per week or a total of 1540 hours.
I generally find that after a pilot release (or even before it), things change a lot. So I don’t invest much time into planning this.

Tracking the development

The true strength of a plan like this appears when you start running the project. Each week, the team will report on which stories they completed. This allows us to adjust the plan to actual progress.
On the flip side, the weekly planning comes down the team and the customers agreeing on the definition of a story. The vagueness of “basic add worker” is by design! But the team should agree on what they mean by “experimental”, “simplified”, “basic”, “complete” and “polished”.

Conclusions

In this article, I have showed a quick and accurate way of coming up with a project forecast, complete with time and cost estimates. It’s easy to see and react to deviations from the forecast.
A few critical critical observations support this methodology:
  • I never believe a developer estimate other than “by the end of the day” or “by the end of the week”. (Don’t talk to me about hours!)
  • Estimating in hours is a silly way to get to project costs. Any hour-based estimate is always prodded and padded before magically turning into cost. Instead, estimate number of features, feature per week and cost by week.
  • Visiting a feature multiple times lowers total cost due to less gold-plating and investment of in poorly understood areas. It also improves the success of the final feature
  • The ambition of a feature (that is, how many times we will visit it) is a more reliable indication of cost than developer gut feeling
I’ve left many questions on the table, for example: What about architecture? What is meant by a “simplified” user story? How to deal with deviations from the forecast? Feel free to grill me for details in the comments to the article.
“So what will it cost?” Using this simple method to lay out your project forecast week by week, you can give a better answer next time someone asks.
Published at DZone with permission of Johannes Brodwall, author and DZone MVB. (source)

Code recipe: Using Maven to launch a Java Process

GET JAVA & MAVEN

apt-get maven2
apt-get java

GET YOUR PROJECT

git init <repo> cd <repo> git remote add -f origin <url>
git config core.sparseCheckout true

echo "some/dir/" >> .git/info/sparse-checkout
echo "another/sub/tree" >> .git/info/sparse-checkout
git pull origin master
mvn clean compile
mvn exec:java
(With a setting in the project "exec.mainClass")


yes!



nohup mvn exec:java &