You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
- 3If a developer I was working with simply wrote "evil floating point bit level hacking" to explain the fast square-root algorithm - they'd get a talking to by me. So long as they included a reference to somewhere more useful I'd be happy though.Michael Anderson– Michael Anderson2014-09-01 03:56:24 +00:00Commented Sep 1, 2014 at 3:56
- 9I disagree in one way - a comment explaining how something bad works is a lot quicker. Given some code that is likely not to be touched again (most code I guess) then a comment is a better business solution than a big refactoring, that often introduces bugs (as a fix that kills relied-upon bug is still a bug). A perfect world of perfectly understandable code is not available to us.gbjbaanb– gbjbaanb2014-09-01 07:42:55 +00:00Commented Sep 1, 2014 at 7:42
- 2@trysis haha, yes but in a world where the programmers are responsible and not businesspeople, they'll never ship as they're forever gold-plating a constantly refactored codebase in a vain quest for perfection.gbjbaanb– gbjbaanb2014-09-01 14:26:43 +00:00Commented Sep 1, 2014 at 14:26
- 4@PatrickCollins nearly everything I read on the web is about doing it right first time. Almost nobody wants to write articles on fixing up messes! Physicists say "given a perfect sphere..." Comp.Scientists say "given a greenfield development..."gbjbaanb– gbjbaanb2014-09-02 07:26:32 +00:00Commented Sep 2, 2014 at 7:26
- 2The best solution is to rewrite it given infinite time; but given someone else's code base, typical corporate deadlines, and reality; sometimes the best thing to do is comment, add a TODO: Refactor and get that refactor into the next release; and that fix that needed to be done yesterday done now. The thing about all of this idealistic talk about just refactoring is it doesn't account for how things really work in the work place; sometimes there are higher priorities and soon enough deadlines that will preempt fixing legacy poor-quality code. That's just how it is.hsanders– hsanders2014-09-04 18:17:57 +00:00Commented Sep 4, 2014 at 18:17
| Show 3 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you