Min-Maxing Software Costs - Laracon EU 2015
-
Upload
konstantin-kudryashov -
Category
Technology
-
view
13.087 -
download
0
Transcript of Min-Maxing Software Costs - Laracon EU 2015
![Page 1: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/1.jpg)
Min-Maxing Software Costs
![Page 2: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/2.jpg)
@everzet
![Page 3: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/3.jpg)
@inviqa
![Page 4: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/4.jpg)
What is this talk about?
![Page 5: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/5.jpg)
Harm that "Laravel Facades" inflict on not-suspecting
developers.
![Page 6: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/6.jpg)
Bad idea that is Active Record and Eloquent.
![Page 7: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/7.jpg)
Other framework's superiority over Laravel.
![Page 8: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/8.jpg)
Killing kittens.
![Page 9: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/9.jpg)
And other subjective and nonconstructive crap like that ...
![Page 10: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/10.jpg)
... is not in this talk.
![Page 11: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/11.jpg)
Actually in this talk
1. Introducing & making sense of development costs
2. Highlighting the context of tools & practices we use
3. Years of observation & experience, not data collection and analysis
![Page 12: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/12.jpg)
Context, the talk
![Page 13: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/13.jpg)
Software Costs
![Page 14: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/14.jpg)
Software Costs
![Page 15: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/15.jpg)
Software Costs
1. Time to write & test code
2. Time to change code & tests
3. Time to refactor code & tests
![Page 16: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/16.jpg)
Software Costs
1. Time to write & test code - Cost of Introduction
2. Time to change code & tests - Cost of Change
3. Time to refactor code & tests - Cost of Ownership
![Page 17: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/17.jpg)
Cost of Introduction
![Page 18: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/18.jpg)
Cost of IntroductionTime it takes to introduce new,
naturally independent application logic.
![Page 19: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/19.jpg)
Attributes
— Has direct correlation to business value
— Has direct correlation to LOC
— Relatively easy to optimise by generalisation
![Page 20: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/20.jpg)
Dynamics
— Visible from the outset
— Loses relevancy over the project lifetime
— Stable across projects
![Page 21: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/21.jpg)
Dynamics
— Visible from the outset
— Loses relevancy over the project lifetime
— Stable across projects
![Page 22: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/22.jpg)
Cost of Introduction is relatively easy to optimise.
![Page 23: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/23.jpg)
Optimising for CoI: Convenience Layer
![Page 24: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/24.jpg)
Service Locator
// --- Explicit Dependency
public function __construct(Cache $cache) { $this->cache = $cache;}
public function index() { $photos = $this->cache->get('photos'); // ...}
// --- "Laravel Facade"
public function index() { $photos = Cache::get('photos'); // ...}
![Page 25: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/25.jpg)
Base Class
// --- Base Controller
class MyController extends Controller{ public function indexAction() { $homepageUrl = $this->generateUrl('homepage'); // ... }}
![Page 26: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/26.jpg)
Optimising for CoI: Generalisation
![Page 27: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/27.jpg)
Active Record
// --- Custom Mapping
class DbalCustomerRepository implements CustomerRepository{ public function findCustomerWithName($name) { // ... }}
// --- Eloquent
use Illuminate\Database\Eloquent\Model;
class Customer extends Model{ // ...}
![Page 28: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/28.jpg)
Event Dispatcher
// --- Event Subscriber
interface MyListener { public function emailWasSent($email, $text);}
// ...
public function sendEmail() { // ... $this->myListenerInstance->emailWasSent($email, $text);}
// --- Event Dispatcher
$eventDispatcher->dispatch('email.sent', new Event($email, $text));
![Page 29: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/29.jpg)
Dependency Injection Container
// --- Dependency Inversion Principle
$contoller = new MyController( new Router(), new Cache(new Configuration()));
// --- Dependency Injection Container
$controller = $container->get('controller.my');
![Page 30: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/30.jpg)
No matter what you think, optimising for CoI (Cost of
Introduction) is not inherently a bad thing.
![Page 31: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/31.jpg)
A Cut-Off of the product
![Page 32: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/32.jpg)
If the product life is short enough to not encounter loss of CoI
relevancy, then the CoI is the only cost worth optimising for.
![Page 33: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/33.jpg)
Convenience based projects either die a hero or live long
enough to see themselves become the villain.
![Page 34: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/34.jpg)
Cost of Change
![Page 35: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/35.jpg)
Cost of ChangeTime it takes to adapt the
existing application logic to new business realities.
![Page 36: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/36.jpg)
Attributes
— Has direct correlation to business value
— Has no direct correlation to LOC
— Affected by generalisation
![Page 37: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/37.jpg)
Dynamics
— Invisible from the outset
— Gains relevancy during the project lifetime
— Exponentially increases over time
![Page 38: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/38.jpg)
Cost of Change increases exponentially over time.
![Page 39: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/39.jpg)
public function searchAction(Request $req){ $form = $this->createForm(new SearchQueryType, new SearchQuery); $normalizedOrderBys = $this->getNormalizedOrderBys($filteredOrderBys); $this->computeSearchQuery($req, $filteredOrderBys); if ($req->query->has('search_query')) { /** @var $solarium \Solarium_Client */ $solarium = $this->get('solarium.client'); $select = $solarium->createSelect(); // configure dismax $dismax = $select->getDisMax(); $dismax->setQueryFields(array('name^4', 'description', 'tags', 'text', 'text_ngram', 'name_split^2')); if ($req->query->has('search_query')) { $form->bind($req); if ($form->isValid()) { $escapedQuery = $select->getHelper()->escapeTerm($form->getData()->getQuery()); $escapedQuery = preg_replace('/(^| )\\\\-(\S)/', '$1-$2', $escapedQuery); $escapedQuery = preg_replace('/(^| )\\\\\+(\S)/', '$1+$2', $escapedQuery); if ((substr_count($escapedQuery, '"') % 2) == 0) { $escapedQuery = str_replace('\\"', '"', $escapedQuery); } $select->setQuery($escapedQuery); } } } elseif ($req->getRequestFormat() === 'json') { return JsonResponse::create(array( 'error' => 'Missing search query, example: ?q=example' ), 400)->setCallback($req->query->get('callback')); } return $this->render('SomeAppWebBundle:Web:search.html.twig');}
![Page 40: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/40.jpg)
public function searchAction(Request $req){ $form = $this->createForm(new SearchQueryType, new SearchQuery); $this->computeSearchQuery($req, $filteredOrderBys); $typeFilter = $req->query->get('type'); if ($req->query->has('search_query') || $typeFilter) { /** @var $solarium \Solarium_Client */ $solarium = $this->get('solarium.client'); $select = $solarium->createSelect(); // configure dismax $dismax = $select->getDisMax(); $dismax->setQueryFields(array('name^4', 'description', 'tags', 'text', 'text_ngram', 'name_split^2')); $dismax->setPhraseFields(array('description')); $dismax->setBoostFunctions(array('log(trendiness)^10')); $dismax->setMinimumMatch(1); $dismax->setQueryParser('edismax'); // filter by type if ($typeFilter) { $filterQueryTerm = sprintf('type:"%s"', $select->getHelper()->escapeTerm($typeFilter)); $filterQuery = $select->createFilterQuery('type')->setQuery($filterQueryTerm); $select->addFilterQuery($filterQuery); } if ($req->query->has('search_query')) { $form->bind($req); if ($form->isValid()) { $escapedQuery = $select->getHelper()->escapeTerm($form->getData()->getQuery()); $escapedQuery = preg_replace('/(^| )\\\\-(\S)/', '$1-$2', $escapedQuery); $escapedQuery = preg_replace('/(^| )\\\\\+(\S)/', '$1+$2', $escapedQuery); if ((substr_count($escapedQuery, '"') % 2) == 0) { $escapedQuery = str_replace('\\"', '"', $escapedQuery); } $select->setQuery($escapedQuery); } } $paginator = new Pagerfanta(new SolariumAdapter($solarium, $select)); $perPage = $req->query->getInt('per_page', 15); if ($perPage <= 0 || $perPage > 100) { if ($req->getRequestFormat() === 'json') { return JsonResponse::create(array( 'status' => 'error', 'message' => 'The optional packages per_page parameter must be an integer between 1 and 100 (default: 15)', ), 400)->setCallback($req->query->get('callback')); } $perPage = max(0, min(100, $perPage)); } } elseif ($req->getRequestFormat() === 'json') { return JsonResponse::create(array( 'error' => 'Missing search query, example: ?q=example' ), 400)->setCallback($req->query->get('callback')); } return $this->render('SomeAppWebBundle:Web:search.html.twig');}
![Page 41: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/41.jpg)
public function searchAction(Request $req){ $form = $this->createForm(new SearchQueryType, new SearchQuery); $filteredOrderBys = $this->getFilteredOrderedBys($req); $normalizedOrderBys = $this->getNormalizedOrderBys($filteredOrderBys); $this->computeSearchQuery($req, $filteredOrderBys); $typeFilter = $req->query->get('type'); $tagsFilter = $req->query->get('tags'); if ($req->query->has('search_query') || $typeFilter || $tagsFilter) { /** @var $solarium \Solarium_Client */ $solarium = $this->get('solarium.client'); $select = $solarium->createSelect(); // configure dismax $dismax = $select->getDisMax(); $dismax->setQueryFields(array('name^4', 'description', 'tags', 'text', 'text_ngram', 'name_split^2')); $dismax->setPhraseFields(array('description')); $dismax->setBoostFunctions(array('log(trendiness)^10')); $dismax->setMinimumMatch(1); $dismax->setQueryParser('edismax'); // filter by type if ($typeFilter) { $filterQueryTerm = sprintf('type:"%s"', $select->getHelper()->escapeTerm($typeFilter)); $filterQuery = $select->createFilterQuery('type')->setQuery($filterQueryTerm); $select->addFilterQuery($filterQuery); } // filter by tags if ($tagsFilter) { $tags = array(); foreach ((array) $tagsFilter as $tag) { $tags[] = $select->getHelper()->escapeTerm($tag); } $filterQueryTerm = sprintf('tags:("%s")', implode('" AND "', $tags)); $filterQuery = $select->createFilterQuery('tags')->setQuery($filterQueryTerm); $select->addFilterQuery($filterQuery); } if (!empty($filteredOrderBys)) { $select->addSorts($normalizedOrderBys); } if ($req->query->has('search_query')) { $form->bind($req); if ($form->isValid()) { $escapedQuery = $select->getHelper()->escapeTerm($form->getData()->getQuery()); $escapedQuery = preg_replace('/(^| )\\\\-(\S)/', '$1-$2', $escapedQuery); $escapedQuery = preg_replace('/(^| )\\\\\+(\S)/', '$1+$2', $escapedQuery); if ((substr_count($escapedQuery, '"') % 2) == 0) { $escapedQuery = str_replace('\\"', '"', $escapedQuery); } $select->setQuery($escapedQuery); } } $paginator = new Pagerfanta(new SolariumAdapter($solarium, $select)); $perPage = $req->query->getInt('per_page', 15); if ($perPage <= 0 || $perPage > 100) { if ($req->getRequestFormat() === 'json') { return JsonResponse::create(array( 'status' => 'error', 'message' => 'The optional packages per_page parameter must be an integer between 1 and 100 (default: 15)', ), 400)->setCallback($req->query->get('callback')); } $perPage = max(0, min(100, $perPage)); } $paginator->setMaxPerPage($perPage); $paginator->setCurrentPage($req->query->get('page', 1), false, true); $metadata = array(); foreach ($paginator as $package) { if (is_numeric($package->id)) { $metadata['downloads'][$package->id] = $package->downloads; $metadata['favers'][$package->id] = $package->favers; } } if ($req->getRequestFormat() === 'json') { try { $result = array( 'results' => array(), 'total' => $paginator->getNbResults(), ); } catch (\Solarium_Client_HttpException $e) { return JsonResponse::create(array( 'status' => 'error', 'message' => 'Could not connect to the search server', ), 500)->setCallback($req->query->get('callback')); } return JsonResponse::create($result)->setCallback($req->query->get('callback')); } if ($req->isXmlHttpRequest()) { try { return $this->render('PackagistWebBundle:Web:search.html.twig', array( 'packages' => $paginator, 'meta' => $metadata, 'noLayout' => true, )); } catch (\Twig_Error_Runtime $e) { if (!$e->getPrevious() instanceof \Solarium_Client_HttpException) { throw $e; } return JsonResponse::create(array( 'status' => 'error', 'message' => 'Could not connect to the search server', ), 500)->setCallback($req->query->get('callback')); } } return $this->render('PackagistWebBundle:Web:search.html.twig', array( 'packages' => $paginator, 'meta' => $metadata, )); } elseif ($req->getRequestFormat() === 'json') { return JsonResponse::create(array( 'error' => 'Missing search query, example: ?q=example' ), 400)->setCallback($req->query->get('callback')); } return $this->render('PackagistWebBundle:Web:search.html.twig');}
![Page 42: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/42.jpg)
Exponential increase of Cost of Change is not inherently a problem of every product.
![Page 43: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/43.jpg)
A Cut-Off of the product
![Page 44: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/44.jpg)
If the product life is long enough to encounter exponential growth of CoC, then the CoC is the cost
worth optimising for.
![Page 45: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/45.jpg)
If you want to change the world with your product, then the
change is the primary thing your product must prepare for.
![Page 46: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/46.jpg)
Optimising for Cost of Introduction in most cases has a
negative effect on the Cost of Change curve.
![Page 47: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/47.jpg)
That's why some engineers try to increase the Cost of Introduction
in attempt to affect the Cost of Change curve.
![Page 48: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/48.jpg)
Cost of Introduction and Change
![Page 49: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/49.jpg)
Increasing Cost of Introduction
![Page 50: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/50.jpg)
Cost of Change with increased Cost of Introduction
![Page 51: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/51.jpg)
Upfront Design (aka Waterfall) Illusion that one can control
cost of change by applying enough analysis upfront.
![Page 52: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/52.jpg)
Upfront Design fails to achieve long-lasting effect because both
rate and nature of change for arbitrary domain is
unpredictable.
![Page 53: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/53.jpg)
Cost of Ownership
![Page 54: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/54.jpg)
Cost of OwnershipTime it takes to maintain the
owned application logic to support its ongoing change.
![Page 55: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/55.jpg)
Attributes
— Intermediate between Cost of Introduction & Cost of Change
— Has no direct correlation to business value
— Has direct correlation to LOC
![Page 56: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/56.jpg)
Dynamics
— Always invisible
— Always relevant
— Stable over time, but adds up
![Page 57: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/57.jpg)
Cost of Ownership is the cost you pay for the right to change a
particular part (module, class, method) of application
continuosly and sustainably.
![Page 58: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/58.jpg)
Testing
![Page 59: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/59.jpg)
Unit testing
![Page 60: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/60.jpg)
Refactoring
![Page 61: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/61.jpg)
Introducing Cost of Ownership allows you to balance two other
costs.
![Page 62: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/62.jpg)
Cost of Introduction and Change
![Page 63: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/63.jpg)
Cost of Introduction and Ownership
![Page 64: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/64.jpg)
Cost of Ownership effect on Cost of Change curve
![Page 65: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/65.jpg)
Emergent DesignUsual result of ongoing
ownership.
![Page 66: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/66.jpg)
Cost of Ownership of everything
![Page 67: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/67.jpg)
Cost of Ownership of everything
![Page 68: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/68.jpg)
Owning everything fails to achieve ever-increasing benefits,
because you rarely need to change the entire system.
![Page 69: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/69.jpg)
End-to-end testing is owning everything
![Page 70: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/70.jpg)
Cost of Ownership of the wrong thing
![Page 71: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/71.jpg)
Ownership wouldn't help if you're owning the wrong thing.
![Page 72: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/72.jpg)
Exclusive end-to-end testing is owning the wrong thing
![Page 73: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/73.jpg)
You do want to own everything worth owning.
![Page 74: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/74.jpg)
But you don't know what's worth owning at the beginning of the
project.
![Page 75: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/75.jpg)
Software Costs recap
1. Cost of Introduction - Linear. Relevant at the beginning. Very easy to optimise for.
2. Cost of Change - Exponential. Relevant everywhere except the beginning. Hard to optimise for.
3. Cost of Ownership - Linear. Relevant throughout. Owning the wrong thing is bad.
![Page 76: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/76.jpg)
Gaming Software Costs
![Page 77: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/77.jpg)
Own only the logic you need to change.
![Page 78: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/78.jpg)
Write only the logic you need to own.
![Page 79: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/79.jpg)
Own everything you write.
![Page 80: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/80.jpg)
Own everything you write.Try to not write anything.
![Page 81: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/81.jpg)
Own everything you write.Try to not write anything.
Reuse everything else.
![Page 82: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/82.jpg)
1. Document the need
![Page 83: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/83.jpg)
2. Spike - Experiment with tools available
![Page 84: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/84.jpg)
3. Document changes & constraints
![Page 85: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/85.jpg)
4. Stabilise - Claim ownership when the thing grows outside of tool boundaries
![Page 86: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/86.jpg)
5. Isolate Religiously
![Page 87: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/87.jpg)
Steps
1. Document the need
2. Spike
3. Document changes & constraints
4. Stabilise
5. Isolate Religiously
![Page 88: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/88.jpg)
Unit testing is owning
![Page 89: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/89.jpg)
Refactoring is owning
![Page 90: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/90.jpg)
Test Driven Development is an ownership technique
![Page 91: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/91.jpg)
![Page 92: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/92.jpg)
Gaming Software Costs
1. Document
2. Spike & Stabilise
3. Use TDD for stabilisation
![Page 93: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/93.jpg)
CC credits
- money.jpg - https://flic.kr/p/s6895e- time.jpg - https://flic.kr/p/4tNrxq- cheating.jpg - https://flic.kr/p/7FCr59- developing.jpg - https://flic.kr/p/bHLu96- change.jpg - https://flic.kr/p/6PtfXL- ownership.jpg - https://flic.kr/p/bwJSRV- pair_programming.jpg - https://flic.kr/p/QNdeB- unit_tests.jpg - https://flic.kr/p/7KEnN7- testing.jpg - https://flic.kr/p/tpCxq- test_driven.jpg - https://flic.kr/p/7Lx9Kk- refactoring.jpg - https://flic.kr/p/dUmmRN- context.jpg - https://flic.kr/p/93iAmM
![Page 94: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/94.jpg)
Thank you!
![Page 95: Min-Maxing Software Costs - Laracon EU 2015](https://reader034.fdocuments.in/reader034/viewer/2022051521/5870df5a1a28abcf288b4605/html5/thumbnails/95.jpg)
Questions?Please, leave feedback: https://joind.in/15022