Questions tagged [maintenance]

The concept of keeping software or hardware functional in a productive environment

469 questions
229
votes
34 answers

What to do about a 11000 lines C++ source file?

So we have this huge (is 11000 lines huge?) mainmodule.cpp source file in our project and every time I have to touch it I cringe. As this file is so central and large, it keeps accumulating more and more code and I can't think of a good way to make…
Martin Ba
  • 33,741
  • 27
  • 150
  • 304
155
votes
11 answers

Listing each branch and its last revision's date in Git

I need to delete old and unmaintained branches from our remote repository. I'm trying to find a way with which to list the remote branches by their last modified date, and I can't. Is there an easy way to list remote branches this way?
Roni Yaniv
  • 49,329
  • 5
  • 17
  • 14
151
votes
16 answers

Visual Studio setup problem - 'A problem has been encountered while loading the setup components. Canceling setup.'

I've had a serious issue with my Visual Studio 2008 setup. I receive the ever-so-useful error 'A problem has been encountered while loading the setup components. Canceling setup.' whenever I try to uninstall, reinstall or repair Visual Studio 2008…
85
votes
15 answers

Deleting millions of rows in MySQL

I recently found and fixed a bug in a site I was working on that resulted in millions of duplicate rows of data in a table that will be quite large even without them (still in the millions). I can easily find these duplicate rows and can run a…
Steven Surowiec
  • 9,196
  • 4
  • 30
  • 37
71
votes
9 answers

Managing highly repetitive code and documentation in Java

Highly repetitive code is generally a bad thing, and there are design patterns that can help minimize this. However, sometimes it's simply inevitable due to the constraints of the language itself. Take the following example from…
polygenelubricants
  • 348,637
  • 121
  • 546
  • 611
51
votes
13 answers

ResultSet: Retrieving column values by index versus retrieving by label

When using JDBC, I often come across constructs like ResultSet rs = ps.executeQuery(); while (rs.next()) { int id = rs.getInt(1); // Some other actions } I asked myself (and authors of code too) why not to use labels for retrieving column…
Rorick
  • 8,561
  • 3
  • 30
  • 36
46
votes
19 answers

Is there a way to avoid spaghetti code over the years?

I've had several programming jobs. Each one with 20-50 developers, project going on for 3-5 years. Every time it's the same. Some programmers are bright, some are average. Everyone has their CS degree, everyone read design patterns. Intentions are…
Yoni Roit
  • 26,694
  • 7
  • 32
  • 32
42
votes
13 answers

How do I write more maintainable regular expressions?

I have started to feel that using regular expressions decreases code maintainability. There is something evil about the terseness and power of regular expressions. Perl compounds this with side effects like default operators. I DO have a habit…
ojblass
  • 19,963
  • 22
  • 75
  • 124
41
votes
3 answers

Patch vs. Hotfix vs. Maintenance Release vs. Service Pack vs

When you are somewhere between version 1 and version 2, what do you do to maintain your software? The terms Patch, Hotfix, Maintenance Release, Service Pack, and others are all blurry from my point of view, with different definitions depending on…
Rob Hunter
  • 2,539
  • 4
  • 34
  • 50
40
votes
27 answers

Inherited a PHP nightmare, where to start?

I've inherited a PHP project that's turning out to be a nightmare. Here are the salient points: All the original developers have left The code has no version control All development and testing was done on the live server by renaming and editing…
gerdemb
  • 10,547
  • 15
  • 62
  • 71
38
votes
3 answers

Do you have health checks in your web app or web site?

I have built PHP based "health check" scripts for several projects in the past, but they were always custom-made for the occasion and not written for abstraction as an independent product. I would like to know whether such a solution exists. What I…
Pekka
  • 418,526
  • 129
  • 929
  • 1,058
36
votes
7 answers

How does one decompile and recompile a database application?

I have an Access database application and I would like to know the proper way of decompiling and recompiling it.
Alex Gordon
  • 51,480
  • 273
  • 609
  • 976
35
votes
5 answers

Development cost versus maintenance cost

I'm trying to explain the ratio of development versus maintenance costs to our sales department, and currently I have mostly my gut feeling that we spend about 60% of the time with maintenance. We have some persons on the team who tends to sell…
Alexander Kjäll
  • 3,984
  • 3
  • 26
  • 53
33
votes
4 answers

How can I copy data records between two instances of an SQLServer database

I need to copy some records from our SQLServer 2005 test server to our live server. It's a flat lookup table, so no foreign keys or other referential integrity to worry about. I could key-in the records again on the live server, but this is…
Jaymie Thomas
  • 792
  • 2
  • 9
  • 22
32
votes
37 answers

Writing maintainable code

What is the single most important factor for writing maintainable code (language independent)?
Jeremy
  • 8,073
  • 17
  • 52
  • 68
1
2 3
31 32