Tag Info

New answers tagged

7

Use the entire method signature to specify your intent, not just its name. Method names should represent verbs not phrases. Your method signatures can be written as: Get(object id) Get(Date day) Update(object id) Get(string name, string surname) Get(Filter filter) Get(string name, string surname, Date day, string country) Get(Date greaterThan); Get(Date ...


1

There is no reason you can't apply clean code principals to Javascript. You just need to do it. There are code metrics you can use like https://codeclimate.com/github/jquery/jquery but there a double edged sword. Structure your code base, DRY your code, apply SRP. Javascript is no different then any other language. Standard rules of thumb apply like "If ...


1

I know what you are talking about and have faced the same problem where chaining functions, getting data from HTML elements etc creates a clutter in your codebase and refactoring it could be a huge pain as well. Even if you use MVC frameworks out there but you don't organize your code correctly you will still end up with a messy codebase. What I have been ...


3

No. There is no such thing as a flawless program, so don't aim for that. What you should aim for in for a first release is good/thorough documentation, some automated tests, one or more places for people to tell you about any problems they have or features they'd like to see, and a clear/prominent description of what your program library is and is not ...


0

Clean code for my understanding is to adopt standards which allows you to keep correct naming inside the code, correct function and class sizes, on over all a good usage of OO practices. This takes time and it is hard to get it write the first time you write your code. So you must be able to refactor. The only way I know you can safely Refactor code, is if ...


0

I would recommend not only dev testing the code but also QA testing it with a few scenarios before passing it on for actual QA testing. Yes, dev testing takes a bit of time to complete properly with useful comments and such. However, you should look at this as a long-term investment. You won't see results in a week or even a month but over a course of time ...


0

Many (but not all) coding style / safety issues can be caught with tools. Also, tools can be configured to signal a certain subset of infringements. You and your team members should agree upon two sets: (1) should never occur (2) might occur under certain conditions. All team members should submit code that does not generate warnings by set 1. Team leaders ...


4

You let the team review each others code. Use your team leaders to spot check at random. This means the team is part of the solution, becomes more involved in the whole process, and spreads the task so its achievable. Invest in a code review tool such as reviewboard or redmine's plugin to help make reviewing easier and quicker too.



Top 50 recent answers are included