JSON processing with Jq made simpler

Jq is a very convenient tool to handle JSON from the cli or in scripts and programs. Yet, many find it complex to use, and not obvious. Jq relies on a few core concepts. Once understood, they make using jq a lot easier. In this post, I’ll discuss the 4 most important jq concepts. For each, I’ll give a few examples of usual things that are possible.

Reliability of Sequential Layers

Have you ever seen an architecture diagram with many layers of services, and wondered how reliable it is? After all, KISS is better, right? Our intuition tells us it makes sense: if each layer can fail, more layers just mean more failure. But exactly how many layers become too much? 1. Model By layers, I mean units that depend on each other to process an input.

Anything as a service: business ideas

Good ideas come in two flavours: original and improvement. Original ideas are those that bring to the world something that was never conceived before: they are rare and difficult to come up with, but almost always have a lasting impact. Improvements take an idea from another field, and apply it to a novel one: they often imply seeing a pattern that is not formulated yet, and generalizing it.

From Example-based unit-tests to property testing

I recently wrote about how many unit-tests one needs to write to reduce the number of faults in programs. One of the conclusion one can have is that this is a big number of tests to write! Surely, nobody have time to write that many tests by hand! That’s where property testing enters the scene. 1. A simple function: toUpper Imagine you have to write a new function named toUpper that takes a string as input, and returns the same string, but in upper case.

How Many Unit-tests?

Writing unit-tests is an integral part of writing software. How many tests are needed? What coverage target should one aim for? What’s coverage anyway? Follow along on this quick journey, where I wonder those very questions. 1. Why do we need any tests? First and foremost, why would you need any tests, if you could simply prove that the program is right? After all, in mathematics, if we assume that there are an infinite number of prime numbers for example, we can just prove it, and we don’t have to test all numbers to check that this statement is true.