Search Results

Search found 5641 results on 226 pages for 'maintenance plan'.

Page 13/226 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Strategies for removing register_globals from a file

    - by Jonathan Rich
    I have a file (or rather, a list of about 100 files) in my website's repository that is still requiring the use of register_globals and other nastiness (like custom error reporting, etc) because the code is so bad, throws notices, and is 100% procedural with few subroutines. We want to move to PHP 5.4 (and eventually 5.5) this year, but can't until we can port these files over, clean them up, etc. The average file length is about 1000 lines. I've already cleaned up a few of the low-hanging fruit, however the job took almost an entire day for 2 300-500 line files. I am in a quagmire here (giggity). Anyway, has anyone else dealt with this in the past? Are there any strategies besides tracing backwards through the code? Most static analysis tools don't look at code outside of functions - are there any that will look at the procedural code and help find at least some of the problems?

    Read the article

  • Copy-and-Pasted Test Code: How Bad is This?

    - by joshin4colours
    My current job is mostly writing GUI test code for various applications that we work on. However, I find that I tend to copy and paste a lot of code within tests. The reason for this is that the areas I'm testing tend to be similar enough to need repetition but not quite similar enough to encapsulate code into methods or objects. I find that when I try to use classes or methods more extensively, tests become more cumbersome to maintain and sometimes outright difficult to write in the first place. Instead, I usually copy a big chunk of test code from one section and paste it to another, and make any minor changes I need. I don't use more structured ways of coding, such as using more OO-principles or functions. Do other coders feel this way when writing test code? Obviously I want to follow DRY and YAGNI principles, but I find that test code (automated test code for GUI testing anyway) can make these principles tough to follow. Or do I just need more coding practice and a better overall system of doing things? EDIT: The tool I'm using is SilkTest, which is in a proprietary language called 4Test. As well, these tests are mostly for Windows desktop applications, but I also have tested web apps using this setup as well.

    Read the article

  • How should I write new code when the old codebase and the environment uses lots of globals in PHP

    - by Nicola Peluchetti
    I'm working in the Wordpress environment which itself heavily relies on globals and the codebase I'm maintaining introduces some more. I want this to change and so I'm trying to think how should I handle this. For the globals our code has introduced I think I will set them as dependencies in the constructor or in getter / setter so that I don't rely on them being globals and then refactor the old codebase little by little so that we have no globals. With Wordpress globals I was thinking to wrap all WP globals inside a Wrapper class and hide them in there. Like this class WpGlobals { public static function getDb() { global $wpdb; return $wpdb; } } Would this be of any help? The idea is that I centralize all globals in one class and do not scatter them through the code, so that if Wordpress kills one of them I need to modify code only in one place. What would you do?

    Read the article

  • Five years old Ubuntu system - dist-upgrades always went fine, however some tasks remain

    - by knb
    I have a PC with a current Ubuntu distribution installed. I've upgraded many times since 5.10. It always went well, however some tools or features were kind of left behind in a unsatisfactory state: grub to grub2 - is it an really necessary to switch the boot loader some time to grub2. Upgrading this scares me abit. I still have ext3 devices - is it worth upgrading to ext4? should I wait for btrfs? hibernation and suspend- it only worked in 5.10, since 6.04 it was messed up. Should I really care? Any chance to repair this myself? Simply by cleanup or hacking config files. It is a desktop PC after all. So energy saving functionality is not really needed. I am using vmware workstation 6.5 and the latest kernel that supports it is 2.6.32. This is my default kernel now, ignoring 2.6.35. Am I missing anything important in the new kernel now?

    Read the article

  • How to make changes in linux maintence mode

    - by Jack
    I notice when Linux boots in maintenance mode the filesystem is read-only. Is there a way to change this, perhaps remounting as writable? An example of this being a problem is that I was unable to open vi because there were too many session files.... Not to mention it would be nice to actually fix problems.... What are you meant to be able to do if you can't make any changes to the filesystem? What kind of maintenance can be expected?

    Read the article

  • Implementing new required feature after software release

    - by TiagoBrenck
    Fake Scenario There is a software that was released 1 year ago. The software is to map and register all kind of animals on our planet. When the software was released, the client only needed to know the scientific name of the animal, a flag if it is in risk of extinction and a scale of dangerous(that is a fake software and specification, I don't want to discuss this here). There are already 100.000 animals records saved on DB. New Feature One year later, the client wants a new feature. It is really important to him to know the animals classes, and this is a required field. So he asks me to put a field to input the animal class, and this field is required. Or maybe where this animal was discovered. Problem I have already 100.000 recorded animals without a class or where it was discovered, but I need to insert a new column to storage this information and this column can't be null. I don't have a default value for this situation (there isn't a default animal class or where it was discovered). I don't want to keep the requirement rule only on my software, my DB must have this requirement too(I like to keep business rules on DB too). What are the alternatives to solve this situation? I am on a situation that this new feature cannot be previewed or reviewed for the existing records. The time already passed and I can't go back on time to get it

    Read the article

  • How far back do you use your version control and for what reason?

    - by acidzombie24
    Typically when i work on a project i only go back a few days or the last major change when i decide to do something drastic. I sometimes notice i broke a test or a feature and overlooked it for a few weeks so i may go back a month or two and see if the feature or test is broken and trace down the week i broke it. Then find what change did it. On a long term project over the span of a year. Do you actually go back 6+ months and if so why?

    Read the article

  • How do you call the process of taking a part of a function and making an individual function of it?

    - by bitmask
    I know there was a technical term for this. I'm just can't remember what it was. If the title needs clarification, here is what I mean; If this is the old code: Result foobar(Param1,Param2,Param3) { code that does abc code that does xyz code that does asdf more code that does something } and it's changed into: SomeResult do_xyz(SomeParams) { code that does xyz } Result foobar() { code that does abc do_xyz(args); code that does asdf more code that does something }

    Read the article

  • Should users be deleted after inactivity on a website?

    - by Hovaness Bartamian
    When you have a social website or a website where you can register, would you eventually delete them after a certain time (after a year of inactivity) or would you rather keep their account records for ever? I know websites like Facebook have large amount of inactive, duplicated and fake accounts. So I'm wondering if after two years of inactivity it would be alright to send the account a warning email of deletion unless they log in. Just thinking of a clean and efficient database management or any implications this may cause to new potential users.

    Read the article

  • Backup and the evil RETAINDAYS option

    - by TiborKaraszi
    "So what bad has this option done?", you probably as yourself. Well, not much, but I find it evil because it confuses people, especially those new to SQL Server. I have many times seen people specifying something like 3, and expect SQL Server to keep the three most recent backups in the backup file and overwrite everything which is older than that. Well, that is not what the option does. But before we go into details, let's look at an example backup command which is using this option: BACKUP DATABASE...(read more)

    Read the article

  • I just started a job with Scrum and something seems to be missing. I am new to Scrum

    - by punkouter
    The code is a complete mess of a combination of classic ASP/ASP.NET. The scrum consist of us patching up the big mess or making additions to it. We are all too busy doing that to start a rewrite so I am wondering.. Where is the part in Scrum where the developers can have the power to say that enough is enough and demand that they are given time to start the big rewrite? We seem in an endless loop of just patching old code with 'Stories'. So things are being run by the non-technical people who seem to have no desire to push for a rewrite because they don't understand how bad the codebase has gotten.. So who is in charge of making this big rewrite change happen? The developers? The Scrum Master? The current strategy is just to find time and do it ourselves without the higher-ups involved since they are mostly to blame for the current mess we are in.. <- insert rant about non-technical people telling technical people what to do here ->.

    Read the article

  • Couldn't pass the signin screen on ubuntu

    - by Amokrane
    I have an issue here with my computer using ubuntu 10.10 on a 64 bits machine. When I start it, I have the login screen, I enter my credentials but instead of starting the session it reloads the login screen again. I checked the disc using fsck and it seems clean. How should I proceed to diagnose and repair this issue? Thanks! [Edit] I went to the log files, this is what I got: auth.log pam_unix (gdm:session): session opened for user amokrane by (uid=0) pam_ck_connector (gdm:session): nox11 mode, ignoring PAM_TTY :0 pam_unix (gdm:session) :session closed for user amokrane messages.log No ACPI video bus found I also took a shot with my camera of the black screen that appears between the two login screens, it says something like: fsck from util-linux-ng 2.17.2 /dev/sdc4 : propre, xxxx files, xxxx blocs Starting AppArmor profiles Skipping profiles in /etc/apparmor.d/disable: usr.bin.firefox Setting sensors limits Starting postgreSQL ... /var/log/Xorg.0.log [ 25.375] (II) intel(0): Modeline "1920x1080"x60.0 172.80 ... [ 28.850] (II) Power Button: Close [ 28.850] (II) UnloadModule: "evdev" [ 29.910] (II) Power Button: Close [ 28.910] (II) UnloadModule: "evdev" [ 28.941] (II) AT Translated Set 2 keyboard: Close [ 29.000] (II) ImPS/2 Generic Wheel Mouse: Close [ 29.000] (II) UnloadModule: "evdev" [ 29.039] ddxSigGiveUp: Closing log Update I tried the following: Ctrl-Alt-F1 on the login screen (to runt the console). sudo pkill startx sudo rm /tmp/.X0-locl startx But it tells me that the x server is already running.

    Read the article

  • Geek City: sp_cacheobjects for SQL Server 2012

    - by Kalen Delaney
    In a post about 4 1/2 years ago , I gave you my version of a replacement for the old pre-2005 pseudotable syscacheobjects . I called it sp_cacheobjects and created it as a view in the master database. With the sp _ prefix, the view can be accessed from any database. When testing this on SQL Server 2012, I noticed that I almost always got a lot more rows back than I was expecting. Even when I added a WHERE clause to limit the database to only the database I was working in, I STILL got way to many...(read more)

    Read the article

  • How to run ubuntu-tweak's janitor automatically?

    - by Eliran Malka
    My aim is to have the janitor running at startup, with a pre-configured profile (e.g. clear redundant packages and browser cache). The website is lacking any documentation or usage instructions, and I could not find any information on this here as well. I tried, naturally, to start ubuntu-tweak from the command line, hoping additional API exists that will come through in this (allegedly) simple task. I only got as far as: ubuntu-tweak -f janitor which is a step in the right direction, but what's still missing is a command for the clear action. Is such a command available, or is there any better way of achieving the desired behavior?

    Read the article

  • 5 year old ubuntu system, always dist-upgraded => ok. however some tasks remain

    - by knb
    I have a PC with a current ubuntu distribution installed. I've upgraded many times since 5.10. It always went well, however some tools or features were kindof left behind in a unsatisfactory state: grub to grub2 - is it an really necessary to switch the boot loader some time to grub2. Upgrading this scares me abit. I still have ext3 devices - is it worth upgrading to ext4? should I wait for btrfs? hibernation and suspend- it only worked in 5.10, since 6.04 it was messed up. Should I really care? Any chance to repair this myself? Simply by cleanup or hacking config files. It is a desktop PC after all. So energy saving functionality is not really needed. I am using vmware workstation 6.5 and the latest kernel that supports it is 2.6.32. This is my default kernel now, ignoring 2.6.35. Am I missing anything important in the new kernel now?

    Read the article

  • To reorganize code, what to choose between library and service?

    - by essbeev
    I want to reorganize a large application with lot of code duplication into multiple components. Plus, some code is also duplicated over other applications. The common set of functionality that can be taken out of main application is clearly defined. Now, do I write a library or do I write a service for this functionality; so that all such applications continue to work and there is only one code-base (of common functionality) to maintain ?

    Read the article

  • How can I redirect any kind of access to my site to somewhere else, except for me?

    - by Omega
    My site, www.example.com has a MyBB forum installation, and has many users constantly checking it out. I would like to make a major change to it - basically, I want to delete everything it has and start clean. However, this rebuilding process may take me hours since I need to do a lot of things. Thus, whenever an user tries to enter any part of my site (www.example.com, www.example.com/blog etc), the user will always be redirected to www.example.com/underconstruction so they can see a nice HTML site explaining the current situation. But not only that - while I am configuring my site, I need to visit it myself to make sure things do work live. So basically, it has to redirect everyone who isn't me. Is that possible in any way? I am using GoDaddy hosting.

    Read the article

  • How to maintain a demo version of an application?

    - by O.O
    I need to be able to demo our production application to prospective clients. The way I have it setup today is simple. The demo application is an exact duplicate of the production system, except that the data in the database is obfuscated to protect our current clients' data. This works great because it doesn't require any application changes. Boss dropped a potential BOMBSHELL today and said that the demo system needs to contain a special link and that ONLY shows up on demo. He went on to explain that in the future there may be much bigger differences between the demo and production apps (e.g. an entire area of functionality). What do I do now? Some things I have thought about doing: Maintain a different branch in subversion specific to the demo system Create an installation package that has the changes for demo, then revert and build a production installation package Modularize the application (no idea how) Say: "Screw you! I will not do it!" (LOL) Use some sort of conditional logic in the app to determine if it is a demo or a production app. E.g. (if the URL contains 'demo' then show else hide). If you haven't guessed by now, this is a web application Anyways, I have no experience in this scenario as to which one is better or if none of these are any good. Anyone have an answer, strategy, something!?

    Read the article

  • Maintaining unmaintainable code

    - by uman
    Hi guys, I'm at a job where I have to do a lot of bugfixing in code that's, shall we say, not the most best-practicey in the world. One example I found today: The logic for checking whether a form has been modified and we should prompt the user if he wants to save is in a function called "IsImage". The function has nothing to do with images whatsoever. Hmmm... How do fellow stackexchangers deal with situations like this and maintain their sanity?

    Read the article

  • A more reliable and more flexible sp_MSforeachdb

    - by AaronBertrand
    I've complained about sp_MSforeachdb before. In part of my "Bad Habits to Kick" series in 2009-10, I described how I worked around its sporadic inability to actually process all of the databases on an instance: http://sqlblog.com/blogs/aaron_bertrand/archive/2010/02/08/bad-habits-to-kick-relying-on-undocumented-behavior.aspx I lumped this in a "Bad Habit" category of relying on undocumented behavior, since - while the procedure does have rampant usage - it is, in fact, both undocumented and unsupported....(read more)

    Read the article

  • How do people maintain their test suite?

    - by Ida
    In particular, I'm curious about the following aspects: How do you know that your test cases are wrong (or out-of-date) and needed to be repaired (or discarded)? I mean, even if a test case became invalid, it might still pass and remain silent, which could let you falsely believe that your software works okay. So how do you realize such problems of your test suite? How do you know that your test suite is no longer sufficient and that new test cases should be added? I guess this has something to do with the requirement changes, but is there any systematic approach to check the adequacy of test suite?

    Read the article

  • How to redesign the UI of a large project?

    - by jem88
    I'm currently working at a quite big Android project (a social network, you can see it here if is useful to answer the question). We decided to restyle the whole app, changing all the UI design. The code I actually have is complex, there are many controllers, and it's a little messy too. Is it "better" in terms of time and code cleanliness to take one controller per time, and rewrite it entirely, or to modify one controller per time? The layout change entirely anyway, so for that I know I've to restart from scratch. Maybe it could seem a stupid question, but with the "time" variable I really can't see the best way.

    Read the article

  • Different execution plan for similar queries

    - by Graham Clements
    I am running two very similar update queries but for a reason unknown to me they are using completely different execution plans. Normally this wouldn't be a problem but they are both updating exactly the same amount of rows but one is using an execution plan that is far inferior to the other, 4 secs vs 2 mins, when scaled up this is causing me a massive problem. The only difference between the two queries is one is using the column CLI and the other DLI. These columns are exactly the same datatype, and are both indexed exactly the same, but for the DLI query execution plan, the index is not used. Any help as to why this is happening is much appreciated. -- Query 1 UPDATE a SET DestKey = ( SELECT TOP 1 b.PrefixKey FROM refPrefixDetail AS b WHERE a.DLI LIKE b.Prefix + '%' ORDER BY len(b.Prefix) DESC ) FROM CallData AS a -- Query 2 UPDATE a SET DestKey = ( SELECT TOP 1 b.PrefixKey FROM refPrefixDetail b WHERE a.CLI LIKE b.Prefix + '%' ORDER BY len(b.Prefix) DESC ) FROM CallData AS a

    Read the article

  • Improving SQL Code

    - by jeremib
    I'm using Pervasive SQL. I have the following UNION of mulitple SQL statements. Is there a way to clean this up, especially the Pay Date an the Loc No fields that are selected in each statement. Is there a way to pull this out and have only one place to need to change those two fields? ( SELECT '23400' as Gl_Number, y.Plan as Description, 0 as Hours, ROUND(SUM(Ee_Curr),2) as Debit, 0 as Credit FROM "PR_YLOC" y LEFT JOIN PR_SUMM s ON (s.Summ_No = y.Summ_No) WHERE y.Loc_No = 1041 AND s.Pay_Date = '2010-04-02' AND y.Code IN (100, 105, 110) AND y.Type = 3 GROUP BY y.Plan ) UNION ( SELECT '72000' as Gl_Number, y.Plan, 0, ROUND(SUM(Er_Curr),2), 0 FROM "PR_YLOC" y LEFT JOIN PR_SUMM s ON (s.Summ_No = y.Summ_No) WHERE y.Loc_No = 1041 AND s.Pay_Date = '2010-04-02' AND y.Code IN (100, 105, 110) AND y.Type = 3 GROUP BY y.Plan ) UNION ( SELECT '24800', c.Plan, 0, ROUND(SUM(Ee_Amt),2), 0 FROM "PR_CDED" c WHERE Pay_Date = '2010-04-02' AND Loc_No = 1041 AND Code = 100 GROUP BY c.Plan ) UNION ( SELECT '24800', c.Plan, 0, 0, ROUND(SUM(Ee_Amt),2) FROM "PR_CDED" c WHERE Pay_Date = '2010-04-02' AND Loc_No = 1041 AND Code = 115 GROUP BY c.Plan ) UNION ( SELECT '24150', c.Plan, 0, 0, ROUND(SUM(Ee_Amt),2) FROM "PR_CDED" c WHERE Pay_Date = '2010-04-02' AND Loc_No = 1041 AND Code = 241 GROUP BY c.Plan ) UNION ( SELECT '24150', c.Plan, 0, ROUND(SUM(Ee_Amt),2), 0 FROM "PR_CDED" c WHERE Pay_Date = '2010-04-02' AND Loc_No = 1041 AND Code = 239 GROUP BY c.Plan ) UNION ( SELECT '24120', c.Plan, 0, ROUND(SUM(Ee_Amt),2), 0 FROM "PR_CDED" c WHERE Pay_Date = '2010-04-02' AND Loc_No = 1041 AND Code = 230 GROUP BY c.Plan ) UNION ( SELECT '24100', c.Plan, 0, ROUND(SUM(Ee_Amt),2), 0 FROM "PR_CDED" c WHERE Pay_Date = '2010-04-02' AND Loc_No = 1041 AND Code = 225 GROUP BY c.Plan ) UNION ( SELECT '23800', c.Plan, 0, ROUND(SUM(Ee_Amt),2), 0 FROM "PR_CDED" c WHERE Pay_Date = '2010-04-02' AND Loc_No = 1041 AND Code = 245 GROUP BY c.Plan ) UNION ( select m.Def_Dept as Gl_Number, t.Short_Desc, (SELECT SUM(Hours) FROM pr_earn en WHERE en.Loc_No = e.Loc_No AND en.Emp_No = e.Emp_No AND en.Pay_Date = e.Pay_Date AND en.Pay_Code = e.Pay_Code) as Hours, (SELECT SUM(Pay_Amt) FROM pr_earn en WHERE en.Loc_No = e.Loc_No AND en.Emp_No = e.Emp_No AND en.Pay_Date = e.Pay_Date AND en.Pay_Code = e.Pay_Code) as Debit, 0 from pr_earn e left join pr_mast m on (e.Loc_No = m.Loc_No and e.Emp_No = m.Emp_No) left join pr_ptype t ON (t.Code = e.Pay_Code) where e.loc_no = 1041 and e.pay_date = '2010-04-02' group by m.Def_Dept, t.Short_Desc ) Thanks

    Read the article

  • howto plan RAID for ESX

    - by maruti
    eight 300GB SAS drives are available. Can ESX be put on one disk as RAID-0 and others as RAID-5 ? so that in the event of disk failure data (VMs) are safe. if os disk RAID-0 fails could that be installed on replacement disk and still be able to keep VMs running? if not RAID-1 for OS is only option for OS disk? please suggest any other RAID options.

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >