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 guidance.
Closed 10 years ago.
My manager never did refactoring. I once read Martin Fowler's book Refactoring and apply its tips on a module. So he want me to make a plan on refactoring existing project.The project has no unit-test and my teammates not know much refactoring. He insist me to make a schedule on the process, as to modify which file, how long it take, the final outcome, how many methods will be extracted...
I have recommend him the tips in how-do-you-refactor, but he wants a detailed plan.
Without unit tests, you can't really refactor with confidence. So start there. Don't set out to "unit test everything" or "refactor everything." Just quietly start wherever you are.
Eventually, the code you work on should be noticeably cleaner, which means it will be easier (cheaper) have fewer bugs and be cheaper to maintain & reuse. Those are the things your manager cares about.
Related
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 guidance.
Closed 10 years ago.
I've seen a lot of developers who move across VS almost quicker than you can see. A lot of it seems to be short cut keys. I'm a terrible hunt and find it in the menu. Is there a tried and test way of getting your speed up to dome of the VS masters? Is it just memorizing all those short cut keys. Maybe removing the menus so that you can ONLY use the shortcuts? How have others done it? Are there other techniques?
EDIT
I've seen a lot of the key-binding and key code lists. But its actually going about putting in practice so that its second nature.
This isn't my forte but... print out a spreadsheet, if you will, of all the shortcuts you think you might like to use.
Plaster it to your desk. Whenever you would like to reach for a menu, force yourself to go over this spreadsheet.
Slower at first, faster in the end.
(See the link below for a list of spreadsheets from Microsoft, though you may want to reformat the data there.)
Good luck sir.
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 guidance.
Closed 10 years ago.
I've been programming for the last 6 years. I just recently started my first degree in computer science. My work seems to be constantly marked down for different reasons, amongst many of them:
Uncommented code
Writing too long identifier names and methods
Writing too many methods
After working as a programmer for six years for numerous startup companies, and absorbing best practices which include the requirement to write "self explanatory code" I find it very difficult to go back to bad practices.
What can I do?
Self documented code is not synonymous with comments.
I've argued with many senior devs around this point. Code can go a long way in communicating intent but there are some things which simply cannot (and should not) be documented through code.
For example if you have a highly optimised function/method or chunk of code which is heavily coupled to the underlying problem domain and requires very specific knowledge of the business or solution. Comments are needed in these scenarios.
Yes, yes, comments come with there fair share of problems but this doesn't mean they aren't helpful (or mandatory in certain cases).
I can't tell you how many times I've read a colleagues line of code and thought "what the hell?!?" only for them to explain that they needed to do that due to some quirk of some library or browser we were targeting etc.
Comments are a mechanism for a developer to justify a design decision.
As for your other problems, they are subjective. How long is too long? How many is too many?
Point them at Microsoft's guidelines if you are on the MS stack or there will be countless articles for whichever language you're using...
Hope that helps.
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 guidance.
Closed 11 years ago.
I am wondering if it is feasible for me to use MVP or MVPC in game development, if yes then how it could help me produce more confined output.
MGD
In general, the MVC pattern doesn't really work for game development. There's usually not enough difference between what are normally models, views, and controllers in games that it usually doesn't make sense to separate them out. It's very hard to achieve the sort of separation needed to make a true "MVC" program.
That said, it's not entirely impossible. There's an excellent set of answers about MVC in game development in this question: Why are MVC & TDD not employed more in game architecture?
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 guidance.
Closed 12 years ago.
The programming language or The programming logic.....
Because both are equally important for good coding practice. And, please justify your answer.
What makes a program to be a good program?
Being able to address the customer needs and make him happy.
Programming language, programming logic, code style etc. are nonessential to the success.
The programming language doesn't have squat to do with a good program, you can write ugly code in C++ and elegant code in LOLcode and if they perform the same function nobody will care. Most important is that the code is bug free and performs its function.
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 guidance.
Closed 10 years ago.
I have a team lead who seems to think that business logic is very subjective, to the point that if my stored procedure has a WHERE ID = #ID — he would call this “business logic”
What approach should I take to define “business logic” in a very objective way without offending my team lead?
I really think you just need to agree on a clear definition of what you mean when you say "business logic". If you need to be "politically sensitive", you could even craft the definition around your team lead's understanding, then come up with another term ("domain rules"?) that defines what you want to talk about.
Words and terms are relatively subjective -- of course, once you leave that company you will need to 're-learn' industry standards, so it's always better to stick with them if you can, but the main goal is to communicate clearly and get work done.
One way to differentiate is that "business logic" is something the customer would care about and that could be explained to a customer without referring to computer-specific words.
You could try to argue your point with a timed example, run a sql select against an indexed table and then run a loop to find exactly the same item in the same set but this time in code. The code will be much slower.
Let the database do what it was designed to do, select sets and subsets of data :) I think realistically though, all you can do is get your team together to build a set of standards which you will all code to, democracy rules!