Skip to content

Instantly share code, notes, and snippets.

View xpepper's full-sized avatar
💭
😏

Pietro Di Bello xpepper

💭
😏
View GitHub Profile

What is a Design Pattern?

Every Software Engineer certainly must have to deal with change. Change is a constant in Software Design: adding feature, changing of requirement or bug fixing.

What is a design pattern? In simplest way I can say, it is a general solution for common problems in Software Development. The purpose of design patterns is to help structure your code so it will be flexible and resilient when its changed.

There are 23 common design patterns that are being used by programmers around the world. In this chapter I am going to describe the Observer Pattern.

Introduction to Observer Pattern

@xpepper
xpepper / user story template.md
Last active September 7, 2022 05:00
User Story templates
@xpepper
xpepper / whiteboardClean.sh
Created June 3, 2015 14:17
whiteboard effect
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"%
@xpepper
xpepper / From monolith to microservices.md
Last active July 5, 2022 13:47
My notes on Rodrigue Schaefer's talk "From monolith to microservices" at microXchg 2016

Rodrigue Schaefer: From monolith to microservices about some of the challenges of Zalando's transition from monolith to microservices (microXchg 2016)

Zalando history

  • 2008 started with a POC with magento => starts fine but does not scale very well

  • 2010 couldn't handle the raising load and traffic with magento

  • => so in 3 months they build their own system, based on Java, Spring, Postgres DB (a monolithic application)

tags disqus
kata
pierodibello

A curated list of programming kata

IDE automation skills

  • Refactoring Golf katas (easy...medium), to learn how to use the IDE at its best
@xpepper
xpepper / Kotlin Scope Functions.md
Created June 26, 2019 16:48
Kotlin Scope Functions
// 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 / Docker as a dev tool.md
Created December 4, 2021 14:55
Docker as a dev tool

Docker aliases

(full article by Andrew Welch here: https://nystudio107.com/blog/dock-life-using-docker-for-all-the-things)

alias composer='docker run --rm -it -v `pwd`:/app -v ${COMPOSER_HOME:-$HOME/.composer}:/tmp composer '
alias composer1='docker run --rm -it -v `pwd`:/app -v ${COMPOSER_HOME:-$HOME/.composer}:/tmp composer:1 '

alias node='docker run --rm -it -v `pwd`:/app -w /app node:16-alpine '
@xpepper
xpepper / CI Alternatives.md
Last active April 17, 2022 12:41
CI, alternative a confronto :-)

Continuous Integration - Know your opportunities

Continuous Integration in a nutshell

Continuous Integration (CI) is an important practice every team should adopt in order to detect defects and errors early and solve integration problems easily. Roughly speaking we may say that CI is a practice that allows the growth of solid software by giving greater confidence to the developers and better products to the final customers.

The concept behind CI is fairly simple: the codebase is owned by several developers that continuously integrate their changes to a common version control system. For each integration the system runs a predefined set of tasks automatically; these tasks may vary from running all the tests to building all the components.