Slashdot Mirror


User: ArunSaha

ArunSaha's activity in the archive.

Stories
0
Comments
2
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2

  1. Knowing C != Knowing C++ on C++ and the STL 12 Years Later: What Do You Think Now? · · Score: 1

    In my observation (YMMV), most C++ programmers are former C programmers. The assumption is, "If I know C, then I know C++." In practice, they are just compiling C code with a C++ compiler. Once in a while, they throw in a class to club few function. A lot of "systems" companies have such C-turned-C++ programmers who are unaware of the existence of the books like "Effective C++."

    Another problem is, many C++ programmers go gung-ho with inheritance as if, in C++, they have the moral obligation to use all the different flavors of inheritance and create a deep (messy) hierarchy without analyzing if such complexity is inherently necessary.

    (Long rant truncated)

  2. Generate numbers to share your concern on Ask Slashdot: How To Convince a Team To Write Good Code? · · Score: 1

    I fully understand what you mean, but unfortunately, "code is complex" is a very subjective statement. Something complex to you may not be complex to your team member. So, everyone need to arrive on a common ground on what is considered "complex."

    One widely accepted metric to measure is complexity is the cyclomatic complexity or McCabe complexity. [http://en.wikipedia.org/wiki/Cyclomatic_complexity]

    There are free and open source tools to compute cyclomatic complexities of your code base. Using a tool, you can find out complexities of functions, files, directories (by adding that of files) etc. Then find the top-10 in each category. My favorite is the top-10 complex functions.

    Install a cronjob to perform this computation every day.

    Track which functions are increasing complexity.

    Have all this information readily available in a intranet website and share that link to the team (couple of times!).

    I am pretty confident (have done it myself) that this will bring some improvements (may not be as much as you want).