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!

Other How to learn programming?

  1. Jun 21, 2016 #1
    I got chewed out today by one of my professor for not knowing or having an interest in coding. The professor told me it is a school that every math/science major should know. It does not have to be at the level of a computer science major, but competency is needed according to my professor. Sadly, the professor apologized because they graduated in the 70s. She is not extremely familiar with the todays languages to offer any learning resources.

    I have to take a required programming course. Here is the description:

    Prerequisite: CECS 100 and MATH 113 (or equivalent) all with a grade of "C" or better.
    Introduction to basic concepts of computer science and fundamental techniques for solving problems using the Python programming language. Variables, data types, conditional statements, loops and arrays. Programming style. Applications to numerical and non-numerical problems. Introduction to basic concepts of computer science and fundamental tec
    Letter grade only (A-F). (Lecture 2 hours, laboratory 3 hours)

    Course textbooks are not yet posted. However, I prefer to use atleast 2 books in my courses.

    What is worrying me is that the class has a prerequisite. I do not have it completed, I am a transfer student. I am majoring in mathematics and Math 113 is a intermediate algebra course. I have finished the Linear Algebra/Differential Equations/ Calculus Series/ Discrete Mathematics. At my school, transfer students are only allowed to take courses in their initial semester that have been authorized by a academic advisor or counselor in the respective department. This class is what my advisor wrote on records.

    Here is the prerequisite:
    100. Critical Thinking in the Digital Information Age (3)
    Prerequisite/Corequisite: ENGL 100 or GE Composition (Area A1).
    Help students develop critical thinking skills using technical software. Main topics include: identifying engineering issues for investigation, developing planning and problem solving strategies, locating pertinent information and examples, critically analyzing these sources, forming and testing hypotheses, synthesizing and organizing results for effective communication, and developing transferable problem solving skills.
    Letter grade only (A-F). (Lecture 2 hours, laboratory 3 hours)
     
  2. jcsd
  3. Jun 21, 2016 #2

    chiro

    User Avatar
    Science Advisor

    Hey MidgetDwarf.

    Programming is about two things - state and flow control.

    If you can manage both in increments at a time - increasing it slowly and being able to manage the two then you will be a good programmer.

    Start off slow with simple programs looking at new features of the language little by little until you get better and are able to be confident with each new instruction or feature of the language.

    Think of it like a matrix where you have bits (or collections of bits) in memory and you are trying to understand how all these bits actually "change". Once you are able to do that with more complexity you will be able to track large programs within your head.

    If you do it more and more (and get experience debugging) and combine it with good programming practice that avoids bugs, crashes, and other "nasties" then it will get easier.

    Most of the learning is spent within the debugging environment and I'd recommend learning at least one low level language where you have to step through the code line by line to get a good intuition for programming.

    Good luck with your coursework.
     
  4. Jun 21, 2016 #3

    symbolipoint

    User Avatar
    Homework Helper
    Education Advisor
    Gold Member

    You might want to keep which or what type of professor or what this professor teaches to yourself. You did not give too much information about how or why this person "chewed" out at you. Whether you are interested or not interested, you seem to be qualified for the beginning computer programming course. CECS 100 is a course code name, and not a course title, but the description is of Introductory Programming.
    • You should be able to handle the course
    • It may still be a tough course for you
    • You WILL find ways of applying what you learn, and in some situations, you will WANT TO.
     
  5. Jun 21, 2016 #4

    jtbell

    User Avatar

    Staff: Mentor

    Actually, CECS 100 is the prerequisite, not the programming course. MidgetDwarf left off the course number and name of the programming course. A bit of Googling reveals it to be

    174. Introduction to Programming and Problem Solving (3)

    I agree it looks like a standard introductory programming course that happens to use Python, which I think is a reasonable choice of language. As for CECS 100, I'd want to talk to the instructor and find out what you'd actually be doing in that course. Or see if you can find a syllabus for it. That description is full of educationese but has no specifics.
     
  6. Jun 21, 2016 #5

    MarneMath

    User Avatar
    Education Advisor

    The link below will take you to one of my favorite python tutorials. This will probably teach you everything you need to know for an introduction class in python (and probably more).

    http://learnpythonthehardway.org/book/
     
  7. Jun 21, 2016 #6
    I'm sort of in the same boat as you MidgetDwarf! I am currently learning Python and I'm using sololearn and codeacademy as online sources. These are both pretty good and interactive! I'm using the free version of both.

    I personally think taking a course is better, but I don't have that option right now.

    It helps to think of an in interesting problem to solve (that requires coding and numerical methods) and make it your goal to solve it.

    Technically, that's how I'm doing it now. I have no experience in coding but my entire research is basically that. I'm learning as I go. If you check out my two latest posts: https://www.physicsforums.com/threa...n-a-short-amount-of-time.875092/#post-5503488

    https://www.physicsforums.com/threads/simulating-an-experiment-for-a-two-state-system.875539/

    You can see that I clearly have trouble with coding, but I hope to improve. However, in these links a lot of people have given me advice on how to learn programming and also provided additional sources.
     
  8. Jun 21, 2016 #7

    chiro

    User Avatar
    Science Advisor

    What resources for Python have you used?

    Most procedural languages are easy to grasp once you know the basic constructs of those languages along with state and flow control.

    The language will add features that others don't but if you can follow what happens line by line and get the information in your head then it will be a lot easier.

    One of the simplest procedural languages (that is also popular) is C. If you haven't done any sort of programming then I'd pick C and then learn the C++ extensions later if you want to get into object oriented stuff.
     
  9. Jun 22, 2016 #8
    Python is not very hard to learn, though you will probably learn more by "doing" than by reading anything. Just get some basic program done, see it crash, google a solution and, eventually, you'll get the hand of it.

    Then, you study the theory and learn why your code was so ugly.
     
  10. Jun 22, 2016 #9

    chiro

    User Avatar
    Science Advisor

    It might help though that if the OP wants to learn programming then they should get some well written, well documented, and well functioning (in terms of lack of bugs and problems) code.

    I definitely agree though to get dirty and get into it but as the OP learns I'd recommend thinking about organizational characteristics of the code in addition to the raw code itself.
     
  11. Jun 23, 2016 #10

    symbolipoint

    User Avatar
    Homework Helper
    Education Advisor
    Gold Member

    Learning to create flow-diagrams should be a big part of the instruction. This practice is a huge help, because the flow-diagram becomes a map from which one can put this visual information directly into the form of code.
     
  12. Jun 23, 2016 #11

    chiro

    User Avatar
    Science Advisor

    I definitely agree but I'd like to add that quite often, the real lesson comes in the debugging stage where you have a bit of pain and eventually rejoice when the bug is found and corrected.

    Sometimes doing that with code - especially well written (and even poorly written to a small degree) can help.

    It's those kinds of things give specifics.
     
  13. Jun 23, 2016 #12

    FactChecker

    User Avatar
    Science Advisor
    Gold Member

    It actually looks like the other course is a corequisite, not a prerequisite. That is a big difference. You should ask the teacher of the programming course if you can take it without taking the corequisite course. He may recommend some reading or exercises that will allow you to skip it.
     
  14. Jun 23, 2016 #13

    jtbell

    User Avatar

    Staff: Mentor

    The programming course (CECS 172) has CECS 100 as a prerequisite.
    CECS 100 has a pre- or corequisite of ENGL 100 or a composition course.

    At many/most schools, prerequisites can be waived by the instructor or the department under suitable circumstances, but you have to contact the instructor or department chair or other designated faculty member and make your case. At the college where I work, not having the prerequisite(s) means that a student can't register for the course online; but the instructor can e-mail the registrar's assistant and authorize her to override the prerequisite and register the student for the course.
     
  15. Jun 25, 2016 #14

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    I think this is horrible advice. Start with a high-level language that allows you to concentrate on problem solving instead of having to deal with the nuisance of irrelevant machine-dependent details.
     
  16. Jun 25, 2016 #15

    chiro

    User Avatar
    Science Advisor

    If you are going to get good at debugging code then it becomes far more useful.

    Most of real programming is learned in the debugging environment and to be successful in debugging it's often a good idea to have familiarity with the languages that are as close to the actual platform instructions as possible.

    You may not do it the first time around, but for the above reason it's always a good idea to do this.

    Without this experience, a programmer will write code and have far less of an understanding why it doesn't work because of the lack of these fundamentals.
     
  17. Jun 25, 2016 #16

    symbolipoint

    User Avatar
    Homework Helper
    Education Advisor
    Gold Member

    The reason that MOST people would do better starting with a high level language is because this is much closer to the logic of human languages and less dependant on Ones and Zeros. Higher level languages are less foreign to humans than low level languages, so for most people, easier to debug problems.
     
  18. Jun 26, 2016 #17

    chiro

    User Avatar
    Science Advisor

    You would think so in most cases - but sometimes not.

    You get some obscure bug and you are going through the code like crazy and if you don't have the raw source code it could be impossible to find.

    A lot of commercial software companies have their own code and often it's in something like C++ or some other language.

    Not everyone is using Python or .NET or something higher (or Java even).

    When you actually develop on repositories that are huge (and I mean huge) then it becomes more necessary to have more fine grained control over everything and that often translates to using something like C++ or even Assembly (if it involves something like an embedded system).

    It may not be necessary (and I do agree with this) but for debugging and understanding what is going on it does develop a good mindset to know exactly what is going on "under the hood" and that is a very good tool for any programmer to have.

    Also I did say you "may" not do this the first time around in my above post - I posited as a "recommendation".
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: How to learn programming?
Loading...