I’ve recently found a very interesting collection of terrible tips for C++ developers. Yes, that's right, they are terrible! And the coolest thing is that the book is both useful and entertaining.
Here are some examples from the book that made me smile:
• Real developers code only in C++!
• Disable compiler warnings. They distract from work and prevent you from writing compact code.
• Use invisible characters in your code. Let your code work like magic. That's cool.
• All old books recommend using int type variables to store array sizes and to construct loops. Let's keep it up! No reason to break with tradition.
• Undefined behavior is just a scary bedtime story for children. Undefined behavior doesn't exist in real life. If the program works as you expected, it doesn't contain bugs. And there's nothing to discuss here, that's that. Everything is fine.
• Never test anything. And don't write tests. Your code is perfect, what's there to test? It's not for nothing that you are real C++ programmers.
Of course, this is just sarcasm. Al the ″tips″ originate from the real-life cases and I liked it. To summarize, this mini-book is informative, entertaining, and easy to understand.
Book - https://pvs-studio.com/en/blog/posts/cpp/1053/