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

  • Other
  • Thread starter MidgetDwarf
  • Start date
  • Tags
    Programming
In summary, the professor told me that I need to take a required programming course in order to maintain my math major. The prerequisite is a course called CECS 100 which I do not have completed yet. The professor apologized because they graduated in the 70s and she is not familiar with the languages used today. The class has a prerequisite and I do not have it completed, so I am a transfer student. She recommended that I use at least two books in the class, one for the programming and one for the data analysis. I am worried that I will not be able to handle the course and that I will not be able to learn the language.
  • #1
MidgetDwarf
1,525
674
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
  • #2
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.
 
  • #3
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.
 
  • #4
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.
 
  • #5
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 atyy
  • #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.
 
  • #7
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.
 
  • #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.
 
  • Like
Likes Student100
  • #9
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 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 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.
 
  • #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".
 

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

What programming language should I start with?

There is no one "best" programming language to start with. It ultimately depends on your goals and interests. However, some popular languages for beginners include Python, Java, and JavaScript.

How long does it take to learn programming?

The time it takes to learn programming varies for each person. It depends on your dedication, previous experience, and the complexity of the language you are learning. It can take anywhere from a few months to a few years to become proficient in a programming language.

Can I learn programming without a computer science degree?

Yes, you can learn programming without a computer science degree. There are many resources available online, such as tutorials, courses, and coding bootcamps, that can help you learn programming skills without a formal degree.

How can I stay motivated while learning programming?

Learning programming can be challenging, but there are several ways to stay motivated. Set small, achievable goals, celebrate your accomplishments, and take breaks when needed. Joining a community or finding a study partner can also provide motivation and support.

What is the best way to practice programming?

The best way to practice programming is to code regularly. Start with small projects and gradually increase the complexity of your projects. Collaborating with others and working on real-world projects can also help improve your skills.

Similar threads

Replies
1
Views
945
Replies
4
Views
2K
Replies
3
Views
2K
2
Replies
63
Views
6K
Replies
2
Views
1K
Replies
11
Views
2K
Back
Top