The long way through Software Craftsmanship

Resources for Java 9 (beta)

Aug 3, 2015 - 1 minute read - Comments - java-9resourcerepltutorial

I’ve found this list of links for Java 9, while in beta, useful: Contents of the new version Java REPL workshop, with useful commands and questions & answers for installing the REPL REPL tutorial PDF Another getting started guide, by JClarity Yet another getting started guide, by Arun Gupta Information on the REPL project, (codenamed Kulla)

Self-Study in August 2015

Aug 2, 2015 - 12 minute read - Comments - 200720142015absence-of-bugsadvicealejandro-marcuanalysisanders-janmyrandraz-bajtarrayarticleaugustautobiographyawsbackground-mindblogbookbounded-contextbrett-wooldridgebroadcastby-examplebytecodecareercareer-changecarlos-blecarlos-villuendascheatsheetchristopher-maierclientclojureclojurescriptcmscompanycomparisoncompilercompletable-futurecompojurecomputer-scienceconcurrencyconsultancyconsultingcontinuous-deploymentcraig-larmandan-grossmandaniel-whittakerdatadave-ellimanddddesigndevopsdijkstraecuadoredoficedsger-dijkstraeric-normanderin-swenson-healeyessayewdexhaustive-testingexperience-samplingfeedbackffifixfizzbuzzflowframeworkfregefrungykingfunctorfuturegeorge-polyagerard-meszarosghcgistgithubgithub-pagesgoogle-developersguidehakyllhammock-driven-developmenthaskellhastehistory-of-programming-languages-conferencehotspothow-tohumble-programmerhypothesisihinfographicinformation-hidinginlineintroductionjaelle-scheuermanjames-cooperjan-stepienjava-8javascriptjeff-atwoodjoe-nelsonjoel-kaasinenjoey-hessjohn-cheejoseph-grennyjoy-of-clojurejustjustin-leitgebjustin-perryjvmkatakathy-phamkerodonlambdalambda-dayslatin-squarelazy-evaluationlearninglein-fregeclessonlightning-talklink-shortenerlisplong-waylovemacromanagementmanchestermaybemetametaprogrammingmicroservicemigrationmihaly-csikszentmihalyimonad-readermoocmooc-programming-languagesnamespacenate-wildermuthnear-exhaustive-testingnebojsa-stricevicnegative-feedbackneil-brownnietzschenon-blockingnon-strictnessnothingobjective-cocpopen-closedprincipleoptimizationoptionoptionalosconparallelismpassionpatternpaul-grahamperfectionismperformancephilosophyphppragmatic-programmerpreprocessorprivate-functionprivate-variableprofessionalprogrammingproject-managerprologprotected-variationpvquantificationquasi-quoterquotereactive-programmingreadreadingreplrereadrestrich-hickeyrobert-c-martinrobert-mandlroman-numeralrubyruby-on-railsrustryan-trinklesandro-mancusosantiago-valdarramascreencastsean-corfieldself-study-aggregationsharingsimon-peyton-jonessimonmarsimplicityslidesnapsocial-mediasolve-problemstack-buildersstrange-looptalktddtechnical-debttestingthoreauthoughtworkstime-lapsetomasz-nurkiewicztravis-ciubiquitous-languageuku-tahtvideowaking-mindweb-developmentweb-frameworkwebappwrite-onlywrocloverb

Humble Object I’ve read the Humble Object list of patterns, by Gerard Meszaros, including: humble dialog humble executable humble transaction controller humble container adapter Tags: pattern, gerard-meszaros How you know I’ve reread this small essay by Paul Graham on storing information in our heads, based on the context. On the importance of rereading, to add more contexts to the initial one. Tags: paul-graham, reread, read Protected Variation: The Importance of Being Closed I’ve read this article by Craig Larman in the magazine IEEE Software > Design.

Packing your own maven dependencies

Jul 30, 2015 - 2 minute read - Comments - mavenprotipjitpack

Lately, I’ve found myself repeating always the same dependencies for my pet projects and katas. Usually, I prefer maven to hold my java dependencies, organized in a java project. This is how most of them look like: <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.gmaur.legacycode</groupId> <artifactId>legacyutils</artifactId> <version>0.0.1-SNAPSHOT</version> <dependencies> <dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest-all</artifactId> <version>1.3</version> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-all</artifactId> <scope>test</scope> <version>2.0.2-beta</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.

Tool to Find Duplicate values in Constants

Jul 30, 2015 - 2 minute read - Comments - sampletooljavaduplicategmaurlibrary

Imagine having this java class: private static class RepeatedConstants { public static final String A = "A"; public static final String A_1 = A; public static final String A_2 = "A"; public static final Integer _3 = 3; public static final Integer THREE = 3; } I wanted to remove the repeated values in the constants, in an automatic way, because the file was big (> 4000 constants). A way of doing this is basing the differences on the values, directly.

Exploring Testing with Java 8 Lambdas

Jul 30, 2015 - 4 minute read - Comments - draftjavalambdaexplorationclient

At a client, we were testing a simple feature, but the resulting tests had much subtle repetition: (source code is here) @Test public void log_when_sending_greeting_letters() { sut.send(mock(GreetingLetter.class)); verify(logger).sentGreetingLetter(); } @Test public void log_when_sending_love_letters() { sut.send(mock(LoveLetter.class)); verify(logger).sentLoveLetter(); } and the production code: public class MailSender { private final EventLogger eventLogger; public MailSender (final EventLogger eventLogger) { this.eventLogger = eventLogger; } public void send (final GreetingLetter letter) { // more business logic eventLogger.