Ask HN: Beginner confused on where to start learning programming
TL;DR - install Linux or use a Mac, Learn a compiled language, find a book&#x2F;tutorial for beginners on that language and your operating system and actually work through all examples&#x2F;tutorials&#x2F;problems.  Take the harder route, Learn the basics of programming in general, as that all languages share those concepts.   If you go that route all the other languages are just syntax and new tools&#x2F;programs.   stay away from interpreted languages until after you have a firm grasp on how compiled languages work.<p>The state of programming is currently a mess.   20 years ago there was not so many topics and programming techniques.  back then you started with Basic programming to get your feet wet.  You would move on to other high level languages like C&#x2F;C++, Java, etc...)  Developers older than me would have learned C&#x2F;C++, Fortran, Pascal, Lisp etc...)   There was a clear learning path without too many branches to go down.<p>Now a days, you have terms like UI&#x2F;UX designer, Front-end developer, back-end developer, full-stack developer, embedded systems developer, etc...<p>These are all new concepts, back in the day it was just developer or software engineer.<p>Todays landscape has too many things to wrap your head around - HTML, Javascript, Nodejs, Go, Rust, Scala, CSS. Ruby on Rails, React, yadda, yadda, on and on and on...<p>So it is easy to understand it&#x27;s hard to find out where to start.<p>The truth is; all of these programming languages all build upon basic principles. Assignment of data, mathematics( arithmetic, calculus, algebra, etc...) , and most importantly Boolean algebra which gives us true and false, AND, OR, NOT, XOR, XAND, NOR, NAND, etc..   Boolean algebra or sometimes called Boolean Logic lets us form Conditional logic&#x2F;statements ( if statements, equals, greater than,, and loops (do, while, for, foreach, etc..).<p>to recap the basics of programming are:<p>1. assignment of data to a variable.  X = 1;  Just like algrebra.  Put your data in a bucket with a label.
2. operations on that data:  mathematics,  inputs and outputs (I&#x2F;O), etc...)   Do something with that data, which may create more data to store.
3. Conditional statements to decide what to do next with the data:  if ( x = true) let y = 2 + 2;  do while (y == 4) then y = y -1 end<p>So... My advice is learn the basics of programming.  Do not get hung up on a &quot;Buzz&quot; word&#x2F;topic&#x2F;language.   Pick a language and master the basics.<p>Programming languages could be said to generally come in 3 flavors. and 2 sizes.   The official terms are paradigms and types.  Note that there are more paradigms and types, but to keep it simple these are the most common&#x2F;basic.<p>Flavors (paradigms)<p>1. Procedural  - (do step 1, then 2, then 3 in a defined order)
2. Object Oriented ( a very simple definition: objects are generic, reusable chunks of code that try to describe real world concepts. Once objects are created, what those objects can do are executed.  define Object boy: the boy can jump, the boy can sit.   create new boy.  boy.jumps boy.jumps boy.sits )  
3. Functional - just like higher mathematics that have the concept of functions.  f(x) = y +2 f(y) = 3 - a  f(lambda)= f(x)(f(y)(a=1)).   You define your functions, then the global function typically called the lambda function is where the program starts it&#x27;s execution.<p>Sizes (types):<p>1. Compiled&#x2F;assembled -  languages are read by a program and turned into a file that is executable by your operating system.  To run your program you ask your operating system to run the code in that file.    your code is converted from the language you wrote it in and converted to machine binary (zero&#x27;s and ones) that your CPU can understand.  That binary (zero&#x27;s and ones) is saved as a file for later use ,and reran quickly.<p>2. Interpreted - you run a program and give it your code as you wrote it, and it runs the steps in your code.  it is not saved for later use.  Every time you want to run your code, the work of converting your code to Binary is done again.   Interpreted languages will sometimes have a runtime,  A runtime is the program that executes your code on your machine.   Interpreted languages are slower than compiled languages.<p>I would suggest picking a compiled programming language. Preferably on in the C syntax family (C, C++, or D).   Pick up a book on one of these languages written for beginners.  Read the book and work through each example&#x2F;tutorial&#x2F;assigment.    This is the harder route, because you will have to learn the compiler and associated tools sometimes referred to as a &quot;toolchain&quot;  You&#x27;ll have to learn how to run the compiler, what program&#x2F;tool you type your code into, etc...<p>I would also suggest Installing Linux or using a Mac.  Stick to open operating systems that are of the UNIX family.  Find open source applications that suit your fancy read the source code to learn more.   This is one of the reasons Open source is king.  You can use the force by reading the source.<p>Programming is not easy, it is not meant to be.  You have to fall in love with computers, and learn not to give up when something is not working.  Solving complex problems starts with learning from cryptic compiler warnings and errors.   It will force you to find your mistakes, and avoid them moving forward.  it&#x27;s like negative reinforcement,  you just want it to work, eventually it clicks and you can write tons of code and have it compile on first go.   Does not mean it works as designed, but works as you wrote it.<p>After you have a firm grasp on the concepts,  rest is just syntax. What do I mean by that?  every language has assignment of data, operational statements , and conditional statements.   It&#x27;s just how you type the code that is different so it works.  Learning a new language is then just re-learning how to express the basic concepts in code and run that languages toolchain.<p>you should not concentrate on web, mobile, embedded at first.  Learn to crawl, then walk.  Then again find open source projects in those area&#x27;s and see what you like.  If you dabble with them all you will be well rounded and won&#x27;t sweat any job that comes your way.   ultimately you might like embedded, or systems programming.<p>In reality though, you&#x27;ll do what ever work you can find a job doing. knowing more languages, and being able to answer tough interview questions will really determine what you end up doing.  My advice to you is once you adept at writing code, it&#x27;s not what you like doing at work. It&#x27;s about what pays the bills.   You can always work on what you want to do on the side.