maintainability

Speed Comparisons - Procedural vs. OO in interpreted languages

In interpreted programming languages, such as PHP and JavaScript, what are the repercussions of going with an Object Oriented approach over a Procedural approach? Specifically what I am looking for is a checklist of things to consider when creating a web application and choosing between Procedural and Object Oriented approaches, to opti...

One database or many?

I am developing a website that will manage data for multiple entities. No data is shared between entities, but they may be owned by the same customer. A customer may want to manage all their entities from a single "dashboard". So should I have one database for everything, or keep the data seperated into individual databases? Is there ...

What are generally accepted code formatting guidelines?

According to McCall's Quality Model, Product Revision is one of the three main perspectives for describing the quality attributes of a software product. Under the Product Revision perspective, maintainability, the ability to find and fix a defect, is identified as a key quality factor that impacts the ability to revise the software. Cle...

What should we do to prepare for 2038?

I would like to think that some of the software I'm writing today will be used in 30 years. But I am also aware that a lot of it is based upon the UNIX tradition of exposing time as the number of seconds since 1970. #include <stdio.h> #include <time.h> #include <limits.h> void print(time_t rt) { struct tm * t = gmtime(&rt); put...

Best css generator lanugage?

Reusing values in css (particularly colors) has always been a problem for me when it comes to maintaining that css. What are the best tools for creating variables, or generally improving maintainability with css? ...

How do you maintain large t-sql procedures

I'm about to inherit a set of large and complex set of stored procedures that do monthly processing on very large sets of data. We are in the process of debugging them so they match the original process which was written in VB6. The reason they decided to re write them in t-sql is because the vb process takes days and this new process t...

How not to repeat yourself across projects and/or languages

I'm working on several distinct but related projects in different programming languages. Some of these projects need to parse filenames written by other projects, and expect a certain filename pattern. This pattern is now hardcoded in several places and in several languages, making it a maintenance bomb. It is fairly easy to define this...

C++ Function List

I'm working on a fairly complex project, a custom encryption routine if you will (just for fun) and I've run into this issue in designing my code layout. I have a number of functions that I want to be able to call by index. Specifically, I need to be able to call one randomly for the encrypt process, but then address that by a specific ...

from X import a versus import X; X.a

This is one of those semi-religious Python questions that I suspect has well reasoned responses lurking in the community. I've seen some Python programmers use the following style fairly consistently (we'll call it style 1): import some_module # Use some_module.some_identifier in various places. For support of this style you can cite ...

Open Source Project & Language Selection

I'm getting ready to start an open-source project that will target .NET/Mono. For those who have started their own open source venture... Do you let the fact that a project is going to be open-source weigh on the decision of what language to use? For example. Most .NET open-source projects are written in C#. However, if you were more...

Maintaining releases/branches in an "agile" rhythm ?

We have a software product that evolves at the rhythm of clients' needs and of a more general roadmap. Because we are in a SCRUM project environment, it happens very regurlarly that a new feature makes its way to the product, and then we are confronted with the choice of: implementing this feature in an already released branch (not re...

CakePHP or CodeIgniter Longterm Upgrade / Maintainability?

Hi All, I am deciding on a framework to try out for PHP and have narrowed it down to CakePHP and CodeIgniter. I have a couple questions for any of you who have used or are familiar with both: I like the fact that Cake keeps most of the code outside the webroot by default. Especially since I may end up using a single framework instal...

How to synchronize C & C++ libraries with minimal performance penalty?

I have a C library with numerous math routines for dealing with vectors, matrices, quaternions and so on. It needs to remain in C because I often use it for embedded work and as a Lua extension. In addition, I have C++ class wrappers to allow for more convenient object management and operator overloading for math operations using the C A...

How complex should code be?

I'm studying about algorithms which can help me write smaller but more complex code. Instead of writing 150 lines of if-else statements, I can design an algorithm that does it in 20 lines. The problem is a lot of these algorithms can be complex and require a lot of math to understand them. I'm also the only one around here who underst...

Maintainability Index

I have come across the recommended values for a Maintainability Index (MI) as follows: 85 and more: good maintainability 65-85: moderate maintainability 65 and below: difficult to maintain with really bad pieces of code (big, uncommented, unstructured) the MI value can be even negative Are these values are dependent on technology? ...

At what point does refactoring become not worth it?

Say you have a program that currently functions the way it is supposed to. The application has very poor code behind it, eats up a lot of memory, is unscalable and would take major rewriting to implement any changes in functionality. At what point does refactoring become less logical then a total rebuild? ...

Should I worry about the upgrade path for LINQ (the query language)

I'm starting to use LINQ as a true query language in code to help improve readability. Until recently I was afraid to touch LINQ because of the LINQ to SQL team move under the Entity Framework team (trying to ignore that conversation here) -- will LINQ the query language be a safe bet going forward (as much as anything in this fast movi...

How to overcome the "Everyone else's code sucks" attitude?

I'm the only programmer at work. A result of downsizing, I have to work on programs that have been created/maintained by many different past programmers. When I look at the code in some of them, I shudder to think that I worked with these people and they produced code like that. Now if I sound big headed and demeaning, well, I'm tryin...

Is it possible to maintain a 43 page query?

I always thought an SQL compiler would break but apparently nesing can nearly be infinite. Is this code to be trashed immediately or is there some glimmer of hope that something like this can function? This query doesn't really belong to me so I cannot post it... However let's just pretend it is this one: [SELECT /*+ NOPARALLEL bypass_...

how to adhere to the Don't-Repeat-Yourself (DRY) principle when there will be too many if-then-else making the code unreadable?

I'd like to adhere to the Don't-Repeat-Yourself principle, but sometimes when I write PHP together with HTML and CSS, if I re-use the same code for different situations, my code soon will have so many if-then-else that the code is not easily maintainable. This may be a bigger issue if Smarty, the templating engine is used, because most ...