Should Undergrad Physics major learn C#?

In summary, If you want to use Microsoft's ".net" framework to make your software communicate with other MS products and network services, I can't think of any reason why C# is "better" than C++.

Learn C#, C++ or both?

  • Learn C#

    Votes: 0 0.0%
  • Learn C++

    Votes: 4 50.0%
  • Learn C# and C++

    Votes: 4 50.0%

  • Total voters
    8
  • #1
Kuhan
46
0
I'm an undergraduate Physics major. I'm interested in doing research, right now I'm aiming to do undergraduate research in photonics (I'm just a freshman).

After a conversation, I learned that I should learn C++, mathlab, AUTOcad and labview to use in my research.

My question is:
Does it make sense to
learn C#, C++ or both?
 
Technology news on Phys.org
  • #2
Learn both. Pick up C# first. It's more marketable these days, easier to get into, and will help you learn good habits before you pick up C++ (and invariably, C). Personally I recommend pascal (and object pascal / delphi) as the best there is for teaching good programming habits, but through a comedy of marketing errors, that language is almost dead today.
 
  • #3
Depending on the student price, get MATLAB first, since you'll be able to use it very quickly if you're already doing research. As for C# versus C++, I think it depends more on the class curiculum (is there a intro class oriented towards non-computer science majors?) than the language.
 
  • #4
Unless you want to use Microsoft's ".net" framework to make your software communicate with other MS products and network services, I can't think of any reason why C# is "better" than C++.

C# has all the problems of C++ for writing numerical algorithms - except there are some fairly good workrounds in C++ which don't exist in C#.

Trying to learn C++ and C# at the same time would also be a bad idea IMO, because for a beginner they are similar enough to be confusingly different, if you see what I mean.
 
  • #5
AlephZero said:
Unless you want to use Microsoft's ".net" framework to make your software communicate with other MS products and network services, I can't think of any reason why C# is "better" than C++.

I gave a few reasons.
1. More marketable.
2. Easier to learn (entirely OO, no chances of picking up procedural habits from examples)
3. Learn good habits (again, all OO. Strongly typed. Etc.)

Many of the same sorts of things that make Java appealing as a first language.
 
  • #6
My two cents.

I would focus on becoming proficient in one language. That will give you a good foundation if you need to learn another language. I recommend something object oriented so that you get both the structural exposure as well as the object oriented concepts.

I studied C++ and when I arrived at graduate school we used FORTRAN and C. In my experience the language predominately used by the group is usually what the adviser is most comfortable with or whatever is the currently working program language. My group worked with C. The other two groups on my floor used C++ and FORTRAN. No one wants to redo code as long as it works.

My own personnel experience is often you do not master anyone language as a researcher. You just learn enough to make it work. The focus is on getting results. A good grasp of programming concepts will enable you to get it done more efficiently regardless of the language used.
 

Related to Should Undergrad Physics major learn C#?

1. Should undergraduate physics majors learn C#?

It depends on the individual and their career goals. C# is a programming language commonly used in fields such as software development and data analysis. If a physics major is interested in pursuing a career in these areas, learning C# can be beneficial. However, if their focus is on theoretical physics, C# may not be as relevant.

2. Is C# useful for physics majors?

Yes, C# can be useful for physics majors in certain applications. Some physics research projects may involve data analysis and simulations, which can be done more efficiently with programming languages like C#. Additionally, many physics-related industries, such as technology and engineering, value programming skills.

3. How difficult is it for a physics major to learn C#?

The difficulty of learning C# depends on the individual's prior programming experience and their ability to grasp new concepts. Physics majors with a strong foundation in mathematics may find it easier to learn C#, as it also involves logical thinking and problem-solving skills. However, it may take some time and practice to become proficient in the language.

4. Are there any resources available for physics majors to learn C#?

Yes, there are many resources available for physics majors to learn C#. Many universities offer courses in programming for scientists, which may include C# as a language option. There are also online tutorials, books, and coding bootcamps specifically designed for beginners in C# programming.

5. Can learning C# benefit a physics major's career?

Yes, learning C# can benefit a physics major's career in various ways. It can open up job opportunities in fields such as data analysis, software development, and scientific computing. It can also enhance their problem-solving and critical thinking skills, which are valuable in any career. Additionally, having programming skills can make a physics major more versatile and marketable in the job market.

Similar threads

  • Programming and Computer Science
Replies
6
Views
573
  • Programming and Computer Science
Replies
8
Views
1K
  • STEM Academic Advising
Replies
3
Views
900
  • STEM Academic Advising
Replies
2
Views
1K
  • Programming and Computer Science
Replies
17
Views
4K
  • STEM Academic Advising
Replies
4
Views
1K
  • STEM Academic Advising
Replies
6
Views
2K
  • STEM Academic Advising
Replies
10
Views
2K
  • STEM Academic Advising
Replies
9
Views
1K
  • Programming and Computer Science
Replies
15
Views
2K
Back
Top