Clojure ‘def’, ‘declare’, and ‘concat’

I hit the Aeron hard and asked my pair Liz “what’s up?” I’d been sick and she had been working on a tricky Datomicdatalog query in my absence. She claimed to have solved the whole problem but the tests would not pass when run as a whole vs. when run individually.
A classic problem with a big Clojure twist. I, being no stranger to this terribleness, eventually shook the sick out of my head and asked if she had tried running the singular test file by itself. Good news: it failed too.  What? I’ll explain.  We use a classic trick here at Backstop when running tests in the Clojure REPL: ‘:reload-all’
(require '[clojure.test :refer [run-tests]]) (require 'your-ns.example-test) (run-tests ‘your-ns.example-test) ; First time (require 'your-ns.example-test :reload-all) ; Picks up new changes in the files (run-tests ‘your-ns.example-test) Otherwise we’d spend all day waiting for the JVM to start up every time we run our tests. It’s a cool trick but it has its limitations. We were cl…

Lutz’s Super Truthful Murder-ball adventure

For backstory checkout out the previous DnD post.
Landing in a pile on a large stone table in a massive room from out of a swilling green magic portal is very disorienting. However, it did lead to Lutz shaking off his magical blindness. First sight: Many intense dudes some covered in lacquer armor — Lutz didn’t even know lacquer was a thing you could make armor from. While Lutz pondered the truth of his eyesight, Lord Valparaiso threw a little fit. One: He was mighty pissed that his evil portal trap has ensnared him in addition to our heroes. Two: The portal had clearly been hijacked to another mysterious and far away land. The land was so strange and far from their home that Raest couldn’t feel his god Palore anymore which meant no spells.  Essentially this changed his role in the party from from healer/crappy fighter to, um, crappy fighter. That single set of footprints on the beach are not from Palore carrying Raest during his darkest hour. 
The team had many questions but lacking a …

Our Purely Functional Microservice in Production

Recently I was interviewing a candidate for a job on my team at BackstopSolutions and he said something like: “I read your blog post about Microservices and was wondering if the lack of follow up meant the project was a failure.” He actually expressed this sentiment in a much nicer way as this was an interview but still it got me thinking: "I should do an update on the status of our microservice and explain how it could be purely functional."
The service is implemented in Clojure, uses Datomic for persistence, and integrates via REST.
The service has been in production for several months now and has gone through a number of versions of its API. Implementing HATEAOS worked out well as it allows us decouple having to keep the service and front end in lock step. Since this is a microservice, we could keep both applications in step with each other as we own both ends of the interface. However this co-ordination is not without cost.  Release dates slip b/c of bugs in either system.…

Lutz’s completely accurate DnD summary for those who weren’t there

The “Curious Case of the Tiny Thieves” is being joined in progress and so a little backstory is necessary:

The dexterous and rather handsome rouge Lutz was investigating these “Tiny Thieves” with his band of mostly merry adventurers: Raest a cleric of Palore, Bran the mighty barbarian, Torment the super naive atheist paladin, a wild magic user called Very Forgettable Name, and Iesha or Aida or Ada AKA: the old lady magic user who casts a lot of sleep spells. They discovered the little thieves trying to abscond with their solid gold cat statue which they received as a gift for returning a talking cat to an old lady who was really a dragon in human form — long story.

Turns out the whole town hated these mini scofflaws as they has been on a veritable spree of the crime variety.  A reward was offered and pursued by our fairly fearless heroes. As far as they knew the criminals were: 6-8 inches tall, never seen in full light, and immune to sleep spells. Lutz made a super cool trap for these…

Microservices vs David Heinemeier Hansson

Hearing that David Heinemeier Hansson had slammed microservices in his Rails Conf 2015 keynote was a bit disorienting as I was developing a microservice at the time. I leaned over to the other senior developer and said: “What’s his deal?” Toby Tripp, who had just watched the keynote, explained that when David’s team implemented microservices they had terrible trouble managing all the versions between 3 systems. “Isn’t that why we use a lookup call to get the URI-map?” I asked. “Yep” he said. “That and never remove a return key/value (pair), only add new ones until you can prove they are not used anymore” He added. I returned to adding in some caching to our service calls. 
Later, I watched the video which is here:
David has a meandering style but he mostly discusses microservices between 43:00 and 52:00.  The “what’s in your backpack” stuff is all about his earlier zombie apocalypse metaphor that you can watch if you like.  He claims his team impl…

Why Group Texts Must Die

Recently I re-tweeted this thought from Pete Holmes:

top reasons for divorce. 1984: 1. financial problems. 2. religious differences. 2014: 1. constant inclusion in group texts. 2. no wifi.
— Pete Holmes (@peteholmes) September 14, 2014 because I'm in the middle of a communication crisis.  I do "knowledge work" so it’s considered inappropriate to have a device constantly making little beeps and boops while the person next to me is working on some insane LibXML (you don’t wanna know) bug.  Programming requires extreme concentration and distractions are to be avoided. 

The rub of it is that I’m “on call” if our software product bursts into flames.  Therefore, I must keep my phone in a mode capable of disturbing me so I don’t eat lunch, play ping-pong, or just code right through the disastrous failure of our software. 

This used to be fine back when text messages were either:
Time sensitiveImportantFrom one person In first two cases the beeps my phone made were appropr…

Software Apprenticeship Podcast Update

Episode 4 “Time to Exercise!” is out right now! Search for it on your favorite podcast app or check out our free temp website here:

With 4 weeks under his belt (plus 9 weeks of Dev Bootcamp) our apprentice, Jonathan Howden, continues his quest to become an enterprise software developer at an amazingly rapid pace.  Can a dedicated man become a good developer without a college degree?  Tune in and find out (spoiler: he’s doing well but it’s intense) 

Topics this week:
Doing push-ups to break up the lethargy of coding Migrating from Authlogic to Devise/Warden and the perils of using a framework’s column in the database for activation.Why senior programmers avoid becoming mentorsRails’ Asset PipelineThe usual screwing around and one censored F-bomb (sorry - it was me).
Yesterday we all sat in a room and reviewed Jon’s chess code (his outside of work coding project).  I’ll try to put up a more detailed article about it soon, but in brief it went well.…