What programming language is the number crunching program written in? If I am considering studying astronomy in college, would you recommend that I learn that or other programming languages? It seems most astronomers need to write some kind of programs for data processing or simulations of events, is that true? Thanks!
Copyright © 2024 Einstein@Home. All rights reserved.
Programming languages
)
Well I'm not 100% sure about Einstein, but the CPDN app, for example, is written in FORTRAN... would be "classic" for scientific purposes I think.
FORTRAN is an old language,
)
FORTRAN is an old language, with many programs written using it. I would choose C and C++.
Tullio
SETI is open source, so you
)
SETI is open source, so you could look at what their's is written in.
Other projects that are not open source would have to tell you. I do not think Einstein ever stated what it is written in.
RE: What programming
)
C, C++, and Java are all good choices. I agree with whoever said Fortran is a little long in the tooth (I learned it in 1967). You might not write an application in C today either(I learned it in 1976) but it is still used for low level interface work and astronomers still have to do that these days.
The main thing is to learn one good programming lang and the rest will be easy. I am ignoring Visual Basic (VB) since to my knowledge it is not heavily used in scientific work and some people do not think it is a good general purpose lang.
So, Java is a good
)
So, Java is a good programming language? If I learned Java really well it would be useful and anything else I needed would be easy to adapt to?
Thank you all for your comments!
RE: […] I agree with
)
The one computer-science course I took in university was on Fortran; that was around 1980. (A horrible course: there were only about 30 terminals for 150 students, and we had to go to another building to get printouts of our assignments’ output. On finding a bug we had to go back to the lab and line up again to get on a terminal for another session … and there was always someone literally breathing down our necks while we worked.)
The only programming language in which I remain ‘fluent’ is PostScript—but while it’s still commonly used for scientific graphics as well as other kinds, these days the code is usually machine-generated (e.g. by “dvi2ps� in a TeX installation).
The einstien app is C++, with
)
The einstien app is C++, with handcoded assembler in the hot loops.
Java's not a bad langauge, but not a good choice for highend scientific computing. The costs of compiling into intermediate code during development and only being converted into machine code at runtime (you can do much more agressive compiler optimizing if you do it all at once since you're not limited timewise), and of using a garbage collection engine mean that niether Java, .Net, or any of thier successors are ever likely to be able to get faster raw performance than C++.
The advantage they provide is much faster development rates which for thier normal uses (web pages and intranet apps) make the labor savings more than pay for additional server resources. The economics change when 10% slower translates to needing an extra 10,000PCs instead of just 1 or 2.
RE: So, Java is a good
)
Java is a good programming language for certain tasks, as DanNeely says. You may need to program those kinds of tasks as an astronomer but not very likely. You would more likely be programming to crunch numbers or other tasks where you need speed and low level memory access. Learn C, C++ and assembly language. You may never actually use assembly but learning it will give you valuable insight into the hardware.
Assembly on i386 and i586 can be a bit daunting but there are far simpler processors, the 8051 family, for example. You can learn 8051 at home with free assemblers, a breadboard, a few transistors, resistors and LEDs. You can build a chip programmer or buy one. Take a look at Iguana Labs if you're interested in that sort of thing.
BOINC FAQ Service
Official BOINC wiki
Installing BOINC on Linux
RE: Learn C, C++ and
)
Here's a foolish question: Do you mean computer assembly?
Assembler language ;-) which
)
Assembler language ;-) which is a bit closer to the hardware than other programming languages. You don't have many different commands but it's normally very efficient in how it uses the hardware.