code-review

Code reviewing site

Possible Duplicate: Online Peer Code Review? What sites if any exist where it's possible to post code and have it reviewed by other users? ...

An algo for generating code callgraphs

I am working on a project which requires generating some metrices of a code (it can be C/C++/Java/Python). One of the metrices can be that I create a callgraph after parsing the code entered (the programs are expected to be small - probably under 1000L). As of now, I am looking for a way to create a program (it can be C/Python) which ca...

Python: Is this an ok way of overriding __eq__ and __hash__?

I'm new to Python, and I wanted to make sure that I overrode __eq__ and __hash__ correctly, so as not to cause painful errors later: (I'm using Google App Engine.) class Course(db.Model): dept_code = db.StringProperty() number = db.IntegerProperty() title = db.StringProperty() raw_pre_reqs = db.StringProperty(multiline=...

Can you review my simple SQL database and perhaps provide some feedback on things I may have overlooked? (7 Tables)

Here is the SQL script: create table Employee( Carnet nvarchar(15) primary key, Name nvarchar(500), LastName nvarchar(500) ) create table Document( ID nvarchar(20) primary key, Employee nvarchar(15) foreign key references Employee(Carnet), Project nvarchar(20) foreign key references Project(ID) ) create table DocumentsArea( DocumentID...

Is leaving comments on code a thing of past?

When i started my carreer i have been instructed to (properly) comment each and every module that i write. Instructing what a method does, how its parameters are used, and what to expect in return etc. Then with almost 2years of doing so i started visiting legacy codes with misleading and/or useless comments. And in the process i used t...

What can you catch in a manual code review that static code analysis tools cannot?

What do you look for during code walkthroughs, inspections that regular static code analysis tools like FxCop, VS Code Analysis plugins cannot. ...

Merging changesets in git for a code review

I have around 50 relevant commits on my local git repo, of this list I want to show in a code review only my commits. But they are mixed with other people commits, and some of my commits are corrections to others, so I don't want to go commit by commit because I would step twice in the same code, for the original and for the correction. ...

Better way to see if an array contains an object?

I have an array of items (terms), which will be put as <option> tags in a <select>. If any of these items are in another array (termsAlreadyTaking), they should be removed first. Here is how I have done it: // If the user has a term like "Fall 2010" already selected, we don't need that in the list of terms to add. for (var i = 0...

What code metrics\guidline you are using?

I am using code complexity metric, and line of code(per function). This keeping the code short and readable. What code metrics you using? ...

Commit Early Commit Often With Code Reviews?

Hi, I'm looking for advice/experience/best-practices on how to get a team of developers engaged in a commit early commit often work paradigm while still benefitting from a thorough code review process. We currently use review board and it is policy that no code be committed to SCM w/o a peer review. While I completely embrace code revie...

How easy is it to port ASP.NET MVC to Silverlight application and vice versa?

I was thinking of writing a client application in ASP.NET MVC first to make it available over the net to everyone. In the near future I'd like to port it to Windows Phone 7 using Silverlight. How much of the code can I re-use from ASP.NET? Would I have to completely rewrite it? Thanks in advance! ...

PHP how could I make this class better? Suggestions/Feedback welcome

Best suggestion will be the accepted answer Class: <?php class LogInfo { private $first_run; // Flag to add line break at the beginning of script execution private $calling_script; // Base name of the calling script private $log_file; // log file path and name private $log_entry; // inform...

My Python Program Files cleaner, a better way to write this?

Similar to my other post I have created a new little utility and wanted to get some feedback if there is a way to make my script more Pythonic per say. It is a simple tool for Windows that removes empty directory from the Program Files directory because sometimes programs leave behind an empty directory when they uninstall. import os d...

Dead tree code reviews

At my shop we do out code reviews in person and by printing out all the code on paper. Printing out all those .h and .cpp files are a pain, and getting them in order is more of a pain. Is there any sort of program that will take all the files, print them out all at once and in order(specified by user), and include the line numbers and c...

How to show general comments on function overloads.

I have created a function with some overloads. Now I want to add comments for each overload but not repeating summary content again and again. I only want parameter description to be given. i.e. /// <summary> /// Binds Control With DataTable/DataSet Passed as a Parameter. DataTable/Control Should not be NULL. /// </summary>...

searching for a free and trusty js and php code review tool

hi, i'm looking for a free tool, which i can use local to do javascript and php codreviewing. if it's even easy to install you'll be my hero! any experiences, preferences, suggestions, commendations? thanks in advice. p.s.: if there is no adequate tool which can handle both good enough, i will be happy with a combination of two tools...

Groovy Scripting - Regex Replacements - Code Review My Script

Use Case: Take an HTML file with comments in a specific format (a format I specified), and change it to a JSP page that fills in these special areas with custom JSP code. Simple Example: <html> <!-- start:custom-title-content --> <h1>this is the generic title content used to develop the HTML page</h1> <!-- end:custom-title-content --...

Critique my prime_factors() function

I just wrote this function to break a number into its prime factors. Is the algorithm I'm using a good one? How might I improve this function? So far it seems to be working quite well. from copy import copy # Decorator to memoize using the first argument only @memoize_first def prime_factors(n, prime_list=[None], prime_limit=[None]): ...

Best way to code review my own single developer project?

I have a medium small open source project that I am wanting to release, but first I would like to do a code review to check to make sure everything works and, most importantly, makes sense. I already (sorta) do the first part by having my own implementation of the project that I use heavily. But the second part is more tricky. How can y...

Qualities of Code Reviewers

When choosing code-reviewers for your project what qualities you see/prefer in the candidates (the one who does review)? # of years of experience? time availability (not selecting very busy guys) one whose code gets least comment senior junior ladder (juniors can't do seniors code review) inside team or someone outsider ... ...