Advice sought

Advice sought

Post by Donovan Rebbech » Thu, 11 Apr 2002 01:23:35




> Student access to the Milky Way tool will be via the Web using a
> standard forms-capable Web browser (i.e. primarily the most recent
> stable releases of either Microsoft Internet Explorer or Netscape
> Navigator) running either over standard Microsoft Windows, UNIX or Linux
> platforms.

> I anticipate "random number methods" will be used by the tool to
> "generate" astronomical data (e.g. to sample from known data
> distributions).

> Aside from astronomical education, one of the major motivating factors
> of the project is also education in use of a supercomputer (a Beowulf
> cluster supercomputer). It is anticipated that the processing of large
> datasets (of order Terabytes in size) may be a possible problem.

> I was initially going to use C++ to develop the tool but now I am
> considering using Java so I am seeking advice from anyone who has
> experience in a similar development. I am not sure if this is the right
> forum and my apologies if it is not. You can send me email directly to


You might want to use java as an intermediate interface layer, running on
the client end. The main thing java has going against it is that it is very
slow. Why use a high performance cluster if the language you're using is
slow? I'd suggest doing the number grinding in C++. Java forces dynamic casts,
indirection, and other peformance liabilities on the programmer. C++ is a
step closer to the metal.

However you choose to do this, test, test, test! Coming from someone who's been
burnt by not testing (-; Assume that your program is incorrect unless a test
tells you that it is working properly. That you pass tests doesn't imply that
a program is correct, but if it fails tests, you can be pretty sure it's
incorrect, and this saves you a lot of trouble.  With software this complex,
things *will* go wrong, and you need to know when they go wrong.  Tests can't
expose every possible bug, but you'll nearly always be able to think of
automated tests that are a superset of "typical usage".

Since you've got a clean slate, start by writing (or choosing) a unit testing
framework, especially for the lower level stuff (which I suggest using C++ for)

Cheers,
--
Donovan

 
 
 

Advice sought

Post by jacob navi » Thu, 11 Apr 2002 08:57:20


Quote:> I was initially going to use C++ to develop the tool but now I am
> considering using Java so I am seeking advice from anyone who has
> experience in a similar development.

Avoid C++. It has too many problems.

Use C. It is much better as a language since it is much simpler and the
compiler technology is much more reliable. There is no easy to find C++
compiler that integrates the whole standard C++ language. Of course they
exist, but they are not easy to find, and all C++ compilers are very fragile
since the language is a monster of complexity.

C, to the contrary, is much simpler and gives you the same speed advantage
of C++ without the complications. C is highly portable, what is surely not
the case with C++.

Java is too slow. Processing terabytes of data in Java?

Please, Java was designed to be a simple language for an embedded
environment like an appliance or a web browser. Astrophysical calculations
are not really Java's strength.

C to the contrary is fairly usable for that environment, and it takes MUCH
less machine resources. Besides C programs are easy to port. It has the
disaventage of low level data representations, but it has much more level of
abstraction than Fortran, the other possible candidate.

Jacob Navia

 
 
 

Advice sought

Post by Donovan Rebbech » Thu, 11 Apr 2002 11:10:53



>> I was initially going to use C++ to develop the tool but now I am
>> considering using Java so I am seeking advice from anyone who has
>> experience in a similar development.

> Avoid C++. It has too many problems.

> Use C. It is much better as a language since it is much simpler and the

                    ^^^^^^                                ^^^^^^^

I think the right word is "different". Simpler is not always better. If you
want to be able to count the clock cycles in your code (say you're  an embedded
systems programmer) it might help, otherwise it doesn't.

Quote:> compiler technology is much more reliable. There is no easy to find C++
> compiler that integrates the whole standard C++ language.

There is no compiler that supports the whole language. However, if you don't
use some of the fancier template features (export and partial specialisations),
it's not a big problem. For example, KDE and Qt work on several platforms, and
they use very few ifdefs.

Quote:> Of course they exist, but they are not easy to find, and all C++ compilers
> are very fragile since the language is a monster of complexity.

Misleading at best.

Quote:> C, to the contrary, is much simpler and gives you the same speed advantage
> of C++ without the complications.

There's no free lunch.

If you want to write purely procedural code in C, you end up with very long
functions, that take several arguments. Humans don't read a line of code in
isolation, so the fact that each line of code is simpler does not help you
"understand" it if you have long functions.

On the other hand, if you use greater abstractions in C, you end up with
something like GTK+, which basically re-implements the C++ object model on top
of C. You have all that complexity, and it's only enforced by convention.

Quote:> C is highly portable, what is surely not the case with C++.

C++ is at least as portable as g++, and that is fairly portable. One could
target gcc and Metrowerks (for example) and still have access to all of the
language except export.

--
Donovan

 
 
 

1. Advice sought: seeking archival storage system for Linux

Recently, due to space shortage on my Windows 95 partition, I have moved my
huge collection of Offline Archive files to my Linux ext2 partition.  These
are files that I've accumulated over time -- shareware programs, graphics
files, etc. -- that I need to keep around in accessable format (if a friend
requires a certain shareware program, I should be able to dig it up within a
reasonable amount of time, etc.).  Moving them over to Linux is acceptable
because it doesn't take much effort to shut down Windows 95 (when I'm at a
convenient "stopping point" in my work), boot into Linux, get the files, etc.

The ideal solution, of course, would be to either get a bigger hard drive, or
(this is what I REALLY want to do) get an entire machine to dedicate to
Linux, so that I can use both at the same time (which is what I want to do
anyway).  But alas, money is the limiting factor: basically, I have none to
spend.

My problem is that, with all the stuff dumped onto my Linux system, I have no
space available.  In order to fit all my archives on Linux, I had to compress
a great deal of the system binaries and all of my local files.  This leaves
very little of a usable system, so I can't get a lot of work done.

What I do have is about a TON (literally!) of 3.5" high density (1.44Mb)
floppy disks.  What I am looking for is a Linux program that I can use to
archive all of my stuff onto these floppy disks.

The program would have to do this:

Priority     Function
========     ========
high         Maintain a "table of contents" that lists what files are on
             what disk(s)

high         Be able to random-access the archive: if I wanted a specific
             file, and it was located on disk #14, I wouldn't have to go
             through disks #1-13 to get to it.

high         Be able to add new files to the end of the archive, without
             having to re-do the whole thing all over again.

low          Be able to store the files in any of the filesystem formats,
             mainly MS-DOS.

I'm hoping (and praying) that this isn't such an insurmountable task.  Surely
someone else has come up with a need similar to mine, and maybe a program
exists that can fill these needs.

I'm attempting to search the archives, but so far, have had not much luck.

Please, if anyone nows of a program that can help me out, please e-mail a
response (preferable) or post a follow-up.  Thanks!
--

TEL: (805)564-1871 // FAX: 564-2315 // WWW: http://www.silcom.com/~picard
PGP Public Key and more are available through the Auto-Responder -- send
e-mail to me with the words "SEND HELP" in the Subject: line for info!
** Uphold your right to privacy - Use PGP. **

2. unresolved symbols and other problems

3. Advice Sought: Is this a good system for linux?

4. Printing Problems with HPIIp

5. Linux and BBS setup -- Advice sought

6. alsadev/KDE-devel under SuSE 7.0

7. Beginning X Programming Advice Sought

8. Installing Linux?

9. ADVICE SOUGHT: Boot problems after swapping HDD.

10. X11 Windows managers - advice sought.

11. multi-booting Linux & '95 & NT - advice sought

12. Advice Sought Re: Good Unix Database

13. RPM advice sought with respect to vmode and X windows screen resolution quest