It's nice to live in a perfect world where every problem has an elegant solution but when dudes like Bruce Dawson, an awesome C++ developer from Google, commits code with this subject line, I think we can safely assume that the perfect world doesn't exists 🙂 . Avoid Windows kernel bug using Python hack I … Continue reading GIT commits a la Google
The modern C++ standard libraries, includes smart pointers, which are used to help ensure that programs are free of memory and resource leaks and are exception-safe. All good and sweet, but these structures have a dark little secret. You may ask yourself how do smart pointers choose between delete and delete when deleting the managed … Continue reading C++: Using Smart Pointers with Arrays
I had a debate lately about micro optimizations in C++ and what structures are faster: IF or SWITCH. Until now, I honestly didn't encounter a scenario where the speed difference between these two structures could be objectively measured but hey, I'm a curious man and decided to look under the hood to see exactly how are … Continue reading C++: Switch vs IF
We all know the theory, that linked list are faster than vectors when it comes to insert and remove operation. Given the fact that I value proof more than anything, I decided to make a little benchmark in C++ . To objectively measure the running speeds I implemented the followings: Insert n elements by preserving ascending … Continue reading Linked List vs Vector
Almost every time I start a new C++ project I find myself in need of a precise timer to benchmark my code or for other fancy jobs. I decided to make, the code I use for timing, open source. It is a header only library compilable on Linux and Windows, very small, very basic. You … Continue reading Precise Timer in C++
This is actually a really obvious "issue" but I found that some developers (usually the inexperienced ones) simply don't think about this horrible source of bugs:). Now let's see the problem: https://gist.github.com/arpytoth/f8a43578f39de7ab378e If you run the code snipped above you will see an output similar to: The value of our int is: 1 The value … Continue reading The dangerous pointer to vector
As a VIM enthusiast I think that you can do a great job using a plain text editor + a terminal. Both Emacs and VIM are great tools with IDE like features, great shortcuts, nice plugins... I don't want to bash these editors. As I said, I like them and I use them every time, … Continue reading C++ IDE vs Text Editors ?