About 6,390,000 results
Open links in new tab
  1. refactoring - How to cope with bad code - Stack Overflow

    Aug 26, 2013 · Refactoring needs the safety harness of a unit test suite to remove that "Have I broken it?" feeling. Covering the bad code in a blanket of tests will help you whilst you strive for good clean …

  2. How do you tell someone they're writing bad code? [closed]

    If you haven't formally agreed upon code quality characteristics and a naming convention, then you can't rightly say that what they're doing is bad or wrong, but you could address it by calling it …

  3. 400 BAD request HTTP error code meaning? - Stack Overflow

    Oct 30, 2013 · The description of the 400 code is "the request could not be understood by the server due to malformed syntax " - so it shouldn't be used for validation errors, imho.

  4. What are magic numbers and why do some consider them bad?

    Here's a quote about magic number as a bad programming practice The term magic number also refers to the bad programming practice of using numbers directly in source code without explanation. In …

  5. HTTP status code for update and delete? - Stack Overflow

    Feb 26, 2010 · What status code should I set for UPDATE (PUT) and DELETE (e.g. product successfully updated)?

  6. Why should I not wrap every block in "try"-"catch"?

    I consider code that is littered with try / catch blocks to be a good target for code review and refactoring. It indicates that either exception handling is not well understood or the code has become an amœba …

  7. What HTTP status code should be used for wrong input

    400 Bad Request isn't bad but should generally be reserved for malformed syntax. OP seems to be more concerned about a case with well-formed syntax but invalid values. Plus 400 is a fairly common …

  8. Why is the 'if' statement considered evil? - Stack Overflow

    Oct 12, 2009 · Corey Haines, who proposed the subject, was convinced that if statement is absolute evil. His alternative was to create functions with predicates. Can you please explain to me why if is evil. I …

  9. What HTTP status response code should I use if the request is missing …

    Jun 16, 2010 · The 400 Bad Request, as Gert suggested, remains a valid response code, but I think it is normally used to indicate lower-level problems. It could easily be interpreted as a malformed HTTP …

  10. Is while (true) with break bad programming practice?

    Apr 10, 2016 · I think what you are looking for is a do-while loop. I 100% agree that while (true) is not a good idea because it makes it hard to maintain this code and the way you are escaping the loop is …