maintenance

Proper status code for a maintenance page redirect?

允我心安 提交于 2019-11-30 08:39:00
While performing some upcoming maintenance, I'm going to have to redirect all site traffic to a maintenance page briefly. What's the proper status code to use for the redirect? 503 makes sense, but it's not technically a redirection status. 302 is a temp redirect, but wondering if that might have implications if the site is being spidered at the time. I would use 503, too, combined with a Retry-After header. A proper robot should know how to handle this. 302 Found would probably be the classic way - not a permanent redirect. You want it to be temporary though, so when the spider came back, it

Do you develop your Perl applications as CPAN modules?

白昼怎懂夜的黑 提交于 2019-11-30 06:27:07
Recently I read a blog post saying that it is a good practice to develop Perl applications just as you would develop a CPAN module. ( Here it is – thanks David!) One of the reasons given was that you could simply run cpan . in the project dir to install all the dependencies. This sounds reasonable, and I also like the “uniform interface” that you get. When you come across such an application, you know what the makefile does etc. What are other advantages and disadvantages to this approach? Update: Thanks for the answers. I’ve got one more question about the dependency installing, I’ll post it

Rewrite of legacy code [closed]

不羁岁月 提交于 2019-11-30 00:18:18
My department is currently faced with the responsibility for the task of maintaining a rather large COBOL code base. We are wondering how to add new features to keep up with business needs. COBOL programmers are hard to come by these days, and we also think we would get higher productivity from using a more modern language like Java or C#. We feel that we have four options: Rewrite everything from scratch, leaving the old application to itself until it is ready to be replaced Rewrite everything from scratch, getting some people to maintain the old application to cope with new business needs as

Implement “Down for maintenance” page

谁说胖子不能爱 提交于 2019-11-29 21:58:29
I know we could simply use an app_offline.htm file to do this. But I want to be able access the website if my IP is 1.2.3.4 (for example), so that I can do a final testing. if( IpAddress != "1.2.3.4" ) { return Redirect( offlinePageUrl ); } How can we implement this in ASP.NET MVC 3? You can use a catch-all route with a RouteConstraint with the IP check: Make sure you put the offline route first. routes.MapRoute("Offline", "{controller}/{action}/{id}", new { action = "Offline", controller = "Home", id = UrlParameter.Optional }, new { constraint = new OfflineRouteConstraint() }); and the

Development cost versus maintenance cost

北慕城南 提交于 2019-11-29 21:22:11
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 custom solutions, that we have to build, and if the sales people doesn't understand the total cost of development, then they will not be able to sell for realistic prices. Another "problem" is that we are expanding our service, and have a need to refactor some of the underlying infrastructure in order to reduce time to market and other measure points.

Identifying Unused Objects In Microsoft SQL Server 2005

你离开我真会死。 提交于 2019-11-29 21:04:25
It's a trivial task to find out if an object is referenced by something else or not. What I'd like to do is identify whether or not it's actually being used . My solution originally involved a combination of a table that held a list of objects in the database and an hourly job. The job did two things. First, it looked for new objects that had been added to the database since the last run. Secondly, it looked at sql's object cache. If an object in the table was listed in the cache, it was marked off in the table as having been recently "seen" in use. At the end of a six month period or whatever

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

℡╲_俬逩灬. 提交于 2019-11-29 19:44:22
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 meam by "health check" is a protected web page that functions much like a suite of unit tests, but on a more operational level, showing red/yellow/green statuses for things like Are the cache directories writable? Is the PHP version correct, are required extensions installed? Is the database server reachable? Do the necessary tables exist in the

How do I write more maintainable regular expressions?

北城余情 提交于 2019-11-29 19:12:52
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 of documenting regular expressions with at least one sentence giving the basic intent and at least one example of what would match. Because regular expressions are built up I feel it is an absolute necessity to comment on the largest components of each element in the expression. Despite this even my own regular expressions have me scratching my head as

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

北城以北 提交于 2019-11-29 19:03:21
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 it actually start to shrink. The file is used and actively changed in several (> 10) maintenance versions of our product and so it is really hard to refactor it. If I were to "simply" split it up, say for a start, into 3 files, then merging back changes from maintenance versions will become a nightmare. And also if you split up a file with such a

Proper status code for a maintenance page redirect?

假装没事ソ 提交于 2019-11-29 11:38:31
问题 While performing some upcoming maintenance, I'm going to have to redirect all site traffic to a maintenance page briefly. What's the proper status code to use for the redirect? 503 makes sense, but it's not technically a redirection status. 302 is a temp redirect, but wondering if that might have implications if the site is being spidered at the time. 回答1: I would use 503, too, combined with a Retry-After header. A proper robot should know how to handle this. 回答2: 302 Found would probably be