Reverse Engineering Celestia

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
GlobeMaker
Posts: 216
Joined: 30.10.2005
With us: 18 years 10 months

Reverse Engineering Celestia

Post #1by GlobeMaker » 31.12.2005, 19:43

Reverse Engineering Celestia

Summary

To efficiently develop new versions of Celestia, outsiders would
benefit from purchasing the best computer programming software.
Please recommend which IDE and UML software to purchase.

Details

Outsiders, like me, sometimes want to make changes to the
Celestia open source software. The insiders, like Chris, Clint,
Fridger, Christophe, Toti, Selden, and Grant may be writing the
Celestia programs using tools that relieve them of the need to type
in most characters seen in the source code. If the outsiders knew
what software the insiders were using, then the outsiders would
be able to be more efficient. In particular, the reverse-engineering
of the existing program would be more accurate, which would
improve my understanding of the algorithm. Please recommend
which IDE and UML software to purchase. If there is other software
I should purchase that is not an IDE or UML program, please
enlighten me about its name. I expect to compile from a command
line, but analyze the program, and write new classes from a GUI.

Conclusion

Please post your software purchase recommendations here.
Please focus on tools that can be used on Microsoft Windows XP,
but all types are welcome. I may go over to Linux on one of my
computers. The reverse-engineering that I am interested in would
produce graphical displays of classes that call into a hierarchy of
other classes and functions. With that overview, I would be able to
confidently limit my work to a small section of the Celestia program.

In another thread, the following links were provided by Paolo:

MagicDraw UML 10.5
http://www.magicdraw.com

Free UML Modeling Tool
http://www.visual-paradigm.com

Poseidon for UML is a fully fledged tool with a free Community Edition
http://www.gentleware.com

Get practical software analysis knowledge on UML, UP, OO, MDA, ER
http://www.methodsandtools.com

These products do not include C++ compilers. Which compiler should I buy?
The UML programs, above, are ready to integrate compilers. They are
free for a month, but this will take a year. I did not try any of these
programs, yet. Please post your software purchase recommendations here.
My budget for re-education in 2006 is $1500.
Your wish is my command line.

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 22 years
Location: NY, USA

Post #2by selden » 01.01.2006, 13:58

GM,

A quibble: I don't do source code development for Celestia. My contributions to Celestia development tend to be the reporting or verification of bugs.

If you're using Windows and want to take advantage of others' experience here, you should consider getting a version of Microsoft Visual Studio, preferably 2003 or later. Supposedly unopened boxes often are available on e'bay for reasonable prices. If you're affiliated with an educational institution, you can get the Academic version for under $100.

gcc and other free Unix development software is available with Cygwin.
Selden

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 5 months
Location: Hamburg, Germany

Post #3by t00fri » 01.01.2006, 17:02

GlobeMaker wrote:...
The insiders, like Chris, Clint,
Fridger, Christophe, Toti, Selden, and Grant may be writing the
Celestia programs using tools that relieve them of the need to type
in most characters seen in the source code. If the outsiders knew
what software the insiders were using, then the outsiders would
be able to be more efficient
..


GM,

just like Selden recommended, I am using Microsoft Visual Studio 2003, if I /have/ to write or check Celestia code under Windows.

In order to sync all working steps to my preferred UNIX development environment, I make intensive use of a layer of CYGWIN Linux on top of Windows. So I don't need special Diff versions or even CVS programs for Windows, the excessive need for "clicking" being a continuous horror to me ;-)

Under Cygwin I can use a most convenient terminal with a powerful 'zsh' (z-shell) and full ssh (secure shell) for networking. I can use at full advantage what I know since decades: UNIX shell-scripting, including of course PERL scripting...All these goodies being free of charge of course.

Really, for professional computer work, and typing with ~10 finger technology ;-) it is a pain to be forced by Windows to continuously take your hands off the keyboard for doing some stupid clicking! It's slow, highly unelegant and tiresome...

In a CVS subdirectory on my HD I maintain an always /virgin/ CVS copy of Celestia, while the current Celestia copy where I make changes, resides in another subdirectory.

As to CVS, I don't need to login explicitly, since due to my developer account at SF, I was able to deposit my ssh public IDs there from all the machines I tend to use! So all it takes to update the virgin Celestia from CVS is to cd to the (virgin) Celestia root directory (from within my Cygwin terminal) and type a simple alias: 'cvsup', standing for

cvsup='cvs -d:ext:t00fri@cvs.sourceforge.net:/cvsroot/celestia up -d -P'

The equally simple and short subsequent command

'make'

then does all the rest! It /one-way-syncs/ the updated code with my actual Celestia copy in the working directory. That sync process is very fast and clever, using the very poweful tool 'rsync' from the development crew of the Apache Web server...In particular, it means that any already compiled object files, the sources (or headers) of which did not change during the updating, will remain untouched! Thus, only very little recompilation is usually required after an update.

CVS-updating and subsequent rebuilding takes rarely more than 1 minute altogether!

As mentioned initially, any major coding I much prefer to do under Linux (KDE Desktop). So again all is free of charge here. The native Linux compiler is gcc of course. More recently I sometimes also use a KDE GUI development environment, 'KDevelop', which is quite convenient indeed. Since it has customizable key-shortcuts for every operation, I can continue working with the keyboard only. KDevelop has a neat Editor (Kate) that color-highlights and formats the C++ code (as well as any other programming or shell language). Most importantly KDevelop lists the Classes and Methods, allows to jump to the definitions, has a fancy bookmarking and error retrieving system. The CVS updating process is integrated in that GUI and amounts to just hitting one key, but otherwise I also like to use the same tools as under Cygwin. Of course a debugger is also integrated.

Bye Fridger

Paolo
Posts: 502
Joined: 23.09.2002
With us: 21 years 11 months
Location: Pordenone/Italy

Post #4by Paolo » 01.01.2006, 22:51

Hi Globemaker

My 2 cents.

Now my favourite tool is Visual studio 2003 (VS2003). It is quite powerful and has a lot of features so its a bit complex. I'm not a developer for job but after some years fighting against Visual C++ 6.0 for hobby now I can mange it form my personal experiments and to compile Celestia.

Despite the other tools it has an unrivalled Debugger for the windows environment. And this is obvious: its M$ stuff. To follow at least partially the main execution of Celestia I found it essential.

VS2003 fits very well my programming style that is /Scratch & Refine/ so I don't use UML or other tools to write down software specifications, first of all I write the software in English as Doxygen style comments that at the end will remain in the source code. After that I start coding in C++ very roughly giving names to classes, methods, variables (VS2003 has a handy smart helper). I start with if, switch, loop statements ad then I refine with details looking for methods and function names in the libraries (VS2003 has a handy object inspector and other tools to find very rapidly what you need even if you dont remember the correct names of the methods or you don't know the names at all). In the meanwhile I update comments and compile the code continuously in order to get sintactically correct code that does nothing, but potentially is almost ready to work. (VS2003 has a very fast compiler and with pre complied header technology it is even more fast).
At this point I start the refining phase with debugging. The most of the work is done but since now I didn't care so much of details so there should be a lot of logical mistakes. So I start tracing the code execution step by step checking variables content. (VS2003 here is unpayable). If I found errors I can correct them immediately. If the errors are very small (name mistakes and so) VS2003 can recompile the changes on the fly and continue the execution of the program. I continue since the things are not ok.

Someone should say that this is not serious programming method it is a programming by tentatives, but since I'm a hobbyist programmer and in the years I've followed different styles in different languages, at the end I found this method the most convenient because IMHO it has at least 3 advantages:
- The code is really commented;
- The code is almost truly debugged;
- It is really fast;
The drawback is that without a tool such VS2003 it is impossible to get the same results if you are not a C++ professional.

Moreover using doxygen style comments I can get something that perhaps you've missed:

The reverse-engineering that I am interested in would
produce graphical displays of classes that call into a hierarchy of
other classes and functions. With that overview, I would be able to
confidently limit my work to a small section of the Celestia program.


And that for Celestia you can get at: http://celestia.teyssier.org/source-doc ... aCore.html (Waiting for Chrisptophe's updating now that 1.4.0 was released.)
The collaboration Graphs are not as detailed as UML representations of Celestia code but can give you an idea of the data structure. Doxygen has also other graph type capabilities in addition to collaboration one.
Moreover I think that UML tools are really effective in projects where a team is starting from scratch something completely new. Reverse engineering of Celestia in UML should take a LOT of time and the risk is that the work will never be finished because of the new updates.

Perhaps your contribution should be directed better.

Kind regards
Remember: Time always flows, it is the most precious thing that we have.
My Celestia - Celui

suwalski
Developer
Posts: 62
Joined: 03.12.2003
With us: 20 years 9 months
Contact:

Post #5by suwalski » 02.01.2006, 00:37

Don't waste your money. There are no tools for Windows that are anywhere near as good as what you get for free with Linux. Go grab yourself a copy of Ubuntu and grab the Anjuta IDE.

Honestly, I spent *hours* fumbling with MSVC before I got Celestia compiling. There's no standard build method!

GlobeMaker wrote:...may be writing the
Celestia programs using tools that relieve them of the need to type
in most characters seen in the source code. If the outsiders knew
what software the insiders were using


That part made me giggle.

As far as I know, none of the developers use an IDE at all. Chris, I believe, uses emacs. I use vi, though occasionally I dabble in the Anjuta IDE (it has a nice gdb front-end built in).

For making small changes, there is absolutely no need for an IDE. It just gives you nothing but complexity.

For what it's worth, I'm not much of a programmer. Pointers often confuse the living daylights out of me. Still, without any diagrams or anything, it took me "not long" to get familiar with the Celestia code.

If you want to read something that is heavily documented, I suggest taking a look at my GTK code (src/celestia/gtk). Any line that does anything at all is documented. The core code, while not as comment-heavy, is also surprisingly easy to read.

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 5 months
Location: Hamburg, Germany

Post #6by t00fri » 02.01.2006, 01:09

suwalski wrote:Don't waste your money. There are no tools for Windows that are anywhere near as good as what you get for free with Linux. Go grab yourself a copy of Ubuntu and grab the Anjuta IDE.

Honestly, I spent *hours* fumbling with MSVC before I got Celestia compiling. There's no standard build method!

GlobeMaker wrote:...may be writing the
Celestia programs using tools that relieve them of the need to type
in most characters seen in the source code. If the outsiders knew
what software the insiders were using

That part made me giggle.

As far as I know, none of the developers use an IDE at all. Chris, I believe, uses emacs. I use vi, though occasionally I dabble in the Anjuta IDE (it has a nice gdb front-end built in).
...

Pat ,

you apparently did not read my detailed post above your own ;-) . When making statements about the developer's habits it might have been worth reading ...

In fact, I don't share your statement about the Microsoft IDE. I configured VC++ 2003 Net /quickly/ without any problems and the code compiles fast. The handling is very convenient. Other people have similar experiences. All the usual features like class browser and jumping to method definitions etc are there. Also it has a fairly good debugger for Windows specific code.

++++++++++++++++++++
After developing code in a variety of languages for decades by just using Emacs, I recently learned that modern IDE's have quite some advantages, too, notably in case of complex code structures.
++++++++++++++++++++

Above, I also described my experiences with KDevelop...but I better stop since you don't read it anyway ;-)

I suppose the Anjuta IDE is gtk/gnome-based and you are working for Ubuntu? ;-) . While KDevelop is really mature, at version 3.2.2 (!), Anjuta 2.0.x seems like the first release for gtk2? Certainly KDevelop has all the features of Anjuta and much more...and the interface is also beautiful ;-) . Just to help you out a bit: Toti also uses KDevelop (exclusively)...And so does Christophe, of course!

+++++++++++++++
In my experience it is really too much for a "Windows-only person" to switch to Linux at the same time with struggling to build and understand a complex program like Celestia!
+++++++++++++++
Even the simplest shell comands are presumably lacking, etc...

After your amazing sentence...
suwalski wrote:Go grab yourself a copy of Ubuntu


let me just do a 'ldd celestia' for GM, as a little reminder that also in Linux a lot of detailed knowledge about required libraries and headers is needed before there is a chance that things work as smoothly as your statement (incorrectly) seems to suggest:

Code: Select all

ldd celestia
        libpng.so.3 => /usr/lib/libpng.so.3 (0x4001a000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40048000)
        libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x4008d000)
        libgtkglext-x11-1.0.so.0 => /usr/local/lib/libgtkglext-x11-1.0.so.0 (0x40095000)
        libgdkglext-x11-1.0.so.0 => /usr/local/lib/libgdkglext-x11-1.0.so.0 (0x40099000)
        libpangoxft-1.0.so.0 => /opt/gnome/lib/libpangoxft-1.0.so.0 (0x400eb000)
        libpangox-1.0.so.0 => /opt/gnome/lib/libpangox-1.0.so.0 (0x400f2000)
        libGLU.so.1 => /usr/lib/libGLU.so.1 (0x400fd000)
        libGL.so.1 => /usr/lib/libGL.so.1 (0x40179000)
        libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x401fd000)
        libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x40213000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40267000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40270000)
        libgtk-x11-2.0.so.0 => /opt/gnome/lib/libgtk-x11-2.0.so.0 (0x40289000)
        libgdk-x11-2.0.so.0 => /opt/gnome/lib/libgdk-x11-2.0.so.0 (0x40586000)
        libatk-1.0.so.0 => /opt/gnome/lib/libatk-1.0.so.0 (0x40607000)
        libgdk_pixbuf-2.0.so.0 => /opt/gnome/lib/libgdk_pixbuf-2.0.so.0 (0x40620000)
        libpangocairo-1.0.so.0 => /opt/gnome/lib/libpangocairo-1.0.so.0 (0x40636000)
        libpangoft2-1.0.so.0 => /opt/gnome/lib/libpangoft2-1.0.so.0 (0x4063d000)
        libpango-1.0.so.0 => /opt/gnome/lib/libpango-1.0.so.0 (0x40662000)
        libgobject-2.0.so.0 => /opt/gnome/lib/libgobject-2.0.so.0 (0x40699000)
        libgmodule-2.0.so.0 => /opt/gnome/lib/libgmodule-2.0.so.0 (0x406d2000)
        libdl.so.2 => /lib/libdl.so.2 (0x406d6000)
        libglib-2.0.so.0 => /opt/gnome/lib/libglib-2.0.so.0 (0x406d9000)
        libcairo.so.2 => /usr/lib/libcairo.so.2 (0x40761000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x407af000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x407de000)
        libexpat.so.0 => /usr/lib/libexpat.so.0 (0x40850000)
        libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x40870000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40879000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40977000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0x40985000)
        libz.so.1 => /usr/lib/libz.so.1 (0x409b3000)
        libglitz.so.1 => /usr/lib/libglitz.so.1 (0x409c3000)
        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x409e9000)
        libm.so.6 => /lib/i686/libm.so.6 (0x40aa9000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40acc000)
        libc.so.6 => /lib/i686/libc.so.6 (0x40ad4000)
        libXft.so.2 => /usr/X11R6/lib/libXft.so.2 (0x40c08000)
        libGLcore.so.1 => /usr/lib/libGLcore.so.1 (0x40c1b000)
        libnvidia-tls.so.1 => /usr/lib/tls/libnvidia-tls.so.1 (0x413d9000)
        libXrandr.so.2 => /usr/X11R6/lib/libXrandr.so.2 (0x413db000)
        libXinerama.so.1 => /usr/X11R6/lib/libXinerama.so.1 (0x413df000)
        libXcursor.so.1 => /usr/X11R6/lib/libXcursor.so.1 (0x413e3000)
        libXfixes.so.3 => /usr/X11R6/lib/libXfixes.so.3 (0x413ec000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)


Bye Fridger

Topic author
GlobeMaker
Posts: 216
Joined: 30.10.2005
With us: 18 years 10 months

Post #7by GlobeMaker » 02.01.2006, 02:17

Thank you Paolo, Selden, Suwalski, and Fridger for your
comments.

I am reading the Doxygen documentation that Paolo mentioned
above. Maybe that is better than a UML class diagram.

It will take me a long time to produce useful software based
on the analysis of the present Celestia source code. I am
doing this to educate myself on programming skills for
complicated software. I am already skilled at writing
programs in old languages, so this big program is
appropriate to expose me to the harsh realities of 2006++.

for (I know I am diving; into deep cold < waters;
with !subMerged::objects()-- )
{
CelestiaReverseEngineering::UML(productSurvey)

This is an essay on the results of reading about the
Unified Modeling Language (UML) to prepare to purchase
software to reverse engineer the Celestia source code.
Paolo alerted me to three products to consider :
MagicDraw, Visual Paradigm, and Poseidon by Gentleware.
Also, I obtained the specification for UML 2.0 from
the Object Management Group at http://www.omg.org .

After reading the two specs for UML infrastructure and
superstructure, I concluded that the "Class Diagram" in
UML will be the best available substitute for a flowchart.
After these diagrams are produced, forum readers will be able
to look at them to see the static structure that connects
the classes. With these class diagrams, new developers will
have an easier task of visualizing and understanding which
classes are important for the new Celestia features that are
wanted.

Here is a class diagram link at Borland :
http://bdn.borland.com/article/0,1410,3 ... ssdiagrams

Top choice::$300:VP-UML Standard Edition
($700 : VP-UML Professional Edition with IDE to author programs)
Visual Paradigm VP-UML provides a handy way to reverse engineer
various sources (including binary files) into UML class models.
This feature is called Instant Reverse. If only a .exe file is to
be reverse engineered, it must be created by Microsoft?® Visual
Studio .NET . But when the C++ source code .cpp and .h files are
available, the .NET is not required. .NET 2003 is supported, but
the 2005 version of .NET is not supported. Look at this animated
tutorial, click on C++ , 3 inches above the bottom of the page:
http://www.visual-paradigm.com/product/ ... pumlse.jsp
VP is Java centered, but it can make class diagrams from C++
source code. The Professional version may be justified only for
Java. A free 30 day download may be used to make the class
diagrams for Celestia, but with Visual Paradigm watermarks across
them.

Second Choice::MagicDrawTM Enterprise Edition $1599
MagicDrawTM UML 10.5 features
Round-trip support for J2EE, C#, C++, CORBA IDL programming
languages, .NET, XML Schema, WSDL), but Java is emphasized.
Round trip means it can reverse engineer from source code to
UML class diagrams.
Enterprise Edition C++ source code reverse engineering.
http://www.magicdraw.com/


Third choice::$249 Poseidon by Gentleware.
This has reverse engineering for Java. Plugs-ins are available,
but not for C++ reverse engineering.


Conclusion::
{
The UML class diagrams could be displayed on your Forum
this week for free. Then, I could pay $300 to keep the
Visual Paradigm software, if the class diagrams are better than
the Doxygen diagrams. The Visual C++ Toolkit 2003 compiler,
that I already have, is not needed to make the class diagrams,
apparently.
}
}
Your wish is my command line.

suwalski
Developer
Posts: 62
Joined: 03.12.2003
With us: 20 years 9 months
Contact:

Post #8by suwalski » 02.01.2006, 02:19

t00fri wrote:you apparently did not read my detailed post above your own ;-) . When making statements about the developer's habits it might have been worth reading ...

I read the entire thing before posting. But you put equal weight on using cygwin and bash/zsh. You "sometimes" use KDevelop. You use MSVC if you "/have/" to. My statement is not incorrect.

t00fri wrote:In fact, I don't share your statement about the Microsoft IDE. I configured VC++ 2003 Net /quickly/ without any problems and the code compiles fast. The handling is /very/ convenient. Other people have similar experiences. All the usual features like class browser and jumping to method definitions etc are there. Also it has a fairly good debugger for Windows specific code.

I just can't agree with that. I cannot, for the life of me, figure out how to get the damned code to compile. It's always missing libraries, paths have to be added by hand, the workspaces checked into CVS don't work at all for some reason with recent versions of the development environment. It's hell, plain and simple. There is no organization, there are no standards, zero automation.

t00fri wrote:After developing code in a variety of languages for decades by just using Emacs, I recently learned that modern IDE's have quite some advantages, too, notably in case of complex code structures.

While it's true that writing Java without an IDE is painful, C++ is quite easy to get along with.

t00fri wrote:I suppose the Anjuta IDE is gtk/gnome-based and you are working for Ubuntu? ;-) . While KDevelop is really mature, at version 3.2.2 (!), Anjuta 2.0.x seems like the first release for gtk2? Certainly KDevelop has all the features of Anjuta and much more...and the interface is also beautiful ;-) .

I don't work for Ubuntu. I recommend Ubuntu because it's free. In fact, they are my company's competition, but if someone wants to try Linux, it's really the best way to go. Anjuta is a lot more basic than KDevelop in most ways. But it's good enough. It certainly doesn't have a million things in the menus. It's a lot more like the DevC++ IDE, I suppose.

t00fri wrote:In my experience it is really too much for a "Windows-only person" to switch to Linux at the same time with struggling to build and understand a complex program like Celestia!

I've helped people who have never opened a command line before compile and install kernels over the phone. It's really not that big of a deal. Windows users are not stupid, they're just not encouraged to exercise their knowledge of how things work behind the Fisher-Price skin.

t00fri wrote:let me just do a 'ldd celestia' for GM, as a little reminder that also in Linux a lot of detailed knowledge about required libraries and headers is needed before there is a chance that things work as smoothly as your statement (incorrectly) seems to suggest:


Of which Celestia touches, what, 10% directly? I remind you that ldd outputs the entire recursive hierarchy of libraries. Celestia/GTK actually uses less libraries directly than Celestia/Win32. I would argue that if someone is new to compiling, it's equally easy to learn under Linux as Windows. I kid you not, I can't get Microsoft's IDE to build Celestia!

Under a Debian-based distribution like Ubuntu, after extracting the source tarball using some desktop tool (just like in Windows), compiling Celestia on a newly installed system is as easy as:

Code: Select all

sudo apt-get install g++ make libgtkglext1-dev
cd celestia-1.4.0
./configure --with-gtk
make


My mom could do that faster than I could set up MSVS.net even with instructions.
Last edited by suwalski on 02.01.2006, 02:49, edited 1 time in total.

suwalski
Developer
Posts: 62
Joined: 03.12.2003
With us: 20 years 9 months
Contact:

Post #9by suwalski » 02.01.2006, 02:43

GlobeMaker wrote:for (I know I am diving; into deep cold < waters;
with !subMerged::objects()-- )
{

This stuff is really creative!

GlobeMaker wrote:Conclusion::
{
The UML class diagrams could be displayed on your Forum
this week for free. Then, I could pay $300 to keep the
Visual Paradigm software, if the class diagrams are better than
the Doxygen diagrams. The Visual C++ Toolkit 2003 compiler,
that I already have, is not needed to make the class diagrams,
apparently.
}
}


But (personally) I still don't think you will get a lot of mileage out of these pieces of software. I've used a number of pieces of Enterprise-class UML software in university, and it all plain sucked. I think that if you put Celestia through it, you'll get a very large, very ugly schematic with a million crossing lines and more information than any human being can handle. I know, I know: "That was 2005, we're in 2006 now!"

Herein lies the paradox. To create a good UML diagram, one has to be intimately familiar with the source code. It's usually recommended that the person writing the source code is intimately familiar with the UML.

The software will most likely produce an overwhelming spider web of information. If it does not do that, then the diagram will be overly simple, like what Doxygen produces. A few hours of reading code in the src/celengine/ directory would be a much better investment, in my opinion.

The OMG (*Oh* *My* *God!*) has had some really stupid ideas in the last few years, most of the crap that is UML being one of them.

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 5 months
Location: Hamburg, Germany

Post #10by t00fri » 02.01.2006, 03:38

Pat,

suwalski wrote:
t00fri wrote:you apparently did not read my detailed post above your own ;-) . When making statements about the developer's habits it might have been worth reading ...

I read the entire thing before posting. But you put equal weight on using cygwin and bash/zsh. You "sometimes" use KDevelop. You use MSVC if you "/have/" to. My statement is not incorrect.

Yes it is. Under Windows I only use cygwin and zsh/ssh for CVS management but the Microsoft IDE for development. That should have been understandable from my post.
The "/have to/" referred to the fact that I don't generally like to develop under Windows.

For KDE (where I do by far most of my development), I use quite regularly KDevelop as I described.
Toti and Christophe use /exclusively/ KDevelop.

You claimed instead:

suwalski wrote:As far as I know, none of the developers use an IDE at all.

I don't work for Ubuntu. I recommend Ubuntu because it's free.
Many Linuxes are free these days! OpenSusE certainly is.
Cygwin is free an perfectly cooperates with Windows....
GM was NOT asking for the cheapest solution but the best, rather. You did NOT allow for alternatives ;-)

...but if someone wants to try Linux, it's really the best way to go.
You did NOT explain with a single word WHY it's the best way to go. It's certainly not clear to me...and I am with UNIX since 20 years and with Linux since > 15 years.

Anjuta is a lot more basic than KDevelop in most ways. But it's good enough.
But it's also very useful for people to learn what /exists/, notably as to the long-proven and mature tools like KDevelop that 3 of the Celestia developers actually use regularly...

t00fri wrote:In my experience it is really too much for a "Windows-only person" to switch to Linux at the same time with struggling to build and understand a complex program like Celestia!

I've helped people who have never opened a command line before compile and install kernels over the phone. It's really not that big of a deal. Windows users are not stupid, they're just not encouraged to exercise their knowledge of how things work behind the Fisher-Price skin.


Well, you have only been around here lately. But be assured that in a non-negligible fraction of my ~3600 posts in this forum during the past 4 years, I made often VERY different experiences. My experiences can even be documented if you like, using the powerful search engine ;-)
I have tried often and with lots of effort to teach forum users how to install Cygwin under Windows and how to move around a bit in a shell. The problems that arose are of course UNRELATED to people's intelligence.

Bye Fridger

suwalski
Developer
Posts: 62
Joined: 03.12.2003
With us: 20 years 9 months
Contact:

Post #11by suwalski » 02.01.2006, 04:10

t00fri wrote:Many Linuxes are free these days! OpenSusE certainly is.
Cygwin is free an perfectly cooperates with Windows....
GM was NOT asking for the cheapest solution but the best, rather. You did NOT allow for alternatives ;-)

You did NOT explain with a single word WHY it's the best way to go. It's certainly not clear to me...and I am with UNIX since 20 years and with Linux since > 15 years.

As I've told you in the past, I work with a *lot* of distributions. OpenSuSe and Fedora are both at about the same level of maturity, which is "not very." They both suffer from being stripped-down versions of their commercial products. The situation is not exactly like that, but it's not far off -- they are largely developed by the minority of employees in one of those companies.

Ubuntu is the exact opposite. It builds up on what is already the largest distribution out there, which has the largest and most sophisticated network of developers in the world. They replace packages from Debian with their own (newer) ones, while OpenSuSe and Fedora go the other way, replacing packages in their commercial distros with the ones that are "proven" in their free versions.

In other words, Ubuntu gives the best of what Linux needs: a large stable package pool from Debian on multiple architectures, and the newest desktop packages. It helps that they release every six months.

t00fri wrote:But it's also very useful for people to learn what /exists/, notably as to the long-proven and mature tools like KDevelop that 3 of the Celestia developers actually use regularly...

Absolutely. I didn't mention it because you already had. Still, I sometimes feel as overwhelmed in KDevelop as I do in VS -- there are a lot of features. For people starting out, sometimes a simple IDE is better. Not always.

t00fri wrote:I have tried often and with lots of effort to teach forum users how to install Cygwin under Windows and how to move around a bit in a shell. The problems that arose are of course UNRELATED to people's intelligence.


The thing about Cygwin is that running a Unix shell in Windows is a little like a fish out of water. Things like path mapping and the mixing of forward and back slashes can cause confusion. I use it because a lot of things can be done more quickly than otherwise, but it is definitely a little awkward. The installation isn't very straighforward either.

Aren't you going to sleep tonight? :)

Topic author
GlobeMaker
Posts: 216
Joined: 30.10.2005
With us: 18 years 10 months

I like Doxygen

Post #12by GlobeMaker » 12.01.2006, 19:39

Reverse Engineering Status Report
January 12, 2006 Alan Folmsbee, MSEE

Summary

The reverse engineering of the open source software has a goal of producing a
rocket motor to move objects in Celestia. This goal limits the scope of the
understanding that is wanted.

1 The documentation of Celestia was reviewed.
2 The Celestia source code was read, partially.
3 A comparison was made between the Doxygen notes and UML notes from Visual Paradigm.
4 A Perl program was written to collect C++ comments from the source code.
5 In the near future, a single-stepping of the code will be done with an IDE.


Details

1 Documentation written in English sentences.
The documentation was reviewed for Celestia. Here are links to the documents reviewed :
http://cvs.sourceforge.net/cgi-bin/view ... text/plain
http://cvs.sourceforge.net/cgi-bin/view ... cvs-markup

The small amount of articulately written documentation is typical of software. I am
accustomed to hardware IC design with excellent documentation, so it is disappointing
to re-discover how common it is for knowledgeable programmers to neglect to communicate
with future programmers. It is not fun or immediately gratifying to write down the
ideas and goals of programs. The original programmers already know the sequence of events
and it must be tiresome to write down the sequence that is so clear to them. This
short-sighted attitude has plagued the software industry forever. This is revealed
by the amount of bugs and patches that are announced by makers of operating systems
and software products. There is always time to fix problems, but never enough time to
prevent them. For digital hardware products, those bugs take so much time to fix that
they are not allowed. For software products, the bugs do not take long to fix, so they
are allowed.

2 Source code was read.
Some of the Celestia source code was read. There is a large amount of reading to
do and most of it is not useful for the limited goal. I was looking for actions, but the
sequence of activity is obscured by C++ preparations. The preparations that clutter the
program flow of control are described by this incomplete list : object-orientation,
constructors, templates, classes, declarations, containers, virtual functions, and
inheritance. C++ is the worst computer language ever sold. But since it is the language
that is used for Celestia, I decided to study it. It has been a potentially valuable
educational experience. It is much easier to learn than Chinese. I recognize that a
53 year old engineer will tend to become set in his ways, and I want to remain flexible
about learning new skills. It hurts.


3 Doxygen vs. UML
A comparison was made between the Doxygen notes and Unified Modeling Language notes from
Visual Paradigm UML Standard Edition. The Doxygen class diagrams and notes are here:
http://celestia.teyssier.org/source-doc ... index.html

The Celestia source code was loaded on my 2 Gigabyte RAM PC and into the Visual Paradigm
UML tool. (My 128 Meg RAM PC choked on it). Class diagrams were produced easily. Only
class diagrams are available for C++, even though what I wanted are UML sequence diagrams.
Doxygen does not provide sequence diagrams, either. Both programs have a shallow depth
displayed for the class hierarchy. There are many classes and much depth, but both programs
emphasize the breadth of classes at one level. They both lack any facility for showing
a narrow width of classes with full depth from the top class down to a targeted class that
exists at a low level. I wish future tools would let me mark CelestiaCore as the top of
the connected classes and LunarOrbit as the target, and then see all the classes that
are called to get from the top to the bottom of the hierarchy. Isn't this the obvious goal
of a class diagram?

Here is the evaluation. Some comments relate only to examining CelestiaCore and the
lower levels of the hierarchy that it calls.

Advantages (+) and disadvantages (-) of Doxygen (Celestia 1.3.2 only)
+ Free, not $300
+ Hyperlinked views and documents in HTML browser
+ Categories of namespace, file list
- Does not show WinMain as the top class
- less complete degree of detailing (maybe 1.3.2 Celestia has less detail, URL class missing?)
- does not show Celestia 1.4.1
+ Direction arrows are not shared, so each line is separate
+ Diagram almost fits on my puny screen


Advantages (+) and disadvantages (-) of Visual Paradigm UML Standard Edition (Celestia 1.4.1)
+ Complete detail at one level of hierarchy for one class in one box
- Does not show WinMain as the top class
- Does not categorize results as being in .h file or .cpp file after Instant Reverse
- Direction arrows are shared
- Diagram is far too big for my puny screen, small letter fonts

Discussion of Navigating from CelestiaCore to LunarOrbit in both tools :
It was easy to use Doxygen. Start on main page. Select Class Hierarchy
Click on CelestiaCore and it shows two levels of hierarchy.
Then select Simulation Class.
Select SolarSystem. Some spaghetti is seen, where Orbit is not called directly.
Select Orbit.
Select CachingOrbit.
Select LunarOrbit.

Now, use Visual Paradigm UML to navigate the same path.
Form class diagram for CelestiaCore : easy. Find Simulation class in diagram, hard.
Try to use the box for Simulation to expand its sub-hierarchy :
right click, open specification, Relationship : a table shows sub classes better than Doxygen.
Try to descend into SolarSystem from the table :right click, open spec : end of the path.
Form diagram for SolarSystem : done. But Orbit is not seen because there is no spaghetti.

Conclusion : I like Doxygen more than the Visual Paradigm for my purposes. But if I
were designing new functionality, Visual Paradigm has total advantage. Doxygen reports
on the old program and does not have facilities to add new functionality.


4 // Comments were collected
A Perl program was written to collect C++ comments from the source code. This allows
me to read the comments like a book. Without this collection, the comments are fragmented
and dispersed around the software. Using the Wordpad program to "find" comments with //
is inefficient, since the comment is placed at the bottom of the screen. That obscures all
following lines, preventing speed reading. With the collected comments, fast reading is
possible because the whole screen is filled with only comments. The Perl program and the
file of collected comments are available on request.


5 Single-stepping
The Integrated Development Environment (IDE) is Microsoft Visual C++ 6.0. This cannot
compile Celestia 1.4.1, but its debugger will be tried for the single-stepping function.
If that fails, I might buy Microsoft Visual Studio 2003.


Conclusion

It is time to make a rocket motor. The simplest motor will be produced first. This first
motor will move one star. An acceleration will be applied by calculating a new position
for each pass through the main loop. A star was chosen for the following reasons :

Only one coordinate system needs to be used.
It is easy to understand where the coordinate comes from and where it is used.
The position of a single star in Celestia is not a function of any other object.
The star's position is not set by a pre-calculated orbit, like planets or satellites.


Return to “Development”