maintenance

Using 'expect' in a secure fashion to automate logins/remote work

I have a server with which I cannot use pre-shared keys and ssh - all authentication is via interactive prompts. That server also has cron and at disabled for non-root users. I would like to be able to cron a job on my local machine that will run a script against the remote server to do periodic maintenance/reporting. I've dallied wit...

Reuse, Rewrite, or Refactor?

At work I inherited development of a PHP-based Web site after the consultant who originally produced it bailed out and left without a trace. Literally half of the code is ripped from online tutorials, and there are thousands of lines of cruft that, being incomplete, do precious little. Hardly any of it actually works. I've been trying to...

Should I be regularly shrinking my DB or at least my log file?

My question is, should I be running one or both of the shrink command regularly, DBCC SHRINKDATABASE OR DBCC SHRINKFILE ============================= background Sql Server: Database is 200 gigs, logs are 150 gigs. running this command SELECT name ,size/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int) / 128.0 AS Availabl...

How to push a new local branch to remote repo and track it too [git]

I tried looking for a an answer to this, but couldn't find any which address this specific need. Which is weird. I want to be able to do the following: create a local branch based on some other (remote or local) branch (via git branch or git checkout -b) push the local branch to remote repo (publish), but make it trackable so git pull...

Is removing unused functionality a bad thing?

Is it possible for YAGNI to apply in the past tense? You created some functionality, it was used a little bit a while ago, but you aren't using it any more, and you don't want to maintain it, so you'd rather delete it. Is getting rid of unused or rarely-used functionality neccessarily a bad thing? Background: I use source control, so...

How to approach huge code base of undocumented code?

I have recently been assigned a project to further develop an existing code base. The code doesn't contain any tests and not even one single line of comments. The whole "thing" is written in a really obfuscating manner so it takes a lot of time to figure out what happens. How do you usually approach this kind of problem? Tips and trix o...

How to keep code maintainable after original programmer quit

Say if it's a 10 people project, 2-3 of the original programmer quit after the project has been release a stable version for a while. How to have the code maintainable in this case? My imagination is reviewing the code after the project goes to release version and keep review it afterwards? Maybe split into 2-3 small groups and have ea...

What Issue Tracking System to select?

What Issue Tracking Sytem is the most appropriate for fast, big, multilingual and international websites? The system has to handle both technical and content/editorial issues. What's the size and type of your site do you run? Whart System are you using for the keeping it state of the art? Thanks a lot for sharing your good or bad expe...

Rails: Display Maintenance Page if No Database Connection Available

I'm looking for a solution that will allow my rails app to render a user-friendly maintenance page when there is no Mysql server available to connect to. Normally a Mysql::Error is thrown from the mysql connection adapter in active_record. Something like: /!\ FAILSAFE /!\ Wed May 26 11:40:14 -0700 2010 Status: 500 Internal Server Err...

Unit Testing during maintenance phase

Our project is currently under maintenance. We have never had unit testing for this project. We were planning on writing unit test for the delta's rather than writing unit test for the entire application. What would be the preferred approach. Does it really add value to add unit testing during the maintenance phase ??? We are still with ...

Tools to update tables in SQL server 2000/2005

Is there any handy tool that can make updating tables easier? Usually I got an Excel file with the original value in one column and new value in another column. Then I write a formula in Excel to create the 'update' statement. Is there any way to simplify the updating task? I believe the approach in SQL server 2000 and 2005 would be dif...

How would you reconcile a number of subtly different databases into a single "dev template"?

We have a fairly straight-forward client server system - Windows app pointing to a database (SQL Server or Oracle). A separate database is set up for each customer and the customers are given several licenses of the Windows application to install on their computers. Over the years, small customizations and fixes have been applied to on...

How do you decide what process to kill in SQL Server Activity Monitor?

Hi, I am not a Db guy. But sometimes I am asked to check Db and see if there are some processes blocking the Db and if yes, KILL! Can you explain me what is the best way of reading the Activity Monitor in terms of finding the right process candidates to be killed? What columns to be checked first and against what values? thank you, ...

Assuring proper maintenance of Clone() in C++

In C++, I find it very useful to add a "Clone()" method to classes that are part of hierarchies requiring (especially polymorphic) duplication with a signature like this: class Foo { public: virtual Foo* Clone() const; }; This may look pretty, but it is very prone to bugs introduced by class maintenance. Whenever anyone adds a data m...

How to create maintenance plan in sql server?

when i m trying to create new maintenance plan in sql server it is popping up this error- TITLE: Microsoft SQL Server Management Studio ------------------------------ 'Agent XPs' component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Agent XPs' by using sp_configu...

Suggest best URL style

Our system Our search module can have many parameters like search keyword examination filter subject filter date range filter course name filter ... ... etc and there are pagination and sorting parameters like Page number Number of results in a page sort field sort order We used to have URLs like:- www.projectname/module/searc...

Application name for project maintenance tasks implementation

There was a discussion (windows service or task scheduler) about maintaining projects. Personally I prefer a console application on task scheduler. I wonder what is the best thing to call such applications? The last team I took part in used the title JobMachine, but is there a more appropriate name for such an application? ...

Understanding code

What is the best way to get acquainted with C# codebase of approximate size 200K LOC? Are there any tools available? http://www.program-comprehension.org/ It seems there is an event going for a long time for this purpose. Thanks. ...

Should one avoid certain programming constructs (and others) for maintenance's sake?

I'm working on a non-personal project, so it's safe to say that the maintenance programmer will not be me, for otherwise I wouldn't need to ask this question. Now there are some constructs (delegates, lambda expressions) which I would like to try in my code, not to intentionally make the code harder to read, but because they lend themse...

Advice for dealing with code maintenance

Hi guys, I've been working at my university this summer in an image/video lab. Just recently, my professor gave me a program written by a grad student who just left the program to "fix up", because it was "giving some errors." The project was written in C++ (seems to be a recurring bad sign in student code). I opened the project in VS0...