Hi dear reader, I'm Xavier Jouvenot and this is the sixth article about Code Craft, by Pete Goodliffe. If you want, you can look at the previous article about 'How to write comments', and you can find book here. Why should I even care about errors ? For a lot of programmers, as long as… Lire la suite How to deal with errors ? – When your program face the hard reality of the world !
Étiquette : Defensive Programming
Encapsulation as a defensive programming technique
Hi dear reader, I'm Xavier Jouvenot and, in this article, we are going to talk about Encapsulation, more specifically in C++, even if the concept can be extended to other languages. This post was inspired by a rule from the first chapter of Code Craft, by Pete Goodliffe, on Defensive programming What is it ?… Lire la suite Encapsulation as a defensive programming technique
Magic numbers and how to deal with them in C++
Hi dear reader, I'm Xavier Jouvenot and in this article, we are going to talk about magic numbers. This post was inspired by a rule from the fourth chapter of Code Craft, by Pete Goodliffe, on Defensive programming. What is a Magic number ? A magic number is a raw number in the code. This… Lire la suite Magic numbers and how to deal with them in C++
How to check every return statement in c++ ?
Hi dear reader, I'm Xavier Jouvenot and in this article, we are going to talk about how to be sure to check every return statement in C++. This post was inspired by a rule from the first chapter of Code Craft, by Pete Goodliffe, on Defensive programming Does it even really matter ? Actually, it… Lire la suite How to check every return statement in c++ ?
How to write proper comments ? – Code Craft
Hi dear reader, I'm Xavier Jouvenot and this is the fifth article about Code Craft, by Pete Goodliffe. If you want, you can look at the previous article about 'Self Documentation', and you can find book here. The chapter we will treat today, is named 'A Passing Comment - How to write Code Comments'. Back… Lire la suite How to write proper comments ? – Code Craft
Self-documentation
Hi dear reader, I'm Xavier Jouvenot and this is the fourth article about Code Craft, by Pete Goodliffe. If you want, you can look at the previous article about 'What's In A Name', and you can find book here. The chapter we will treat today, is named 'The Write Stuff - Techniques for Writing "Self-Documenting"… Lire la suite Self-documentation
Bug fixes and Defensive Programming
Hi dear reader, I'm Xavier Jouvenot and in this article, we are going to talk about we should add assertion each time we correct a bug. This post was inspired by a rule from the first chapter of Code Craft, by Pete Goodliffe, on Defensive programming. Small Recap on Defensive Programming For those who have… Lire la suite Bug fixes and Defensive Programming
To const or not to const
Hi dear reader, I'm Xavier Jouvenot and in this article, we are going to talk about const-correctness, about when and why you should use const keyword. This post was inspired by a rule from the first chapter of Code Craft, by Pete Goodliffe, on Defensive programming. The Const-correctness Principle To define what const-correctness is, we… Lire la suite To const or not to const
How can you check type limits in C++ ? And create your own limits 😉
Hi dear reader, I'm Xavier Jouvenot and in this article, we are going to talk about how to check type limits in c++. This post was inspired by a rule from the first chapter of Code Craft, by Pete Goodliffe, on Defensive programming. Why check type limits ? Let's start by talking about why and… Lire la suite How can you check type limits in C++ ? And create your own limits 😉
Defensive programming – Code Craft
Hi dear reader, I'm Xavier Jouvenot and this is the first article about Code Craft, by Pete Goodliffe. This article is the first of a series in which I will go through this book. It will make me improve as a software developer by resuming it to you, and make you learn about the subject… Lire la suite Defensive programming – Code Craft