|
Hi,
my team members are trying to cross compile a huge codebase (4100 forms, 9300 files)
from Power++ (an old C/C++ IDE made by Whatcom/Sybase ano 1999) to C#.
This codebase is very old and has a lot of issues with quality (copy and paste everywhere, spaghetti code, code smells, ...).
Everything started with a tool that converts Power++ forms to WinForms.
(that worked surprisingly well)
But now they want to convert the whole C++ codebase to C# (there is still some manual work needed to make the C# code compile).
They think if everything is translated to C# their productivity will rise and they have a lot of time to improve the code.
What do you think about this method ?
Is it a good idea to build a 'new' software completely on legacy code ?
modified 8-Jul-21 17:29pm.
|
|
|
|
|
You can go and rewrite the app all you want. No, you're not going to find a "conversion tool" to convert the code.
The language isn't going to make you magically more productive. There's plenty of stuff in the .NET BCL that will save you from having to "re-invent the wheel" in places in your code, but the real benefit to productivity is going to be how you write your new code and your design choices.
This is your opportunity to simplify your code-base and fix stuff in your original code by rewriting it from scratch.
|
|
|
|
|
sx2008 wrote: They think if everything is translated to C# their productivity will rise Straight up management thinking, an application badly written 2 decades ago, run through a n% successful converter and expect the users to be more productive.
For a start if you ever get it to compile (after spending a year fiddling with conversion issues) management will then shelve the "improve the code" effort (a never ending proposition if there ever was one) because if it works don't f*** with it!
Spend the time and redesign the application to meet current requirements and code from the start. If you have 4000+ forms I will guarantee there are improvements your user base would like to be made.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Everyone seems to assume that "legacy code" was always designed badly from the start. A good pattern is a good pattern (design). Only the tools change. I prefer a Dremel over a chisel; most of the time. Fewer rough edges in the final product.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Reread the first paragraph of the post, the OP states there are issues with the existing system.
It curls my toes thinking about trying to convert such a large codebase and betting it will work.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
It was more a rhetorical response to your generalization.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
sx2008 wrote: They think if everything is translated to C# their productivity will rise and they have a lot of time to improve the code
LOL...
No really LOL LOL LOL
|
|
|
|
|
Has this at the end worked? I think not, except adapting ported forms with implementing special logic manually.
|
|
|
|
|
In my workplace, we have an intranet website developed internally that we use for CRM. The data of our clients are shown there (MS SQL server is used as a backend to store data). The site has a limited search functionality at the moment (it'll try to match the text you type in one of the 3 fields that are indexed -company, staff contact, and director name).
I'm trying to find info about what would be the easiest method to implement a more sophisticated search (ideally that makes use of AI), like the one implemented by Google or Amazon on their website. It doesn't have to be so sophisticated, anything better than what I described above would do it. Ideally, the search should be able to guess what you're looking for based on your role, your portfolio of clients, and previous searches. It would be great if it could understand what you mean (i.e search query 'song la la la' that returns as result 'ATC -All around the world' on youtube. It would be great to implement vocal search as well.
But again it doesn't have to be that complex. Any info on where to look or which resources are readily available would be greatly appreciated. Do you know if there are (and what would be the best) search engines/AI libraries/API that are open source and that would fit this purpose? If this is not the right place to ask, on which other website or forum do you think should I ask for?
Thank you in advance
modified 17-Jun-21 12:07pm.
|
|
|
|
|
Maria Delpiano wrote: If this is not the right place to ask
Probably is the best place
Maria Delpiano wrote: what would be the easiest method to implement
Better be careful with that approach.
What is the size of your database now? And do you have actual reasonable data on the expected growth rate?
Otherwise this is what will happen. You will come up with something that works ok with 20,000 rows (across 5 tables) and then it completely falls over with 20 million rows (perhaps by locking up the database for a minute every time someone does the search.)
Maria Delpiano wrote: Any info on where to look or which resources are readily available would be greatly appreciated.
Following in google seems to return quite a bit of info.
predictive search algorithm
Maria Delpiano wrote: (ideally that makes use of AI),...It would be great if it could understand what you mean (i.e search query 'song la la la' that returns as result 'ATC -All around the world' on youtube. It would be great to implement vocal search as well.
Since you presumably have nothing now I would suggest just ignoring all of those ideas currently.
Maria Delpiano wrote: your portfolio of clients,
To me that is something you need to be very careful with. If you have user A with a set of clients X, I suspect you do not want anything associated with X showing up for user B (whose clients Y are different.)
And because of that restriction alone is it possible that you can only build your data based on one user with no sharing at all? Can you insure that a query by user A, if exposed to user B, even without the client name would not be a problem?
|
|
|
|
|
I would assume he already has client isolation already in his current, simple, search.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Hello,
It's same for 'inputs',
get if the type is good, and so the length,
for a enhanced search : history ( by client ?? ) or 'workers background' ( so filtering choice and Db feedback too.
If 'A' really go A*
if 'B' then 'go NOT 'A*'
modified 23-Aug-21 21:01pm.
|
|
|
|
|
How do you desired which of the architectural pattern to work with?
|
|
|
|
|
I reject the premise of the question.
|
|
|
|
|
Why rejecting what you should be able to deal with?
|
|
|
|
|
Experience and knowledge and what you have learnt about the business requirements.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
What if this is your startup and idea, and you've yet to write the business requirement? Your experience level is coming from a lot of books and youtube videos you have read and watch.
|
|
|
|
|
Tabah Baridule wrote: you've yet to write the business requirement Then why are you thinking about architecture patterns. Get you business plan and requirements sorted and THEN start looking into what platform(s) you will service and the different patterns that will meet your requirements.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
A pattern is where you're repeating the same block of code; it is now a pattern; your pattern. The fact that no one has used it before, or named it, makes no difference.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
|
Many patterns, such as those in the GoF book, aren't "architectural". They're more tactical, although they can help to make an architecture better.
Jim Coplien, who was well-known in the C++ world, got involved with patterns early on. Later, he said that there was too much focus on patterns. The emphasis needs to be on encapsulation, polymorphism, and inheritance. Patterns are the exception when those things, by themselves, don't produce loosely coupled code.
To understand a pattern, you need to have seen what code looked like before the pattern was applied, and after. Then, when you write or find code that looks like the "before" code, you'll know how the pattern can improve it. That's usually how a pattern gets used. How code evolves to satisfy its specifications is what determines which patterns are used; it is wrong to start out by saying which patterns will be used before you have a good sense of the high-level design.
|
|
|
|
|
Thank you, permit me to share this as a tweet.
|
|
|
|
|
|
The most correct thing previous commenters posted is that you need to handle business requirements first.
The other correct thing is that GoF patterns are mostly tactical.
Given that in my answer I'll assume is that architectural patterns are monolith, microservices, CQRS etc.
With that said I'd start from monolith application since microservices bring a lot of overhead that you might not need until you've pitched a PoC to some investors or might not need it at all if you're not going to have a team of sufficient size or your application won't endure high loads.
Then your application will evolve according to your business requirements and also to a fact that your understanding of business will evolve too.
Say you'll discover that your business problem contains of multiple subdomains. Then you can handle them via vertical slices.
Or you may need to handle spikes in application load. Then you might need to extract some microservices.
In general, my advice is to start with the simplest solution unless you're encounter requirements to act otherwise.
|
|
|
|
|