# Abstract, Extract
## Lifesum, Stockholm
### April 2017
Daniel Saidi · [@danielsaidi](https://twitter.com/danielsaidi)
# Daniel Saidi
### iOS Lead @ BookBeat
# Windows Mobile 2005
## Before it was cool
# Team Yellow
## With Mariah ❤️
# Code quality
* Very important to me (too important)
* Constant work in progress
* ...and yet, I often suck at it
* Strange how hard the easy is
# BookBeat
## A startup story
# Audio & e-books
* Stream & Download
* Monthly fee, unlimited use
* Soft launched late 2015
* Real launch spring 2016
# Competitors
* Audible
* Storytel
* Nextory
* ...and many others
# The Big Picture
* What should we do?
* How should we do it?
* Name, price, design, tonality
* Partnerships, publishers, reporting?
# Tech
* Backend
* Integrations
* Api(s)
* Applications
# Process
* Discovery & learning driven
* Constant changes
* Fine-tune, change, pivot
* Adaptability is key
# Code
* Adaptability over architecture
* Build it right once we know
* Avoid premature optimization
* (Apps) Test most important parts only
# Keeping it together
## How to keep your code clean
# Good practices
* Minimize coupling
* Minimize inheritance
* Don't let external dependencies leak
* Keep it simple!
# Spike & Stabilize
* Dan North, 2011
* Good for changing scope, pivots etc.
* Optimize for throwawayability
* Code should be easy to throw away
# Prototype-driven
* Start with a prototype
* Stabilize if proven valuable
* Throw away if proven worthless
* Code MUST be easy to throw away
# But what if you fail?
## How do you know?
# Raise of hands
## Favorite code-smells?
# Duplicated code
## e.g. validation, formatting, business logic
# Long functions
## Hard to test, cyclomatic complexity
# Complicated code
## If your code needs a lot of comments, you know
# Large classes
## Does a lot of stuff...that it shouldn't
# Spaghetti code
## ...or lack of obvious design
# Hard coupling
## A depends on B which depends on...
# Bad habits
## Unit tests disabled, no version control etc.
# So, BookBeat?
## How did the MVP code look?
# Thank you!
Daniel Saidi · [@danielsaidi](https://twitter.com/danielsaidi)