What is the best language for someone who wants to learn to code for the first time?

14    30 Mar 2016 03:38 by u/Optick

43 comments

6

What do you want to code?

5

I see this question a lot in programming forums. What you're going to get as an answer is (mostly) people's current favorite language. When you really get down to it, there isn't any best language to start with. Once you understand how software development works, and how to logically solve problems through coding, learning a different language is (for the most part) just figuring out a new syntax.

I would recommend starting with Java as it's the most popular language at the moment according to IEEE.org. Because it's popular, you'll have a larger pool of resources to help you out when you need it.

I also recommend learning all about design patterns. These are reusable solutions to common problems in software development. They aren't coded solutions themselves, but they are templates that push you in the right direction.

2

Java is hard core though ....

Definitely agree on the patterns.

4

If you want to do close-to-the-hardware stuff like little robots and embedded systems and video games, C.

Anything else, python.

3

K&R C.

Everything else is just a children's toy.

2

Except assembler and Lisp.

2

Javascript -> Doesn't requires compiling, good tools for debugging including on all the browsers, typeless, everything is an object so oo, can be used on frontend and backend (nodejs).

7

"learn to code for the first time"

"typeless"

screaming horror

1

Lol, when you get further into js you can learn more about types and all that.

But for me, learn to code for the first time should focus more on learning the logical flow using the different logic operators and cycles and less thinking if you should use an int, float or double.

Logic first, language syntax second. In that sense JS is pretty permissive. A bad developer will always do bad code, a good one will start to get better and better and learn to use JS to its full potential.

0

You make some good points, but in my experience the bigger challenge is not the logic as people understand it, but rather dealing with the way that logic is applied in a computer processor, and that's just inextricably linked to things like typing. If you don't understand how computers encode information, it's hard to get very far.

... but then again, you do javascript, I do C and assembly. Our disagreement probably mostly has to do with what we're trying to do, so whatever.

0

C and c++ are for real coders.

Those languages are beautiful (c++ specially for me). But they are really hard to get into. But once again, once you get better and start trying to learn things like list, graphs, and other data structures, I can't think of a better language for that that c++ and its pointers.

0

Meh, Basic is weakly typed (or at least some versions are) and plenty of people started with it. JS is probably no worse in that regard.

1

I'd say JavaScript. Lots of resources, and its in demand if you choose it as a career

1

+1 python

1

Python for sure

1

C.

And only code in vi.

2

In Gentoo

1

This might be a joke, but learning C first without the benefit of memory management abstracted away by the language is not a bad way to start, and using a CLI text editor like vi or vim means that is ingrained from the beginning and doesn't need to be learned later if you ssh into a box and don't have a fancy editor available.

1

My comment was a joke. I fully agree with learning vi for the reasons you mentioned (vim is my editor of choice), but that should be learned before jumping into programming. I would assume OP is capable of picking out an editor or IDE on his own.

I started out with vi and Bash scripting on Solaris and then learned Python followed by Perl. It was a great way to start out, because I learned "how to program" without all of the overhead of memory management and strict typing. Python's forced whitespace gave me good indentation practice. Its 'batteries included' standard library is also a huge plus.

Now I'm learning Rust. It's like C, low level, strict typing, very fast. The transition hasn't been painful, lacking docs aside. C wouldn't have that problem due to its age, but I believe Rust will eventually replace C.

0

And only code in Emacs

FTFY

1

Javascript is very easy, it doesn't give trouble (except for with null...) and it's got ton of resources. Did I mention that your browser is your compiler? So yeah, for a beginner Javascript is hands down the best, there is no competition if you want the simplest and most robust experience.

1

Python is a good starter. I’d say consider ruby, too.

1

As a first language these are good jump points!

Then off to C or Java.

2

Yeah, I'm personally a big believer in the idea you should learn at least one "low level" language like C or C++. So many concepts that are sorta esoteric in high level languages make a lot of sense once you know where we were coming from.

1

For the most bang for your buck but not a good language would be php.

Yeah, I know that everybody knocks it but it's the one language that is every where and system admins don't have nightmares over.

Python and Ruby are rock solid and go from basic to advanced better than php but getting started is a tough first step.

1

+1 for PHP. I just think it looks prettier than Python.

0

Well, php is finally getting better and some of the frameworks are really starting to be solid and more advanced like Ruby or Python.

0
0

Well, it's not that bad ;-)

0

Depends what you mean by "good language". PHP is great for just slapping something together - I use it over perl for command line scripts for text parsing and stuff.

1

A lot depends on your goals. Would you like to be able to write large scale systems and complex components? Just academic curiosity? Do you just want to be able to write a little game that runs on a webpage?

If you're interested in being able to go all the way to the top, I'd recommend starting with assembly. The big benefit for assembly is that you naturally start to understand why things like encapsulation, objects, and so on exist as opposed to just learning the OO bible and taking it as sacred fact. It also gives you a far better understanding of what's going on under the hood which can help you write more performant and well designed code when using higher level languages. MIPS has a simple assembly syntax and instruction set that's often used for educational purposes. So you'll have countless tutorials, projects, and so on available for learning. Just google for 'MIPS simulator' to find something to run it on.

If you'd rather just get something that's easier to chew on I'd go for C. After that it'd be time for C# - it's cross platform and has done a great job of taking most all desirable features from most languages, cleaning them up, and still keeping them in a very attractive syntax. But it's important to have an intuitive understanding of what's happening under the hood in order to write the most 'effective' code, which is why I think it's critical to start with lower level languages.

On the same theme, even if you just want to throw together some stuff I'd have trouble recommending javascript. It's not really like any other language and may lead to some incredibly bad habits. It's performance is abysmal and as projects grow in complexity it quickly becomes intractable. Coding is a lot like language in that a lot of the real work is done subconsciously. You know when you formulate a sentence you're not sitting there thinking about subject-verb agreement, adjective placement, tense agreement, and so on. That all happens automatically and subconsciously. The same is true for a coder working on a large project. So I think getting your fundamentals down 'correctly' is critical to make sure you don't hamstring yourself.

1

ENGLISH MUTHAFUCKA!

But seriously, if you're just starting, java if you plan on sucking. C if you don't. Python if you want to be a weirdo.

Edit: oh and if you're 15 go study mobile stuff that i know nothing about. I'm hoping all those systems eat shit and die but they probably won't.

1

BASIC. Beginner's All-Purpose Symbolic Instruction Code.

0

In order:

Python

Basic

JavaScript

Logo

Not recommended, but if you learn it you can do anything:

Brainfuck

Whitespace

Assembler

Haskell (sorry, couldn't resist)

0

What, no Erlang or Lisp?

0

Not even a mention of perl, as tho it's evil spawn of satan!

0

Ruby

I like Python and Ruby, but Ruby was way under appreciated in the suggestions. :)

0

go, Javascript, or python.

If you want to learn to code without things getting in your way then python is the best. javascript can be useful for a lot of things though, google scripts use it, as well as webpages, etc. Go if you want an awesome modern language that is incredible, but doesn't have the support that the others have and is much harder to get started with.

0

If you want into the web development world, which doesn't really require any degree (for most jobs) I'd suggest PHP (because there are a ton of jobs) and Javascript.

If you want to make the most money, learn Python. Javascript second. You can also transition. Once you get one language under your belt, it gets easy.

I started out with Ruby, but I had a really hard time finding any work with that language, in fact I found simple jobs editing Ruby code that others couldn't (Ruby on Rails to be exact). I learned PHP, CodeIgniter and the doors opened. Using Laravel now. I mastered javascript first though, and javascript jobs are as plentiful as PHP. You need a portfolio and a github account showing your code. No one ever asked to see my degree in Internet Productions (a 2 year program at some shit college), in fact I was a few credits short of finishing it and I just said I had it.

If you are good, you don't need paper, people want work examples. This however is just for web development in my experience. And my experience alone. I am doing very well because of the connections I made on my path. If you work with someone who is a good worker and good person, keep them as a friend on Facebook or something. You never know who gets a golden chance and may need your help.

0

If you want something easy to learn while also practical for IRL use, Python and Ruby are great choices. If you want to work as a professional programmer, Javascript is never fucking going away.

0

While learning the basics of software development I'd recommend Python. It'll force you to get in the habit of properly formatting code and doesn't have as many syntax related necessities (like ugly semicolons)

To learn how a computer manages memory and other advanced concepts I'd recommend C.

Also, when you hear of a new language you haven't heard of before look into what the designers had in mind when they created it and what makes it unique, it'll introduce you to different ways of solving similar problems