views:

3577

answers:

7

For people who work on very small teams, or by themselves, or on teams where they are by far the best developer and have a need to learn from someone better than them, are there any online resources/methods for doing some sort of peer code review?

I used to be pretty active in the online art community (specifically drawing anime) and there were all sorts of sites where you could just post pictures for critiques and comments. I've never seen anything like that for programmers. I'm thinking of somewhere where you could post Object Architecture plans, DB design plans, or even just straight code for others to look at, learn from, and critique and comment on. Anyone know of anything like that anywhere (preferably focused towards PHP, but anything will do, and even a non-free site would be ok)?

Thanks!

note: yes, I am aware that this could have security implications, but security by obscurity is the worst security, and posting your code would actually help flush out potential security issues...

+37  A: 

If you can't open source your project (the best way to do a massive distributed code review), there are a number of resources out there.

Here's an writeup about a tool called Rietveld authored by Guido van Rossum.

There is refactormycode.com which Jeff has used before in the Stackoverflow blog.

I found Code Collaborator by following ads from the Coding Horror but I have never tried it myself.

For django specific code, there is djangosnippets.org

But do consider that for your small team, especially if you are the most experienced developer in your group, in person code reviews are incredibly valuable, and when you use an automated approach you lose some of that value. The kinds of things you learn from in-person code reviews (tricks, techniques, elegant styles, different ways to solve a problem) may often be unrelated to the code you set out to review. In addition, everyone will learn something, not just the junior devs. If possible, I recommend you do in-person code reviews with your team.

Justin Standard
+3  A: 

The whole Free Software and Open Source community :)

Release even the smallest of programs and eventually somebody will point out your bugs either in the form of a patch, polite note or gentle nudge or an insulting email pointing out your dubious parentage and lack of skill.

sparkes
Only if your code is in a mainstream language. If you release code in languages with smaller communities (as I have), it can fall on deaf ears.
Jacques Carette
A: 

It looks as though Jeff used refactormycode.com only twice:

http://www.refactormycode.com/users/648

Does anyone have a lot of experience using it?

Zack Peterson
I only used it once and no one has yet refactored my code. (Also, it looks like Perl isn't a big favorite there.)
Ali Nabavi
+4  A: 

Why not just use Stackoverflow? Post asking for people to find flaws in the code and the problem should be solved.

Teifion
I think that would be cool but other people on here don't seem to think so.
Ali Nabavi
+8  A: 

Don't forget Review Board.

Jordi Bunster
If only it were hosted somewhere then I would definitely use it.
Ali Nabavi
We tried Code Collaborator, then we tried ReviewBoard. I really wanted to like ReviewBoard, as it was free, and it was 2009 and I worked at a company where there were no raises that year. Code Collaborator was really that much better. Coming back to it felt SOOOO good. It's got a much more "complete" feeling, and has great workflow. ReviewBoard is a fine tool, for what it is. But Code Collaborator really was much better.
Chris Thornton
A: 

Another currently very simple code review tool which you may find useful is one I have been working on at http://codereviewapp.com - it doesn't integrate with your code repository, but it does have a colored diff viewer and reviews are private (viewable only by people you invite). It is currently very much beta but I am trying to improve it all the time.

Stephen ODonnell
A: 

Noone has mentionned Crucible which is powered up by the same team that created Jira. It's an awesome tool that is completely free for non-profits / open-source projects but fairly expensive for commercial projects.

It's personnaly the best I've used amongst all I've seen.

m_oLogin