Plurrrr

a tumblelog
home

YAML: probably not so great after all

Don’t get me wrong, it’s not like YAML is absolutely terrible – it’s probably better than using JSON – but it’s not exactly great either. There are some drawbacks and surprises that are not at all obvious at first, and there are a number of better alternatives such as TOML and other more specialized formats. Personally I’m not likely to use it again when I’ve got a choice.

One good alternative might be to just use commandline flags.

If you must use YAML then I recommend you use StrictYAML, which removes some (though not all) of the more hairy parts.

The above is the conclusion Martin Tournoij reaches in his article YAML: probably not so great after all

Don't Fear the Makefile

I’m writing this because I have the feeling that many developers underestimate the power of Makefiles and they are simply not aware of this nice and handy tool which is installed on nearly every Unix-like machine. To be honest, who have never executed a make install or something similar? Most tutorials I’ve found out there are bloated with stuff, more complex than they would have to and you have to read pages after pages to get the basics.

writes Max in his introduction of Don't Fear the Makefile.

Highlights from Git 2.23

The open source Git project just released Git 2.23 with features and bug fixes from over 77 contributors, 26 of them new. Here’s our look at some of the most exciting features and changes introduced since Git 2.22.

Source: Highlights from Git 2.23,an overview by Taylor Blau.

Experimental alternatives for git checkout looks like something I am going to use in the future.

Learn vim For the Last Time: A Tutorial and Primer

The problem with learning Vim is not that it's hard to do---it's that you have to keep doing it. This guide attempts to break that cycle, so that you can learn it for the last time.

Source: Learn vim For the Last Time: A Tutorial and Primer, written by Daniel Miessler.

Parsing JSON is a Minefield

JSON is the de facto standard when it comes to (un)serialising and exchanging data in web and mobile programming. But how well do you really know JSON? We'll read the specifications and write test cases together. We'll test common JSON libraries against our test cases. I'll show that JSON is not the easy, idealised format as many do believe. Indeed, I did not find two libraries that exhibit the very same behaviour. Moreover, I found that edge cases and maliciously crafted payloads can cause bugs, crashes and denial of services, mainly because JSON libraries rely on specifications that have evolved over time and that left many details loosely specified or not specified at all.

Source: Parsing JSON is a Minefield by Nicolas Seriot.

A great overview, highly recommended if you maintain a JSON parser or plan to write one.

Flower Shopping

In the afternoon my mother wanted to buy some flowers for my brother Marco and his wife Ingrid. They were about to return from a vacation and my mom loves to leave some flowers in their house as a surprise.

Garden baskets with succulents Garden baskets with succulents

At the first shop she didn't find something she liked. While waiting I took some photos of garden baskets with succulents.

Echinacea purpurea close-up Echinacea purpurea close-up.

At the second shop she found some nice flowers to her liking. I took a photo of Echinacea purpurea flowering.

Another shy calico cat

On the way back to her house my mother and I spotted two cats. Of the first one I had taken a photo while it was resting on top of a garbage can.

The second one, a calico, I had seen before but now as back then it was very shy and I couldn't pet it. Yet, I managed to take a photo of it while I was sitting underneath some bush.

A calico cat sitting underneath some bush A shy calico cat sitting underneath some bush.

The calico reminded me of the calico cat we had seen near my mother's house.

If I should optimize only one query, which one should it be ?

Answering this question is not easy. Like always, the best response is “it depends” !

But let’s try to give you all the necessary info the provide the most accurate answer. Also, may be fixing one single query is not enough and looking for that specific statement will lead in finding multiple problematic statements.

In the evening I read MySQL 8.0: if I should optimize only one query on my application, which one should it be ?.

The Thirst: an excellent story

In the evening I finished The Thirst by Jo Nesbø. At first the pace was a bit slow to me but it was well worth to keep going on as the speed picks up after a while. I loved the various plot twists and red herrings. An excellent read which ends with a cliffhanger.

The Daemoniac

Sherlock Holmes meets The X-Files in this acclaimed paranormal mystery series from the author of the Fourth Element Trilogy

In the evening I started in The Daemoniac, book 1 in the Gaslamp Gothic series by Kat Ross.

Getting a stack trace in Perl on die

In the afternoon I was debugging a Perl program that died in a function; I tried to call a method on an unblessed reference.

Because I wanted to know which part of the code had called this function I defined a sig handler for __DIE__ as follows:

use Carp;
$SIG{ __DIE__ } = sub {
    Carp::confess( @_ );
};

And I got a nice stack trace which made it possible to fix this bug within a few minutes.

Advantages of Git Rebase

I want to list a few good reason why, in my opinion, rebasing is a good practice that brings many benefits to your workflow.

Alessio Pieruccetti writes in Advantages of Git Rebase, an article I read in the evening.

Adding Twitter Card and Facebook Sharing support to Tumblelog

In the afternoon I added Twitter Card and Facebook Sharing support to Tumblelog, the static site generator I wrote to create Plurrrr.

Twitter card for a Plurrrr post An example of a Twitter card for a Plurrrr post on iOS.

I also created a tiny Perl program to generate a text file with tweets which I can automatically tweet using another Perl program. I hope to get more visitors this way. For more information, see the aforementioned link.

The blue cat with white socks

On our way to the town centre my mother and I encountered a beautiful blue cat with white socks. The cat was very friendly and loved to be petted.

A blue cat with white socks A beautiful blue cat with white socks

Performance Wiggle Room

“Premature optimization is the root of all evil“: the famous Knuth-ism that we all know and… well, that we all know. It’s hard to go a day of reading programming blogs without someone referencing this and leaving their particular footnote on it. I suppose today I am that someone.

Source Performance Wiggle Room, an article by Doug Thayer.

Six Shades of Coupling

[W]e should pursue loose coupling, so one would be able to easily analyze/debug/maintain any class, without detailed knowledge about other classes within the system. The looser the coupling is, the more independent the classes are.

In the evening I read Six Shades of Coupling, an article by Mr. Picky.

The six types of coupling from those considered as the least to those that are the most welcome are:

  • Content Coupling,
  • Common Coupling,
  • External Coupling,
  • Control Coupling,
  • Stamp Coupling, and Data Coupling

A recommended read.

Known bugs in macOS Mojave 10.14.6: an incomplete summary

This article lists bugs which you and I have encountered in macOS Mojave 10.14.6 itself, rather than issues in specific third-party applications and other software.

Source: Known bugs in macOS Mojave 10.14.6: an incomplete summary.

Twenty Lego Scorpions Arrived

In the afternoon, the twenty new black Lego scorpions, part number 30169, I had ordered the 30th of July arrived.

Twenty black Lego scorpions Twenty black Lego scorpions, part number 30169.

I had placed the order with Vintage Sets & Bits in the UK via the BrickLink website.

I am very happy with those tiny arachnids, and I am sure our children will play a lot with them.

Archive