📜 ⬆️ ⬇️

The history of a single reengineering or RNAInSpace v.1.3. Demo

There was recently such a post Rules for the development of complex systems. The story of one project , where the author describes how he successfully “delved” into one project, and then threw everything out and rewrote it from scratch.

I will try to tell the opposite story. About a month ago, I did not successfully try to present a demo version of one of my development (see Part number 7. RNAInSpace is software for semi-automatic RNA construction in space ).

It turned out that the downloading module does not have one module responsible for the display of graphics. In a nutshell, the RNAInSpace project is software for the semi-automatic construction of RNA in space. Provides 3D visualization of the structure of RNA, allows it to be modified and, through communication with the RNAWorld module, allows automating some stages of RNA folding.
')
To enter the topic - I wrote some articles here:
From proteins to RNA , Mat. criteria How to reduce the number of turns the chain? How to evaluate the course of folding of single-stranded RNA? , The limitation of optimizing methods in games with and without an adversary , One fundamental problem , Introduction to the folding of multi-stranded RNA

But this article can be discussed without knowing the subject area, by the way at the same time we can check whether it is possible to judge the quality of the software without knowing the semantics of the subject area (I argue that it can).

So this 3D visualization (module RNAInSpaceDisplay) and did not work on some computers. To implement the graphics, I used an existing VMD 1.8.7 project.

Below is a story about how I adapted VMD 1.8.7 to fit my needs.



First, let's check if this project works for you , you can download it here . Comments on how to use it are described in the article Part 7. RNAInSpace is a software for semi-automatic RNA construction in space . The only, added directory RNAInSpaceDisplay, where the .exe. If the graphics have not started, then run this .exe - it is important for me to know either the C # connection with C ++, or the schedule. Only I warn RNAInSpaceDisplay.exe does not have an exit (we remove the task through the task manager).

For those interested in the topic - let's right there and discuss the development of this software and the project as a whole.

And below I will tell you a little about the graphics module.

VMD 1.8.7 was originally written in C ++ and contains about 85,000 lines of clean code (no empty lines, comments, and so on). After my adaptation, the code contains 25,000 lines (about 100 files) - in general, also not a little.

I adapted it in many ways mechanically - I threw out the entire user interface from VMD (which is quite miserable), except for the graphics window, cleaned branches for operating systems other than Windows (I’m not going to support others), and that's all. I must say the code is terrible there, with a beard, written in general in OOP, but everything is strongly intertwined, and tied to the user interface from VMD (apparently the developers did not hear about MVC).

In general, the quality of the VMD code, and wrote it to the University of Illinois, is poor. But he has one fat plus - it works and compiles under Windows without any problems.

Of course, when adapting, it was necessary to bring it into a “divine form” - put it into a Microsoft Visual C ++ 2010 project, write a wrapper class to invoke everything you need, and make a .dll, which I then use from C #.

Reengineering took about a week in the first version, and another week recently. And I formatted the code 50% of the time (I replaced the spaces with tabs - the editor himself did it semi-automatically, I had to arrange the brackets, because I don’t digest the style when the brackets are not under one another).

Actually, I did not understand why it does not work on a number of machines. I have since moved to Windows7 x64, with WindowsVista x32. Now I tested it on these two operating systems - everything works for me.

But the way I did business, I made a UML class link diagram. I submit it for discussion.



Here in high resolution so that you can see the details

This is the best that came after reengineering :) it was a lot worse. But as we see - and so terribly enough. Why and how to fix it? Let's discuss this topic and discuss it. But the main thing (!) Is not a reason to throw out and rewrite it from scratch.

Source: https://habr.com/ru/post/143932/


All Articles