Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

What are some good coding languages for beginners?

  1. Jul 13, 2018 at 3:22 PM #1
    I'm 23 and currently still in undergrad. I want to learn how to start coding before I take my core classes for computer science. What are some good coding languages to start with?
     
  2. jcsd
  3. Jul 13, 2018 at 3:33 PM #2

    Mark44

    Staff: Mentor

    I suggest Python. It's a high-level language that is freely distributed, and comes with pretty good documentation. See https://www.python.org/downloads/.
    Java also would be good, but I think it would take a bit longer to get comfortable with its extensive API (applications programming interface). See https://java.com/en/download/.
    If you plan to do Windows programming, C# is a good place to start. There's a free version of C#, I believe, with Visual Studio Community Edition. See https://visualstudio.microsoft.com/vs/getting-started/. I have had Visual Studio in various editions for a number of years -- a very pricey edition is available for free because of the agreement the school I teach at has with Microsoft. Students are able to download this product for free as well.
     
  4. Jul 13, 2018 at 3:43 PM #3

    phinds

    User Avatar
    Gold Member

    Visual C# is present on the free download Community Visual Studio 2017 along with VB.NET
     
  5. Jul 13, 2018 at 4:03 PM #4
    Do these languages come with tutorials? What about C#? Also out of curiosity can you get employment by being self taught? Reason I ask is because I want to build up a resume.
     
  6. Jul 13, 2018 at 6:11 PM #5

    jedishrfu

    Staff: Mentor

    In my experience, no because most companies looking for programmers go for degreed programmers considering them a known quantity. Some really small mom and pop operation might hire you but the pay will be low and it won’t help you to move to the bigger ranks.

    My suggestion is to go to school and get a degree. It’s a lot of work but you will gain some good training, maybe an internship and definitely get a better paying job.
     
  7. Jul 13, 2018 at 6:23 PM #6

    wle

    User Avatar

    Depends on what you find interesting. I think just about anything that is reasonably popular except C++ could work as a first programming language as long as it can sustain your interest. Some ideas:
    • C, if you find the idea of mucking around with lower-level details of how the computer works interesting.
    • Python, if you want to get started building practical things quickly and easily, like programs that do networking or show graphical interfaces.
    • One of the web development languages like Javascript, if that's what you find interesting.
    • Common Lisp, if you want to learn about high-level programming concepts.
    • Scheme, Haskell, or ML if you're very theoretically/mathematically oriented.
    Most programming languages including all the ones above are free to use, and it's possible to find tutorials and sometimes entire books about them freely online, so there's nothing stopping you from installing and trying out more than one of them just to see what you like. Note that some of these languages require more independence to learn than others, if you're learning by yourself.

    This essay by Peter Norvig includes some good advice about programming language choice among other things.
     
  8. Jul 13, 2018 at 6:29 PM #7
    Out of curiosity why is everyone turning anyway from C++? By the way @jedishrfu I understand what you're saying, but I at least want to learn how to code before I jump into a CS program.
     
  9. Jul 13, 2018 at 6:37 PM #8

    jedishrfu

    Staff: Mentor

    A lot of jobs are web based applications and so knowledge of java is critical for server side programming. Similarly for mobile apps with Java on Android and Swift on IOS.

    In my experience, I used C++ for several years and hated it because of the standard template library that seemed tacked on to the language. There were also certain fragilities when building dynamic libraries that one would trip over costing a fair amount of debug time. Java to me was a breath of fresh air with its relative simplicity and singl inheritance tree.

    The IDE tools also make a big difference. My coding of C++ was always slowed because I had to look up apis that were inherited by a given class that just took way too long to do. Now the IDE tool can look it up for you speeding development along.
     
  10. Jul 13, 2018 at 7:38 PM #9

    Tom.G

    User Avatar
    Science Advisor

    I'm thinking for someone that has NO programming knowlwdge, a much more basic start would be better. For instance the BASIC language or maybe even Turtle Graphics. There is free download for BASIC at https://www.microsoft.com/en-us/download/details.aspx?id=46392

    Turtle Graphics is aimed at the Elementary (Primary or Grade) school level so it won't keep your interest for long, but it does start from the very beginning.
     
  11. Jul 13, 2018 at 7:41 PM #10

    jedishrfu

    Staff: Mentor

    For kids that might work but for high school or college, Python seems to be the preferred route or Java via the Pocessing IDE. These folks don’t want to have start from scratch to learn a more professional language so that why Python is used. Processing provides a nice environment with immediate graphical feedback.

    These discussions come up endlessly and while BASIC is good for learning its somewhat dated no and introduces some bad programming practices that must be unlearned.
     
  12. Jul 13, 2018 at 8:20 PM #11

    StoneTemplePython

    User Avatar
    Science Advisor
    Gold Member

  13. Jul 13, 2018 at 8:31 PM #12

    phinds

    User Avatar
    Gold Member

    Just FYI, C++ is a bastardized language with object oriented capabilities overlayed on C, but not enforced. That is, you CAN write object oriented code with C++ but you don't have to. Java is much cleaner in the respect that it enforces object orientation.
     
  14. Jul 14, 2018 at 10:05 AM #13
    I have a background in Fortran, but lately I've been studying C# so that I can understand some of the things that my grandson is doing in his programming. My background has helped me get through many of the beginning concepts, and I've written some decent programs to solve some physics forums problems. But, the concept of object oriented language is new to me, and I'm struggling to get an understanding of Classes, and working with Classes. I've looked over many online references, and have gotten some understanding, but I'm still struggling. Any recommendations on good (and simple, straightforward) sources would be greatly appreciated. Thanks.

    Chet
     
  15. Jul 14, 2018 at 5:32 PM #14

    Vanadium 50

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2017 Award

    I'm not sure this is a great idea. There is a difference between programming and slapping together some lines of code. Presumably your classes will teach you to do it right. Why do you want to jump in early and teach yourself what you are likely to have to unlearn?
     
  16. Jul 14, 2018 at 6:48 PM #15
    I recommend C as it is a low level language. I learnt JAVA and OOP first, then C, but I think learning C is a good way to start. Enjoy!
     
  17. Jul 14, 2018 at 7:59 PM #16

    Mark44

    Staff: Mentor

    My preference is to get a good book. There are a lot of C# books, but I would highly recommend Jeffrey Richter -- https://www.amazon.com/CLR-via-4th-...coding=UTF8&psc=1&refRID=R155X9WAXWRMY5MK2YTZ, and the price is very reasonable. Richter was a long-time consultant on the .NET Framework team at MSFT, so he knows his stuff.
     
  18. Jul 15, 2018 at 7:08 AM #17
  19. Jul 15, 2018 at 10:56 AM #18

    Mark44

    Staff: Mentor

    @Chestermiller, Regarding your sig line, my cousin lives just outside Ann Arbor on 12 Acres. Here's an Google Maps view photo of his barn. The M is quite visible, but the full message is M GO BLUE.
    The barn is very well known around Ann Arbor.
    mgobluebarn.jpg
     
  20. Jul 16, 2018 at 1:32 AM #19
    You might have a look at rosettacode.org -- from that site:

    Rosetta Code is a programming chrestomathy site. The idea is to present solutions to the same task in as many different languages as possible, to demonstrate how languages are similar and different, and to aid a person with a grounding in one approach to a problem in learning another. Rosetta Code currently has 881 tasks, 221 draft tasks, and is aware of 699 languages, though we do not (and cannot) have solutions to every task in every language.​
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted