Home
Sandor Dargo's Blog
Cancel

My battle against signed/unsigned comparison: the worst violations

We spent the last two weeks discussing the dangers of signed/unsigned comparisons. First, we discussed why it’s a problem in the first place, and how we can safely compare signed and unsigned types...

My battle against signed/unsigned comparison: the most usual violations

As we discussed last week, comparing numbers with different signs can be dangerous in C++. If you try to compare a signed with an unsigned integer, you might get a result that makes no sense if you...

How to compare signed and unsigned integers in C++20?

Comparing two numbers should be easy right? Maybe it should, yet it’s not the case in C++ even if we constrain the comparison to the domain of integral numbers. If you try to compare a signed with...

Trip report: Dev Talks Cluj 2023

The last week of September I had the honour to share my thoughts in the heart of Transylvania about clean code and software quality at DevTalks Cluj. Over the last few years, DevTalks became a succ...

Be a good gardener of your scripts

I wanted to share a few words on why you should care about your scripts. Programming is a science. Programming is art. Programming is a craft. Programming is… Programming is like gardening Diffe...

Once more about clean code

This summer, I gave a talk at C++ On Sea about Why Clean Code is not the norm where at the end, Conor Hoekstra - who you might know from code_report or from other podcasts - asked me a question abo...

Constexpr functions for smaller binary size?

I read recently “constexpr functions: optimization vs guarantee” by Andreas Fertig. I was a bit surprised by some of his claims about constexpr functions regarding binary size so I decided to go af...

C++23: some changes related to templates

I know the above title is a bit vague. As we move forward with the introduction of C++23 features, there are going to be some articles like that. At the same time, there are more than two features ...

The value of boring tasks

Has it ever happened to you that you had a job at a cool company but your daily tasks were somewhat meh? If you’ve been working for at least a few years, I’m sure that this happened to you. Probab...

C++23: compatibility with C

In this blog post, let’s see two papers in C++23 that are being introduced due to compatibility with C. The <stdatomic.h> header Originally, atomics for C and C++ were designed together. Th...