Questions for best practices for writing high quality code.

learn more… | top users | synonyms

4
votes
0answers
188 views

Diagram to show code responsibility

Does anyone know how to visually diagram the ways in which the flow of control in code passes between code produced by different groups and how that affects the amount of code that needs to be ...
4
votes
0answers
120 views

Acceptable dependencies in a service-oriented architecture, internal to a team

In a service-oriented architecture, subsystems can depend on each other in different levels: Database level => Foreign keys to enforce data integrity across services on deletions and updates (...
1
vote
0answers
212 views

Can this be used to implement Post Redirect Get pattern?

I am trying to implement proper a Post Redirect Get on a PHP site (question is language agnostic in nature however). I thought about it, and realized that running this code on every request seems to ...
1
vote
0answers
81 views

WMC Calculation in CK Metrics Suite

I have two classes C1 and C2. C1 has 2 methods and C2 has 3 methods each of complexity value 1. C2 inherits from C1. So, I know C2 has 2+3=5 methods in all. The question is, should I take C2 to have 5 ...
1
vote
0answers
78 views

Managing interdependent project reference in solution file

Context for question I am working on a legacy product, that has multiple projects - Class libraries, websites, windows services, web services etc.. I have a single solution file that contains all ...
0
votes
0answers
32 views

What is the common practice of calculating average length of identifiers

Quoted from Ian Sommerville's Software Engineering(9th ed), page 673: This is a measure of the average length of identifiers (names for variables, classes, methods, etc.) in a program. The ...
0
votes
0answers
121 views

GMP Core Dump while using mpz_clear in C

I'm working on a prime factorization program written in C using the GMP library through cygwin. The algorithm that I have now works fine, but has memory leaks from not using the mpz_clear function on ...
0
votes
0answers
71 views

Algorithm to Select Sequential Subarrays from an Array

I solved my problem by using simple nested loops and comparisons but I'm wondering if there is a well known Selection Algorithm to solve my problem. Let's say I have an array such as [1, 10, 250, 9, ...