What programming language should I learn as a beginner?

  • Thread starter Pupil
  • Start date
  • Tags
    Weighing
In summary, a recent high school graduate with a passion for physics and some experience in programming in Pascal is seeking advice on which language to learn next. The expert recommends Python as a versatile language with various programming styles and libraries, while also suggesting C# as a popular and well-designed language with access to a wide range of libraries through .NET. Other factors to consider when choosing a language include speed, portability, and the specific goals and applications for the language. The expert also recommends learning the basics of C++ for modern scientific computing, and mentions other languages that may be useful for specific tasks or industries. Overall, Java and C# are the easiest to learn, while C++ offers the most control but is more complex. Python is a
  • #1
Pupil
165
0
So I just graduated from high school and am heading to college with the intention of getting a BS in physics. I took a semester of programming in Pascal my senior year, but had to drop the class the second semester (to get a freakin' art credit to graduate. God**** arts...), so I didn't learn nearly what I wanted to get from of the class.

I learned the basic syntax of programming in Pascal, input and output, data types, loops, nested loops, and just generally writing a lot of programs to calculate stuff (all console applications). Since I wasn't in the second semester I didn't learn about functions, libraries, window applications, or any of the good stuff I see online sometimes.

In my free time I will sometimes write little programs to do things like calculate Pi, find Fibonacci numbers, etc.

Now that you know where I stand, what programming language should I learn (or should I stick with Pascal)? I know Pascal is a pretty ancient language, and I don't think it's very widely used. I'd like to get very skillful at programming in general, so why not do it in a language I will be using in the future?

What language would you recommend for a fairly newbie programmer?
 
Technology news on Phys.org
  • #2
Learn Python http://python.org.
(You don't have to give up Pascal...
You can use both... You might find one language is better for a particular task than the other.)
 
  • #3
robphy said:
Learn Python http://python.org.
(You don't have to give up Pascal...
You can use both... You might find one language is better for a particular task than the other.)

If no one says different shortly, I'm going with your advice.
 
  • #4
just to spice things up, my fav language these days is C#. And I've worked with a wide variety of prog. languages including Python, Ruby, Java and C. So you might consider C#.NET.
 
  • #6
robphy said:
Learn Python http://python.org.
(You don't have to give up Pascal...
You can use both... You might find one language is better for a particular task than the other.)

I haven't learned python but it is cool because you can do a lot of programing styles in it (e.g. functional programing). It also is a good language to interface with open office and Apache is programed in python.
 
  • #7
harborsparrow said:
just to spice things up, my fav language these days is C#. And I've worked with a wide variety of prog. languages including Python, Ruby, Java and C. So you might consider C#.NET.

I read the pocket language reference for C#. It seems like a pretty cool language. Supports lambda expressions and language integrated queries. It also somewhat supports generic programing. ".Net" gives the programmer access to a huge amount of libraries which could make programming tasks easier. Of course it relies on the user having the right components installed on their system which could add bloat. I find ".Net" doesn't function that well on old computers.

It is somewhat portable in that in theory because .Net platform could be installed on any platform but it is a Microsoft specific product so it is likely to work best with windows. I guess, as for learning a language, ask your self some questions: how important is speed, how important is portability, what programing styles might you want to learn (functional, logical, declarative, object oriented).

Also ask you self, what do you want to accomplish. Are you trying to make university easier or do you want to learn something you might not learn in university. What do you want to do with the programing lanuguage. Will your applications be graphical based, database oriented, computational intensive, do you plan to interface with any programs, like office programs or firefox? Are you interested in web programming, or perhaps even facebook programming? Are there a particular set of libraries (e.g. linpac) or packages, which you might want to interface your program with.

Also keep in mind, depending on what you want to accomplish maybe you want to learn the scripting language of a mathematical package (e.g. MATLAB, Maple, Mathematical).

Some other notes:
-If you want to interface with microsoft office, learn visual basic (although C++ and C# would work)
-If you want to learn to inteface with octive learn lisp (also okay if you want to learn functional programing)
-If you want to learn to interface with firefox learn javascript
-If you are using a windows platform, and you want speed, learn C++
-If you are using a windows platform and you are willing to give up a bit of speed for a bit of excellence and portability learn C#
-If portability is your top priority and speed is a low priority learn JAVA
-If you want to learn functional programing learn Haskel
-IF you want to learn logical programing learn prolog
-If you want to learn web programing and you are using a lunix server learn php
-IF you plan to do a lot of text processing and use a lot of regular expressions learn PERL (note perl is close to php and also good for the same type of tasks)
-If you plan to do web programing but want to use a windows server then learn ASP (your choice of C# or visual basic dot net).
-If you are doing numeric analysis or signal processing, I'd recommenced, C, C# or FORTRAN.
-If you are programing hardware (e.g. microprocessors in robotics) then learn C or assembler although C++ might be okay.
 
Last edited:
  • #8
By all means learn (at least) the basics of C++. Alot of modern scientific computing is done with C++.

Thanks
Matt
 
  • #9
Java and C# are very easy to learn. There seem to be more job offerings using Java, which is also more cross platform, but C# is a better designed language. C++ gives the most control, making it the best high level language for serious programmers, but it's also the most complicated. Python is a scripting language, not very good for serious work but some people seem to enjoy using it anyway.
 
  • #10
junglebeast said:
Python is a scripting language, not very good for serious work

You could have written the above only if you haven't the faintest idea what you're talking about.
 
  • #11
John Creighto said:
I read the pocket language reference for C#. It seems like a pretty cool language. Supports lambda expressions and language integrated queries...

<snip>

The OP is just out of high school and is looking to learn a language. He doesn't care about interop, lambda expressions, CLIs or CLRs because he doesn't know what they are. He most likely won't care about them until he leaves college, if ever. Trying to sell him on the supposed benefits of C# is a bizarre thing to do given his stated goals.

The OP should go away and learn Python, as others have said. If he likes it enough there's plenty of time for him to get his teeth into C-like languages later on.


John Creighto said:
Some other notes:
-If you are doing numeric analysis or signal processing, I'd recommenced, C, C# or FORTRAN.

If you suggest to a prospective employer that C# is a good approach to serious numerical work, you'll be laughed out of the building. You may also have things thrown at you as you leave.
 
  • #12
shoehorn said:
If you suggest to a prospective employer that C# is a good approach to serious numerical work, you'll be laughed out of the building. You may also have things thrown at you as you leave.

Sorry, my mistake. I meant to type C++
 
  • #13
shoehorn said:
The OP is just out of high school and is looking to learn a language. He doesn't care about interop, lambda expressions, CLIs or CLRs because he doesn't know what they are. He most likely won't care about them until he leaves college, if ever. Trying to sell him on the supposed benefits of C# is a bizarre thing to do given his stated goals.

I wasn't trying to sell the original poster on C#. Someone else mentioned it and I said it was a cool language with some neat features. I listed several languages, and where I thought those languages were best suited.
 
  • #14
shoehorn said:
The OP should go away and learn Python, as others have said. If he likes it enough there's plenty of time for him to get his teeth into C-like languages later on.

If you read my post #6 you'll see that I said that python seemed like a cool language. I never stated anything against the original poster learning python. As for him learning over a c like language, I'll leave that up to him.
 
  • #15
I've been programming for 30 years and have forgotten more languages than many currently know, and I say Python is the best first language I've ever seen. It is remarkably easy to learn and an excellent introduction to programming in general (a precursor to other more popular languages), but can easily be kept as your primary language--there's a rich set of libraries. the only drawback is slowness when you code loops yourself, because its interpreted. But python libraries are usually written in C++, so they are fast. Be sure to get a good IDE though--with a decent debugger and GUI builder. I'll let others make the suggestions because I haven't bothered to take my own advice, yet, on the IDE (I just edit my python source in visual studio and code the GUIs directly with Tkinter--yeah, go ahead and laugh)

Note also that Jython makes it compilable, but then you can't use other python libraries (but CAN use java libraries)
 
  • #16
Pupil, if you want to stay with Pascal, download a free version of Turbo Delphi which is just object oriented Pascal. http://www.codegear.com/downloads/free/turbo The free license expires after only 100 years, though.
 
Last edited by a moderator:
  • #17
Last edited by a moderator:
  • #18
Another language to check out is Scala--it has all the advantages of Java (and can be fully mixed with java modules and libraries) but it doesn't have nearly the wordiness of java.
 
  • #19
Pupil, I am not pushing any particular language over any other language. But my opinion is, that there are a few posters in Physics Forums who are what I would call "Python zealots". It seems to me that they are trying to sell something too hard. I have used Python and I like it. I have used many languages. There are things to like, and dislike, about each of them. My advice (unsolicited of course) is to beware of anyone who is overzealous about anyone language.
 
  • #20
Pascal is very great to use as an introduction to programming... I say learn Pascal and if master or atleast master it to an extent, you should not have any problems with any other language.and BASIC is also ideal for a beginner.
 
  • #21
Pascal is a dead language. Who uses it?

Thanks
Matt
 

What is "Weighing the languages"?

"Weighing the languages" is a scientific process of comparing and quantifying the linguistic characteristics of different languages.

Why is "Weighing the languages" important?

"Weighing the languages" allows for a deeper understanding of how languages differ and evolve, and can provide insights into the history and origins of different languages.

How is "Weighing the languages" done?

"Weighing the languages" involves analyzing various linguistic features, such as grammar, vocabulary, and sound systems, and assigning numerical values to them. These values are then compared between languages to determine similarities and differences.

What can we learn from "Weighing the languages"?

"Weighing the languages" can reveal patterns and relationships between languages, which can help us understand how languages are related and how they have evolved over time. It can also provide insights into the cognitive and cultural aspects of language.

How does "Weighing the languages" impact society?

By understanding the linguistic characteristics of different languages, "Weighing the languages" can help in language preservation efforts, language teaching, and cross-cultural communication. It can also aid in creating effective language policies and promoting linguistic diversity.

Similar threads

  • Programming and Computer Science
Replies
15
Views
1K
  • Programming and Computer Science
Replies
8
Views
875
  • Programming and Computer Science
12
Replies
397
Views
13K
  • Programming and Computer Science
4
Replies
107
Views
5K
  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
Replies
11
Views
1K
  • Programming and Computer Science
Replies
9
Views
1K
  • Programming and Computer Science
2
Replies
69
Views
4K
  • Programming and Computer Science
Replies
13
Views
1K
  • Programming and Computer Science
2
Replies
58
Views
3K
Back
Top