How to get started with programming

in #programming8 years ago

The most common question that people ask when they want to learn programming is: how do I get started? Some think this is the wrong question to ask, but it's understandable. The field is huge and can be overwhelming for newcomers.

Learning to program is like learning to ride a bike. Your parents didn't sit you down as a child to explain Newton's laws of motion and gravity. Instead, they strapped a helmet to your head, put you on your bike, gave you a push and off you went...sort of.

You learnt to ride a bike by riding a bike, and programming is exactly the same: you learn to program by programming.

Below are four great ways to get started with programming that get you writing code quickly.

1. Work through a textbook

When I started learning to program we didn't have an Internet connection at home so the only option was to work through programming books, and it's an excellent option for complete beginners. Textbooks go into a lot of depth, covering a wide range of topics to ensure that the reader leaves with enough knowledge of the language to "go it alone".

You can find a good programming book for almost any language. Below is a list of books that I recommend for languages I've studied:

There is also a list of free programming books on github.

Bear in mind that working through a textbook requires a lot of discipline and self-motivation.

2. Solve online challenges

If you're more interested in solving challenges and puzzles, or creating real world applications, you might want to try online resources.

One way I've found to improve my programming skills is to work on small challenges that are quick to complete but help exercise the programming muscle. I've found the following websites extremely helpful:

3. Follow an online course

If you prefer a more structured, lesson-oriented approach to learning, you could also try the excellent Coursera, Khan Academy and Code Academy.

Coursera also has an active community around each course, but not all courses run year long. Usually you have to sign up and wait for it to begin.

4. Solve a problem you have

Programmers are lazy. We spend a lot of our time getting computers to do things for us, to solve our problems, in order to make our lives easier.

Solving your own problems through programming is a great way to learn. It's highly motivating and when you've finished, you have something useful to show for it. Moreover, as you maintain the finished product, you'll continue to learn.

I recently wrote a small program to compare GPS tracks because I wanted to know how often I'd run a particular route. I've also written a program to find out when whales upvote and another to hunt upvote bots.

These were all problems I cared about, so solving them was fun.


Banner image by Christiaan Colen used under the CC BY 2.0 license. Changes were made to the original.

Sort:  

This is excellent @bitcalm. I'm a pretty solid writer, but programming has never been my forte. I took a Java class in high school for AP Computer Science, and while it was fun to develop programs (I built a P2P command-line Magic the Gathering program which worked surprisingly well) I could not stand debugging programs. Given how much I've focused on improving my grammar and punctuation, though, I might have a better go of it since I'm more focused on syntax now than I used to be. Coding is an excellent skill to have nowadays, so I think I'll give it another shot. :)

Debugging can be frustrating at times for sure. I seeit as a challenge and get a narcissistic kick when I fund the source of a bug. Sometimes that also results in a facepalm ;)

My problem was always that finding that bug resulted in a dozen other bugs. Programming is logic; one faulty premise can collapse an entire argument, and fixing the faulty premise invalidates the statements that follow. It's entirely my fault, of course, since the computer doesn't write the code for me, but hot damn did I get tired of recompiling after fixing one bug only to find 26 other conflicts lol

@bitcalm, thank you for the resources. I'm well versed in alot of things but programming is not one of them. Those references will be very helpful.

You're welcome. Programming is a passion and I encourage everyone to try it out. Focus on having fun and you'll do fine. ☺

I've done some good courses on Coursera for Python, R and other (non-programming) subjects. I think it's good to have some structure to your learning. Once you've got some knowledge you can get into challenges and come up with tools you actually need. I did a Python script to automate how I do my post images. Saves a lot of time and I learnt new things

You have no idea how many people ask this question in AnonOps IRC, I am going to bookmark this page and send it to people who ask from now on. Thanks for compiling this into one article. Big up-vote!

Hey! I recently started to get to know javascript as my very first programming language. I know this is a big first step to move into when you have no previous experience, but I thought I would give it a go. My brother is a software engineer and he kind of inspired me. Two very very useful websites for me to get to know the language are as follows:
www.codecademy.com - This is a beginners guide which shows you step by step how to master the basics for free
https://codecombat.com/play/dungeon - This one is really fun too. It's for kids I think, but I used it anyway. I am a 22 year old male (in one hour) and I still found it very useful to learn the language with it being very entertaining while I was doing it.

I do really think that learning to program is one of those skills that can only benefit you in the future, so if you have the time you should give it a go!

Awesome post anyway

codecombat! Damn I forgot that one, thanks for posing it. Great to hear that you've had some success programming

Definitely would be interested and keen to learn, it does sound bit geeky thou :)

Everyone has there own inner-geek. I think yours likes cooking ;)

My suggestion is not using a textbook (was too boring for me).
I always used video tutorials, trying to do what was on video on my own code.

It's also very useful to start with a simple project in mind and try to create it using already existing pieces of code. :)

Starting small is indeed very good advice. Using existing code is also helpful, though I discourage copying and pasting it - you learn better by typing every line out yourself.

I've always tried video tutorials, still have some saved up from when I started thinking about programming, 10-12 years ago, yet sometimes not being actively engaged, and just passively watching it, makes me fall asleep :D
A book might help as you constantly need to turn pages ;)

What you should do is watching the video tutorial and, at the same time, writing code on your text editor.
I don't recommend watching video passively, it will give you too many info and you will forget them or get very bored :)

That is true and I think I've given up on many tutorials because they had long introductions and actual coding was done after.

Learning to program is like learning to oil paint... most don't' do the art justice.

That being said, I whole heartedly agree with 4... if I do something twice I'm annoyed. If I do it 3 times I'm down right pissed off a computer didn't do it the last two times for me.

Programming = automation = facilitation. I shouldn't have to do math (though I can do math with the best of them) and I sure as shit shouldn't have to do math twice...

When I code the objective is the computer is my bitch and it works for me...

I think you touch on an important point here: there is the "it provides an income" side to programming but also the art and creative side.

The debate of whether everyone should learn to code is a difficult one. I personally don't think everyone needs to be able to code, must as much as not everyone needs to know plumbing; that said, if you enjoy the learning process, the skill can come in handy even if you only use it for small tasks and not as a source of income.

In my experience probably only 5% of the CompSci students, undergrade or grad school, really got it and were elegant and skilled at writing code or designing an architecture. The rest were just able to functionally regurgitate a learned skill if at all

The big debate is whether they functionally are unable to get it or if they just lack passion, drive and motivation. I'm undecided on whether programmers think differently or are fundamentally "special". I tried to find research on this a while back but couldn't find anything

Excellent Post, I attempted Programming myself... Woah was I in for a shock, It's much more challenging than it seems. The Odin Project, Coderschool and Codeacademy are all great teachers.

I suppose Im lucky that I never found it hard or was shocked, or at least when it got hard, I became more motivated.

Oh, thank you that you made a post "How to get started...", not "how to become...". I tired from the articles about easy programming for all, because it's not true, it can't be easy for all. If you don't have mathematical mind it will be better forget about it.

And your article will help people to understand can they use it or not. Thank you one more time!

The "learn x in y hours/days/weeks" is a marketing gimmick and it bothers me too. In fairness it does depend on his far you v want to go: not all programming is created equal, and you can get by in some cases without a strong mathematical background

two other challenge related platforms are:

Thanks for adding. Not heard of checkio before, sounds like fun. I can imagine there are lots more I've not heard of.

you can't imagine! :)

Great post ! +1 and following

It is my first downvote ever. Sorry for that, it is not 'personal' but my eyes are bleeding. If you feel your comment does not deserve it, please sent me a message on Steemit chat - I will explain it to you in details (don't want to start an offtopic here).

EDIT: Dear Reader, before you continue, you should know that together with @jtstreetman, we have already discussed this situation. It was quite unfortunate, you can ignore all comments below, it is not worth your time. ( @jtstreetman also changed the comment above and I removed my downvote)

@radoslaw You Rock !, glad we got that ironed out, very good !

tried chatting, no response

I read your original answer, so will answer it...
To answer you, my comment after a downvote has nothing to do with my ego. I simply felt bad about using it, therefore I left a comment, not to be rude, and give you a chance to get a feedback 'why'. Unfortunately, Steemit does not allow us to leave a reason of the downvote - which I think would be useful and fair. My eyes are bleeding is just a figure of speech (a hyperbole).
Briefly, why:

  • Ubuntu is Linux (coma is a logic mistake, which hints you may not be fully aware the subject you try to discuss)
  • Knowledge about Linux (e.g. Ubuntu) is a completely different topic from programming - it is not "these are basics, I mentioned advanced one, lol" - No. These are different areas of knowledge.
  • Ruby on Rails (RoR) is an example of a web application framework one of many, completely useless to anyone else than Ruby programmers. Additionally I would say: not "advanced" at all (but it is just an opinion).

You did not mention algorithms, programming paradigms, any good programming practices etc, which would actually bring a value to this discussion. Instead, you were just throwing random terms and laughing like it was any kind of 'next level'. I think this comment was irrelevant, contained logic mistakes and showed bad attitude.
I would love to see Steemit growing and become a source of knowledge to its users. There are great posts around from a variety of disciplines and there is a lot of potential here. On the other hand, a kind of behavior expressed in your post is the one, I would like to see gone for a greater good. So I used my downvote as a hint for you and to 'help it disappear' from this topic.
It is why it is a 'downvote', not a 'report' or 'flag' anymore.

and btw, you did not try to catch me on chat, don't lie ;)

There's a "broken telephone" part here. he DID try to catch you on DM... but he could not figure out how.

interesting and thanks for sharing @bitcalm

Lynda.com is awesome too. Highly recommended for beginners.

--Source: Dev

nice post. i enjoy this. this is the best post so far

I agree project euler does depend on your mathematical background. I think the first 20 or so are at least attainable for most people.