code-review

[PHP OOP] Review some code?

Hi Guys, Had a bit of spare time to learn some OOP in PHP this evening and hit a brick wall. I am creating a little book library app to keep track of my book collection and thought I would use OOP for practice. I have a main php file called library.php that contains 2 main classes so far. class database (connects to mysql, database ...

Best Method for Printing .NET Source Code

I have an old skool professor that requires that we print out all of our project source code for him to review. I am writing this app in VS 2008 and the solution contains a C# Web App and several Class Libraries (consisting of probably 100 files total). Anyone have experience with a good method of printing out many source files like th...

Does anybody have a code review checklist for annual reviews?

I have a software engineer that I supervise and management needs a "code review" as part of his annual review. I'm thinking that there might be something out there that could help with this. Something along the lines of a list of categories and maybe a rating (1-5?) in each category with a space for comments. Categories that I'm thinking...

Improvements for this C++ stack allocator?

Any suggestions for my stack based allocator? (Except for suggestions to use a class with private/public members) struct Heap { void* heap_start; void* heap_end; size_t max_end; Heap(size_t size) { heap_start = malloc(size); heap_end = heap_start; max_end = size + (size_t) heap_start; } ...

Feedback on my first Objective-C code (a QuickLook plugin)

I've written a fairly simply QuickLook plugin, which displays the files of a .torrent file, The complete code is here on Github, and the main file is torrent.m The reason I'm looking for feedback is it's acting slightly weirdly.. After building/installing the plugin (into ~/Library/QuickLook/), and running.. qlmanage -r; qlmanage -p ~...

Is this a good way to factor DragDrop logic out of a control?

I was recently adding some drag/drop functionality to a usercontrol that I'm creating, and I decided that it made sense to factor the specifics of drag/drop out for subsequent testing, etc. The core logic is in DragOnMouseMove<TInput>(). (Formatting trimmed for brevity) internal class DragState { private static readonly Size deadZ...

Is there a way to prepare for a rough code review?

I am trying to remain positive and keep the objective of quality software as my goal; however, others are criticizing my code. How can I prepare adequately and get the most out of a code review that may be rough? ...

What are the good static code analysis plugins?

Are there any automated code review tools for Java? Especially plugins for Eclipse? The tool I expect is an automated code review plugin or tool that can automatically detect the problems in Code. ( Microsoft does this using OACR ).Plugins like Jupiter won't help because they are just peer review tools for eclipse. ...

Looking for a tool to help me analyze and understand others' code

I am looking for a tool to help me to more quickly grasp someone else's code. Usually I am working with 10-15 method call chunks scattered across 3-5 modules (DLLs or .NET assemblies). What I am after is a tool which could be used to draw an annotated call diagram in 10-30 minutes. I think it should look like a some kind of combination...

What's a good PL/SQL source code analysis tool?

What's a good PL/SQL source code analysis tool? ...

Does anyone else prefer visual diffing to unified diff patch files?

I took over some code that hadn't been developed since 2002 and I looked through the patches sent against it over time. All these patches were in unified diff format, which apparently is the de facto standard for submitting code improvements. Here's what one patch looked like: @@ -365,7 +385,10 @@ return () unless defined $op_sym; ...

Search for motif in protein sequence?

I have written the following script to search for a motif(substring) in a protein sequences(strings). I am beginner and writing this has been tough for me. I have two questions regarding the same: 1. Errors: The following script has few errors. I have been at it for quite sometime now but have not figured out what and why? 2. The followi...

How do I protect the trunk from hapless newbies?

A coworker relayed the following problem, let's say it's fictional to protect the guilty: A team of 5-10 works on a project which is issue-driven. That is, the typical flow goes like this: a chunk of work (bug, enhancement, etc.) is created as an issue in the issue tracker The issue is assigned to a developer The developer resolves t...

What is the difference between code reviews and code inspections?

I'm trying to understand the difference between the two. Any help would be greatly appreciated. Potential duplicate: http://stackoverflow.com/questions/52598/code-walkthrough-vs-code-review ...

Is there a cleaner way to write this block of code that parses a delimited string into an object?

Is there a more elegant way to structure the following code, which takes a comma delimited string containing certain values in specific positions and assigns the values to the properties of an object? // split comma delimited items into a string array Dim items As String() = myList.Split(CChar(",")) // Assign my...

Need help creating an array of objects.

I am trying to create an array of class objects taking an integer argument. I cannot see what is wrong with this simple little code. Could someone help? #include <fstream> #include <iostream> using namespace std; typedef class Object { int var; public: Object(const int& varin) : var(varin) {} } Object; int main (int argc, char * c...

Review Board workflow for Mercurial repository

At my company we are trying to add code reviewing practices into our development process and for that purpose we decided to use Review Board. While Review Board should work out of the box for Subversion the workflow for Mercurial looks a little bit involved. Firstly it seems that only post reviewing(via post-review script) is supported ...

Viewing result of Mercurial in/out commands in external diff viewer

I do a lot of code reviews mostly using "hg in -p /path/to/repo" command and it would be very nice if its output could be viewed in some external program(e.g vimdiff). Is there any way to achieve that? ...

ReviewClipse with Zend Studio for Eclipse

I've installed the latest ReviewClipse and latest Subeclipse plugin in the latest Zend Studio (6.1.2). I've got a connection to Subversion through Subeclipse but I do not get the Review context menu that the help file suggests: "You may start the review wizard from the context menu of your Subversion shared project under Review - Review ...

How do audit a code base to find code no longer used/required?

I'm working with a code base, which in places has code 10 years old. The code has undergone numerous additions, changes, editions, and refactorings without the removal of any code, or modules which are no longer required. As a result, the code base is littered with unnecessary code. Have any of you come up with a comprehensive technique...