Computer Programming Help (in Off-topic)

deifeln October 26 2006 7:32 PM EDT

During the course of my PhD in Chemistry, I am required to take an introduction level computer programming course. I have been told by a few other fellow Chem folks, that the Java course, while cool, is a pain in the rear. I have also heard that FORTRAN is easy and that , as a chemist, I may actually use it. I have wiki'ed a few pages on FORTRAN and it seems like it has been around forever and is not highly respected (Wiki-folk seem to favor C/C++).

What computer programming class should deifeln take?

AdminQBVerifex [Serenity In Chaos] October 26 2006 7:51 PM EDT

Fortran is an old outdated language (I'm not even sure where you would use it nowadays.). If you can find things on it, you are less then likely to find many useful applications of Fortran. Fortran looks like Visual Basic in many ways too.

Java, C and C++ are used quite frequently and by many people, so you will find quite a bit of code base and tutorials available online to help you learn. Which is why I would choose Java or C/C++ instead of Fortran.

ottar October 26 2006 7:56 PM EDT

If you intend to eventually make your living writing code, you'd want to learn something in the C / C++ family, as well as something radically different. My boss had to write his own Lisp interpreter in assembler in his freshman year. Tough, tough comp sci program at his school, but once you've done something like that, you have the skills to pay the bills.

You're going to be a chemist at the end of this, not a programmer, so I'd say go with FORTRAN. It requires that you think like a programmer, but won't require that you think too much about pointers, data structures, UI design, object inheritance, stuff like that.

deifeln October 26 2006 7:59 PM EDT


I do not intend on making my living as a programmer...a course in programming is just a requirement of my PhD. I'm looking for an easy option as I really don't see myself using this.

AdminQBVerifex [Serenity In Chaos] October 26 2006 8:14 PM EDT

Go with Fortran then, C/C++ means learning the very TERSE syntax, functions, methods and conventions of C. And by terse, I am not kidding, here is an example of a real C program:

#include <stdio.h>
main(t,_,a)char *a;{return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
main(2,_+1,"%s %d %d\n"):9:16:t<0?t<-72?main(_,t,
;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l \
q#'+d'K#!/+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# \
){nl]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#n'wk nw' \
iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c \
;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;#'rdq#w! nr'/ ') }+}{rl#'{n' ')# \
"!ek;dc i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);}

For all you programmers out there, do you know what this program does? :)

Stephen October 26 2006 8:25 PM EDT

Yes, it hurts my eyes!

Miandrital October 26 2006 8:43 PM EDT

Do you have any other options other than Fortran, C/C++ or Java? If so, try to take a python class. Python is a really learnable language, and most people who try it, enjoy using it. Other than that, any Basic classes would probably be easy.

If you dont have any other choices, I would go with Fortran, mostly because c and c++ are really complex and you would need much more than one class in it to properly learn all its features.

AdminJonathan October 26 2006 11:11 PM EDT

As you say, Fortran might actually be useful in Chemistry. If those are your three options I would go with that.

C++ is far too complex to bother with unless you're going to make a career out of programming.

Tyriel [123456789] October 26 2006 11:28 PM EDT

I'm taking C++, and I don't find it that complicated or difficult. Mind you, I only just learned how to randomly generate numbers, but I can make a game out of it in about 20 minutes.

As for choosing between FORTRAN and C++, go with whichever one will be more useful to you. Ask people who have a PhD in Chemistry, or maybe a prof. or two, and see what they think about it.

That's my 2 biased cents.

Miandrital October 27 2006 12:04 AM EDT

Tyriel, just wait until you scratch the surface. Right now you are still looking at it. ;)

AdminNightStrike October 27 2006 2:06 AM EDT

Take a class in bash scripts :)

btw, should this be in OT?

bartjan October 27 2006 3:37 AM EDT

On the twelfth day of Christmas my true love gave to me
twelve drummers drumming, eleven pipers piping, ten lords a-leaping,
nine ladies dancing, eight maids a-milking, seven swans a-swimming,
six geese a-laying, five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.

Maelstrom October 27 2006 9:27 AM EDT

My vote is for you to take Java. That's the main language I use, but I also believe that it is better for a beginning programmer to learn Java than your other options.

OK, FORTRAN may be easier to learn, but it's old and obsolete. It's a waste of your time to learn about programming without learning about Object-oriented programming (OOP), and FORTRAN is not Object-oriented. C is also not OO, but it is still widely used... from the code Verifex posted above, you can see that you don't want to use it ;)

OOP allows you to better organize your code and ideas. For example, you might define a Protein object which can describe a general chemical protein, and then sub-objects to describe specific proteins, re-using the information common to the general protein.

Java and C++ are both OO: C++ is probably more widely used, but a given Java program can run on any operating system, and can be added to a website. Personally, I find C++ more difficult to understand that Java.

I can tell you much more about Java if you want, and I might have time to help you to understand Java concepts if you start taking that course.

Relic October 27 2006 9:51 AM EDT

C++ is an Object Oriented language? Since when? It is a procedural language if there ever was one I am sorry to say.

Maelstrom October 27 2006 10:13 AM EDT

You're thinking C, which is not Object oriented. Part of the ++ of C++ is the addition of OOP. Google it if you don't believe me.

deifeln October 27 2006 2:10 PM EDT

Thanks for all of the input. I may ask some of you for more information when I select my course for next semester (or possibly next Fall).

AdminJonathan October 27 2006 2:18 PM EDT

"FORTRAN may be easier to learn, but it's old and obsolete."

From what I've read, FORTRAN has kept up with the times; there's a 200x version of the standard and they're working on the next.

It's not used much outside of scientific stuff but that's what deifeln is doing so it would probably be a good fit.

QBOddBird October 27 2006 2:31 PM EDT

go Pascal!! xD (just kidding, don't do that)

bartjan October 27 2006 2:42 PM EDT

99 bottles of beer, the ultimate way of judging a language.

Relic October 27 2006 3:44 PM EDT

Sorry Mael, brain fart or something, yes, I was thinking C, not C++. :)
This thread is closed to new posts. However, you are welcome to reference it from a new thread; link this with the html <a href="/bboard/q-and-a-fetch-msg.tcl?msg_id=001w8T">Computer Programming Help</a>