Skip to content

Instantly share code, notes, and snippets.

View giorgiosironi's full-sized avatar

Giorgio Sironi giorgiosironi

View GitHub Profile
version: '3'
services:
b:
build:
context: .
dockerfile: Dockerfile.b
args:
image_tag: ${IMAGE_TAG}
image: b:${IMAGE_TAG}
Martin Fowler foreword
- real data and analysis
- 1 hour from commit to production as the benchmark
- speed with stability, not a trade-off
- caveats: subjective perceptions, sampling bias, confirmation bias
- scope: from commit to production, not entire development process
Courtney Kissler (Nike) foreword
- advocates for the book by personal experience
- optimizing for speed, not cost
- senior leadership commitment to a learning organization
# https://github.com/hibri/pair-programming-interview-resources/wiki/The-Checkout-Kata
The Checkout Kata
BlueReZZ edited this page on 27 Jun 2012 · 5 revisions
We’re going to see how far we can get in implementing a supermarket checkout that calculates the total price of a number of items. In a normal supermarket, things are identified using Stock Keeping Units, or SKUs. In our store, we’ll use individual letters of the alphabet (A, B, C, and so on). Our goods are priced individually. In addition, some items are multipriced: buy n of them, and they’ll cost you y pounds. For example, item ‘A’ might cost 50 pounds individually, but this week we have a special offer: buy three ‘A’s and they’ll cost you 130. The price and offer table:
Item Price Offer
--------------------------
A 50 3 for 130
{
"subjects": [
{
"id": "biochemistry-and-chemical-biology",
"name": "Biochemistry and chemical biology"
}
]
}
<subjects>
{
"journal": {
"id": "eLife",
"title": "eLife",
"issn": "2050-084X"
},
"snippet": {
"-meta": {
"location": "/home/giorgio/code/bot-lax-adaptor/elife-00666-v1.xml"
},
E {'event-message': 'Lax has not ingested article '
E '7121087146396100666 result from '
E 'lax:invalid; message from lax: '
E '(error 1 of 1)\n'
E '\n'
2018/05/11 14:52:54 [DEBUG] [aws-sdk-go]
2018/05/11 14:52:54 [INFO] terraform: building graph: GraphTypeInput
2018/05/11 14:52:54 [DEBUG] Attaching resource state to "fastly_service_v1.fastly-cdn": &terraform.ResourceState{Type:"fastly_service_v1", Dependencies:[]string{}, Primary:(*terraform.InstanceState)(0xc4202cecd0), Deposed:[]*terraform.InstanceState{}, Provider:"provider.fastly", mu:sync.Mutex{state:0, sema:0x0}}
2018/05/11 14:52:54 [TRACE] Graph after step *terraform.AttachStateTransformer:
fastly_service_v1.fastly-cdn - *terraform.NodeAbstractResource
2018/05/11 14:52:54 [TRACE] Graph after step *terraform.RootVariableTransformer:
fastly_service_v1.fastly-cdn - *terraform.NodeAbstractResource
2018/05/11 14:52:54 [TRACE] ProviderConfigTransformer: Starting for path: []
@giorgiosironi
giorgiosironi / gist:f421c60cd63c2918e162e27e09d6bb84
Created January 23, 2018 12:00
When your Value Object is so immutable, you remove a field and a non-deterministic value is readded in its place
<?php
require 'vendor/autoload.php';
$response = Symfony\Component\HttpFoundation\Response::create('HelloWorld');
$response->headers->remove('Date');
$response->headers->remove('date'); // just to be sure
var_dump($response->headers->all());
/*
array(2) {
["cache-control"]=>
array(1) {
$ ls /usr/bin/*-* | wc -l
801
$ ls /usr/bin/*_* | wc -l
243
@giorgiosironi
giorgiosironi / init.sls
Created September 26, 2017 07:34
Attempt to reproduce require_in misordering
second:
cmd.run:
- name: echo "second"
first:
cmd.run:
- name: echo "first"
- require_in:
- cmd: second