Skip to content

Instantly share code, notes, and snippets.

If you have two days to learn the very basics of modelling, Domain-Driven Design, CQRS and Event Sourcing, here's what you should do:

In the evenings read the [Domain-Driven Design Quickly Minibook]{http://www.infoq.com/minibooks/domain-driven-design-quickly}. During the day watch following great videos (in this order):

  1. Eric Evans' [What I've learned about DDD since the book]{http://www.infoq.com/presentations/ddd-eric-evans}
  2. Eric Evans' [Strategic Design - Responsibility Traps]{http://www.infoq.com/presentations/design-strategic-eric-evans}
  3. Udi Dahan's [Avoid a Failed SOA: Business & Autonomous Components to the Rescue]{http://www.infoq.com/presentations/SOA-Business-Autonomous-Components}
  4. Udi Dahan's [Command-Query Responsibility Segregation]{http://www.infoq.com/presentations/Command-Query-Responsibility-Segregation}
  5. Greg Young's [Unshackle Your Domain]{http://www.infoq.com/presentations/greg-young-unshackle-qcon08}
  6. Eric Evans' [Acknowledging CAP at the Root -- in the Domain Model]{ht
@osmanizbat
osmanizbat / gist:10d0854da5ad7ec85e72
Last active August 29, 2015 14:10
Word Frequency Analysis
cat INPUTFILE \
| tr -d '[[:punct:][:digit:]]' \
| tr ' ' '\n' | tr 'A-Z' 'a-z' \
| sort | uniq -ic | sort -rn
@osmanizbat
osmanizbat / MatcherUtils.java
Last active August 29, 2015 13:56
Hamcrest matchers ile fonksiyonel tarzda koşullu ifadeler
import org.hamcrest.Matcher;
public class MatcherUtils {
public static <T> boolean the(T actual, Matcher<? super T> matcher) {
return matcher.matches(actual);
}
}
public static int getSimdikiYili() {
// GregorianCalendar gCal = new GregorianCalendar();
// gCal.setTime(new Date());
// return gCal.get(Calendar.YEAR);
// TODO:DATE DE BUNUN BARIZ DEGISMESI LAZIM
return 2008;
}
@osmanizbat
osmanizbat / 1
Last active December 11, 2015 02:18
Tell don't ask (Law of Demeter)
class Otomobil {
private Motor motor;
public void hizlan(){
motor.getKarburator.yakitValfiAcik = true;
}
}
@osmanizbat
osmanizbat / GroovierReport.groovy
Last active September 27, 2019 13:39
Groovier reports with groovy & jasperreports
import java.awt.Color;
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.design.*;
import net.sf.jasperreports.engine.type.*;
import net.sf.jasperreports.view.JasperViewer
class GroovierReport {
static void main(String[] args) {
def builder = new ObjectGraphBuilder()
if(foo == null || bar == null || baz == null || qux == null){
...
}
vs.
if(ObjectUtils.anyNull(foo, bar, baz, qux)){
...
}