code-quality

Effective technique to reduce and eliminate warnings in a large code base?

I have been involved in the development of large code bases that grew to millions lines of code over the course of multiple years and where the amount of warnings grew out of control because it was not a concern for the initial developers. Technical debt accumulated and now, I would like to pay it back. Do you know of any process, metho...

Tools to identify code duplications

I have being reading and tracking some questions on code reuse and I have this question: Are there any tools to identify duplicate or similar code? I have googled this a while ago and found nothing good. ...

Simpson's Integral in Common Lisp

Hello all, I just wrote a simple Common Lisp program to find out Simpson's Integral: ;Integration by Simpson's rule; CL code ;Found to be working correctly with 'clisp' (defun simpsons(f a b n) (defparameter *summation* 0) (defvar *h* (/ (- b a) n)) (loop for k from 2 below (- n 1) by 2 do (setf *summation* (+ *summation* ...

Tools to detect Dead code in delphi2007 or above

Are there good tools to detect dead code in DELPHI2007 or above? That can integrate with the IDE? The option to look at blue dots is just time consuming, so it’s ruled out. ...

What is the most constructive way to code-review an interview submission?

As part of our interview process, we ask candidates to complete a coding problem of moderate complexity. Some candidates seem to spend an awful long time on it and produce code that is not of high enough quality. It can be difficult to document what "high enough quality" actually is and provide feedback that is as useful and objective a...

internal code review tool for web developers? Both for security and QC.

I feel fortunate that I have been given an opportunity to improve code practices in my office by starting to implement some internal code reviews which could start out as some simple checklist. I need suggestions on tools and general tips. I went to school for SoftE and understand the process of classic software development. I then wo...

Tips on a tool to measure code quality?

I'm looking for a tool that can provide code quality metrics. For instance it could report very long functions (spaghetti code) very complex classes (which could contain do-it-all code) ... While we're on the (subjective:-) subject of code quality, what other code metrics would you suggest? I'm targetting C#/.NET code, but I'm sure...

Production Ready Code / Product Requirements

What are the things that we need to ensure before a software goes alive. I assume that the software is a commercial product. But most of them applies to OSS as well. I made it community wiki so feel free to update the question and the list. If we treat this as a check list, So far I've come up with these: Code Related Exception Mana...

What is the oldest code written by yourself to which you still have access?

What is the oldest code written by yourself to which you still have access? And how has your coding style evolved over time? ...

Any code quality tool for pl/sql?

Hi, is there any tool, library that can analyze plsql code, like PMD/CheckStyle do for Java ? ...

Is it worth refactoring Swing code to conform to coding standards?

Code generated for swing always fails when it comes to code quality. Inevitably, there's one method that builds the entire interface, and there's anonymous event handling code that calls member methods. Does anyone have some nuggets on transforming this monstrous code to well organized code. Is it worth going without a GUI builder too...

Javascript Minifier that preserves conditional comments?

I tried out the online JS Minifier but it cuts out conditional comments like: var u = navigator.userAgent;var e=/*@cc_on!@*/false; BECOMES var u=navigator.userAgent;var e=false; This would affect the operation of the code, so instead of manually adding the stripped out comments manually, I'm looking for ...

What tools do you use in your build process to guarantee better code quality?

Earlier today I asked a question about enforcing coding standards. Someone mention about NDepend tool that does code analysis. It looks like this tools does a lot of good thing to help developers to write higher quality code. The problem is that NDepend is not free (I obviously got spoiled by Open Source projects). I don't mind to sp...

Eclipse plug-in/setting to detect empty exception blocks?

I have several Java projects checked out into my Eclipse workspace, some of which are being worked on by several distributed teams. Is there a plug-in/setting that will allow me to detect exception blocks that are empty? I am trying to figure out how we can improve code quality across all of our projects and avoid expensive defects down ...

How to increase code quality?

I would like to increase the code quality of myself and my team. What do you recommend me to do in order to achieve that? We are working with Visual Studio and C# (don't know if it's relevant though). Thanks! Shay. P.S. I've written a blog post that summarizes the answers from here: http://ironshay.com/post/How-to-Increase-Code-Quali...

Static code analysis tool to detect code duplication in Maven projects

After I found out that there's no plugin for Simian in Maven 2, we turned to CPD, but it doesn't perform as well as Simian (observed in our Ant projects that use both Simian and CPD). I know that developers in my team have been checking in redundant code but CPD isn't flagging anything. I wanted to try out another code duplication analys...

What's the best way to write code, allowing that any developer can easily understand it?

Normally each person takes their own "calligraphy" to write code, however, is there a "standard" or any way that you feel clear and easy to allow the code becomes "readable" by any programmer who is using your code? Personally I use (a simple example): if (myVar == 5) { // easy to identify where the IF was launched, IMHO. } Inste...

tool for detecting commented-out code

It is agreed by many that commented out code is a bad thing if you are using source control. (And it is agreed by many more, that if you are not using source control, that is even a worse thing). So the question is, do you know a tool that detected (too much) commented out code? Do you think such a thing would be a useful [[your-buil...

Why use base16 numbers in code when base10 numbers are more readable?

I have seen many people uses base16 numbers in code where a base10 number is more readable. Here is a c# code. byte[] b = new byte[0x1000]; For me the below is more readable, byte[] b = new byte[4096]; Is there any good reason for using base16 numbers or is it a matter of preference? ...

About code quality and designing

Hello, I don't know if I am only like this or maybe some people has same problem. Always when I get a project I don't know how to design it well. I mean I just try to make UML design, but always it doesn't show the final result. In the end project has so many changes which aren't in the design, so my drawn UML gets useless to people who...