problem about code-quality-Collection of common programming errors
Ian Boyd
code-quality bug
Do other people fix bugs when they see them, or do they wait until there’s crashes/data loss/people die before fixing it?Example 1Customer customer = null;…customer.Save();The code is clearly wrong, and there’s no way around it – it’s calling a method on a null reference. It happens to not crash because Save happens to not access any instance data; so it’s just like calling a static function. But any small change anywhere can suddenly cause broken code that doesn’t crash: to start crashing.But, it’s also not inconceivable that correcting the code:Customer customer = null; … customer = new Customer(); try…customer.Save();… finallycustomer.Free(); end;might introduce a crash; one not discovered through unit tests with complete coverage, and manual user testing.Example 2float spee
ExplodingRat
c code-quality code-reuse
I’m rather new to C, and I’m wondering if code duplication is a necessary evil when it comes to writing common data structures and C in ge
magol
c vb.net code-reviews quality code-quality
This question already has an answer here:How do I choose what code to review?5 answersI have been asked to quality review two code bases. I’ve never done anything like that, and need advice on how to perform it and report it.Background
phant0m
dash-tom-bang
code-quality coding-style
I was involved in a programming discussion today where I made some statements that basically assumed axiomatically that circular references (between modules, classes, whatever) are generally bad. Once I got through with my pitch, my coworker asked, “what’s wrong with circular references?”I’ve
Leonid Shevtsov
javascript jslint code-quality
I’ve had numerous bugs happening just because of a missing return in a function. You see, when most of the code you write is in Ruby, it’s easy
galambalazs
javascript quality software-quality code-quality
I have been in the process of learning Javascript to complement ASP.NET. I have a strong background in general programming, and have always been an advocate of disciplined practices and good hygiene to reduce the error count in code.However, the language that Javascript is seems to make this very difficult. Its dynamic and interpreted nature seem to push error detection to the last point possible in the cycle. For example,
Emiliano Zilocchi
Makis
nimcap
javascript jslint code-quality
I am checking if a variable is defined or not, and if it is not defined explicitly I am going to define it by doing:if ( typeof(aVariable) == ‘undefined’ ) {var aVariable = value; }Because the variable is
Corey
code-quality bad-code refactoring maintenance
Conundrum: During the course of working on a new feature or fixing a defect, you find a legacy problem in code. What should you do? Fix it and risk altering the behavior of the code. It has either been working up until no
Originally posted 2013-11-09 22:42:50.