Thursday, October 2, 2014

Do it yourself usability design for developers

Usability
Learnabilty- how long to learn first simple task
Efficiency - how long for experienced user with difficult task
Memorability- how long for experienced user who's been away and is coming back to complete difficult task
Errors - how many errors and recovery time,
Satisfaction - feel good factor

The curse of knowledge is what to tell users to train them. Not too much nor too little.
Can't really see ui from user perspective. They get stuck.



Process and tools
Look at other crafts. Painting create sketches, study posture. We should take same approach.
Two curves: complexity (start low) and parallelism (start with many designs and eliminate)
Don't g et attached to design, easier to take feedback if have several versions in parallel.
Sketches important. As many as you can think of of. 5,6 8. 5 mins, 6-8 sketches. Get into flow.
Paper prototype. Create all the screens. One person plays user, another the computer swapping screens.
Lofi prototype. Wireframe designs. Or powerpoint, make interactive, only good for simple though. Can be used by many.
Simplified app with very little logic is an alternative.
Lofi can leave you frustrated.
Hifi prototype. Usability questions should be answered. Not all functionality.



Ux techniques
Field study. Watch users doing tasks. Check out competition or manual workarounds.
Persona. A description of a user group, a typical representative. Used to answer questions. Have empathy for character. Difficult to create.
Proto-persona. Ad-hoc persona that you keep improving. A guess.
Empathy map. (diagram)
Heuristic evaluation. Colleagues from another team or project. These experts do tasks and they report on heuristic. Visibility, match between system and real world (same terms?),user control and freedom - recover from errors. Report on most important heuristic. Can provide false positives. Low cost.
Usability test - mics and cameras. Usually out of reach because of cost. Alternative is screen recording or screen sharing. Participant should have never seen app before. Craig's list. Important to stress app is being tested not participant. Stuck good. No help during test. Ask to think out loud. Whole team should evaluate. 3-5 participants is enough, fix, another round.


Rich HTML5 Web Apps: Typesafe Edition 2

Java web framework errai.

Web design vs web development. What's the overlap?
Jsps hard to deal with.
Angular.js also mixes logic and design.
Take plain html and attach behavior with java.

@templated @page annotated class
@datafield textbox, button
@eventhandler for click event

Java class same name as html template.
Id html attributes line up with java members

Compile source files twice., javac, and gwt to get runnable js
Java to js compiler
Cross browser
Up front optimizations
Client and shared folder contents are compiled to js.

Security, cdi, jpa, mobile support, databinding, page navigation

Vertical repetition: code duplication between client and server.
Horizontal repetition: code duplication in client.

Can use jax-rs annotations

Can debug.

@RestrictedAccess for security. Can be constrained for roles.

Habits of Highly Effective Technical Teams

JClarity

Social interactions at the fore.
Communication key.
Loss leads to fingerpointing, loss of collaboration.
Needs lots of interactions every day, standup, etc.
No more than 150 people.
No boy's clubs, all inclusive.
Lone coder in corner vs tiger team
Collaboration much better.

Strong leadership throughout
Each member makes autonomous decisions in own realm.
Most junior devs should be 100% responsible. Let them make mistakes. Do not get tied to leadership role.
Leaders != managers
Servant leadership, remove crap out of dev's way.

Empowerment vs control
Orgs tend to create structure but it becomes inflexible.
Bad in fast moving market.
People are promoted to level of incompetence.
Devs make poor managers.
Let people make technical decisions.
No ivory tower architects making decisions
Make your colleagues faster.
Empower down the line.

Shared goals.
Specific, measurable, attainable, relevant, time bound.
Everyone has individual goals.
Have team come up with goals.
Some giant companies have competing products.

Respect and trust
Respect is an unassuming resounding force.
It is the stuff that equity and justice are made of.
Trust should be there from the start.
Does the whole team have prod access.
Performance is measurable.

Common culture
Can be very difficult. Ethnicity, generation, gender, etc.
Not the company motto or table tennis table.
Need inclusive culture with shared values, e.g. never screw customer.
Tech Fridays, team members presentations at lunch.

Automation and tools
Setting up environments wastes time.
Use emerging tools.
Jenkins, Chef, puppet, vagrant, maven, gradle.
Automate away time wasters, timesheets, etc. Anything not core to development.

Encourage debates
We all think we're right. Arguments are disruptive and can destroy a team.
Many people fear conflict.
Many cultures avoid conflict.
Assumptions need to be challenged.
Debates can lead to arguments.
Set up a debate framework. No shouting or bullying. Breaks. Empirical bets intuition. Leave no one behind. Everyone should have their say.
blackberry crushed debate.

Measuring subjective decisions
Set out criteria
Make weightings.
Run the numbers.
Prototype the top two, use hardest requirement.

REST Assured: Hypermedia APIs with Spring MVC

Pivotal

Hateoas hypermedia as the engine of application state.
Hyperlinks in response
State navigations discoverable

How to represent links in json? _links {} HAL is option.

Spring-hateoas github project, library.
ResourceSupport adds links node.
Resource.add(new Link())
Facility to create absolute url

Annotation to enable HAL _links comes with spring hateoas.

Book, rest in practice

We should look at that git project.

Java in the Cloud: The Good Parts

And other Google cloud innovations for developers.

Google cloud Platform

Cloud allows you to iterate quickly, fail fast, low cost of entry.
Don't want to manage clustering and security. It takes teams to focus on that.

Google, amazon, heroku, pivotal cloud foundry, ms azure all support java.
Not java EE. Meant to offer services in a container. A bunch of apis, some of which don't work in a cloud, e.g websockets.
May take web profile and expand to cloud or repackage.

NoSQL DB + Memcache + stateless front instances

Focus on services. Ask for and be given instantly fully configured. E.g. DatastoreFactory.

Injection. Spring > Guice (@inject) > Dagger

Jetty 9 in Google app engine.
Since 2008.
Small footprint, scales well, modular (important).
Java EE scanning in cloud wastes resources, has latency issues, and security issues (unknown jars).

Demo.
Jetty quickstart 800ms startup vs 3secs. 500ms tweaked. Web.xml 500 lines, a lot of stuff. All discovered bits, context params, initializers, annotations and classes, tlds, listeners, servlets all pre-parsed.

Glassfish 12ms, tomcat 5sec, jetty < 1sec.

Now no longer deploying a war but rather a docker container including app and slim linux.
Add to web.xml app engine params.
Docker file is an image.
Same app in google app engine ran in 1.7sec

Wednesday, October 1, 2014

New and Noteworthy in Jersey 2

Oracle Application Server Group

2.13 released

Reactive Client:
Describes data flows and dependencies.
E.g. travel agency, travel to new destination, get recommendations, forecast and cost.
Orchestration layer handling various rest calls and creating result. AgentResponse.
1st option is synchronous. Slow and can be done in parallel.
Async using callback is alternative. More complicated, callback hell. .async in call chain
Better is Observable (java 8)
Best is .rx() and .flatmap() in call chain.


Security
oath2
get access token from 3rd party.
Openid int.
2012 for client, still not in server-side
SimpleOAuthService

Monitoring and Tracing
Default is info log level and exceptions not logged.
jdk.logging properties
Response headers.
ServerProperties variable tracing set to "all". System variable. Also onDemand using request header.
Another system property for monitoring, access using jmx console.

NASA Mission Software Development on the Eights: Java 8, JavaFX 8, and NetBeans 8

a.i. solutions

One of the drone guys + his colleagues. 30 aerospace missions daily.

All java development. Flexible, agile, new talent, lifecycle bang for the buck.

Move to 8 seamless, worked out of the box.

Benefit to customers: modern, latest talent.

Demo of NetBeans Platform app.
Javafx3d globe scene satellite tracking.

Dscovr - Deep space climate observatory
Going to L1.
Had to use STK (jni), matlab (java). Made extensive use of NetBeans wizards. Plugins architecture helped.
Demo of app.
Using WorldWind.

Research software exploring Jupiter and moons gravity wells. Very complex. Lots of data.
Lots of visualizations.

Contact Analysis Visualization Tool
Demo
Nimbus dark L&F
Javafx scatter chart
Worldwind was swing in java fx app using lookups

Deep Space Mission Design
Going to Saturn's moon, calculate trajectory.
Demo
Using javafx Tasks to not block GUI.

Spring 4TW!

Josh Long, Pivotal /Spring

Spring.io website
Guides section important
4.1.1 just released.
Baseline: Java SE 6 and Java EE 6 (servlet 3.0)

New:
@Autowired, @Lazy
Ordered injection
Construct beans with no default constructor.

Also supports Java EE 7 and Java 8

Spring Boot demo

Spring boot is  simplification of all spring apps.
@EnableAutoConfiguration
@DBRef  MongoDB
@Service
@Bean
@RestController - drop @ResoonseBody
UriComponentBuilder as rest method arg to build url
ResonseEntity.created()
Embedded tomcat or jetty container.
Thymeleaf - jsp templating engine
@EnableWebsocketMessageBroker

Configure boot
HealthIndicator example.