Skip to content

Instantly share code, notes, and snippets.

View seblm's full-sized avatar

Sébastian Le Merdy seblm

View GitHub Profile
@seblm
seblm / ArchiExagonaleEtOgnon.md
Created September 19, 2018 08:58
Résumé de la session du Software Crafters Nantes sur les architectures hexagonale et ognon

Définition

Qu’est-ce qu’une architecture hexagonale (Alister Coburn 2005/2006) ? On a dessiné l'hexagone. Le coeur du système n’a pas de dépendances. On défini des ports (sortie db) et des adapters (api, console).

Ognon (Jefrey palermo - 2009) : les dépendances ne se font que de l’extérieur vers l’intérieur. Là aussi on a fait un schéma. Isoler le centre de l’architecture, le business vs ihm, persistence, apis Le liant étant l’injection de dépendance

Points positifs

package tictactoe;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class TicTacToeTest {
@Test
public void should_end_the_game_when_all_fields_are_taken() {
assertThat(isOver(new String[]{"xxo", "xoo", "oox"})).isTrue();
@seblm
seblm / Inv3st_Plan.java
Last active August 29, 2015 14:07
katastrophic refactored
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
class Inv3st_Plan {
static final int MAX_HOURS = 12;
static String compute(String input) {
MaxProfits maxProfits = new MaxProfits();
@seblm
seblm / gist:7681363
Created November 27, 2013 19:11
error log when building JTaches
$ mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jtaches 1.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.12/maven-surefire-plugin-2.12.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.12/maven-surefire-plugin-2.12.pom (10 KB at 11.9 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire/2.12/surefire-2.12.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire/2.12/surefire-2.12.pom (11 KB at 107.2 KB/sec)