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

How did you learn to program? (C++, Mathematica, etc)?

  1. Aug 25, 2015 #1
    Did you guys self study or take a class?
  2. jcsd
  3. Aug 25, 2015 #2


    User Avatar
    Education Advisor
    Gold Member

    Combination of classes, self study, and professional activity.
  4. Aug 25, 2015 #3
    It was self study initially. My first exposure to any kind of programming was applescript on classic MacOS, which I followed with learning C from a book.
  5. Aug 25, 2015 #4
    My professors threw a Mathematica notebook at me, and told me to come back in the morning and tell them what it did and where the error was. And forgot to tell me about the documentation.
  6. Aug 25, 2015 #5
    Pascal: class.

    Fortran: self-study.

    C: self-study.

    G (Labview): self-study.

    Matlab: self-study.
  7. Aug 26, 2015 #6
    C and MATLAB in classes
  8. Aug 27, 2015 #7
    C, various assembly, HDL, MATLAB in classes and through personal projects. I learned Python through self-study.

    It gets easier after learning your first language.
  9. Aug 27, 2015 #8


    User Avatar
    Gold Member

    Pascal at high school, C++ at University.
  10. Aug 27, 2015 #9
    Oh I wasn't really counting assembly, but we did some of that in our microprocessors and microcontrollers module as well
  11. Aug 27, 2015 #10
    I self studied some Pascal coding but I stopped, hence now I'm confined to the basis of it (using variables, doing simple calculations and giving variables an user given value)
  12. Aug 27, 2015 #11

    Dr Transport

    User Avatar
    Science Advisor
    Gold Member

    Fortran, C++ and Java: Class

    Matlab: School of hard knocks
  13. Aug 27, 2015 #12
    I learned both C++ and Python through the books and undergraduate research project. I do not think the class is necessary for learning the programming languages.
  14. Aug 27, 2015 #13
    please refer a literature that is easy and knowledgeable for learning c++
  15. Aug 27, 2015 #14


    User Avatar

    Staff: Mentor


    For more discussion of C++ books, do a search in the textbooks forum for "Stroustrup." Most threads about C++ books mention Stroustrup along with other books.

    As for how I learned to program:

    Fortran - one lecture class and one seminar-type class as an undergraduate more than 40 years ago, then 15 years experience in graduate school (experimental particle physics) and teaching.

    Assembly languages for Digital Equipment PDP-5 and IBM 1620 "minicomputers" - self-taught from books and documentation, also as an undergraduate.

    Pascal - self-taught from books about 30 years ago, so I could teach a couple of courses that used it.

    C++ - self-taught from books about 20 years ago, so I could convert the Pascal courses to C++.

    Perl - self-taught from books and the web, also beginning about 20 years ago, for Unix system-administration tasks and a collection of programs for moderating a Usenet newsgroup.

    HTML - self-taught from books and the web about 20 years ago, later some CSS and recently a bit of PHP.

    SQL - self-taught from books and the web, about 10 years ago, so I could migrate my music-collection database from a proprietary classic Mac OS database to MySQL before my classic Mac died.

    The first language is always the hardest, because you're both learning how to program (how to translate a real-world problem into a solution in program code), and the details of a particular language. If you learn how to program well in that first language, the following languages are much easier because you can focus on the details of the languages (syntax etc.).
    Last edited: Sep 21, 2015
  16. Aug 27, 2015 #15


    Staff: Mentor

    It was genetic for me! I just knew how to write programs starting with BASIC then FORTRAN and calculator programming... This was before there were formal classes for kids. We learned in Explorer Scouts at GE but I was taught some by my uncle when I was a wee lad.
  17. Aug 31, 2015 #16
    I took a class on C++. This was my introduction to the world of programming.
    My university also offered Mathematica workshops which had homework assignments making up part of your grade in a couple of upper division Analytical Mechanics classes.
    I started learning Verilog HDL on my own, though this is because learning how to work an FGPA was a research assistant project for a Physics lab. It was the first time I actually used a library for Physics. Checked out a couple of books, used a lot of online resources, including StackExchange.
    I also started learning Python on Codecademy... probably about 50% of the way through.

    Other than these formal programming languages, I've had some "informal" experience playing around with game development programs like Game Maker, RPG Maker, and designing maps for Source Engine games (Left 4 Dead, Alien Swarm) :woot:.
  18. Aug 31, 2015 #17
    Books and 20 years of tinkering around. I'm still not very good :biggrin:
  19. Aug 31, 2015 #18


    Staff: Mentor

    IMO, if you're just starting out with programming, it's better to take a class. That way you will have someone looking at your work who can provide more valuable feedback than you can if you're self-studying. After you become competent with your first language you can pick up other languages on your own.

    Here is some info about my experience.

    PL/C, Fortran, Modula-2, C - class
    Pascal, C++, Java, C#, JavaScript, x86 assembly, 68000 assembly, HTML, CSS - self-study

    Edit: Oh, and Basic in several flavors.
    Last edited: Sep 1, 2015
  20. Aug 31, 2015 #19

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    I started with BASIC, a long, long time ago. There were no computer science classes where and when I went in high school, there were no teachers who knew how to program. I taught myself.

    I also taught myself some bad habits. I unlearned those with my first class in PL/C. (I further unlearned those bad habits by being an undergraduate TA for the intro computer class.) I learned MIXAL (Knuth's MIX assembly language) as a small part of another comp sci class. (The next step was to write a MIXAL emulator in PL/C. The last step was to use the emulator to write a compiler of a subset of PL/C in MIXAL.)

    Since then, most of languages I've learned I have learned on my own, sometimes with a rare short seminar. That includes Fortran, Pascal, IBM360 assembly, 8086 assembly, APL, lisp, prolog, ART/CLIPS, C, smalltalk, HyperCard, Ada, Java, perl, awk, shell (many forms), matlab, Tcl/Tk, C++, mathematica, python, ruby, and a bunch of other languages/tools/libraries, many of which no longer exist. The only ones that involved short classes or seminars were Pascal, ART, and Ada.
    Last edited: Aug 31, 2015
  21. Aug 31, 2015 #20
    I got a degree at a fancy university, but 95% of what I know I learned myself. The programming instruction didn't amount to much.

    The language is important, but what really matters in big programs is planning and organization. They don't teach you that.
  22. Sep 1, 2015 #21
    Both. Have a degree too, but most of what I learned was self taught.
  23. Sep 1, 2015 #22
    Dabbled around in visual basic as a teen and got introduced to the concepts, then I learnt C, MATLAB and some assembly (mostly understanding how it works and edit it, not actually writing code from scratch) in university.
  24. Sep 16, 2015 #23
    We've done a bunch of assembly...MIPS32, TI, intel x86, MIPS64. Programming an MSP430 with assembly is so much fun...
  25. Sep 16, 2015 #24
    We used I think some 16 pin PIC microcontrollers...I don't actually know what language it was using :x I failed that module anyway xD I was not a fan :P
  26. Sep 16, 2015 #25


    User Avatar
    Science Advisor

    Except for a course in assembly on a very primitive computer (in 1964 all computers were primitive, a sophisticated computer had much less processing power and memory than a simple mobile phone has today), my first computer language was ALGOL60. Fast forward to 1973 - assembly programming on an Intel 8008. I stuck to assembly for several years before starting to use C.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook