The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
137 views

Query Language for Java Code Analysis

I want to write a refactoring tool for the Java programming language. For this reason I need to do structural queries against the abstract syntax tree. Given this AST how do I get answers to the ...
32
votes
11answers
4k views

Is it okay to make coding style changes on an open source project that doesn't follow best practices?

Recently, I came across a number of open source Ruby (or majority of it was Ruby) projects on GitHub that when checked with a code analyzing tool like Rubocop, create a lot of offenses. Now, most of ...
3
votes
2answers
506 views

CA1819: Properties should not return arrays. Does this happen only with arrays? If yes, why?

I have a question about CA1819 msdn performance warning. The rule is: Arrays returned by properties are not write-protected, even if the property is read-only. To keep the array tamper-proof, the ...
16
votes
5answers
6k views

Why would anyone invest time in Microsoft “Roslyn”?

I have just been reading through some of the white papers & examples from Microsoft "Roslyn" and the concept seems very interesting. From what I can tell, it opens up the black box that is the ...
0
votes
0answers
85 views

How to quickly understand a huge piece of code [duplicate]

(This is a general question but I think is important.) How do you quickly understand a huge piece of code, say, a project with tens of thousands of lines of code (written by other people)? Are there ...
2
votes
1answer
508 views

Strategy to find bottleneck in a network

Our enterprise is having some problem when the number of incoming request goes beyond a certain amount. To make things simpler, we have N websites that uses, amongst other, a local web service. This ...
1
vote
3answers
1k views

Is there any open source code analyzer for java which I can adopt my software metrics algorithm on it? [closed]

I am doing my masters dissertation and I have conducted a software metrics. I need to adopt my metrics on an open source tool. I have found PMD and check style on sourceforge.net but there is not ...
3
votes
1answer
187 views

How to read Scala code with lots of implicits?

Consider the following code fragment (adapted from http://stackoverflow.com/a/12265946/1333025): // Using scalaz 6 import scalaz._, Scalaz._ object Example extends App { case class Container(i: ...
25
votes
9answers
6k views

Is catching general exceptions really a bad thing?

I typically agree with most code analysis warnings, and I try to adhere to them. However, I'm having a harder time with this one: CA1031: Do not catch general exception types I understand the ...
12
votes
5answers
523 views

Programmaticaly finding the Landau notation (Big O or Theta notation) of an algorithm?

I'm used to search for the Landau (Big O, Theta...) notation of my algorithms by hand to make sure they are as optimized as they can be, but when the functions are getting really big and complex, it's ...
5
votes
0answers
236 views

What to do when tackling an unfamiliar Code base? [duplicate]

Possible Duplicate: How do you dive into large code bases? When you join a pre-existing project that has a large code base, what are some of the things you do to get acclimatized quickly ...
2
votes
2answers
69 views

Is it possible to analyse the API surface of a set of class libraries to automatically determine inter-assembly dependencies?

I'm sure we've all been in the situation where we've inherited code that was "overly public", becomes obsolete or needs to be refactored. In these situations, it is easy to spend many days analysing ...
18
votes
10answers
1k views

Is it possible to speed- read code well?

Sometimes we have huge code listings to deal with, and I'm curious as to how the advanced, highly skilled programmers read code. And I'll say with an emphasis on debugging and finding issues.
4
votes
1answer
162 views

Rapid code analysis

I have recently moved to a new company where I am tasked (in part) with evaluating the existing code base and coming up with patterns and best practices. Our development team consists of around 20 ...
18
votes
3answers
300 views

Is there a correlation between complexity and reachability?

I've been studying cyclomatic complexity (McCabe) and reachability of software at uni recently. Today my lecturer said that there's no correlation between the two metrics, but is this really the case? ...
4
votes
3answers
2k views

Why use sealed instead of static on a class?

Our system has several utility classes. Some people on our team use (A) a class with all-static methods and a private constructor. Others use (B) a class with all-static methods (these the juniors). ...
5
votes
5answers
615 views

Is it worth writing a memory error detection tool for C++ these days?

For past 2 years, I have been writing a tool in C++, meant for C++ as my hobby project. Slowly, I realized that it can be made commercialized, as it can compete with other memory leak detectors. This ...
0
votes
1answer
1k views

C++ IDE and tools with Clang integration [closed]

Recently I've read this blog about Google integrating Clang parser into their code analysis tools This is something in which C++ is at least a decade behind other languages like Java, but now that ...
3
votes
2answers
526 views

How do you write a code analysis & refactoring tool to interface with Visual Studio?

Recently while working on a project of mine and doing some refactoring I got an idea to write a custom tool to help me analyze my code in a very specific context and perform some very custom ...
38
votes
16answers
2k views

How do I deal with analysis paralysis?

Very frequently, I am stuck when choosing the best design decision. Even for small details, such as function definitions, control flow, and variable names, I spend unusually long periods perusing the ...
3
votes
2answers
262 views

Are there any good tools to help implement or enforce the proper equals and hashcode patterns for c#?

A very common bug on my development team is forgetting to, or incorrectly overriding equals and hashcode. While the pattern is simple, there's a lot of boilerplate code that goes into doing this ...
0
votes
2answers
142 views

Does this status show a green signal?

I have done this static code analysis with Code Analyzer. Is it a green signal or should I improve my coding standards?