PDA

View Full Version : Majority of bugs we face as developers



charlesprabhu
10-31-2022, 07:30 AM
Let’s go through each one, and discuss a simple way you can fix your code fast!*****
​​​​​​​
Formatting Errors - These are common and sometimes really hard to notice. Check online if there are linters online or for extensions, whether it’s JSON, HTML, Python, or JavaScript. Some linters may display better error messages than your code editor would alone.

Syntax Errors - For syntax errors, linters also come in handy, but so does referring to the documentation! If you’re pulling code from an outside source, such as for API calls. Simply check that you’re calling it correctly in the first place.

Spelling Mistakes - Not only are these annoying but they can also be embarrassing! If you feel like your code is absolutely correct but it’s still not working, here’s a reminder to check the spelling. Sometimes you add or miss an extra letter and it will throw everything off!

Missing Libraries - How many times have you tried to run code only to realize your editor had no idea how to even run the code? Missing library messages will usually tell you upfront the system has no idea what the heck you’re talking about. BUT, that’s doesn’t mean they can’t be sneaky from time to time. Always double-check to install your libraries whether it’s with pip, npm, bundle, or more.

SamHobbs
10-31-2022, 08:42 PM
What is the difference between a formatting error and a syntax error? Compilers typically do syntactic then semantic processing of program source code. Is a formatting error a semantic error? Probably not. Format sounds more like syntax. Also, I think spelling mistakes would be caught by the compiler's syntactic processing, but I have not written a compiler.