When I start to use a programming language I always have the following questions:

  • How do I build/run my program?
  • How do I run tests?
  • How do I install dependencies?
  • How do I integrate all of this in my text editor?

Some languages such as Go come with simple answers to these questions: go build ./..., go test ./..., go get <my module>, install the official Go extension for your editor. Done. But of course in the case of C++, things are ... different 🙃.

The C++ world is way more fragmented, there is a lot of choices of build and meta build tools, various test frameworks (each with its own test runner), lot of way to manage dependencies, etc. Because so much choices can be daunting for people who just want to start with the language, and because I know I will forget how things work, in this article I will document what I've done to get to a fully working environment that answers all my questions in a simple and coherent way. At the end of this guide we will be able to build and run tests in just one click (or command line if that's your thing).

Tools popularity can vary quite a lot from years to years, for example solutions to manage dependencies are still competing against each other and new ones are popping all the time, so I want to be clear that this document is my setup in 2020, hopefully it will stay evergreen in the future, but I wouldn't bet too much on it.

Read full post

Hide scores on HackerNews

A few days ago I re-published on the Chrome Web Store a small browser extension "HackerNews No Pressure". You can find the store listing here.

It's purpose is to hide user scores, comment scores, and link scores when browsing https://news.ycombinator.com. The implementation is ridiculously simple, it doesn't have any logic, and only consists in a small stylesheet that hides a few elements. It doesn't have any impact other than this and is fairly stable, I'm using it as a side-loaded extension since around 5 years now with zero maintenance.

Someone asked about that feature in a recent thread, so I felt that would be nice to make it available again to more people.

And that's how HN looks when enabled.

Notice that no score are present in the comment header (click on this thumbnail for a higher resolution)

Of course the stylesheet is publicly available on GitHub, you can find the repository at https://github.com/dgellow/hn-no-pressure.

A few days ago we released a new version of HabitCat (v1.9.1) taking in account feedbacks we received from our users:

  • 🌗 Switch between light and dark mode (also known as "night mode")! HabitCat now supports dynamic color schemes, depending on the mode set on your phone the app will automatically select the appropriate scheme.

  • 📆 We received multiple times the feedback that users want to set past data, for example from other applications, and have more control over the starting date of a habit. We agree that's a very good feature, so that's now possible! When creating a habit the start date will default to today, but you can change it to a date in the past then manually fill the data you already have.
Read full post

When reading Svelte 3 documentation of the {#each} keyword, it isn't clear how to correctly handle the case where the variable we want to iterate on is null or undefined.

A common use case is listing the result of an object of type Promise<MyItem[]>. We could imagine for example that this promise represents the result of an HTTP request. We would first initialized the promise to null as a way to communicate that we didn't fetch any result yet.

Read full post

About a month ago we released HabitCat, a simple mobile application to track and develop new habits. We are now learning how to market it, something neither me nor my partner have any experience doing! So far we got a few downloads without doing any form of advertising (other than creating a Twitter account), though that's of course really limited and is mostly from our friends, family, and acquaintance.

So today we are trying something new for us, publishing our project on ProductHunt, which seems to be the main platform for product developers to showcase what they've done.

HabitCat - Track your habits | Product Hunt Embed

Upvote our submission if you have a ProductHunt account and want to support us, we would love to see more people developing habits and routines using HabitCat ✌.