473,573 Members | 2,558 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Terrible tips that sharpen your C++ coding skills

1 New Member
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/
Jul 3 '23 #1
3 23056
13 New Member
I agree, that sounds like a very entertaining and informative book! It's always good to have a laugh at the expense of bad practices, and it sounds like this book does a good job of that.

I also like that the book is based on real-life cases. This makes it more relatable and believable, and it also helps to show the consequences of following these bad practices.

Overall, it sounds like a great resource for C++ developers, whether you're a beginner or an experienced pro. I also agree with your point that it is important to test your code. Even if you think your code is perfect, it's always possible that there are bugs lurking in there. By testing your code, you can help to catch these bugs early on and prevent them from causing problems down the road. Here is another resource that you might find helpful.
Sep 5 '23 #2
1 New Member

Polycarbonate is a versatile and durable thermoplastic material that is commonly used in various industries and applications due to its unique properties. Here are some key characteristics and uses of polycarbonate:

Transparency: Polycarbonate is known for its excellent optical clarity, making it a popular choice for applications where transparency is essential. It is often used in the production of eyeglass lenses, safety goggles, and clear windows.
Sep 11 '23 #3
988 Recognized Expert Contributor
Hello Anastasiia123,

Perhaps you ought write a book called C++ worst practices.

My "best" practices include enabling all warnings and treating them as errors.

Four people tried to get me fired for that. I was creating errors in their code. . .

Let us embrace the worst, it is for the best.

[snip - rant about success oriented programming]

Apr 17 '24 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Eakin, W | last post by:
Unlike a coding question, which may have a definite answer, this deals more with opinion. As I continue my studies of PHP and MySQL, and get to the point of being able to use them in a work environment, I look at the job sites (Monster, Dice), and no-one, asks for just one skill. Therefor, what other skills will complement best my...
by: Raed Sawalha | last post by:
I've been developing since year ago , I noticed that I developed my programming skills in first 6 months then , my coding style and strategy been the same, so what you advice me to develop my programming skills and development strategies
by: oo7nij | last post by:
Hi all, I have been given an assignment of creating an application that must do the following: 1.) User inputs\sends WML scripts using a normal web browser that has functionality and appearance of a WAP browser 2.) The WML scripts must then be verfied somehow as being genuine WML language 3.) The WML is then stored in a database, most...
by: Tyno Gendo | last post by:
Hi everyone I wondered what if any methods people here use to speed up their PHP code (ie. speed at which you produce your code). Things like 'code templates', 'base objects' for this and that? I thought it would be interesting to find out if I'm missing out any anything cool that could aid in speeding up development.
by: zzzmail.01 | last post by:
I find some useful tips about C/C++ and want to share with you. Sorry if it bothers you. Tips for better Coding Style: http://tmh-coding-tips.blogspot.com/2008/09/cc-guidelines-for-better-coding-style.html Tips for better Memory Management: http://tmh-coding-tips.blogspot.com/2008/09/cc-tips-for-better-memory-management.html Tips for...
Eli Lopian
by: Eli Lopian | last post by:
It's easy to get bored writing code day after day. This is especially true when you aren't building a new application from scratch but rather are coding bug fixes and minor enhancements. It's up to developers to challenge themselves and build the skills that will keep their jobs interesting and motivate them to get out of bed every morning. Here...
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool that can be used to create mobile, web, and desktop applications that can be used to automate tasks, improve efficiency, and increase productivity. However, in order to get the most out of PowerApps,...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.