Influence Without Authority

The Psychology of Persuasion.

Read More

Spring Data - powerful and succinct abstraction

Database tier definition

Database tables, indexes and foreign keys defined in Liquibase configuration:

Read More

SQL script generates random data and insert into MySQL database

1
DROP PROCEDURE InsertRandomRecords;

Read More

Set up and run AWS Lambda 'hello' function with serverless

serverless

With latest Node.js 6.x.x installed, then install serverless globally:

Read More

The State Quadrants - Functional vs. Object Oriented

The State Quadrants

Read More

Factorial function implementation in Java 8

Implementation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package org.paradise.function;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;
/**
* Created by terrence on 12/12/2016.
*/
public final class FactorialFunction {
public static final Map<Integer, Long> FACTORIAL_MAP = new HashMap<>();
public static final Function<Integer, Long> FACTORIAL = (x) ->
FACTORIAL_MAP.computeIfAbsent(x,
n -> n * FactorialFunction.FACTORIAL.apply(n - 1));
static {
FACTORIAL_MAP.put(1, 1L); // FACTORIAL(1)
}
private FactorialFunction() {
}
}

Read More

Fibonacci function implementation in Java 8

Implementation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package org.paradise.function;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;
/**
* Created by terrence on 12/12/2016.
*/
public final class FibonacciFunction {
public static final Map<Integer, Long> FIBONACCI_MAP = new HashMap<>();
public static final Function<Integer, Long> FIBONACCI = (x) ->
FIBONACCI_MAP.computeIfAbsent(x,
n -> FibonacciFunction.FIBONACCI.apply(n - 2) + FibonacciFunction.FIBONACCI.apply(n - 1));
static {
FIBONACCI_MAP.put(0, 0L); // FIBONACCI(0)
FIBONACCI_MAP.put(1, 1L); // FIBONACCI(1)
}
private FibonacciFunction() {
}
}

Read More

Remote debugging Java applications run on Tomcat

Enable JVM option to attach a remote debugger:

Read More

Web Components are coming

AngularJS is going to continue to succeed for some time. But change is inevitable.

Read More

Perfection

Il semble que la perfection soit atteinte non quand il n’y a plus rien à ajouter, mais quand il n’y a plus rien à retrancher.

Read More