What is the best programming language for beginners in scientific fields?

In summary, many students play with Python or Java. My suggestion to you is to check out Processing IDE. Its free extremely easy to learn and is based on Java so you can get as complicated as you want.
  • #1
desmond iking
284
2
I wish to learn some programming basic during the holiday. I stumble across Java , C , C++ , Matlab , SQL, PHP and others. There're so much types of programming languages. Which one is the easiest to start?
 
Technology news on Phys.org
  • #2
Many students play with Python or Java. My suggestion to you is to check out Processing IDE. Its free extremely easy to learn and is based on Java so you can get as complicated as you want..

Processing was designed for casual programmers and for graphics artist who wanted to get into dynamic interactive art projects.

processing.org
 
  • #3
desmond iking said:
I wish to learn some programming basic during the holiday. I stumble across Java , C , C++ , Matlab , SQL, PHP and others. There're so much types of programming languages. Which one is the easiest to start?
What is one trying to accomplish with programming. Is one interested in webpage design/graphics, games, databases or data management, or computation.

For example, "PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML." http://php.net/manual/en/intro-whatis.php

For scientific computation, one would want to learn C++ or Fortran. These are necessary in computational physics/chemistry.

For data management, one may wish to learn python.

MATLAB is another analytical software - http://www.mathworks.com/help/matlab/
 
  • #4
desmond iking said:
I wish to learn some programming basic during the holiday. I stumble across Java , C , C++ , Matlab , SQL, PHP and others. There're so much types of programming languages. Which one is the easiest to start?

Python is free and the programming commands and overall structure is very intuitive and easy to learn. I think with a background in python giving you the general structure of programming you can expand to lots of other languages quite easily. You can download canopy, which is a python editor containing the scientific analysis and plotting libraries like matplotlib, numpy, scipy and others for free here:

https://www.enthought.com/products/canopy/

I've also found coursera to be a valuable free resource. This course on high performance scientific computing gives you a general overview of both python and fortran (along with routines to combine both with which to make your code run faster), here:

https://www.coursera.org/course/scicomp
 
  • #5
desmond iking said:
I wish to learn some programming basic during the holiday. I stumble across Java , C , C++ , Matlab , SQL, PHP and others. There're so much types of programming languages. Which one is the easiest to start?

Either Python, or C. Here's why I don't recommend the others:

Java has a lot of syntactic sugar. By that I mean, there's a lot of tedious work you have to put into get your program to work.
C++ is similar, and you'll likely be forced to use iostreams when starting out. They aren't very intuitive, and can confuse a beginner easily.
MATLAB is okay, but it's not really a general programming language.
SQL is not something you make programs with. It's a language to query databases.
PHP is used for web development, not programs in the classical sense.
 
  • #6
All of you here should look at Processing. It's gaining a lot traction in the educational world. There are Vimeo videos of processing projects. True it's based on Java but in learning the language you learn portions of C and C++ which all have a common format.

The beginning programmer needs to know very little to begin.

Www.processing.org
 
  • #7
jedishrfu said:
All of you here should look at Processing. It's gaining a lot traction in the educational world. There are Vimeo videos of processing projects. True it's based on Java but in learning the language you learn portions of C and C++ which all have a common format.

The beginning programmer needs to know very little to begin.

Www.processing.org

I've seen and worked with some projects using Processing with Arduino or Pic microcontrollers, it's nice but if the OP were looking for something more along simple/intuitive lines I'm not sure Processing is it.
 
  • #9
At what level of knowledge & skill are you? If an absolute beginner, consider this.

My perspective is Old School since I learned foundational programming back in the 70's and honed my skills in the 80's doing industrial automation. Ancient History. A lot of methodology I was taught doesn't seem to be emphasized much anymore due to progression of the science & computing power/technology. Back in the day we would start by performing a very deliberate program design using flow charts, Jourdan diagrams, pseudo-coding, etc., to nail down the sequence and interaction of code first before punching keys. Now my more up to date colleagues inform me that creating programs is progressing to more graphical drag-and-drop of rigidly specified objects. I have taught Middle-School programming using Raspberry-Pi graphics packages which astounds me. One friend referenced Apple iPhone apps are supposed to be done by a very rigorous set of guidelines. I suppose that makes sense to ensure compatibility, and the iPhone success is a testament to this.

But I am always shocked at the current generation that seemingly lacks any concept of slow, deliberate, patient plodding through code exercises. They appear to be "corrupted" by the concept that everything just simply works as with an iPhone: a couple of clicks / swipes and you're done. Rather than the realization that your task at hand will require 437 sequential steps, done properly, with sufficient time between steps for everything to work. Too many times I have students that just dive in, start randomly clicking or keyboarding, and throw up their hands in frustration because they are not immediately successful.

Luckily you have available the fantastic free resources of the internet. If you're a complete newbie to any type of programming, I would gently suggest a study of flow charting methods. Easy & quick to learn. I still think this is invaluable for organizing thought and not punching keys blindly. Then a progression through different languages, from simple to more powerful. This will teach you the fundamentals of different variable types and standard programming constructs like IF-THEN-ELSE. I remember my first "self-taught" language was BASIC back in the day of Microsoft DOS & 2 floppy drives. I used it in graduate school to control a robot workcell. And it was quite simple, usable, and easy to understand. It seems there is a 21st century version of this called JustBASIC. This will give you the foundational skills to progress to Python which is amazingly well supported with MOOC classes many places on the web.
 
  • Like
Likes ellipsis
  • #10
tygerdawg said:
But I am always shocked at the current generation that seemingly lacks any concept of slow, deliberate, patient plodding through code exercises. They appear to be "corrupted" by the concept that everything just simply works as with an iPhone: a couple of clicks / swipes and you're done. Rather than the realization that your task at hand will require 437 sequential steps, done properly, with sufficient time between steps for everything to work. Too many times I have students that just dive in, start randomly clicking or keyboarding, and throw up their hands in frustration because they are not immediately successful.

Even though I'm far from a beginner, I feel as if making meticulous charts as you described could help me as well. I just jump in when making a program (as you described), and never, ever, expect a program to compile and run successfully the first time. I'm even skeptical when this does happen: something must be wrong. I work in both low-level and high-level programming environments.

Designing a program with the rigor of mathematical proof heavily appeals to me. What sort of charts and diagrams should I be looking for?
 
  • #11
Of course, I JUST RECENTLY cleaned out my closet and donated the book to the library. But I was instructed by a much-smarter-than-me colleague from my Grad School days to study up on Structured Programming by <name forgotten...did I mention I was old?>. I recall it was cheesy paperback "textbook" that was powerfully instructive on the graphical structured analysis method. One diagrams data flows with curved pointers and circles and rectangles holding task or operation names. Only after this is done does one start the task of coding. And this developed the thought processes needed back in the day to set the foundational thought for multi-threaded programming and object oriented programming. Flow charting is another, more fundamental method of organizing thought for simpler sequential programming operations like industrial automation.
 
  • #12
Some good diagrams from an Object Oriented design approach are UML diagrams. The UMLet open source tool allows you to build them easily. My favorite is the sequence diagram where you list instances of objects as columns and each successive row is an action from one object to another.

It captures the program flow pretty well for design documents that you might write describing how your program works. To me its more useful and perhaps a little more high-level than a flowchart.

More info on UML diagrams may be found here:

http://en.wikipedia.org/wiki/Unified_Modeling_Language#Diagrams

and the UMLet tool here:

http://www.umlet.com/
 
  • Like
Likes Medicol
  • #13
desmond iking said:
I wish to learn some programming basic during the holiday...
There're so much types of programming languages. Which one is the easiest to start?
I recommend you hop on Code Academy and just have fun. Don't worry about finding the *best* language. There isn't one. (Different languages, admittedly, have their strengths.) The good news is that the concepts you learn in your first language will apply in almost any other.

Whatever language you choose to learn first, it is important that you enjoy the experience. (You're on holiday, after all.) That's why I recommend a guided, online learning experience. It'll help keep frustration to a minimum while you learn the basics.
 
  • #14
ellipsis said:
C++ is similar, and you'll likely be forced to use iostreams when starting out. They aren't very intuitive, and can confuse a beginner easily.
I don't think iostreams are difficult to grasp. I am a beginner myself and I understood it very easily. Why do you say it is confusing for beginners?
 
  • Like
Likes Medicol
  • #15
I don't think MATLAB is the good software for learning programming at very beginning. It contains all kind of library and functions. Sometimes you don't need to know what did the MATLAB do for your script, and sometimes you just use the MATLAB as a calculator, not a programming software.
 
  • #16
Just keep in mind that software is a huge subject. You are unlikely to master it in "the holidays." It usually takes years to become more than a beginner. And the industry is always developing new stuff so old skills quickly become obsolete.

My suggestion is to pick a project to build. That way you will have something at the end in addition to a new skill. Write your own calculator program or some such.

Think also about learning to code well instead of just correct. That is, think about learning to make your code easy to understand, easy to modify, easy to test, easy to document, and similar things. Books such as _Code Complete_ by McConnel are a good place to look for this kind of thing.
 
  • #17
Like already mentioned above, it does depends on what's your final goal. I started with Java and then I continued with C, C++ and VHDL. Most
universities start with Java because the syntax is generally the same as a lot of other programming languages.
 
  • #18
DEvens said:
My suggestion is to pick a project to build. That way you will have something at the end in addition to a new skill. Write your own calculator program or some such.

Improvement through practice is the best way to learn programming and develop your skills!
 
  • #19
If your goal is to make use of coding in a Physics or other Science degree, I wouldn't say start in Matlab because it's a script language and won't give you the basics of coding by various reasons. So I'd say start in Java, at least that's what many universities are teaching in the 1st year in degrees of this area. Then Matlab or R (for statistics-based course) is where you want to go, since 1 line of code in this type of software could take hundred of lines in a language like Java or C.
 

Related to What is the best programming language for beginners in scientific fields?

1. What is programming and why is it important?

Programming is the process of designing, writing, testing, and maintaining computer programs. It involves using a programming language to give instructions to a computer to perform a specific task. Programming is important because it allows us to create software, applications, and websites that make our lives easier and more efficient.

2. What are some popular programming languages for beginners?

Some popular programming languages for beginners include Python, Java, JavaScript, HTML, and CSS. These languages are relatively easy to learn and have a wide range of applications, making them a good starting point for beginners.

3. How can I start learning programming as a beginner?

There are many resources available for beginners to learn programming, such as online tutorials, coding bootcamps, and free courses. It's important to choose a programming language that interests you and to practice regularly to improve your skills.

4. What are some common challenges for beginners learning programming?

Some common challenges for beginners learning programming include understanding complex concepts, debugging errors, and staying motivated. It's important to take breaks, ask for help when needed, and practice regularly to overcome these challenges.

5. Can anyone learn programming, even without a background in math or science?

Yes, anyone can learn programming regardless of their background in math or science. While having a strong foundation in these subjects can be helpful, programming also involves problem-solving, creativity, and logical thinking, which can be developed with practice and determination.

Similar threads

  • Programming and Computer Science
Replies
6
Views
1K
  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
Replies
15
Views
1K
  • Programming and Computer Science
2
Replies
49
Views
3K
  • Programming and Computer Science
12
Replies
397
Views
14K
  • Programming and Computer Science
2
Replies
69
Views
4K
  • Programming and Computer Science
Replies
8
Views
943
  • Programming and Computer Science
2
Replies
54
Views
3K
  • Programming and Computer Science
Replies
11
Views
1K
  • Programming and Computer Science
Replies
2
Views
1K
Back
Top