Skip to content

Instantly share code, notes, and snippets.

Common misconception about String concatenation in a loop

No worries about contatenating String in a loop if the buffer does not grow.

import org.junit.Test;

// java 8
public class StringConcatLoopTest {

TOUT texte que vous pouvez voir dans une fenêtre Emacs fait toujours partie d'un tampon.

Export

In top.bash

#!/bin/bash

export foo=hello

./sub.bash

Domain-driven design

  • Premières réunions avec le métier décourageante
  • On ne sait pas à l'avance où l'exploration mène
  • Utiliser notre capacité linguistique (variation sur les mots et discussions)
  • Utiliser notre capacité à voir dans l'espace (diagramme)

Event Storming

Events, commands, aggregates, external systems, key scenarios.

Event

  • Happen in the past
  • Business oriented
  • Start with domain event
  • Assign e.g. orange to events

Everyday Cucumber in IntelliJ

Cucumber runner is used to run the scenario (.feature) from Maven

  1. Write cucumber runner first.
  2. Write scenario in .feature file.
  3. Generate the empty steps.
  4. Glue each step to an actual implementation.

Different step snippet style

Jeux de caractères : quiz

Connaît-tu l'encodage de tes fichiers sources ?

Tu penses que é es une interjection néerlandaise courante ?

Tu modifies un fichier contenant des erreurs d'encodage ?

Tu ne voit pas le rapport entre un problème d'encodage et une faille de sécurité ?

#!/bin/bash
function uw() {
iconv --from-code=utf8 --to-code=windows-1252
}
function wu() {
iconv --from-code=windows-1252 --to-code=utf8
}
@thieux
thieux / pom.xml
Last active January 28, 2017 20:48
Maven quickstart
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>example-app</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
#!/bin/bash
# Validates utf-8 input
function uu() {
iconv --from-code=utf-8 --to-code=utf-8
}
# Converts UTF-8 -> ISO-8859-1
function ui() {
iconv --from-code=utf-8 --to-code=iso-8859-1