Is it possible to avoid enormously big switch in that case? [duplicate]
This question already has answers here: Refactoring Switch Statements and is there any real use for Switch Statements at all? (7 answers) Closed 11 years ago. I’m writing a simple chess-related code with intention to write it clearly (performance doesn’t matter at all). And this method I have doesn’t look clean to me at all: […]
Naming guard clauses that throw exceptions
I have a function evaluate()
that parses a String
for some variables and replaces them with their corresponding value:
Using the mouse as a multi-tool creates heavy conditional logic for executing commands, how do I change this?
The feature is in many different types of editing programs where a mouse click may have completely different commands to execute (using the Command Pattern)
How do I handle having so many SQL queries?
I have an MVC3 project that uses SQL Server.
Is it a good idea to schedule regular time to clean up code? [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for […]
Should a new class refactored out of an existing one have history pointing back to it’s progenitor
If I split one class into two classes should both classes have history in source control tracing back to the original class that contained both; or should the new class be added as a new file without any history tracing back?
Refactoring expansive message architecture
I am currently working with a system that acts like a message bus. A message comes in to the service (WCF Windows Service hosted). The system then uses a service locator pattern to look up which dynamically loaded assembly will be assigned to the message. The assembly is found and then a method is executed which handles the message. The response is then sent back to the client.
Hating your own code – for good or bad, how do you deal with it? [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for […]
When is it inappropriate to make objects immutable?
I have a class which represents an entity object in our system (for sake of argument, a Customer object)
Evaluating the complete revision of other’s software
I’m having some difficulty to evaluate the revision of a software: the software was paid by customer years ago, never used, and now the customer have noticed that it doesn’t work as expected.