code-review

Don't monkey with the loop index

One of Steve McConnell's checklist items (pdf) is that you should not monkey with the loop index. This makes intuitive sense and is a practice I've always followed except maybe as I learned how to program back in the day. In a recent code review I found this awkward loop and immediately flagged it as suspect. for ( int i=0 ...

Best Peer Code Review Software

Following on from my query Here, does anyone know of any good Peer code review software? I am aware of Smart Bear's Code Collaborator (albeit a very expensive option) but can anyone recommend any tools that they use? ...

Where's a good place to post code online?

I've developed a set of small utility classes (a simple markup parser). I'd like to post them online somewhere, both to solicit potential critiques of the code and to make it available in case someone else has use of it. I've looked at RefactorMyCode.com, but it doesn't seem to be well suited to posting code that spans multiple classes...

Are there any code review websites that support C# and VB.NET? Similar to www.pastie.org?

Are there any free web-base code review websites, similar to pastie.org, that supports both C# and VB.NET? I think this is a great tool for looking at code, but it's pretty much worthless to me without C# and VB.NET support. Update Here is a related question http://stackoverflow.com/questions/1542/online-peer-code-review, but again...

Comparing object properties in c#

This is what I've come up with as a method on a class inherited by many of my other classes. The idea is that it allows the simple comparison between properties of Objects of the same Type. Now, this does work - but in the interest of improving the quality of my code I thought I'd throw it out for scrutiny. How can it be better/more eff...

What kinds of things do you look for when reviewing someone else's code before a code review/inspection?

Do you look for anything in particular, or just read the code carefully and just find what you find? ...

Places you can ask for quick code review?

Learning how to unit test in my own time though is providing me with further insight, I'd often would of liked to have someone there saying that I'm indeed going in the right direction with my tests. Doing this by myself (and being the only developer at my company actively looking into unit testing) I get no privilege nor do I have cont...

What should be done first: Code reviews or Unit tests?

Hello, If a developer implements code for some module and wants to get it reviewed. What should be the order : *First unit test the module after designing test cases for the module, debugging and fixing the bugs and then give the modified code for peer code review (Pros- Code to be reviewed is 'clean' to a good extent. Reduces some a...

Google Code Reviews

Has anyone successfully used Google Code Reviews? I'm interested in using it for our code review process and setting up notifications whenever code is checked in so that it can be reviewed. I don't see many settings that allow me to set this up. Am I missing something? ...

Is it possible to show all methods and their access modifiers?

I am doing a code review on some large class libraries and I was wondering if anyone knows of an easy easy way to generate a list of all the methods (and possibly properties/variables too) and their access modifiers. For example, I would like something like this: private MyClass.Method1() internal MyClass.Method2() public MyOtherClass.M...

What are some signs of code smell?

Duplicate: What are Code Smells? What is the “best” way to correct them? I was just curious about what kind of items cause developers to go "Oh, this code smells off", either language-specific or -agnostic. I know some that personally make me flare my nostrils are Nested ifs (low readability, probably too complex); Pointers (do ...

Trouble in F# Land with map

Ok. I'm not asking for a plssendcodezkthx. But I am somewhat new to FP and I'm trying to figure out how to do this, because I know the code I have won't accomplish what I'd like to achieve. So all arguments about optimization aside, here is my code Then I'll explain. let moveBoids boids = boids |> List.map (fun(boid) -> let...

Is the Bookmarklet Password Generator from SuperGenPass.com safe to use?

I reviewed the 981 lines of code for the current version of http://supergenpass.com and did not find anything, however I could have missed something. I just want to confirm that it does not transmit anything so I can use it and suggest it to others. I already use KeePassX to store passwords and other information. And I like the theory be...

Online Software Development Apprenticeship ?

Question: Is there anywhere online where someone can apprentice as a software developer and have an expert work with them, review their code, and guide them as a journeyman would in the trades? (Obviously I do not expect such a service for free) Background: I am a fairly recent graduate of Computer Science; I have worked for 1 software ...

ThreadPool Best Practices, Correctness

Hey everyone. I've been working on some code for a while that would spawn threads when needed, but decided a simpler and more effective solution would be to create a thread pool. It's implemented with a queue I made that has conditional waits on queuing and dequeuing. The only reason I'm posting this, is because I'm getting some weird er...

Factory pattern

I've been trying to create a factory (in Java) that prohibits subclassing of the factory product and prevents the concrete factories from being used by anyone except the abstract factory. What do you think of this... class Client { public static void main(String[] args) { Animal animal = Animal.create(Lion.class); ...

How popular are security code reviews?

Real world, how many here undergo in-depth security code reviews? Those that do, how often - once a quarter, once a version, once a blue moon? Those that don't - why not? (Not referring to small or hobby programmers - not that I'm trivializing them, its just I don't expect them to ;-) ). As a security consultant, I'm usually the one cal...

CMS with strict Code Review for Add-Ons?

Some popular CMSs have a huge number of add-ons and try to fix every security problem as quickly as possible, without hiding. They end up with a lot of security announcements. This seems to be the wrong way, because they distribute broken code and fix it after that. Not intentional, but that's the picture this is painting. Are there an...

Analyze Project using Sourcemonitor

Hi all, I've been recently asked to analyze a project and identify 20 classes that are highest at risk based on the design metrics. I've began analyzing the project and i've decided to pick out the classes with the highest maximum Complexity. Should i be looking at anything else besides max complexity. i.e. number of calls, statements...

Is a debugger the mother of all evil?

Some say that a debugger is the mother of all evil. What do you think of this approach? I have a friend at work, a colleague, who's completely against using a debugger whatsoever. I asked him: So, you just write code without bugs? Is that it? He answers: Of course not. Everyone makes mistakes, the difference is how you deal with them ...