Just startcoding

23
Do you want to code? Lets Get Started Jane Prusakova @jprusakova

Transcript of Just startcoding

Do you want to code?

Lets Get StartedJane Prusakova

@jprusakova

Green field development

• No prior system to fit into

• Define technology stack

• "File –> New Project/Solution"

Blank page is intimidating

Agile way: just start coding

•Decide what is the most valuable thing to build

•Write code

Before coding

• SCM repo

• Build process

• Deployment platform

• Test framework

•Write a test

•… then start coding

https://www.flickr.com/photos/eltpics @2013

But where do I start?

• Documentation• Code examples

• Tutorials

• Frameworks

MVC application

Tutorial from CodeProject

Java with Hibernate

Tutorial from JavaTPoint

Android app

Article on AndroidAuthority

It works!

Something new and great

• Focus on functionality

• Refactor to achieve architecture

• Iterate

What to implement first?

YES

• Visible

• Important

• As small as possible

NO

• Inner layer

• First step of the flow

• Cross-functional concern

How much to implement?

• Production-quality code

• Automated tests

• Refactor

Iterate

• Build several useful features

• Refactor to reflect learning

• Notice patterns that apply

• Refactor to patterns if applicable

• Test everything continuously

But where is the flow?

• Developers are notoriously bad at inventing user flow

• Less defined flow makes for better usability

• Leave every path open

Linear vs Hub & spoke

Home

Pick a product

Select features

Retrieve price

Select quantity

Checkout

Home

Pick a product

Select features

Retrieve price

Select quantity

Checkout

Only one action is possible from every point. Any action is possible at any point.

Linear vs Hub & spoke

State• Transition

• Context

Transition

• Action

• FromState

• ToState

State • Context

Transition • Action

Structured flow Open flow

• Houston Ballet season subscription

1. Pick a package

2. Select day

3. Select performances

4. Review dates

5. Review seating prices

6. Select seating

7. Add to cart

Ah… so what do I code first?

• Implement a valid state

• Implement another valid state

• Implement transition

Valid options

Nothing selected

Product selected

Product & term selected

Product Subscription

Term

Test scenarios

• Valid states exist

• Invalid states cannot exist

• Transitions out of valid states

• Transitions to valid states

• All valid states can be reached by transition

Next stepsAdd functionality

• Add states

• Add transitions

• Build additional linear paths• Login• Checkout • Etc..

Invest in quality

• Refactor design• Merge and split states

• Design additional paths

• Refactor code• To fit the design

Do you want to code?

Lets Get StartedJane Prusakova

@jprusakova