Register to reply

Did I make the right choice?

by jbmiller
Tags: choice
Share this thread:
jbmiller
#19
May5-12, 10:17 PM
P: 122
Quote Quote by Hobin View Post
No. I'd go for Python (which can easily be learned by using tutorials on the internet), then C (since you already bought the book), then Matlab (since Matlab is awesome).
Alright, how long do you think it would take me to learn Python and C pretty thoroughly if I spent about an hour aday 7 days a week?
chiro
#20
May5-12, 10:27 PM
P: 4,573
Quote Quote by jbmiller View Post
Alright, how long do you think it would take me to learn Python and C pretty thoroughly if I spent about an hour aday 7 days a week?
It depends on what you call thorough.

One thing that you should keep in mind is that a lot of what is learned in programming has to do with debugging code and this takes a long time to do when you start off. As you get better though, the time needed will decrease though, but you will be working with larger repositories which means the problems get more complicated.

I think you will need at least a few years minimum for this amount, probably a lot more. Again it depends on how thorough you want to be.

You could probably learn the actual language components a lot quicker, but if you want a thorough understanding you will have to apply your programming to a number of different situations and applications to reinforce it all.

Don't be discouraged though because you'll find that even if you have been doing stuff for a while (like say ten years), there is always stuff you don't know and that's a good thing IMO.
jbmiller
#21
May5-12, 11:08 PM
P: 122
Quote Quote by chiro View Post

You could probably learn the actual language components a lot quicker, but if you want a thorough understanding you will have to apply your programming to a number of different situations and applications to reinforce it all.

Don't be discouraged though because you'll find that even if you have been doing stuff for a while (like say ten years), there is always stuff you don't know and that's a good thing IMO.
Well I actually wouldn't learn it that thoroughly, I'm mainly starting programming so I can do certain things invloving mathematical/physics equations for my classes next year. They wouldn't be that complex, it's just highschool physics and pre-calc. I'm a freshman so I was hoping I could start to learn alot over this summer and get more advanced my next 3 years of highschool.

As to which I understand one must use Matlab for that sort of thing, not for sure though. I really never planned on spending that much time with C, same with Python if I choose to learn it as my first language or even learn it at all. Then again I dont even really know what I could "do" with Python or C. If you could, could you please explain some of these things to me?

Thanks.
chiro
#22
May6-12, 01:09 AM
P: 4,573
Quote Quote by jbmiller View Post
Well I actually wouldn't learn it that thoroughly, I'm mainly starting programming so I can do certain things invloving mathematical/physics equations for my classes next year. They wouldn't be that complex, it's just highschool physics and pre-calc. I'm a freshman so I was hoping I could start to learn alot over this summer and get more advanced my next 3 years of highschool.

As to which I understand one must use Matlab for that sort of thing, not for sure though. I really never planned on spending that much time with C, same with Python if I choose to learn it as my first language or even learn it at all. Then again I dont even really know what I could "do" with Python or C. If you could, could you please explain some of these things to me?

Thanks.
If its mainly computation for science/engineering/computational kinds of things like that then MATLAB would definitely be the platform that you should learn since you don't really have to worry about the stuff that takes away from what you need done.

This is what software developers have to do anyway since projects are so complex. Usually they get some kind of library and then they just call one or two routines to do something complex that they don't have to worry about.

I don't know about Python, but if you can include libraries and call outside DLL's then you can pretty much do anything in Python that you can do in C. The big difference is that it won't be as fast as it could potentially be in C and that you probably won't know how everything works in detail in Python.

It isn't a bad thing though especially if you starting out. Getting stuff running quickly is important and if that means using Python over C (especially when starting out), then OK that's what you need to do.

So with regard to what you can "do", it depends on a) the language features and the environment features, b) the libararies that come with python (and that other people make) and c) whether you can include custom DLL's (to do say Operating System things or functionality which is not included in the Python dev environment).

I think Python allows all three which means that you can pretty much do everything in Python that you can in C and with the speed of computers nowadays, unless you need really really optimized code for something then just use something like Python.
jbmiller
#23
May6-12, 01:18 AM
P: 122
Alright, thanks for the help!

One last thing, how long will it take me to learn the componets of C? I need to make a schedule of how to study C so I can move onto Matlab in optimized timing.
chiro
#24
May6-12, 01:35 AM
P: 4,573
Quote Quote by jbmiller View Post
Alright, thanks for the help!

One last thing, how long will it take me to learn the componets of C? I need to make a schedule of how to study C so I can move onto Matlab in optimized timing.
I have a couple of points for your question.

The first one is that C is a procedural language and has procedural constructs. The constructs for procedural languages include a standard flow-control which itself includes loops, branching, and function calls and it's own flow-control. Within function-calls you get concepts including recursion which is an important thing to use (and is used quite extensively).

The next common thing is state-control. The state-control concerns things like data operators and how data is both read in, transformed and written back somewhere. You have arithmetic (including addition, subtraction, multiplication, division and modulus) for integers as well as for floating point numbers of different precision (but you don't have modulus functions for floating point unless you want to define it yourself).

Apart from arithmetic operations, you have bitwise operations (AND,OR,XOR,NOT), shift and rotate operators (again bitwise) as well operators that deal with reading and writing memory. In C you won't have to tell the CPU this: you just declare variables in the right way and the compiler will sort out this kind of thing.

Branching also includes comparison operators that include bitwise, normal numeric comparison (like less than, greater than, equal to etc). Comparison bitwise operators are not the same as normal bitwise operators.

You also have to learn things to do with memory which includes allocating and deallocating memory, pointers, structs, and how things look in memory in terms of pointers. Things like MATLAB allow you to get away without having to know this kind of thing in a deep way.

Then along with all the above, you have specializations of these concepts as well as issues related to the syntax and its use in the C language. Syntax is something you will learn a lot more when you have to write code, and ultimately compile. There's no real shortcut for this: you write code, compile and see what happens.

This is a really short answer to your question, but I hope it will still be useful.
jbmiller
#25
May6-12, 02:46 AM
P: 122
It does, thanks for the help!
jreelawg
#26
May6-12, 12:02 PM
P: 450
I would just like to add that there is a possibility you will really like programming, and want to go on to developing stuff. Maybe you will one day want to model something related to your research, or develop tools.

C is a good choice for these types of things. First of all, C or C++ are high performance. You also have technologies like CUDA, and OpenCL, which allow you to tap into your video card to crunch numbers, which could be helpful if you want to model something. You can actually use these with python as well, but if your going for high performance, you might as well be using C.

For audio, most professional apps, or processing tools are written in c or c++. There are a lot of third party libraries for C or C++ to handle audio, and there are allot of people to ask questions to about that type of thing in the C or C++ community. This is more an Electrical Engineering thing than a Physics thing but.

Check out DSP.stackexchange.com.
jbmiller
#27
May6-12, 01:21 PM
P: 122
Quote Quote by jreelawg View Post
I would just like to add that there is a possibility you will really like programming, and want to go on to developing stuff. Maybe you will one day want to model something related to your research, or develop tools.

C is a good choice for these types of things. First of all, C or C++ are high performance. You also have technologies like CUDA, and OpenCL, which allow you to tap into your video card to crunch numbers, which could be helpful if you want to model something. You can actually use these with python as well, but if your going for high performance, you might as well be using C.

For audio, most professional apps, or processing tools are written in c or c++. There are a lot of third party libraries for C or C++ to handle audio, and there are allot of people to ask questions to about that type of thing in the C or C++ community. This is more an Electrical Engineering thing than a Physics thing but.

Check out DSP.stackexchange.com.
Oh ok, I will probably just start with C. No need for Python when C seems to be seemingly better.

Thanks for the help/website!
Whovian
#28
May7-12, 08:32 AM
P: 643
I'm more of a C fan than a Python fan, but here's the other side of the story.

While C does have support for structs, it isn't object-oriented. It doesn't have support for, say, inheritance. Python does. Python also tends to be a little more intuitive, and C has no support for strings ("blocks" of text, if you will.), or rather, it does, but there's no data type you can use to store them. You have to declare an array of characters to hold what's effectively a string.
jreelawg
#29
May7-12, 10:14 AM
P: 450
Quote Quote by jbmiller View Post
Oh ok, I will probably just start with C. No need for Python when C seems to be seemingly better.

Thanks for the help/website!
Well I wouldn't say better, just different. My computer science teacher loves python, and uses it constantly. I've also browsed job listings at Nvidia, and noticed that for some of their job offers knowing python is a preference.

So it's definitely not a waste of time to learn python. Learning python, c/c++ and matlab would be a good combination. But if your only going to learn one language I would choose c or c++.


Register to reply

Related Discussions
Did I make a good choice? Academic Guidance 3
Can you make an object have a stronger graviational pull if you make is denser? General Physics 29
Choice of variable to make matrix rank = 1 Calculus & Beyond Homework 0
Need help about a choice I have to make... Academic Guidance 1
Choice 1: get help here Choice 2: throw this damn laptop out window Computing & Technology 7