Skip to content

Instantly share code, notes, and snippets.

View xpepper's full-sized avatar
💭
😏

Pietro Di Bello xpepper

💭
😏
View GitHub Profile
@xpepper
xpepper / Some tools and tweaks on Mac OS X.md
Last active December 13, 2023 11:33 — forked from g3d/gist:2709563
Some tools and tweaks on Mac OS X
@xpepper
xpepper / universal-switcher.md
Created November 24, 2023 07:56 — forked from jthodge/universal-switcher
Show macOS app switcher across all monitors
defaults write com.apple.dock appswitcher-all-displays -bool true && killall Dock

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 / semantic-commit-messages.md
Last active March 22, 2022 16:55 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional, and may contain IDs of the task / user story we are changing the code for (e.g. SELL-123)

Example

@xpepper
xpepper / Install PostgreSQL 9 in Mac OSX via Homebrew.txt
Last active February 8, 2022 03:12 — forked from lxneng/gist:741932
Install PostgreSQL 9 in Mac OSX via Homebrew
install PostgreSQL 9 in Mac OSX via Homebrew
Mac OS X Snow Leopard
System Version: Mac OS X 10.6.5
Kernel Version: Darwin 10.5.0
Install notes for PostgreSQL 9.0.1 install using Homebrew:
sh-3.2# brew install postgresql
@xpepper
xpepper / layers_and_boundaries.rb
Last active September 17, 2021 06:34 — forked from joebew42/layers_and_boundaries.rb
A code-ish description of the example depicted in the chapter 25 ("Layers and Boundaries") of "Clean Architecture" book by Bob Martin
interface GameRulesInputBoundary
void moveSouth()
end
interface GameRulesOutputBoundary
void moveSouthSucceed()
end
class GameRules implements GameRulesInputBoundary
def init(GameRulesOutputBoundary outputBoundary)
@xpepper
xpepper / sonar-history.md
Last active September 10, 2021 23:10 — forked from aslakknutsen/blog.md
Import your project's history in Sonar

When you do your first Sonar run on your project, you get a lot of new quality numbers to play with, but no trends. You only have one data set for comparison, the now picture.

Wouldn't it be nice if you could see the current trend of the project without waiting a couple of month for the 'daily/weekly' Sonar runs to fill up the data? Well, you're in luck! And if you're using git as a version system as well, this is your day. :)

In the Sonar Advanced Parameter documentation you will find a System Property called sonar.projectDate. The property let you tell Sonar when in time the running analysis was ran.

By combining this property and what your version system does best, track changes to source, we can now play back the history of the project as far as Sonar is concerned.

This little Bash script illustrates the concept. To spell out what it does in human readable form:

@xpepper
xpepper / Java8Pills.md
Created March 4, 2021 16:10 — forked from Vashy/Java8Pills.md
Java 8 pills

Java 8 Pills

Example class

@Value // Lombok annotation.
// Generates all private final fields, an all-args-constructor,
// getters (no setters), toString(), etc...
class User {

Clean-Architecture

Notes, comments and errata on Robert C. Martin's Clean Architecture

Reading the book

The book has 34 chapters, with a maximum of 22 pages (chapter 14). Even while involved as a programmer in a project, it should be possible to read one chapter per day, so you can finish the book in about 2 months.

Errata

Page 15, just before subchapter "The greater value".

Question posted on Twitter

For someone with technical leadership responsibilities in a rapidly scaling product company that’s distributed across multiple time zones, what are the top 3 books you think they should read?

My Three

  1. Flow (Donald G. Reinertsen)
  2. Flow (Mihaly Csikszentmihalyi)
  3. Flow (Nonaka, Toyama, Hirata)

Twitterverse