Skip to content

Instantly share code, notes, and snippets.

@yosshi4486
Created April 23, 2021 23:16
Show Gist options
  • Save yosshi4486/6ef0d4a3471677ab7b7c0b3e4951c79f to your computer and use it in GitHub Desktop.
Save yosshi4486/6ef0d4a3471677ab7b7c0b3e4951c79f to your computer and use it in GitHub Desktop.
ファーストリリースに関しての自分の脳内モデル
struct Feature {
var title: String
}
extension Feature: CustomStringConvertible {
var description: String {
return title
}
}
struct Product {
var features: [Feature]
mutating func increment(feature: Feature) {
self.features.append(feature)
}
}
// スプリント1ではまだリリースしているプロダクトがないのでnil
var product: Product? = nil
product?.increment(feature: Feature(title: "Great Feature"))
// リリースしていないものは無なので、無に何をインクリメントしてもnil
print(product?.features) // nil
// スプリントを開始する前に、可能な限り最短でMVPをリリースしておく。
product = Product(features: [Feature(title: "Minimum Valuable Product")])
// すでにリリースしているものにはインクリメントができる
product?.increment(feature: Feature(title: "Incremental Feature"))
print(product?.features) // ptional([Minimum Valuable Product, Incremental Feature])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment