Do I really need to know C++ or Assembly for debugging and understanding code?

  • Context: Other 
  • Thread starter Thread starter MidgetDwarf
  • Start date Start date
  • Tags Tags
    Programming
Click For Summary

Discussion Overview

The discussion centers around the necessity of learning programming languages, particularly Python, C++, and Assembly, for students in mathematics and science fields. Participants explore the relevance of coding skills in debugging and understanding code, as well as the challenges faced by those new to programming.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested
  • Homework-related

Main Points Raised

  • Some participants suggest that programming is essential for math and science majors, emphasizing the need for competency rather than expertise.
  • Others argue that starting with simple programs and gradually increasing complexity can help build confidence and understanding in programming.
  • A participant mentions the importance of debugging experience and recommends learning a low-level language to gain intuition for programming.
  • There is a discussion about the prerequisites for programming courses, with some participants clarifying course codes and descriptions.
  • Several participants share resources for learning Python, including tutorials and online platforms, highlighting the value of practical experience over theoretical knowledge.
  • Some suggest that understanding organizational characteristics of code and creating flow diagrams can aid in learning programming.
  • Participants note that debugging can be a significant learning experience, often leading to a deeper understanding of coding.

Areas of Agreement / Disagreement

Participants express a range of views on the necessity and approach to learning programming. While there is some agreement on the importance of coding skills, there is no consensus on the specific languages or methods that are most effective for beginners.

Contextual Notes

Some participants express uncertainty about the prerequisites for programming courses and the specific content of those courses. There is also a recognition that individual experiences with coding can vary widely, influencing perspectives on the best learning strategies.

Who May Find This Useful

This discussion may be useful for mathematics and science students considering programming courses, educators seeking to understand student concerns about coding, and individuals looking for resources to learn programming effectively.

MidgetDwarf
Messages
1,608
Reaction score
717
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)
 
Physics news on Phys.org
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.
 
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.
 
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.
 
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/
 
  • Like
Likes   Reactions: atyy
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.
 
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.
 
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.
 
  • Like
Likes   Reactions: Student100
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.
 
  • #10
chiro said:
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.
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.
 
  • #11
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.
 
  • #12
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.
 
  • #13
FactChecker said:
It actually looks like the other course is a corequisite, not a prerequisite.
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.
 
  • #14
chiro said:
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.
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.
 
  • Like
Likes   Reactions: Jaeusm and micromass
  • #15
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.
 
  • #16
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 dependent on Ones and Zeros. Higher level languages are less foreign to humans than low level languages, so for most people, easier to debug problems.
 
  • #17
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".
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 21 ·
Replies
21
Views
84K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 63 ·
3
Replies
63
Views
9K
  • · Replies 6 ·
Replies
6
Views
2K