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.
- 2First, all answers here are good and helped me. This answer was not high voted or commented, but I really like it. I think that point of asking a lot of questions and not going on defensive are very important. I talked to my boss about some points I mentioned here, and as expected, I don't have the power to do big changes, but I feel that a bit will be changed for better after that. Thank you, S. Robbins and the others for the wise words.Renato Dinhani– Renato Dinhani2012-04-16 12:46:40 +00:00Commented Apr 16, 2012 at 12:46
- 1Well I did that once, and succeed at it. It is exhausting. I'll never do that again. This is really hard : you can't unittest BEFORE refactoring, code is weak so is likely to explode on your face at any moment, and you will face a very important resistance due to people's working habbits (among other problems). I know work only for people that care about code quality.deadalnix– deadalnix2012-06-12 08:33:14 +00:00Commented Jun 12, 2012 at 8:33
- 1@deadalnix First jobs rarely offer the opportunity to choose the people you work with. Often you won't know how much people really care about code quality until you've worked with them for a while. My answer helps the OP understand this. Your statement about an inability to unit test before refactoring is patently wrong. Trying to refactor before unit tests increases overall risk. Chasing bugs without tests is inefficient and exhausting. People who care about code quality focus heavily on tests and clean coding technique. I don't get your implied objection, happy to chat about this offline :-)S.Robins– S.Robins2012-06-12 09:13:23 +00:00Commented Jun 12, 2012 at 9:13
- @S.Robins Chasing bug without test is inefficient and exhausting and refactoring without unittest is very risky (and both combine nicely). This is exactly why such a situation is a nightmare. Massive legacy codebase aren't usually unittestable (full of global states, hardcoded dependencies on production system, or on other systems, no separations of concerns, massive code repetition, etc . . .). You'll have to go throw a first refactoring pass to make the code unittestable. I think we both agree on the coding aspect of the problem, but misunderstood each other.deadalnix– deadalnix2012-06-12 09:38:59 +00:00Commented Jun 12, 2012 at 9:38
- 1It's also an opportunity to gather content for thedailywtf.comArkh– Arkh2012-06-12 10:23:51 +00:00Commented Jun 12, 2012 at 10:23
Add a comment |
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