ASK HN: What Coding Language Should I Learn?

6 points by bookjunkie13 ↗ HN
I know 0 about coding, web design - any of it. But I know it's something I should learn. What language(s) should I focus on? And what/where would be some good (ideally free) resources?

16 comments

[ 2.0 ms ] story [ 45.0 ms ] thread
Depends on) 1) Who you ask, their opinions etc (and there are many) 2) What you want to do. Coding is too big of a field to say "you should learn this language." Javascript is ubiquitous and you can do most anything with it (especially work with browsers) but it's also not the loveliest language.

You mention web design so then CSS, Javascript and HTML would be the logical choices.

If you want to learn to code, though, then I would personally suggest learning a functional language - maybe Clojure or Scala? That's a highly opinionated recommendation because my own experience has shown me that learning functional programming makes you more capable with other more imperative languages. This might be of interest. http://www.cs.utexas.edu/users/EWD/OtherDocs/To%20the%20Budg...

Most people would likely recommend something like python or ruby or even Java. There are many opinions. I would look at what you want to do first, and then choose the technologies that are used in that problem domain.

Coursera has courses that you can take for free. It would be a good place to start.

Start with Python because it's relatively easy and makes sense. [Learn Python the Hard Way](http://learnpythonthehardway.org/book/) is a good resource.

After you've got a Python project under your belt, learn JavaScript because pretty much every programmer will need to use JS at some point. [MDN](https://developer.mozilla.org/) is a good reference for JS, CSS, and HTML. W3Schools is a terrible resource and should be avoided.

Finally, learn a LISP (like Clojure/ClojureScript) because it will expand the way you think about programming and learn at least one lower-level language (like Rust or C / C++).

You should also learn Bash or Zsh as you go. I wouldn't recommend shell-scripting languages for large projects, but they are immensely useful for tasks like file manipulation, and you will need to know how to work with a terminal for system administration tasks.

lisp or Haskell, which one expands the mind more. I mostly only have time to learn one
C, Lisp, OCaml, and Haskell were all revelatory experiences as I learned them in roughly that order. I'm not sure Lisp would have been, post Haskell - but I'm not at all sure it wouldn't have been. OCaml probably wouldn't have been, post Haskell (except probably for the module system).

I'm not sure where that leaves you, but one anecdote richer in perspective...

At this point I do find myself caring quite substantially more about expressive types than about code generation, which would argue for Haskell being more important.

Start with HTML & CSS then move on to JavaScript. https://ilovecoding.org/

JavaScript is the hottest language on the planet at the moment and it's getting bigger and bigger.

Since you said web design, I am assuming you want to build a website.

So, Ruby on Rails.

Rails is a stack that has:

Ruby - a very simple developer friendly language. This is responsible for putting together

JavaScript - this lang is responsible for all the fancy stuff you see on websites. The animations and all.

HTML, CSS - this is the stuff that websites are made of. Ruby and JavaScript are used to generate this the way you want.

I used to be an accountant and started coding in Nov 2014. I have many rails apps ever since as prototypes and maintain one app that is in production (meaning people use it).

I used this Rails Tutorial by Michael Hart (https://www.railstutorial.org/book) significantly. You will end up with a cool website at no cost at the end of the book.

I also highly recommend Codecademy courses on HTML, CSS, JavaScript and Ruby.

If you are really serious about this stuff, which is great news, you might want to read more about making software. Start with the Pragmatic Programmer. It is a great book to read in your formative years.

And finally (this is important), try to solve a problem (like building a website for yourself or a friend etc) with programming. Learning just to know doesn't stick for long in my experience and probably is true for others.

Initially you'll want to learn

HTML->CSS->javascript

Track down a copy of Head First HTML & CSS to get started.

I recommend installing MAMP or WAMP for a local web host and using sublime text as your editor.

Starting from scratch, use the book Head First HTML and CSS (you can probably get through your library or a digital version)

Once you have a few local websites setup, get a hosting account (hostgator is ok for learning) FTP up your site using filezilla, buy a domain, learn to point it to your hosting.

Next get the book head first PHP & MySQL.

You'll learn PHP and MySQL building on top of what you've learned in the first book.

After you have completed that book. Pick a project to create for your self. A todo list maybe. Code it from scratch using what you've learned.

Next I would look at jQuery and learn how to improve the front end of your todo list.

Next step up would be learning a framework if you want to continue learning backend coding.

I recommend Laravel(PHP) or Rails(Ruby).

I'd recommend developing on a mac for both. Windows tends to have issues doing even the basic tutorials where you'll spend half a day troubleshooting only to find out it's a windows problem that needs a work around.

There are lots of tutorials for both.

Railscasts.com and Laracasts.com are good places to start.

You don't need to dive in to these till you have a solid foundation of HTML->CSS->javascript->jQuery->PHP->MySQL.

There is lots of learn so move at your own pace, see what you like.

Photoshop is a nice skill for editing creating images for your sites.

TeamTreehouse.com is a good paid site for learning.

Good luck, have fun.

What is your goal? What type of projects are you looking to code?
I like to think a good programming book will teach you theory along with showing you what an implementation in a language is going to look like.

While you still find it's hard to decide which language is superior to learn, maybe do some comparisons? You could look at some samples of different languages very easily, e.g. get on github and browse around! Then perhaps you gravitate naturally towards how one looks?

It could be nice, just starting out and all, to enjoy the natural elegance of languages: consider solving some project euler problems...then you can look at solutions in all sorts of languages! What fun.

I think Java would not be a bad choice as a general first language. And Javascript if web is your thing.
Agree with this. My first language was C# and because of it I learned a lot about correct patterns and code readability/refactoring that I can use in PHP or JS now.
It is almost funny that almost everyone are recommending a different language for the OP to learn :)

I would say choose those who are similar in each post, HTML / CSS and Javascript. Javascript actually would be the first one to learn imho, because it is easy, it is used in both client and server side (via node.js); it is very easy to learn.

Not knowing what/where you want to apply this new knowledge, I'd recommend learning Python. It's a very good beginning language and it can be applied to many different areas (web, science, research, etc...). You can also easily apply the general programming knowledge you learn in Python to many different languages.

Some free Python resources: - Dive into Python - http://www.diveintopython.net/toc/index.html - Dive into Python (v3) - http://getpython3.com/diveintopython3/whats-new.html - Official Python Tutorial - https://docs.python.org/2/tutorial/index.html - Learn Python the Hard Way - http://learnpythonthehardway.org/book/ - The New Boston Python (videos) - https://thenewboston.com/videos.php?cat=36

HTH

Either Python, Java, C#, or Ruby. If you are a Windows guy I'd go with C# over Java. None of these are what I prefer to code in, but my career options are extremely limited if I chose the language that I think is the "best".
You should ask yourself what do you want to build? If you just want to build a static website then HTML, CSS and basic javascript with a sprinkling of photoshop/gimp. If you want to build a web app then learn HTML, CSS, Javascript and then ruby, and then ruby on rails or Node.js. In terms of free resources get your feet wet with codeacademy then move on to freecodecamp. Oh and join codenewbie for support as learning to code could be frustrating at times.