How often do you make syntax errors?

Sorry there is no polling option, so you can just type your number without comment (but it won't be anonymous).

1. Never (I'm just gifted this way)
2. Never (I always check each line carefully before compiling)
3. Rarely (and I don't double-check)
4. Rarely (even though I do double-check usually)
5. Sometimes
6. About half of the time I compile I see syntax errors
7. Usually (I'm just too lazy to proofread)
8. All the time (don't ask me why)

I'm a 6. Lazniness to double check is usually the reason. I figure the compiler can do it for me and point out my syntax errors rather than me checking it over myself. However, I get punished when my syntax error by chance is compiled anyway (I guess you wouldn't call it a syntax error then, but you know what I mean--I typed the wrong thing by accident), thus I got to force myself to check every time. Ideally, I want to be able to never need to check.
Last edited on
If you include only syntax errors, it is 3
If you include template deductions and ambiguity errors, it is 5
If you include all the code I fix (fro this site for example), it is 7 — Try to compile, see where first bunch of errors is, fix it, repeat.
> 8. All the time (don't ask me why)

You may ask me why: far too many typos.

The most common (about 90% or so) being omitting to to type a character. (I touch the keys very softly; some of them just don't register, usually when a shift key is also involved.)

The compiler goes mad when it sees std:size_t (clang++ helpfully asks: did you mean '::'?)
I touch the keys very softly; some of them just don't register
That is why I got mechanical keyboard.
I'm either 7 or 8 depending on what you mean by "All the time". If you mean every time I enter a new line of code, then no it's not nearly that often. But I have never gone a day in my life without making several typos in my code. I think it's because I relay on muscle memory to do my typing so if for some reason my left hand goes faster then my right at that moment then I end up with stuff like "std:c:out".

Don't even get me started on the differences in key-spacing between stations, I feel half retarded when ever I have to switch keyboards. Also, I hope there is a special circle in hell just for the idiot who decided that the backspace and\or the return key should be the same size as every other one on the keyboard but only on specific models.
@JLBorges. I'm very surprised by your answer, considering your level of genius. Of course, the two aspects are not really related. But we must all appreciate the editting you must go through to make all your solution codes compile in these forums.

Typing : instead of :: is common for me too. Worse is typing = instead of ==, which actually sometimes compiles. In terms of error message volume, the greatest punishment I usually see is when I cout with a string and type << instead of +, but I guess these are not typos. But spelling mistakes--the most common typo (for me at least, since my variable names tend to be long so that I fully remember what it is meant for).
Last edited on
To fix typos, one edit is all that is needed; and it takes less effort to let the compiler locate and point them out.

I like to have a first real re-look at the code after it has compiled cleanly; that lets me focus on the semantics/logic without getting distracted by typos that are to be fixed. And I compile early, and compile often; as soon as some meaningful lines of compilable code is written.
6/7, sometimes 8. Typos usually.
Worse is typing = instead of ==, which actually sometimes compiles.

If you have problems with = instead of == you could always swap the order like instead of someVariable == 12 you could do 12 == someVariable that way if you accidentally put assignment instead of comparison you will get compiler errors. Though I wouldn't really recommend it since it can make your code pretty obfuscated.

*edit fixed code tags.
Last edited on
If you are using GCC, you can use -Werror=parentheses to make warnings resulting from assigment in condition into errors (it can be suppressed by adding [another] parentheses around assigment)

you could always swap the order
Yoda-style programming :)
4-5 if it is a simple concept. 6-7 for new concepts that I'm testing out or learning.
Topic archived. No new replies allowed.