Skip to content

Instantly share code, notes, and snippets.

View oscarg798's full-sized avatar
👨‍💻

Oscar Gallon oscarg798

👨‍💻
View GitHub Profile
class Car {
fun start(){
val engine = V6Engine()
startIgnition()
pressBrake()
engine.start()
}
private fun startIgnition(){...}
private fun pressBrake(){..}

Thinking

Toyota executive Teruyuki Minoura says that the “T”in TPS stands for “thinking,”and the greatest strength of Toyota’s “Thinking Production System”is the way it develops people.

“Under a ‘push’system, there is little opportunity for workers to gain wisdom because they just produce according to the instructions they are given,”he says. “In contrast, a ‘pull’system asks the worker to use his or her head to come up with a manufacturing process where he or she alone must decide what needs to be made and how quickly it needs to be made.”

Most improvement programs put far too much emphasis on documentation and not nearly enough emphasis on encouraging every person to think every minute about how her or his work situation might be improved. Of course, most companies believe that they encourage workers to think about improvements. For years we have had suggestion systems that encourage workers to write down their good ideas and submit them to the s

For years we have had suggestion systems that encoura

@oscarg798
oscarg798 / Distribute with Firebase and Fastlane
Last active May 28, 2020 10:44
FastFile_for_Firebase_Distribution
fastlane_version "2.68.0"
default_platform :android
platform :android do
lane :firebase do
build_android_app(task: "assembleDebug")
firebase_app_distribution(
override fun onBindViewHolder(
holder: ProductViewHolder,
position: Int,
payloads: MutableList
) {
if (payloads.isEmpty()) {
onBindViewHolder(holder, position)
} else {
for (data in payloads) {
when (data as Int) {
class ProductAdapter(
private val products: ArrayList<ViewProduct>
) : RecyclerView.Adapter<ProductViewHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ProductViewHolder {
return ProductViewHolder(
LayoutInflater.from(parent.context).inflate(R.layout.product_item, parent, false)
)
}
override fun getChangePayload(oldItemPosition: Int, newItemPosition: Int): Any? {
val oldItem = oldProducts[oldItemPosition]
val newItem = newProducts[newItemPosition]
if (oldItem.quantityInCart != newItem.quantityInCart) {
return UPDATE_QUANTITY
}
return null
}
data class ViewProduct(
val id: String,
val name: String,
val description: String,
val quantity: Int
)
class ProductDiffUtilCallback(
private val oldProducts: List<ViewProduct>,
private val newProducts: List<ViewProduct>
) : DiffUtil.Callback() {
override fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean =
oldProducts[oldItemPosition].id == newProducts[newItemPosition].id
override fun getOldListSize(): Int = oldProducts.size
val m : (Int, Int) -> Unit = {x, y ->
print("::::$x $y")
}
CoroutineScope(Dispatchers.Default).launch {
print("Corutine 1 $this\n")
val mm = this
withContext(Dispatchers.IO) {
print("Corutine 2 $this\n")
apply from: "$rootProject.projectDir/common.gradle"
dependencies {
def acceptanceTesting = rootProject.ext.acceptanceTesting
testImplementation project(path: ':core')
androidTestImplementation 'net.rafaeltoledo.okir:library:0.0.1@aar'