Skip to content

Instantly share code, notes, and snippets.

View xpepper's full-sized avatar
💭
😏

Pietro Di Bello xpepper

💭
😏
View GitHub Profile
@xpepper
xpepper / Bank account kata (Sandro Mancuso).md
Last active April 25, 2019 17:26 — forked from abachar/kata.md
The Bank Account code kata (inspired by Sandro Mancuso)

Bank account kata

Think of your personal bank account experience When in doubt, go for the simplest solution

Requirements

  • Deposit and Withdrawal
  • Account statement (date, amount, balance)
  • Statement printing

User Stories

Deposit:
@xpepper
xpepper / tdd-thoughts-by-dave-schinkel.md
Last active April 25, 2019 17:27 — forked from dschinkel/tdd-thoughts-by-dave-schinkel.txt
What Does TDD Give Me in terms of a Design Activity?

TDD

Tests and the Red | Green | Blue cycle put pressure on your design all the time as you code. Your design decisions are guided by that pressure.

As Corey Haines once stated: "It's like having a little buddy as you code, helping you along, pointing things out such as when your design sucks, when you've broken something, etc."

  • forces you to only create enough code to make a test pass (you’re keeping lean all the time)
  • you won’t be able to write the next test if you have code that’s too coupled
  • you’ll know immediately when you’ve broken behavior. This is different than test after.
@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:

node {
// https://registry.hub.docker.com/_/maven/
def maven32 = docker.image('maven:3.2-jdk-7-onbuild');
stage 'Mirror'
// First make sure the slave has this image.
// (If you could set your registry below to mirror Docker Hub,
// this would be unnecessary as maven32.inside would pull the image.)
maven32.pull()
// We are pushing to a private secure docker registry in this demo.
@xpepper
xpepper / service-checklist.md
Created January 13, 2017 23:21 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@xpepper
xpepper / README.md
Created November 22, 2016 21:01 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


Index:

@xpepper
xpepper / Learning Object Oriented Python.md
Last active April 25, 2019 17:30 — forked from briankung/Learning Object Oriented Python.md
Learning Object Oriented Python

Learning Object Oriented Python

I wrote this as a guide for a financial analyst friend of mine looking to learn Python. He is already fairly well versed in doing Project Euler problems in Ruby. All italicized text is for the benefit of any other readers, such as yourself.

Each section is divided into a short resource (10 minutes or less), a long resource (days to weeks or more), and a challenge.

~

So what you're looking to do is to be able to recreate financial models in code. And other types of models. This is a noble pursuit.

@xpepper
xpepper / CleanCode episode 3 on functions.md
Last active April 25, 2019 17:32 — forked from xplayer/CleanCode.3.functions.md
CleanCode episode 3 on functions

Functions

Functions should be small

Four to six lines long

  • "A long function is where the classes go to hide"

Functions should do only one thing