I'm so bored with the way I have to open my colleague's changesets and right click on a specific file and select "compare with previous/latest version" - only here will I reach the compare dialog !
I want this dialog as a side-by-side pane when viewing the changeset so that I can see quickly what changes my colleagues have made to the f...
Hi all.
I'm looking for an ebook about Code Review specifically for .net applications.
Any Suggestions?
...
Looking on some source code I've inherited, there's a snippet of code that calls a SQL stored procedure making an Update.
The stored procedure returns -1 in case something goes wrong:
IF @@Error <> 0
BEGIN
ROLLBACK TRAN
SELECT -1
RETURN
END
COMMIT TRAN
SELECT 0
The C# code is something like this:
...
I want to make my code look cleaner and 'express its intent' more..
The following method is reflecting over two types and checking that if there is a property in one type, then there is a corresponding property of the same name in the other type. If there is then it sets the value of the property to the index variable. otherwise it thro...
What's the best way to check zend code standard? I'm thinking the PHPCS (PHP Code Sniffer) not efficiently because it not complain about php doc and many other things :(
Doc: http://framework.zend.com/manual/en/coding-standard.html
...
I'm currently working on a GAE CMS project and one thing that's been troubling me quite a bit each time I trying something new it's the fear of "I'm a doing this right".
What I'm looking for is idea/links of getting my code review by the public. I've found one site Refactormycode.com that I like. But from what I've seen soo far it's mo...
Having an iterator object, is there something faster, better or more correct than a list comprehension to get a list of the objects returned by the iterator?
user_list = [user for user in user_iterator]
...
I've been interested in the problem of finding a better prime number recognizer for years. I realize this is a huge area of academic research and study - my interest in this is really just for fun. Here was my first attempt at a possible solution, in C (below).
My question is, can you suggest an improvement (without citing some other...
How do you determine what the cycle cost is for a given C library function?
Specifically, how expensive is it to call sqrt()?
I should clarify here, I'm just looking for a general idea of the cost associated with calling certain C library functions. I'm assuming that professional C programmers just have a basic idea of function cost f...
Hi.
As part of a code review, I need to review all the changes made by a single person to an svn branch. Is there a single command that can do this? Or will I have to just go through each revision marked with their name one by one.
...
Hi guys,
I have this curl request below, which was successfully troubleshooted in another post. Right now, my PHP seems to work through this code without any errors, moves onto the next part of the IF statement and sends the confirmation email. It just doesn't update the database as it should from the web service. I will have to email ...
I've had an epic google on this topic and also looked long and hard through the suggested answers to this quandary so please I just want some concrete advice if such exists. Here's my situation. I work as the sole developer at a very small company, my boss used to hack a bit of classic ASP but no longer uses and thus has lost most of his...
I'm working in a small development time with very limited time for development. We develop a tool that is important for the result of our work, but not used daily. I am the only person in the team that has a background as a programmer.
My problem is that I have been pushing for code reviews before merging back to trunk for over a year. ...
Possible Duplicate:
Do you finalize local variables and method parameters in Java?
In its default warnings, PMD is telling me to mark all of my method parameters with final. This seems to be obvious and redundant. Should my code be littered with the final keyword? Why?
...
I've read a lot of Refactoring literature as of late and a common theme I see in examples is the reduction of lots of IF statements. The below is a very simple code block that first checks to see if an email address is supplied and if so, then proceeds to validate the email address. I typically see a lot of this type of code which always...
I'll soon have to review a bolt-on to our existing site, which has been written by an outside developer. While I've been made to squirm over my own code before now, and I've reviewed individual methods or classes, I've never been faced with reviewing what's essentially an entire application. I need to cover both code quality and UI quali...
What would be the best solution for this problem??
if we have a question say by the pythagoran theorem.
x^2+ y^2 = c
then according to that if we are given the value of c, what shall be the best way to deal and find the values of x and y?
x and y can be negative.
Also, suppose c=0 then x=0 and y=0.
Moreover, if we have c=1 then we hav...
I have a question for everyone. I have this problem statement where in given, x^2 + y^2 = c is the equation, you have to optimally find the tuples (x,y) such that the equation holds true.
Given a variable c, whose value is known, you have to find the values (x,y). So suppose if you have c=0, then x=0 and y=0. Suppose you have c=2, then...
Dominator is a value which occurs on more than half positions in an array. For instance in the array:
[3, 4, 3, 2, 3, -1, 3, 3]
5/8 > 0.5
The value 3 occurs in 5 out of 8 positions. , so 3 is a dominator:
In this array the dominator occurs on indexes :
0, 2, 4, 6 , 7.
Write a function
int dominator(int[] A);
that given an array return...
I had this coding question in an interview.I couldnt find an optimum solution to this.
what I did was,
for(i=0;i<n;i++)
for(j=i;j<n;j++)
if(a[i]+a[j]==k) print a[i], a[j]
But that would give rise to a O(n2) complexity.
Is there a better way to solve this??
Array A contains n integers. A pair (i,j) of indexes of the array A is called ...