legacy-code

Utility to Convert Legacy VB6 Function Calls to .NET [closed]

拟墨画扇 提交于 2019-12-31 03:03:13
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I am looking for a utility/tool to convert calls to legacy VB6 functions to the .NET equivalent. For example, it would convert this...

Reached the 65536 bytes limit

家住魔仙堡 提交于 2019-12-24 09:48:07
问题 I'm about to do some work on this hideous old java web app a friend on mine inherited a while ago. After I've set up tomcat, imported project and all that to my eclipse workspace I get this error that a method in the servlet exceeds the 65536 bytes limit. The method may very well exceed that limit, it's several thousand loc. But the thing is, I've worked on this app before without getting this error, and according to the commit logs, no code has been added to the servlet since. Can it be

Cleaning up Legacy Code “header spaghetti”

百般思念 提交于 2019-12-23 13:13:52
问题 Any recommended practices for cleaning up "header spaghetti" which is causing extremely slow compilation times (Linux/Unix)? Is there any equvalent to "#pragma once" with GCC? (found conflicting messages regarding this) Thanks. 回答1: Assuming you're familiar with "include guards" (#ifdef at the begining of the header..), an additional way of speeding up build time is by using external include guards. It was discussed in "Large Scale C++ Software Design". The idea is that classic include guards

In PHP, how can I wrap procedural code in a class?

女生的网名这么多〃 提交于 2019-12-23 12:57:16
问题 I have a large chunk of legacy php code that I need to interface with that looks like this: //legacy.php function foo() { } function bar() { } I want to be able to wrap these legacy functions in a class or somehow require_once without polluting that global namespace or altering the original file. 回答1: You can use a namespace or static methods in a class: // original file: foo.php class Foo { public static function foo() { } public static function bar() { } } // new file: require 'foo.php';

Suggest a simple ORM on .NET - design for maintaining legacy apps

老子叫甜甜 提交于 2019-12-22 08:16:22
问题 I am assigned to maintain a bunch of legacy apps with heavy stored procedure usage built before '05 when there was no ORM. The developers who work with me don't know Entity Framework nor LINQ and are not eager to learn. Is there any ORM on .NET that provides a simple object interface to existing database tables and perhaps stored procedures? I am quite happy if it enables me to code a few lines to get a class to each table, and it has properties corresponding to data in each column and some

The best way to familiarize yourself with an inherited codebase

為{幸葍}努か 提交于 2019-12-20 08:04:58
问题 Stacker Nobody asked about the most shocking thing new programmers find as they enter the field. Very high on the list, is the impact of inheriting a codebase with which one must rapidly become acquainted. It can be quite a shock to suddenly find yourself charged with maintaining N lines of code that has been clobbered together for who knows how long, and to have a short time in which to start contributing to it. How do you efficiently absorb all this new data? What eases this transition? Is

Code refactoring on bad system design

[亡魂溺海] 提交于 2019-12-18 10:52:13
问题 I am a junior software engineer who've been given a task to take over a old system. This system has several problems, based on my preliminary assessment. spaghetti code repetitive code classes with 10k lines and above misuse and over-logging using log4j bad database table design Missing source control -> I have setup Subversion for this Missing documents -> I have no idea of the business rule, except to read the codes How should I go about it to enhance the quality of the system and resolve

Dead code detection in PHP [closed]

◇◆丶佛笑我妖孽 提交于 2019-12-17 10:17:07
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I have a project with very messy code - lots of duplication and dead code here and there. Some time ago there was zero code coverage

Implicit int return value of C function

六眼飞鱼酱① 提交于 2019-12-17 02:24:25
问题 I've googled and just can't seem to find the answer to this simple question. Working on a legacy code base (ported to Linux recently, and slowly updating to a new compiler) and I see a lot of int myfunction(...) { // no return... } I know the implicit return TYPE of a function is int, but what is the implicit return VALUE when no return is specified. I've tested and gotten 0, but that's only with gcc. Is this compiler specific or is it standard defined to 0? EDIT: 12/2017 Adjusted accepted

PHP/MySQL better user searching

ε祈祈猫儿з 提交于 2019-12-13 16:00:47
问题 In trying to rejuvinate code I wrote mostly 14+ years ago. I've come to see that the lovely little setup I wrote then was... lacking in certain places, namely handling user inputs. Lesson : Never underestimate users ability to inject trash, typos, and dupes past your validators. The old way is reaching critical mass as there are 470 items in a SELECT dropdown now. I want to reinvent this part of the process so I don't have to worry about it hitting a breaking point. So the idea is to build a