1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Programming - where should I start?

  1. Mar 2, 2015 #1
    I am currently on a gap year, and I intend to learn a programming language on my own. I know single variable calculus, some basic probability, statistics, and combinatorics, but absolutely nothing about computer science. I would appreciate it if anyone could help me figure out a good starting point for programming. I don't really plan on studying computer science in the future; I will be either doing electrical engineering or physics, but I thought I could utilize some of my time to learn a programming language as it might come in handy one day.
  2. jcsd
  3. Mar 2, 2015 #2
    Hi MohammedRady97. Yes, programming is a very useful skill, especially for electrical engineering, as coding helps in telling your chips what to do in a system. Learning programming also teaches you some managerial skills, for example, taking a huge problem and breaking it down into smaller problems to solve, and thinking logically (my teachers called it 'algorithmic thinking'.) Once you have learnt a language, it will be relatively easy to learn other programming languages as well, since only the syntax changes while the thinking and problem solving skills remain the same.

    I have a good webpage on Visual.ly, which shows a graphic mindmap on which programming language to start learning with.


    For me, I learnt C programming in school as I am studying electrical engineering currently, but I am terrible at it because I have poor problem solving skills, sad to say. I have tried learning Python and C so far. Generally, from what I hear and feel, Python is an easier language to start off with, because it is like speaking 'broken' English to a computer (of course, you'll need keywords), and Python can help a lot in Maths stuff and calculations. My school teaches Python for Business Admin students, so I guess it is applied or relevant in that field.

    If you intend to go into electrical engineering, I think you should learn C. Although it is difficult to learn as a new programmer from what I hear, I think it acts as a good springboard when you want to program in other languages (e.g. VHDL, Verilog), which is needed in digital circuits.

    I hope this helps and if anyone in the forum finds my post to be inaccurate (as it contains quite some opinions), do feel free to tell me or discuss below.

    Cheers! :D
  4. Mar 2, 2015 #3


    Staff: Mentor

    While there are many choices, they often boil down to two languages Java or Python. Both are object oriented languages, both are very popular and both are very useful.

    Check out pyzo.org for a python development environment geared for scientific applications. You'll have to research some of the packages provided to understand how they can be used. Pyzo lacks examples.

    There is also an app for the iPad called Pythonista that allows to program directly on the iPad. So you can take your multitouch interactive graphic application anywhere.

    For Java, check out processing.org and the Processing development environment. It's great for teaching casual programmers Java concepts. There extensive examples and third party libraries. I've used it to do concept work knocking off a small application very quickly.

    For more physics based learning, there's the Open Source Physics collection that can be worked on under the a Eclipse development environment. They have an extensive collection of Java examples that simulate a variety of physical systems. OSP will give you computational physics skills.
  5. Mar 2, 2015 #4
    For physics, you should learn two: a language that's good for carrying out lots of calculations (C, C++), and a language for data analysis / plotting (Python).
  6. Mar 2, 2015 #5


    Staff: Mentor

    I would agree but knowing the industry I would say Java over C or C++. This may become important when searching for a job. Java is more cross platform and for that reason it's used in a lot of web apps and android mobile apps.
  7. Mar 2, 2015 #6


    Staff: Mentor

    For pure physics work MATLAB would be a useful language to know too. Although some shops are using Python as a replacement because of the proprietary nature of MATLAB.
  8. Mar 3, 2015 #7
    I would recommend starting with C. Its probably better to get a grip on procedural programming principals before starting object oriented programming. Then learn python, its very powerful and time-efficient.

    I don't know what kind of physics calculations you guys are doing, but I think pythons virtual machine should be able to handle most (basic) things, especially since you'll save so much time with the vast amount of libraries available.

    Also, do you want to learn to program, or do you want to learn computer science? As far as I'm concerned, they're pretty different.

    It might be helpful to post your end goal. Do you want to get into website development? It could come in handy. For example, I use perl a lot to help me sort design specification document references, resources, do menial tasks, search for things, etc. And of course, you don't need to know any computer science to do this, well, with the exception of knowing regex.

    But I personally feel like once you know C very well, you can easily learn any other programming language. So again, I'd recommend learning C, some object oriented programming (go with java, python, C++, it doesnt matter), learn a bit of functional programming, it really helps you get into the whole recursion lingo, like haskell or scheme (check out SICP), some basic algorithms and data structures, and looking into regex.

    I don't know exactly how much you're looking to get into programming, of course, but I'd recommend learning a little bit of assembly too (unless you're satisfied with C's abstract definition of pointers), how to debug is crutial as well (even using a nice debugger like windbg in visual studio or gdb in netbeans won't satisfy you completely unless you know assembly, for C/C++)

    I could probably go on forever- but I will stop here.

    To recap. I recommend:

    -Learn C, and how to debug. Get into the basics of assembly too.
    -Learn big O notation
    -Read about data structures
    -Learn Scheme or Haskell, practice your recursion skills
    -Learn object oriented programming
    -Learn to use regex
    Last edited: Mar 3, 2015
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook