Skip to content

Instantly share code, notes, and snippets.

💭
😏

Pietro Di Bello xpepper

💭
😏
Block or report user

Report or block xpepper

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@xpepper
xpepper / jbrains.md
Created Aug 18, 2019
What your tests don’t need to know will hurt you
View jbrains.md
@xpepper
xpepper / LondonVsChicago.md
Last active Jul 31, 2019
London vs Chicago, Comparative Case Study - Sandro Mancuso and Uncle Bob
View LondonVsChicago.md

My notes on the video series "London vs Chicago TDD styles" by Uncle Bob And Sandro Mancuso

The git repo of the kata is here: https://github.com/sandromancuso/cleancoders_openchat/

The "starting-point" branch is where both implementations began: https://github.com/sandromancuso/cleancoders_openchat/tree/starting-point

  • The 🇬🇧 "openchat-outside-in" branch captures the tomato by tomato history of the London approach.
  • The 🇺🇸 "openchat-unclebob" branch captures the tomato by tomato history of the Chicago approach.

What I like about Sandro's style 👍

View learning-javascript.md

Before to start

In JavaScript there is NO concept of Class.

Everything is an Object.

Inheritance between objects is achieved with a mechanism known as Prototypal Inheritance.

We can create Objects and then link them together OLOO (Objects-Linked-to-Other-Objects).

View Kotlin Scope Functions.md
// it's NOT an extension function
// it takes the receiver and a lambda with the same receiver
// it returns the result of the lambda on the implicit receiver
inline fun <T, R> with(receiver: T, block: T.() -> R): R {
    return receiver.block()
}

with ("ciao") {
    length + 1
@xpepper
xpepper / from kotlin source to java execution of the generated bytecode.md
Last active May 25, 2019
from kotlin source to java execution of the generated bytecode
View from kotlin source to java execution of the generated bytecode.md

Write the simplest Kotlin file, and name it Main.kt:

fun main(args: Array<String>) {
    println("Hello world!")
}

Then compile the Kotlin file with kotlinc, which runs the Kotlin compiler

@xpepper
xpepper / Keeping a branch up-to-date with master.md
Last active May 21, 2019
Keeping a branch up-to-date with master
View Keeping a branch up-to-date with master.md

Keeping a branch up-to-date with master and then merge back the branch to master

git checkout new-feature # Go to the feature branch named "new-feature"
git rebase master

# Now your feature have all the commits from master!
@xpepper
xpepper / watching my train delay.md
Last active Apr 28, 2019
watching my train delay :-|
View watching my train delay.md
View vim_tips.md

Continued from I'm learning vim. Here's how I'm doing it, by Chris Geihsler

I've committed to learning vim to become more productive without the crutch of an expensive tool and to decouple myself from a specific OS.

Here's what I've done so far:

View class_roles.md

A class plays two roles in an OO program:

  • It provides a container for behavior that's shared by many objects.
  • It acts as an object factory, manufacturing new instances and ensuring they are initialized correctly.
You can’t perform that action at this time.