This method is a bottleneck in my program. (Or, it is at least where most of the time is being spent.)
Its purpose is to calculate the similarity between two strings based on the way characters occur in both, or occur in one or not the other.
The code is correct, but I would like to optimize it. Do you see any inefficiencies, bad pract...
I'm new to functional world and appreciate help on this one.
I want to SUPERCEDE ugly imperative code from this simple function, but don't know how to do it.
What I want is to randomly pick some element from IEnumerable (seq in F#) with a respect to probability value - second item in tuple (so item with "probability" 0.7 will be picked...
I have a base class that declares a virtual function, and a large set of subclasses that inherit from the class, some of which may override the function. Now I need to alter the behavior of the base function (make it non virtual and move the overridable functionality to a different place), and I wonder if there's a quick way to locate al...
Hello,
I am looking for qa tools for php. I am used to pmd, findbugs and checkstyle in the java world. Do you know some similar tools for php doing code analysis ?
So far I have found but not tested yet :
phplint
pmd's cpd module
PHP_CodeSniffer
Thanks in advance for your help
...
Are there any tools (for C/C++) available to visualize the modules affected or the test cases to be executed when a block of code in changed.
Example,
If i modify few lines in a method of a class,
I should be able to get metrics on number of calling methods, affected modules.
Also If i have a traceability from Code-TestCase, can this...
These two functions have basically the same code. How can I factor it out?
public static String[] removeSuffix(String gA, String gB) {
String[] results = new String[2];
results[0] = gA;
results[1] = gB;
if (gA.equals("") || gB.equals("")) {
return results;
}
if (gA.charAt(gA.length() - 1) == gB.cha...
I want to try to make code reviews go a bit faster. While in VS, on a particular class or .aspx page or whatever it is, I can right-click a variable, method, property and use the Find Usages, that's still a very manual process and I wouldn't want to do this on every single method, property, etc. on a page...because most probably have no...
Has anyone come across a code review tool that integrates with Countersoft's Gemini?
I don't need anything too sophisticated. We have a relatively small development team of 10.
I'm not looking for yet another web app to log into, I'd like to assign code reviews tasks using Gemini (similar to the FogBugz/Kiln). We are currently using SVN...
mydata = [{'date': datetime.datetime(2009, 1, 31, 0, 0), 'value': 14, 'year': u'2009'},
{'date': datetime.datetime(2009, 2, 28, 0, 0), 'value': 84, 'year': u'2009'},
{'date': datetime.datetime(2009, 3, 31, 0, 0), 'value': 77, 'year': u'2009'},
{'date': datetime.datetime(2009, 4, 30, 0, 0), 'value': 80, 'y...
We have many WCF services, we have not been using contract first. So now we have a lot of code that throws exceptions, that are not specified in the FaultContracts.
Other than manually inspecting the code. Is there a way to generate FaultContracts or at least get a warning when a FaultContract is missing?
Thanks
Shiraz
...
We are going to interview some candidates over the phone and we need the candidate to write code (pseudo code). Obviously, asking the candidate to read the code out loud to us over the phone isn't ideal.
I wonder if there is any good platform to do this?
I know Facebook uses a simple program they wrote by themselves, and Google uses G...
From what I've gathered browsing SO, I'm the worst nightmare of good people like you: someone who never formally learned any programming, decided he'd like to enhance his hobby website, and bought a fast-track PHP book off the shelf and went at it.
Browsing SO has taught me a great deal of things, highlights of which include:
PHP is t...
We use Git as a revision control system for our code.
I need to setup a mailing list to help code reviews.
Each new commit to a specified subset of Git branches must be sent to the list as the full patch inside the post body.
List must support human replies as well, so all developers would be able to comment on the code.
I guess, I n...
I have a piece of Ruby on Rails code that has a complex SQL query (well, not that complex, but as far as I know beyond the ORM capabilities) and for my taste it has too many strings and harcoded values. I'd like to improve it as much as possible, so my question is open ended, what else can I do to improve it?
Some particular issues I ha...
Line numbers are great in the IDE when you are working with compiler errors - but they degrade overtime. In other words they change when code is added/removed/refactored and the line number that was used in a code review or stack trace may be in the wrong place.
Is there an alternative to using line numbers to identify specific lines of...
This is more of a general question so the answer does not have to be in C#. I have a general code structure below that I use to recursively walk a tree structure. In this particular case I am appending to a string builder object in each iteration.
Is there a way to improve this code to be faster or better?
public static void Recur...
Esp. if there is a very large code base and if the team is also doing some level of test-driven development, it is not practical and also does not make sense to do review of entire code-base. In such a case, how do we decide which parts of code to review and whether it is effective at all? This question is also related to 527259.
...
We write Java code, work with Eclipse but use TFS (through Teamprise) as a repository since vast majority of our company is .NET-based. Do you have an idea whether there is a tool supporting code review which works with both TFS as a repository and Eclipse as an IDE and isn't crappy at the same time?
Open source preferred, but any idea ...
My entire team works from a different geographical location and I am the only programmer working remotely. I often find it quite difficult to have my code reviewed, as people take very long time to give their comments (usually they are genuinely busy with high priority work and I work mostly only on low priority projects/task ) .The com...
I want to write a Windows add-on or application that adds the following function to any Windows text (code) editor:
I select one or more lines of code in the editor (existing functionality of the editor)
I right click and there's an "Insert Comment" choice which I can pick
I type my comment and then click outside the comment edit box
T...