Programming languages

DanNeely
DanNeely
Joined: 4 Sep 05
Posts: 1364
Credit: 3562358667
RAC: 1580

Yes. I'll add that while

Yes.

I'll add that while having some programming knowlege can be useful, there're times when you really should recruit an expert from a different dept. The original einstien app was written by a physics/astronomy grad student, about a year ago a forum user managed to get 5-7.5x speedups largely by algorithmic improvements, with a side helping of hand tweaked assembler for when the compiler wasn't quite performing at it's optimum.

Annika
Annika
Joined: 8 Aug 06
Posts: 720
Credit: 494410
RAC: 0

Fair point... a bit of

Fair point... a bit of programming can never hurt, especially in the sciences, but some stuff is just really complicated and you won't want to do it all by yourself... and my future colleagues (e.g. the people who are doing what I'm going to do after graduation) want to eat, too ;-)- as you might guess, I study Information Science.
As for programming languages, I haven't yet made experiences with too many of them, just C and a bit of assembly. We're going to do a bit more assembly, and also C++, later, whereas Java is probably going to be voluntary. Maybe it helps to know what they think people should learn ;-) personally, I think C (and also C++) are really nice languages- they are said to be a bit complicated to start with but with a bit of practice it's not so bad and it really helps you to get into the "right" way of thinking. Besides, it can be quite useful for a Unix/Linux user to be familiar with C.

Greetings, Annika

tullio
tullio
Joined: 22 Jan 05
Posts: 2118
Credit: 61407735
RAC: 0

The only language course I

The only language course I took was in PL/I and left me completely shocked. Then somebody gave me a copy of the "white book" (.i.e. Kernighan@Ritchie's "The C Programming Language") and I saw some light. I am a physicist with no formal training in computer science.
Tullio

Winterknight
Winterknight
Joined: 4 Jun 05
Posts: 1220
Credit: 312039614
RAC: 668322

I think most scientists

I think most scientists should learn to write their own programs, one because it would help them understand programs written for them, and actually they might be better at it than the professional programmers.
The best person that taught me Z80 assembler was a chemist, and at work our best programmer is the mathematical modeler.

Andy

Hofman's Atlantic
Hofman's Atlantic
Joined: 27 Oct 06
Posts: 2
Credit: 51555006
RAC: 0

My intro to computers was in

My intro to computers was in 1966 useing IBM 1620 Fortran IV. 40 years latter Fortran appears to be alive and well: see this link. Fortran is good at problem solveing, If you can build a math model of your quest the math statements go into Fortran easily.

tullio
tullio
Joined: 22 Jan 05
Posts: 2118
Credit: 61407735
RAC: 0

RE: I think most scientists

Message 60306 in response to message 60304

Quote:
I think most scientists should learn to write their own programs, one because it would help them understand programs written for them, and actually they might be better at it than the professional programmers.
Andy


I agree. But the only language I learnt enough to write a program of my own is LOGO, which is a LISP dialect. It is used to teach programming to children, but it is powerful enough to describe concepts in general relativity, as done by H. Abelson and A.Disessa in their "Turtle geometry" (MIT Press). Of course, being an interpreted language, it is slow and not useful for number crunching.
Tullio

ragnar schroder
ragnar schroder
Joined: 31 Mar 05
Posts: 29
Credit: 6611281
RAC: 1357

RE: would you recommend

Quote:
would you recommend that I learn that or other programming languages?

Writing programs is basically three things:
1. Creating use-once-then-throw-away scripts and small programs.
2. Creating major software.
3. In-between stuff.

For 1) I would suggest an interpreted language, using C/C++/Java and it's ilk is simply too cumbersome, like using a 747 to go to the local 7-11. Lisp (f.i. lush, scheme or clisp) would be a good idea, ruby too, maybe Python when speed is less of an issue.

The main requirement is convenience of use, and reasonable power. Many versions of Lisp have excellent compilers that rival C/c++ in the speed of the executable.

Also, the built in programming languages in software such as Mathematica, Maple, MatLab, Octave, R and others might be quite useful.

For 2) there seems to be no getting away from C++, in practice. In some engineering circles FORTRAN still rules, but I have a feeling those days are numbered. Anyway, welcome to the mind numbing edit-compile-run-debug-modify drudgery of compile-only languages. With C++ the cycle is even more painful and slow than with FORTRAN.

So you need two languages, I think. A good combination would be lisp and C++, possibly augmented by octave for lighter tasks.

Just my opinions, anyway.

Greeting, Ragnar Schroder

DanNeely
DanNeely
Joined: 4 Sep 05
Posts: 1364
Credit: 3562358667
RAC: 1580

RE: I think most scientists

Message 60308 in response to message 60304

Quote:
I think most scientists should learn to write their own programs, one because it would help them understand programs written for them, and actually they might be better at it than the professional programmers.

I don't disagree that basic programming is a useful skill. But creating well otimized code is an advanced skill, and not a quick or an easy one to aquire. While the difference between needing 3hrs or 3days on a personal workstation isn't that significant, 3days vs 3 weeks on a supercomputer is, as is being able to do N amount of work vs 6N on a distrubuted computing platform. Even if the majority of the work is done internally an outside review by someone who is skilled in the optimization game is strongly advised. The N vs 6N comes from E@H improvments with optimization. Prior to the last major official client update SETI also had a very large margin between the performance of hte official client and the best user tweaked ones.

Dagorath
Dagorath
Joined: 22 Apr 06
Posts: 146
Credit: 226423
RAC: 0

RE: RE: I think most

Message 60309 in response to message 60308

Quote:
Quote:
I think most scientists should learn to write their own programs, one because it would help them understand programs written for them, and actually they might be better at it than the professional programmers.

I don't disagree that basic programming is a useful skill. But creating well otimized code is an advanced skill...

Very true. It's probably not a skill your average student of astronomy/physics will have time to acquire because they'll be too busy with courses in their major.

Your advice to seek help from other departments is also sound advice. Team work is what gets the big, tough jobs done. While most astronomers will benefit from being able to create smaller/simpler programs on their own they will definitely want to get help from advanced programmers when run time needs to be reduced to the bare minimum.

Annika
Annika
Joined: 8 Aug 06
Posts: 720
Credit: 494410
RAC: 0

Sounds very logical to me...

Sounds very logical to me... I mean, I learnt a bit of astronomy for fun but that doesn't mean I could do what people who studied it can do... nowhere near that. And if I consider how much time my fellow students and i spend on learning to write code and do administration tasks i think (or hope...) it is good for something... meaning the time we spend on it will pay off in the way of us becoming better at this kind of thing than most people. Someone who studies sth else as well simply doesn't have so much time to spend on the subject- I occasionally find myself wishing for an 48-hour-day already ;-)
So, being able to do a bit of programming is certainly a good idea. Even if you're not going to write all programs by yourself you'll have a better understanding of the matter and can give better instructions to the people who do the programming for you. But I wouldn't count on that replacing a whole university degree ;-)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.