I am going to put a list of most common programming errors and why some bugs are caused. This is also a learning process for me so if you have any suggestion that can improve the reliability of your program, please post it. Also, I should have put this under a user article but I'm a bit lazy so I don't want to read the guidelines, yet...
1) The use of = instead of == to denote the equality of two objects (no objects in C of course).
2) The use of & and OR instead of it's short-circuit equivalent (well, not completely equivalent).
3) The excessive use of global variables and global functions.
4) In C++, don't use using namespace std.
5) Forgetting the semicolon (A classic).
6) Random use of signed or unsigned integers.
7) Use of variables that do not reach a large enough byte number.
8) When defining variables, forgetting capitalization.
9) Forgetting opening and closing brackets.
10) Forgetting that a variable is not defined within a class.
11) Trying to alter a function without the use of a pointer.
12) Forgetting to assign a address to a pointer.
If you have things you want to add to the list, please post them. This is also a learning opportunity for me. Cause I mean, wisdom is the accumulation of experience. And I would love to gain some experience.
Ha, I know one: Forgetting to enable servos... :D
I mean general applications such as C++ and C as an entirety. I am not specifically referring to botball, but, yes, in botball, enabling servos is a common mistake, thanks. Oh, and, by the way. Check out, Jeremy Rand's informative article on enabling servos and disabling them. It is quite impressive.
Using uninitialized variables for decisions.
Forgetting to free/delete and malloc/new memory
Forgetting to check if a pointer is null
Equality comparison of floats/doubles with ==
Thanks, great tips, I can't believe I forgot them, especially the = and == thing.
I always forget the semi colon, I barely program, even though I really want to, but it never seems to compile the first time! It is always that semi colon.
Oh wait! I almost forgot ----> ;
Haha
Amanda
PDCMS
the worst one that I made, was forgetting the create_connect();, and adding a semi-colon after int main. :(
Forgetting to free/delete and malloc/new memory
192.168.1.1
192.168.1.1
192.168.1.1
192.168.1.1
These common mistakes of programming become a headache when you are finding for a problem and you don’t know where to look for. I had alot of trouble on my site due to programming issues and some of the Assignment Writers related to programming field point it out later that my sites have common mistakes like a single = instead of two ==. These tips are quite reliable and it’s a mistake every programmer made but with practice and a daily routine of work you can overcome this problem.
Thanks for tips. I need to print them out look through them every time I try to code. I'm so forgetful, brackets are my curse. Especially in JavaScript https://qubit-labs.com/hire-javascript-developer/
I'm new and I'm interested in this topic. Thank you!
sprint corporate