Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Where do I begin my studies in computer science?

  1. Apr 7, 2007 #1
    Hi, I often try to expand my knowledge studying on my own. So most of my learning is on my own. I wish now to start studying Computer Science, but honestly, I haven't the slightest idea where to begin. I downloaded the free book Concrete Abstractions by Max Hailperin, Barbara Kaiser, and Karl Knight since it seems ideal for me. However, it talks abouts schemes and says

    "To make full use of this book, you will need access to a computer with an implementation of the Scheme programming language; for the ®nal chapter, you will also need an implementation of the JavaTM programming language, version 1.1 or later."

    I don't even know what a scheme is. I'm hoping that someone can help point me in the right direction to start off my studies in computer science. So far I've studied the usual core math sequences of a standard Mathematical Physics B.S curriculum and a bit more (Functional Analysis and Lebesgue Integration and basic Algebraic Topology as found in "Geometry, Topology and Physics" by M. Nakahara. I am in severe need of a review in Differential Geometry as applied to General Relativity and also abstract algebra. ) I tried to take a course in numerical analysis but it required that have some knowledge computers, which I do not, at least not on a sophisticated level. I know nothing about statitics and probability or number theory. Thus, math recommedations would also be helpful.
  2. jcsd
  3. Apr 7, 2007 #2
    My numerical analysis book came with a CD that included programs to get you through the course. The book is Numerical Methods Third Edition by J. Douglas Faires and Richard Burden.

    We do alot of work by hand just so we know how the techniques work. But there are also alot of problems that require 100 iterations of a calculation, in which case the CD gives you the programs you need to do it. The programs are coded in different forms: C, Fortran, Maple, Mathematica, Matlab, and Pascal. If you can get your hands on a student version of one of these or something, or just use a school computer, then you can use the CD.

    Anyway, I am a Physics Major so I don't know exactly where you need to start as far as Computer Science but I have taken quite a bit of programming as a part of my curriculum. IMO, you should start with some intro class learning C++. I did well in it with no experience prior to it. After that, maybe go up the list of programming language courses from there or ask a professor. Maybe a Computer Science guy here can be more specific.

    Btw, don't be afraid of that Numerical Analysis class. I am doing well in my numerical class right now and have not had number theory or any other such course.
  4. Apr 8, 2007 #3
    http://download.plt-scheme.org/drscheme/" [Broken] is a pretty good IDE for Scheme. It works on Linux, Windows and OS X, so chances are you can use it :smile:

    Personally, I'd start with C (The C Programming Language is a very good book about it, by the way).
    The language you pick first doesn't really matters that much, so don't worry too much about it.
    Last edited by a moderator: May 2, 2017
  5. Apr 8, 2007 #4
    Important thing is what will you do with that knowledge? If you are going to use it for solving physics problems, you should know one symbolic program (matlab,maple or mathematica) and for the things you cannot do with them or when you want to have everything in your hands, one programming language (for numerical analysis I recommend Fortran). If you want to code some visualizations, you should learn Java, etc and for a background for them, C++ is the right choice.
  6. Apr 8, 2007 #5
    EvilInside, congratulations on your decision to study CS.

    Here are the major branches:

    1) Theory and Foundations

    2) Programming

    3) Architecture

    Since you are studying on your own, the Theory stuff makes good light reading if you enjoy it. Even if it is hard, try to stay motivated because the abstract viewpoint is the only way to stay flexible with computers for the years to come. This study involves proofs and logic, and it is interesting but not especially practical.

    Programming is the easy part of CS. Once you get over any natural aversion to learning new Syntax, which is quite easy thanks to the abundance of documentation available for free on the web, all languages are quite simple.

    Architecture refers to facts about the underlying hardware. This provides a solid grounding for programmers, learning about how source code gets translated into machine instructions.

    As a first language I would suggest MS Visual Basic .NET, by far. This language is designed for learning, and for the rapid development of simple programs that are not preformance critical. Here are some major professional languages:

    C/C++ is by far and away the most popular language, but this has nothing to do with it being good, in fact it has arguably always been bad and is now positively old. But you need to know C++ to get a job.

    Java is another very good language for getting a job. It is almost as much of a pain as C++, and the syntax is similar.

    C# is the newest language I have mentioned so far, and is completely new, not an upgraded C++. I would really recommend learning C#, because it can be used for doing awesome windows apps, and because it is relatively new but supported by Microsoft I think there will be a good demand.
  7. Apr 8, 2007 #6


    User Avatar
    Science Advisor

    If you're going to start with an OO language, i think that, rather than VB.NET, you should go with either C#.NET or Java because they have the most "common" syntax, so by learning one you'll be learning alot of the other.
    C# in my honest opinion is the most complete language and will be very popular i think.
  8. Apr 8, 2007 #7
    Thanks for the support. I certainly was in no hurry to learn the Scheme thing. I definetly will start learning C++, if I find one introductory enough, and the move on to Java and C#. I can't wait to simply learn what the differences are. I will look into the Theory and Foundations aspect of computer science, but if it is too mathy I will take it lightly, as a lesser priority. Hopefully my familiarity with proofs and logic in Real and Functional analysis will carry me along. I'm actually anxious to learn the Programming and Architecture aspects. School teaches rather slowly and, in my impatience, I feel rather uncomfortable practically not knowing anything about computers.
    Last edited: Apr 8, 2007
  9. Apr 8, 2007 #8
    pascal is the best langauge to learn from =]
    CRosson: why is c/C++ bad? its what drives most HPC programming and VR programming. it all depends on what one wants to do as a career.
  10. Apr 8, 2007 #9
    I already conceded that C++ is far and away the most popular language in the world, but some popular things are very bad, and C++ is one of them. Here is an excellent article:

    http://www.cs.rice.edu/~ian/Manifestoes/c++isBad.shtml [Broken]

    The conclusion is obvious: learn C/C++ if and only if you absolutely have to.

    My Opinion: The only reason anyone still learns C++ is because it was popular in the past, and the only reason it had widespread popularity is because C stands for "Cool". Because FORTRAN belonged to IBM (similar to C# belongs to microsoft), and the geeks who fancy themselves as elite uber hackers wouldn't be caught supporting the blue chip establishment, of course they went for C.

    Last edited by a moderator: May 2, 2017
  11. Apr 8, 2007 #10

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    Not a good example if you want to advocate Visual Basic. Rice uses Scheme as an introductory language. IMHO, Visual Basic, in any form, is much, much worse than C++.
    Last edited by a moderator: May 2, 2017
  12. Apr 8, 2007 #11
    Care to cite any reasons?
  13. Apr 8, 2007 #12
    but when some of modern day research requires HPC/VR whos gonna teach teh next generation of students to code in C/C++? the learning curve is alot longer than any other language.

    I understand the beef this author has with the language as a [0] teaching tool [1] memory leaks and [2] the compilers evaluation of any expression being to free.

    But from what i read of the article, it just seems to illustrate the point that C/C++ is poorly taught in university/education system.

    His article shows that the university does not demand knowledge of programming before university, which seems odd because programming is like mathematics to me and the author is like saying you don't need high school mathematics to learn calculus(which may be possible for some).

    One of the pitfalls of teaching C/C++ is syntax but if the professor isnt' gonna teach these are the common errors that might occur in syntax(or provide a quick reference list) where is a student gonna learn? I understand that algorithsm are more important than syntax which is why one learns it separate from language usually. Also it may be that the professor may not have emphasized teh importance of C/C++ or made another comparison to another language or that the student is entirely lazy to learn.

    As for memory leaks, just shows that the education system doesn't properly teach it in design, since the author points out that a student shouldn't have to learn about computer architecture or memory(which isusually a 2nd year or 3rd year course).

    As for compiler, well again its the freedom to the developer and upto the developer to know the langauges pitfalls. Again apart of the education in debugging errors and illustrates the programmers laziness/level of understanding of the language.

    Its funny that he mentions in the article, that astronomers don't need C/C++ ,but from what i've seen of HPC algorithms they are written in F or C/C++.

    again as you mentioned its on a need to use basis usually, but if the student doesn't delve over the many hours spent developing in C/C++ as a student they will pay for it later as i have.

    Also with the amount of open packages for C/C++, it would be nice if the curriculum laid out most of the popular packages(eg boost/STL) used so that the student can explore them after learning basic C earlier rather than on a need to know basis of whats available later (similar to understanding mathematics).

    Lastly, the author mentions in tidbits about C/C++ program performance compared to other languages (especially in HPC for research). Its a wonder how C# will compare to most HPC code for C/C++ and F.
  14. Apr 8, 2007 #13
    Thank you for the thoughtful response. neurocomp, you said:

    The author discusses a general fallacy:

    We all think that about ourselves, but in reality run-time errors happen. The solution is to create languages that safeguard against these kinds of errors, safeguard at compile time.

    I find it a joy to program in Ada, a language that was designed for the American department of defense. A 10 week Ada project will spend 9 weeks without getting it to compile, and then a very reliable product on the 10th week. In other words, Ada detects human errors at compile time; one study showed that projects developed in Ada83 had 1/10 the total cost of equivalent projects developed in C++.

    I don't think C# is intended for the HPC community, now or ever, but I could be wrong. F is very fast, and can be faster then anything but assembler, because F77 is a totally static language, which means all memory allocation occurs at compile time (in terms of offset addresses). C/C++ is also very fast but I think you will agree with the author that the HPC programmers :

    I am sorry to have sidetracked the thread, but it is still possible to maintain focus with this issue: the learner's decision is "to C or not to C". At some point everyone learns how to at least get by with C/C++. My personal feeling towards the language is neutral, but I know that it is more popular then it should be -- and I think learners should not start with it.

    Also, I should not have said "C/C++ is bad", in fact it is the best tool for doing what it was designed for doing: systems programming.
  15. Apr 9, 2007 #14
    boo f77...don't like the syntax and code layout =].

    Heh don't know how to quote, but i don't think that about my self(one of your article quotes) infact i still use printf ("%p"); which is my best friend because i don't know how to use debuggers(msvc or gdb) though its suppose to be easy. Can't stand command line so can't use gdb but haven't figured out msvc.

    As for the HPC quote, i think this would be something teachers (Highschool,college or university) would be able to urge their students to find their own way in coding while being syntactically correct.

    I also agree that this discussion has relevance to the thread topic because a student is asking where to begin and should know the pitfalls of languages.

    I have preference to C/C++ because of the syntax especially {} and // /**/.
    I don't like being to verbal with my code since I prefer to relate all my code to math symbols/concepts (as i started off as a math student in high school).

    From my experience as a student, its been a long journey to get to where i was comfortable in C/C++ (i still hate F77 with a passion). Started with Pascal/Turing => C(2 years)=>Maple(1), Matlab(4 years)=>
    F(1 year)=>C/C++(last few years).

    I think what was missing was the blend of C/C++ programming with mathematics assignments(which were done in Maple,Matlab,F) because at the time I didn't foresee C/C++ in the career I'm trying to pursue now even though most of the courses were guiding me in that direction through matlab.

    [SIDE NOTE: I'm a grad student aiming for a career in scientific HPC and rendering or game development.]

    Thats why i think a student should start with C/C++(or F) as soon as they have grasp of the "paper & pen" concept of developing an algorithm or concurrently. Matlab was such a waste of time to learn (its probably the easiest language to code in).

    Another reason is for large projects. Because of the lengthy time that it has taken me to learn C/C++, I've forgotten all the theory i learned in math/phys/psych that I would like to code now(though i may have some code lying around from matlab). If a student learns about large project development early, they would be able code concurrently into their large projects.

    I think for a student to learn C/C++ as their first language.
    they should first
    [0] stay away from pointers (which would be like learning any other language)
    [1] bit vector operations usually displayed in most text but not taught by the profs i had at the time.
    [2] vector operations
    [3] printf("%p"); when its time to learn pointers
    //oh how this has saved me many times

    [4] the rest is learning to decipher compiler debugging errors and using debugging tools.
    [5] Large project development/makefiles.

    As mentioned in the article and your posts above it is career specific, but if your career is undecided its best to learn some math&stats/rendering/physics based coding through large project development(eg. pseudo-realistic game engines) because once you can acheive that you would be able to code in almost any language. The only other side of learning for a student would be the more advanced mathematical/scientific theory.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook