Challenging Myself With Coplien's Why Most Unit Testing is Waste

James O. Coplien has written in 2014 the thought-provoking essay Why Most Unit Testing is Waste and further elaborates the topic in his Segue. I love testing but I also value challenging my views to expand my understanding so it was a valuable read. When encountering something so controversial, it's crucial to set aside one's emotions and opinions and ask: "Provided that it is true, what in my world view might need questioning and updating?" Judge for yourself how well have I have managed it. (Note: This post is not intended as a full and impartial summary of his writing but rather a overveiw of what I may learn from it.)

Perhaps the most important lesson is this: Don't blindly accept fads, myths, authorities and "established truths." Question everything, collect experience, judge for yourself. As J. Coplien himself writes:

Be skeptical of yourself: measure, prove, retry. Be skeptical of me for heaven’s sake.


I am currently fond of unit testing so my mission is now to critically confront Coplien's ideas and my own preconceptions with practical experience on my next projects.

I would suggest that the main thing you take away isn't "minimize unit testing" but rather "value thinking, focus on system testing, employ code reviews and other QA measures."

I'll list my main take-aways first and go into detail later on:
Continue reading →

Running JavaScript Tests On a CI Server With Karma, Chrome And Fake X

So I want to run my JavaScript tests in a browser on our CI server. But the server has no graphical environment and the tests do not run under PhantomJS 1.x because it uses too old WebKit without ES5. The solution? Use a real browser and fake X via Xvfb. The browser I use is Chrome though Firefox would like work as well.

In code:
Continue reading →

Focus & Do the Simplest Thing Possible

Credit: Dennis Jarvis, CC

Are you tired of days spent in front of the screen, with no results to show? Have you once again engaged in yak shaving? Today, after having failed previously, I have finally managed to solve a problem while avoiding this trap by following rigorously two guidelines preached by grandmaster programmers. Be warned: Following this approach, you will get a working solution - but you won't like it. It will be ugly, stained by compromises, far from the elegant solution you wish for. But if your resources are limited and you want to avoid death by too many yaks, this is your only option. But first, what are these guidelines?

One: Maintain a laser-sharp focus. A great programmer is constantly aware of what she is trying to achieve and never strays far from it. If the path leads away, she backs up. If something else pops up, she writes it down for later and gets back to the job. This is essentially about deciding what not to do. (Many thanks to Kent Beck for sharing his focus secret!)


Continue reading →

Notes On Automated Acceptance Testing (from the Continuous Delivery book)

(Cross-posted from blog.iterate.no)

These are my rather extensive notes from reading the chapter 8 on Automated Acceptance Testing in the Continuous Delivery bible by Humble and Farley. There is plenty of very good advice that I just had to take record of. Acceptance testing is an exciting and important subject. Why should you care about it? Because:

We know from experience that without excellent automated acceptance test coverage, one of three things happens: Either a lot of time is spent trying to find and fix bugs at the end of the process when you thought you were done, or you spend a great deal of time and money on manual acceptance and regression testing, or you end up releasing poor-quality software.



Continue reading →

Continuous Delivery Digest: Ch.9 Testing Non-Functional Requirements

(Cross-posted from blog.iterate.no)

Digest of chapter 9 of the Continuous Delivery bible by Humble and Farley. See also the digest of ch 8: Automated Acceptance Testing.

("cross-functional" might be better as they too are crucial for functionality)



A strategy to address capacity problems:


Continue reading →

The blog's year 2014 in review

The WordPress.com stats helper monkeys prepared a 2014 annual report for this blog.

Continue reading →

Connect Tunnelblick to VPN automatically after wake up

Need: Make sure that VPN is always running except when at work.

Partial solution: Make sure VPN is always running with "connect when computer starts" and using an AppleScript to connect after waking up from sleep. Disconnect manually when at work.

Future: Check the current location (wifi name? IP?) and do not connect when at work.


Continue reading →

Book Review & Digest: Capital In The Twenty-First Century

My key takeaways and highlights from the book. This is not an objective and consistent review.

Capital in the Twenty-First Century by Thomas Piketty is together with Thinking, Fast and Slow, the most important book on society I've ever read. And together with Rawls' A Theory of Justice it has shaped my opinions on society and justice. All politicians and good people interested in politics and inequality should study it. It is unique in leveraging over 200 hundred years of data from different countries and using those as the base of the discussion of the evolution, laws, and future of capital and (in)justice in its distribution.

Key points:




Continue reading →

Tiny, Tiny Steps - Experience Report Developing A Feature In Minimal Value-Adding Increments

A post for those who want to see what an iterative, MVP-driven development of a feature looks like.

@lukew: Start with the simplest version you can. It's much easier to add complexity than to remove it.


Once upon time, there was a webshop portal with hundreds of partner webshops displayed on the front page. Potential users wanted to find out if their favorite webshops or a particular type of goods were available, existing users wanted to find a shop quickly. Therefore it was decided to implement search. But how to do that?


Continue reading →

Notes From CodeMesh 2014

My consise highlights from CodeMesh 2014.

Continue reading →

Most interesting links of July '14

Recommended Readings


Continue reading →

Most interesting links of June '14

Recommended Readings


Continue reading →

Review: Clojure for Machine Learning (Ch 1-3)

Book coverPack Publishing has asked me to review their new book, Clojure for Machine Learning (4/2014) by Akhil Wali. Interested both in Clojure and M.L., I have taken the challenge and want to share my impressions from the first chapters. Regarding my qualification, I am a medium-experienced Clojure developer and have briefly encountered some M.L. (regression etc. for quantitive sociological research and neural networks) at the university a decade ago, together with the related, now mostly forgotten, math such as matrices and derivation.

In short, the book provides a good bird-eye view of the intersection of Clojure and Machine Learning, useful for people coming from both sides. It introduces a number of important methods and shows how to implement/use them in Clojure but does not - and cannot - provide deep understanding. If you are new to M.L. and really like to understand things like me, you want to get a proper textbook(s) to learn more about the methods and the math behind them and read it in parallel. If you know M.L. but are relatively new to Clojure, you want to skip all the M.L. parts you know and study the code examples and the tools used in them. To read it, you need only elementary knowledge of Clojure and need to be comfortable with math (if you haven't worked with matrices, statistics, or derivation and equations scare you, you will have a hard time with some of the methods). You will learn how to implement some M.L. methods using Clojure - but without deep understanding and without knowledge of their limitations and issues and without a good overview of alternatives and the ability to pick the best one for a particular case.


Continue reading →

Most interesting links of May '14

Recommended Readings


Continue reading →

Fixing clojurescript.test failing with "ReferenceError: Can't find variable: cemerick"

ClojureScript.test (0.3.0; cemerick.cljs.test) may fail with this confusing exception:

ReferenceError: Can't find variable: cemerick


due to couple of reasons:
  1. Your test namespaces do not require cemerick.cljs.test (and thus it is missing from the compiled .js; requiring macros is not enough)
  2. cljsbuild has not included any of your test files (due to wrong setup etc.; this is essentially another form of #1)
  3. You are trying to test with the node runner but have built with :optimizations :none or :whitespace (for node you need to concatenate everything into a single file, which only happens if you use :simple or :advanced optimizations)
There is a pull request to provide a better error message but until then you have to be aware of these problems.

Example failures from all the runners:


Continue reading →

Copyright © 2024 Jakub Holý
Powered by Cryogen
Theme by KingMob