Skip to content

Instantly share code, notes, and snippets.

View MatteoPierro's full-sized avatar

Matteo Pierro MatteoPierro

View GitHub Profile
@MatteoPierro
MatteoPierro / guess_number.rb
Created November 11, 2022 23:09
Guess Number Code For Beer
class GuessNumber
attr_accessor :min, :max
def initialize
@min = 1
@max = 1000
end
def guess
return (max + min) / 2
interface GameRulesOutputBoundary
void moveSouthSucceed()
end
interface GameRulesInputBoundary
void parse(message)
end
class GameRules implements GameRulesInputBoundary
def init(GameRulesOutputBoundary outputBoundary)
@MatteoPierro
MatteoPierro / index.js
Created September 30, 2018 13:59
Send mail with GMail Api
const mailService = require('./mailService')
mailService.send({
to: 'an@email.com',
subject: 'Greetings',
text: 'Hello dude!'
});

KataTennis

About this Kata

This Kata is about implementing a simple tennis game. I came up with it while thinking about Wii tennis, where they have simplified tennis, so each set is one game.

The scoring system is rather simple:

  1. Each player can have either of these points in one game 0 15 30 40

Phonebook

You have to build a web application that provides a phonebook.

Entries

The application handles a set of entries, that contain a first name, last name, and a telephone number.

The entries should be validated, so that it's not possible to enter an empty first or last name; and the phone number should be of the form

+39 02 1234567
@MatteoPierro
MatteoPierro / Dockerfile
Last active March 21, 2018 19:16
maven container with Web Driver for Selenium
FROM maven:3.5.3-jdk-8
COPY *.deb /tmp/
RUN dpkg -i /tmp/fonts-liberation.deb \
/tmp/libdbusmenu-glib4.deb \
/tmp/libdbusmenu-gtk4.deb \
/tmp/libindicator7.deb \
/tmp/libappindicator1.deb \
/tmp/libxss1.deb \
/tmp/distro-info-data.deb \

Bowling Rules

Each game, or “line” of bowling, includes ten turns, or “frames” for the bowler.

  • In each frame, the bowler gets up to two tries to knock down all the pins.
  • If in two tries, he fails to knock them all down, his score for that frame is the total number of pins knocked down in his two tries.
  • If in two tries he knocks them all down, this is called a “spare” and his score for the frame is ten plus the number of pins knocked down on his next throw (in his next turn).
  • If on his first try in the frame he knocks down all the pins, this is called a “strike”. His turn is over, and his score for the frame is ten plus the simple total of the pins knocked down in his next two rolls.
  • If he gets a spare or strike in the last (tenth) frame, the bowler gets to throw one or two more bonus balls, respectively. These bonus throws are taken as part of the same turn. If the bonus throws knock down all the pins, the process does not repeat: the bonus throws are only used to calculate the score of the fin
@MatteoPierro
MatteoPierro / cover-letter.md
Last active June 21, 2017 09:06
cover letter

Matteo Pierro, Software Engineer

I'm a software engineer focused on continuous improvement of my skills and knowledge.
I'm finding my way following the eXtreme Programming methodology.

What I'm doing now

I'm honoured to be a member of XPeppers, one of the best agile teams in Italy and probably also in Europe.
As part of this team I strive to build outstanding products for our clients using agile methodologies.
We also help our customer to migrate towards Cloud environments using the most innovative DevOps technologies.