Most interesting links of March ’14

Recommended Readings Clojure Corner Timo Mihaljov’s Pimp My REPL (3/2014)- really great tips – user.clj, :dev profile, user-wide config in .lein/profiles.clj, tools.namespace, making funs available everywhere & more via Vinyasa, form println with Spyscope, debug-repl, difform, clj-ns-browser Tools/Libs clj-ds – Clojure immutable datastructures extracted from Clojure and made easier for use directly in Java Favourite Quotes

Framework Joy: Load in Hibernate Updates Data

Would you ever guess that this line could lead to a constraint-validation exception during a batch update or delete and re-insert rows (loosing all columns Hibernate does not know about)? I was quite surprised. In particular buyer’s bonusCards get deleted and re-inserted, because Hibernate believes that the collection of cards is dirty, even though itContinue reading “Framework Joy: Load in Hibernate Updates Data”

How To Generate A Valid Credit Card Number For A Bin (First 6 Digits)

There is plenty of generators that can produce numbers that are valid credit card numbers according to the Luhn check and specific rules of the individual issuer companies. However I have not found anything that would generate the missing digits given a bin, i.e. the first 6 digits of a credit card (the “bank identificationContinue reading “How To Generate A Valid Credit Card Number For A Bin (First 6 Digits)”

Ansible: Best practices for deriving host-level var from a group var

I have a cluster and a group variable (in test/staging/prod) holding the hostname of the cluster master. For each host, I want to derive a variable which is set to either “slave” or “master” and use it in templates. This can be done with set_fact:   We could simplify that by using more advanced Jinja:Continue reading “Ansible: Best practices for deriving host-level var from a group var”

Frustration-Driven Development – Towards DevOps, Lean, Clojure

A post about development practices, speed, and frustration. My wife has mentioned that she likes my passion for doing things right in software development. That made me thinking, why do I actually care so much and do not just enjoy the coding itself? It boils down to that I am not happy until my codeContinue reading “Frustration-Driven Development – Towards DevOps, Lean, Clojure”

Recursive Copy In Ansible 1.5 And –diff

Ansible 1.5 has partial support for recursive copy of files: the synchronize module, using rsync cons: does not support group=, owner= -C and –diff – it does not print diff of the files changed; when running ansible with -v, it will print output of rsync’s –itemize-changes, i.e., for each changed file/dir, something like “<…… conf/httpd.conf\n” (< =Continue reading “Recursive Copy In Ansible 1.5 And –diff”

Petitioning EU to act against Russian aggression in Ukraine

As a citizen of a country that has been invaded by Hilter in 1938 under the pretext of protecting local Germans and again invaded by Russia in 1968, I cannot watch another such invasion and annexation taking place in Europe while EU does little of any consequences. Please consider signing the petition to EU toContinue reading “Petitioning EU to act against Russian aggression in Ukraine”

Ansible Troubleshooting Tips

Few tips for troubleshooting Ansible, based on my brief experiences with Ansible 1.4 (read: do not rely on this info too much). Run ansible-playbook in the verbose mode ansible-playbook -vvvv … will provide you with plenty of details of what is going on. (Notice that additional v:s, starting from none, add more detail.) Use ./hacking/test-module CheckContinue reading “Ansible Troubleshooting Tips”