Live data from Hacker News

Ask HN: Which language should I start learning?

news.ycombinator.com

1–10 of 18 posts

Ask HN: Which language should I start learning?

#1
Im in the last year in high school. I wanted to major in Computer Science and Engineering but I don't know any programming so I thought I should start self-teaching me at least the basics. The first language introduced at the university that Im going to is C++ but I read on the internet that C++ isn't a good language to start with ( too complicated for beginners), Python and Ruby seem more suited for this purpose. So now I'm confused, should I start learning C++ so I have a good background on it and risk not fully grasping it or start learning Python (or Ruby or any other "first language") and get my programming basics right from that language, and learn then C++ at the uni? Please elaborate your recommendation and thank-you in advance.

Re: Ask HN: Which language should I start learning?

#2
Given your situation, I would suggest learning C right now. C is a small language, and will be a good ramp up into C++. A lot of people around here readily recommend Kernighan and Ritchie's The C Programming Language as a book for learning C, though for a beginner, it can be a bit terse.

Re: Ask HN: Which language should I start learning?

#3
Learn not the language, but how to use them.

Stop reading this thread and start writing some program/app right now.

Don't know where to start?

Simple: Make a Rock Paper Scissors game in C++|Python|PHP|etc.

Really?

Yes. This little game will allow you to learn the basic principles without much frustration. You will use variables, functions, conditional statements, and loops to make it happen. You can then go and use arrays and object oriented programming to learn more. But just focus on making it work first.

Then, after it sort of works, move into something entirely different.

Like what?

How about a little web app to track your finances?

That's so boring, you might say, but it will teach you many things.

Like:

- Finishing a project is 10000 times harder than starting one. - Many languages in one sitting (HTML/CSS/PHP/SQL/JS/etc.). - How to organize files around. - The importance of comments and readmes. - How to play around with linux to get your stuff to work. - How to work with apache (on XAMPP). - How to work with versioning (GIT, etc).

One last thing:

Don't stop because you are stuck! Push through! Most of the software I build is done so when frustration is navigating around my brain, trying to wreak havoc in the sea of my thoughts.

Note: I know this is rather off-topic, but I'm a long time lurker who saw the opportunity to assist a young mind learn.

Good luck kid,

Never quit, don't give up, you will do it.

Re: Ask HN: Which language should I start learning?

#4
If I were you, I would start messing around with Javascript first. Yes, there are MANY weird things about Javascript. But, the nicest thing about it (for you) is that all you need to start programming with it is a web browser!

Codecademy also has some great simple Javascript tutorials. All you need to worry about now is learning the basics, and the core concepts you learn in Javascript will apply to almost every other language you learn.

Re: Ask HN: Which language should I start learning?

#5
first and formost, learn something. don't waste too much time trying to find the "correct" language to learn. Here are three options:

-If you are interested in reading SICP, then learn scheme -If you want something that is a good prereq for C++, learn C -If you want a simple and very useful language, learn Python. You'll probably keep using it in the future

Re: Ask HN: Which language should I start learning?

#6

Learn not the language, but how to use them. Stop reading this thread and start writing some program/app right now. Don't know where to start? Simple: Make a Rock Paper Scissors game in C++|Python|PHP|etc. Really? Yes. This little game will allow you to learn the basic principles without much frustration. You will use variables, functions, conditional statements, and loops to make it happen. You can then go and use a…

I can't second this. Too many people spend time trying to find the best way to do something. This is only possible when you understand the domain. Until then, move fast and break things!

Re: Ask HN: Which language should I start learning?

#7
Learning the basics of any (within reason...brainfk,etc not included) is within easy reach of a beginner. The difficulty with languages and C++ is the more complicated features like templates and such.

Every minute you spend researching and trying to decide which language to use is time wasted. You shouldn't be learning languages at all, you should be learning concepts. Figure out concepts like what linked lists are, recursion, inheritance, etc. Then learn the details of some language, then go back to the fundamentals and realize how little you knew before. Rinse, repeat.

This advice is for someone interested in CS as opposed to just programming. Yes, there is a huge difference.

Stop wasting your time and start something.

Re: Ask HN: Which language should I start learning?

#8
In my personal experience, the hard part for a beginner is not the actual programming, but the environment. Fussing with the command line to compile and link a program, or setting up system environment variables, class paths etc. pp. can be a frustrating experience. I would argue that for a beginner a good IDE is an important tool to getting you up and running, having fun and keeping motivated.

I would therefore recommend something highly integrated like Visual Studio C# Express Edition which you can download for free. If you have Microsoftphobia, the alternative would be Java with Eclipse.

Having said that, at one point you HAVE to leave the "kiddie pool" and jump into the deep end. For that I would second the recommendation of Kernigham & Ritchie's The C Programming Language.

The order of these two steps is up for debate...

Re: Ask HN: Which language should I start learning?

#10
The good thing about learning C/C++ first is that it will help you understand how the internals work and you will (should) learn how to program efficiently and understand basic algo's and methodologies. For that matter, assembly might be a good start! :-) If you understand HOW things work, it will not matter what language you elect to use down the road (for example, you might want to use Rails because it makes developing web apps a pleasure, or whatever). Ultimately, your choice.
Post reply on HN