Sunday, May 23, 2010

What I learned at Code Camp

I  attended Portland Code Camp with about 1400 other geeks yesterday at the University of Portland.

Because paper notes get lost and don't hyperlink so well, I'm going to post them here. 

Eventually, the slides will be online and I will link them.

Developing a Rich Interactive Application Experience
Brian Henderson, UX guy from Seattle

Start with understanding the user -
  • What is their environment?  Are there post-its or other info they have collected to help do their work?
  • What is their behavior?  What tasks do they do most often?
  • Collect their stories.
Create mockups on cardboard, walk through with user, rework, try scenarios.
Ask open ended questions. Ask about their problems.  Avoid just hearing their proposed solution.
What activity wastes your time? What shortcuts do you use?

Personas -
A made-up, believable person.
  • Role: e.g. beginner, expert, admin.
  • Personality
  • Name
Use the personas to get agreement with team on who they are developing for, get everyone (including management) on the same page.

Sequence what they will do and how.  Test on paper, not code.  Paper is cheap.  Code is expensive, and developers become invested in it - hard to modify.

Focus on solutions, not features.

Features of a Rich Interactive user experience -
  • Guide users through the app
  • Help them progress from beginner to becoming expert
  • Keep it simple - minimum info and context
  • Focus
  • Task oriented
  • Provide meaningful incentives: badge, status, member vs visitor
    • is a good example
Three stages, each with a feedback loop.  Make changes at the easiest, cheapest possible level.
  1. Paper design / test
  2. Functional design / test
  3. Production ready design / test
 Six Principles:
  1. Make it Direct (obvious)
  2. Keep it Lightweight (minimalist)
  3. Stay on the page (avoid context switches, navigating back and forth)
  4. Provide invitations (lead them)
  5. Use Transitions (providing context on-page)
  6. React Immediately (hints, tool tips, popups.  validate input and give feedback)
Matrix of "Interesting moments" - states.  A spreadsheet-like list of tasks - see presentation for an example.   Helps keep it simple, lightweight.

Need screen considerations:  Landscape (PC), Portrait (tablet), Mobile (small)

Couple slides of common screen patterns, UX patterns.  Tried and tested, familiar.
Quince - online tool to explore them.

Manage expectations - early versions should have less polish, to let everyone know its not baked yet.

  • Focus of stories, not features
  • test earlier - cheaper and easier to modify
  • Know your users - don't design for yourself
  • Be visual - storyboards, mockups
  • Maximize shared understanding - UX, dev, coder, user - personas, wiki, stories
Last page: Resources list
Google "RIA" "UX" "Interaction Design"
Note that stuff from most recent 2 years is better than older.

A good presentation, the second I've attended by Brian.

Developing for Windows Phone 7 Series
Marcello Guerra, Microsoft

Everything in his presentation is also available from MIX.  Go there for hours of videos.

Expression Blend - best for Windows Phone development.  Looks like Visual Studio w/ a black UI.  Used for designing the UI and creating simple interactions.  Demo was a very simple version of Mine Sweeper with no code required.

Visual Studio 2010 Express Phone Edition.  Has Silverlight and XNA.  This is beta, about 5-step process to install.  Full instructions on Microsoft web site.  Polished single download due out later this year.  Note: do not try to install over other Visual Studio, must un-install first.

Microsoft Phone Notification - push notification.  Small amounts of data that show up on the app icon.  NOT for app update downloads, not for pushing lots of info for the app to have when it becomes active.

Microsoft has new catch phrase "three screens and the cloud". 
  1. PC
  2. TV (Xbox)
  3. Phone
  4. Cloud (web services)
 Went over the Microsoft Marketplace app submit process.  Sounds like Apple.

Current version of requirements has all phones with the same display resolution, all peripherals required that are in the APIs. 
2nd version will add resolutions, ad-hoc distribution, Flash and Silverlight in the browser (not in 1st version).

For Windows Phone 7 resources, go to

Consuming RESTful web services on the iPhone
Frank Schmitt

Talked about "Objective Resource", an obj-C library for the iPhone.

Mentioned that REST purists may object to some of what he says/does.

This library is designed to work seemlessly with a Ruby on Rails web site.  Frank very quickly created a web app (scaffolding) for a book database with title and auther from the command line using Rails. 

ObjectiveResource supports:
  • List - GET /books
  • Create - POST /books
  • Read - Get /book
  • Update - PUT /book
  • Delete - DELETE /book
Quickly created an iPhone app to talk to the web app.  Classes: Book, Author.
#import "ObjectiveResource.h"

DEBUG key causes the library to send to the console messages about everything it sends and receives from the Rails app on the server.  Very handy.

Contrasting to SOAP - SOAP is higher level, more complex, uses pre-defined data formats, more data traffic. 

Security - POST user, PW, get GUID.  use GUID for session, don't keep sending user and PW!  Or, use SSL and certificates.

Note: if the network is slow, finder may kill your app on launch for being too slow to load.  Need to set up loading the db in the background (with a spinner over the app).

Mentioned ASIHTTP Request as another option, but he hasn't used it.

Design Patterns in architecting applications in the cloud - Amazon Web Services
Jinesh Varia, Amazon tech evangelist

AWS provides scalable, spike-proof, pay-as-you-go cloud services.

Google "Cloud best practices" to find his presentation, on

I mentioned Portland's Urban Airship using AWS to scale their business while the company stayed at 2 guys and a laptop.  He is trying to meet with John at Urban Airship to discuss. is the example he went through.  Cool web app that takes your images and soundtrack and "automagically" creates a cool presentation.  They went viral with their Facebook application, spiked to adding 25K users per hour.  Quickly went from 500 to 5000 servers. 

They have a variety of services.  You can choose from them cafeteria style.  Using one does not imply you must use another.

EC2 - Amazon compute on virtualized server instances.  Linux, Windows, Solaris, etc.
Three pricing options:
  • On-demand - allows for spikey usage.  Most expensive, e.g. 8.5 cents/hour per server
  • Reserved - non-spikey, steady state usage.  Cheaper, e.g. 3 cents/hour
  • Spot - bid on unused capacity.  Executes your workload when price
See to look at various rates.
See for spot prices.

Bandwidth is additional 15 cents/GB/month.

S3 - Amazon storage.  $/GB.  Only pay for what you use.

Other services include: RDS database service on mySQL, SQS Queues, SNS notifications, SimpleDB domains, Analytics.

OS, Framework, Language agnostic.  Use what you want, like you would on your own, in-house servers.  But without the up-front costs, and instant scalability.

Scalability Best Practices
This doesn't happen automatically.  Your app and architecture needs to understand and allow for scaling.

1. Design for failure - recognizing failure, how to recover, rerouting automatically
  • elastic IP addresses - remappable static IP
  • use multiple zones, Amazon has 4 - US-W, US-E, Euro, Asia
  • Use AutoScale for auto recovery
  • use EBS for persistent file systems.  EC2 looses its file storage when terminating or dieing.  Back up volume to EBS on a schedule that is right for your app.
2. Build loosly coupled systems
Independant components, blackboxed, decoupled using queues on load balance clusters.

3. Implement Elasticity - dynamic reconfiguration
On bootup - who am I and what is my role?  Enable dynamic config, not static.  Resiliant to reboot and relaunch.

4. Build security at every level
encrypt data at rest in S3.  Encrypt data in stransit with SSL. Set up security groups. Consider encrypting data in EC2 for sensitive data (they don't wipe data, so next one to use that server might have access)

5. Don't fear constraints
Can always get more instances, etc.

6. Leverage Storage Options
Showed a spreadsheet for pro/con for each type.

7. Think parallel

Start small, put some small piece on the cloud, get experience, scale and expand over time.

C# IDE Tips and Tricks for VS2010
Kevin Pilch-Bisson, Microsoft developer for Visual Studio for 8 years.

There are a lot of underused features, some from versions prior to VS2010. 

As Kevin went through his tips and tricks, he received several rounds of spontaneous applause from the audience when he described how to get to features users have been wanting for a long time.  And "oh!"s when he described "undiscovered" features that have been around for a while.

ctrl-e - brings up search window for any text in your project.
ctrl-comma - navigate to.  Extensible navigation tool.  Understands camel-case. Type TST and get TestStatusText. Understands pascal-case.  Type test text status and get TestStatusText.
ctrl-period - display menu for a smart tag.  These are the small red or blue tags VS puts on code. Much easier than trying to hit them with mouse.
cltr-alt-space - toggle suggestion mode for auto complete.  new mode: tab to accept suggestion. space, period, etc are taken literally.
F12 - go to definition !!!
ctrl-dash - go back to last cursor loc after a search or goto.  With a 5 button mouse, the "back button" does the same.

Hover over a variable in debugger, after 1.5 seconds, click on the push pin to get a "permanent" watch pinned at that location in the code.  Rather than clutter the watch window with variables all over your code.

Breakpoints - now have export (via XML file) to save or share your break points.

.exe projects now default to 32-bit, even on 64-bit systems.

Edit and Continue - nice, but many limitations.  Doesn't work for LINQ, for example.

Intellitrace - only available in high end SKU above Pro.  Shows a list of exceptions that led up to a problem.

cltr-shift-F12 - see list of where identifier is used in your project.

F8 can now cycle through results for any list, e.g. compile errors. Shift-F8 to cycle backward.

Other resources he recommended:

CodeRush Xpress - free tool that adds more features to VS. - C# developer center.

VS key bindings posters available at

No comments: