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

I want to learn programming -- How?

  1. Jun 5, 2015 #1
    I've been taugth Matlab in university but I want to improve my programming skills and learn other programming languages. I want to ask where to begin? Can I learn it on my own? I can go to some courses too.
     
  2. jcsd
  3. Jun 5, 2015 #2
    What languages? You can search Google for tutorials or find a book on Amazon. You can definitely learn programming yourself.
     
  4. Jun 5, 2015 #3

    Mark44

    Staff: Mentor

    Certainly a lot of people can learn on their own, but for many, it might be a more productive use of their time to take a class at a local college. If you are in the US, there are lots of community colleges (two-year colleges that don't award bachelors' degrees). Many of these schools offer courses in Basic, Java, or C++ (or maybe C). Having someone with experience direct your learning and critique your code is very beneficial for many people. Also, two-year schools usually have much smaller classes with tuition that is much more affordable.

    IMO, the community colleges can do a better job in some areas of teaching for the reasons I listed above. In full disclosure, I am retired, but am teaching a class in C at a local CC near where I live. Some of the other instructors (including myself) have worked in the software industry for years, and bring a lot of real-world experience to the classroom.
     
  5. Jun 5, 2015 #4

    jtbell

    User Avatar

    Staff: Mentor

    Did this include programming-type type constuctions such as if-statements, loops and functions? If yes, then you should be able to learn another procedural language by self-teaching, with a suitable textbook and some help from online forums like this one. Scroll down through a few pages of threads in this forum and you'll probably find some other threads with recommendations for languages and textbooks etc.
     
  6. Jun 5, 2015 #5
    Yes that was actually about if-statemes,loops, numerical methods and functions on matlab. Thanks. So I can start with C?
     
  7. Jun 5, 2015 #6
    Yes that would be a fine start.
     
  8. Jun 5, 2015 #7
    mit ocw has a full 20something python video course.
     
  9. Jun 5, 2015 #8
    That would be a good place to start since many other languages use constructs originally defined for C.
    If you have a good grasp of C, other languages become easier to grasp, though there are exceptions.
    Knowing C won't help much if you are trying to understand code written in an assembly language.
     
  10. Jun 5, 2015 #9
    What do you mean by that?
     
  11. Jun 5, 2015 #10
    I'm just supporting your notion that the C language is a good place to begin learning since it's a very general purpose language, but nevertheless is powerful in that it allows to write code close to hardware level (low level code).
    It does permit coding errors more readily than some higher level languages do, but that's actually quite a good thing for learning.
    You can learn a lot more by understanding a mistake and fixing it than you can from a language which tries to limit what you can do so that mistakes don't happen.
     
  12. Jun 5, 2015 #11
    Thank you for the answer.

    I study chemical enginnering but I want to learn a programming language also. My reasons:
    1) I can find a good job. My job may require programming skill besides chemical engineering.
    2) I am interested in.
    3) I'd like to code a programme or a game and sell them for extra income.

    I hope C is still a good choice to learn for those reasons also.
     
  13. Jun 5, 2015 #12

    Bandersnatch

    User Avatar
    Science Advisor
    Gold Member

    There's this site that I enjoy quite a lot:
    http://www.codecademy.com/learn
    I could never quite make myself read a book on programming, but I'm managing to slowly progress with Java on that site.
    It does not have C on the roster, though.
     
  14. Jun 5, 2015 #13
    1. For small applictions C is very widely used, and for large scale applications it's dervitive C++ even more widely.
    2. If you know C, a lot of other languages become more readily understandable.
    3. It's not going to be easy to make a commercial successful game or similar with no previous experience at all, regardless of what language you use
     
    Last edited: Jun 5, 2015
  15. Jun 5, 2015 #14
    You are right but I can give a try at least can do some things later.
     
  16. Jun 5, 2015 #15
    you can always add inline asm to your c code if you learn it.
     
  17. Jun 7, 2015 #16

    QuantumQuest

    User Avatar
    Gold Member

    It is definitely good to start with C, as in this language you can write very compact and powerful programs and learn programming in a very "mathematical" way, but as this language is mainly used at system level in the industry, it is better to go to C++ after a while or right from the beginning if you want. A word of warning though, is that the extreme capabilities of control over the machine (OS for that matter), that these languages give, comes at the cost of hanging a system and other unhappy experiences, if you are not careful enough, as they deal directly with resources like memory. This is not to tell that they are so hard, but they have a steep learning curve, in order to write some serious programs and they demand serious efforts to get to that. Of course the prize, is to be a very good programmer, they give you back what you put in. Personally, as a Java developer for about 15 years, I would recommend also Java, as it is a really flexible and powerful language and an incredible tool for many tasks in every kind of platform. As for gaming, there are really many choices you can do and an extra one, is to go to Microsoft family of languages (VB, C#, F#) and .NET platform, that they give you an easier "match the blocks" way to construct software, that today's software high technical demands make an absolute necessity. So, it's after all a question of what you want to achieve and how much time and effort you are willing to spend. I agree that learning C, gives you an excellent background and programming mindset to learn other languages too - I can tell from my own experience, and that attending some college course or even an online if you want, is far better than studying alone: there are always things we think we have grasped but we have not and this becomes pretty evident when we take some course, so do it right from start!
     
  18. Jun 8, 2015 #17
    Thank you. My advisor academician said I had some kind of talent on programming. I got AA in my first year and I haven't even attended one of the courses and didn't know anything about programming. I just got the notes and simply studied on my own and became the most succesful while many of the students failed the class even if they attended the whole semester. And it was a very hard exam. So I think maybe I can try more on programming according to my advisor.

    I also have a question for you. How do they make the all that graphics of games? I mean you cannot simply code it right? They use some other programs for that or even engines?
     
  19. Jun 11, 2015 #18
  20. Jun 12, 2015 #19
    As an experienced programmer I can say (for myself) the best way I learn is by doing.
    Since one of your objectives is to possibly write some games, a very good place to
    start learning is through trying a variety of example programs where you can see
    the inputs and outputs directly. The internet itself is an excellent source.
    The Javascript language will likely play a big part in achieving your efforts and there
    are some excellent samples - freely available on the internet.
    Here is a good approach ...
    1. Look at each web page example and see if it displays graphics effects you like.
    2. View the programming source code of the web page and study how it works.
    3. Copy the source code to your own computer and run it - keep the original.
    4. Experiment with the code (trial and error) by making minor changes.
    5. Run your version to see if your changes do what you expect.
    6. Look up questions on the html or language.
    7. Go back to step 1 above.

    The following site has lots of good examples and provides fairly good documentation:
    http://stemkoski.github.io/Three.js/

    With Javascript experience, you can fairly easily grasp some of the other popular
    languages like C++, C, Java, etc.
    I know I have taken a lot for granted here about existing background and skills you may have,
    but if you run into things you do not understand, or don't know how to do, just consult
    a web site that provides reference information, or ask someone for more explaination or help.

    Have fun with programming in Javascript.
     
  21. Jun 12, 2015 #20
    The production of graphics for commercial games, (and other animation), is a whole industry unto itself.
    Typically a game studio employs several highly skilled artists who use high end software dedicated to producing 3D models, (eg 3D Studio max), and there are other specialised tools for making 2D animation frames etc.
    Often the amount of human resource time dedicated to producing game art can be equal or even exceeding the coding effort.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: I want to learn programming -- How?
Loading...