-
July 3rd, 2023, 09:04 AM
#1
Terrible tips that sharpen your C++ coding skills
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.
-
July 3rd, 2023, 10:29 AM
#2
Re: Terrible tips that sharpen your C++ coding skills
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|