Search This Blog

Friday, August 14, 2020

I am 17..I want to learn coding. I want to be a programmer but I don't know where and how to start..what do I do?

I am a self-taught programmer, so I think I am qualified to answer this.

First of all, programming is not learning any specific language. Programming is (as Dominic Conner says in his answer) when yo get a computer to do things.

You write a series of instructions, feed them to the computer and it will follow the instructions and perform those actions. If you write the instructions specific enough, the computer will give you the result you expect. If you are not precise and specific enough, or miss a step because it is obvious to you (which it is not to the computer), you will not get the desired result.

The language you use for the instructions can be any of the many programming languages that exists. Some languages are very generic, some are specific for particular tasks, or only for particular environments/platforms.

Some languages are easy to learn, others are more complicated. But in the end, they are just a way to write the instructions to feed the computer.

Ignore anyone who starts to talk about choosing between web development, mobile applications, games, etc. That is a later step. First you learn to program.

Programming is solving a problem by breaking down it into smaller problems, then solving each of those. That is what you need to focus on. You need to work on problem solving skills and logic, the way a computer thinks.

Start writing programs in pseudo code. That is when you don't use a real programming language, but use your regular language to describe what the program should do, step by step.

Imagine someone asks you to write a program to make a sandwich with strawberry jam. What would that look like in pseudo code? Perhaps you would write something like this:

    • get loaf of bread 
    • get butter 
    • get jar of strawberry jam 
    • put butter on bread 
    • put strawberry jam on butter 

You would end up with a loaf of bread with a package of butter on top, and a jar of jam standing on top of the butter. Not exactly what you intended, right?

So you decide to be more detailed:

    • get loaf of bread 
    • get a knife and use it to cut a slice of bread 
    • get butter 
    • using a knife, spread butter on bread 
    • get jar of strawberry jam and a spoon 
    • put it on it on top of butter 

Better, but still not working correctly. You would end up with a slice of bread that is all squished, since you did not specify to use a sharp bread knife. The computer used a dull butter knife. You have an inch of butter on the bread, you never told the computer the amount of butter to use, so it used the whole package. Finally you have a spoon laying on top of the butter.

Also notice that you never told the computer to open the jar of jam, so even if your other instructions gets corrected, you will not have any jam on your sandwich. That is called a "bug". :-)

I learned to program in 1982. I had started 7th grade in the fall of 1981, and just before Christmas a computer club was formed. It would start its activities after the Christmas break, everyone had to take three evening classes, learning to turn the computers on and off, how to use the (shared) floppy drives and the printer, and some rudimentary BASIC, the language used by the computers in the school's computer lab.

Picture by Ellinor Algin, Creative Commons Attribution 4.0 International

I did not have a computer at home, so before Christmas break, I went to the library and borrowed a book about programming on this particular computer. I then spent almost 3 weeks writing simple programs with pen and paper, then going through them line by line to see if I missed anything or could find an error in my logic.

I attended the three evening classes, then I got my own access card, so I could go to the computer lab any time I wanted (as long as there was no class going on). During the next five and a half years I spent all my free time in the computer lab, learning to program. I learned from book and from older students, who sometimes also had computers at home (I lived in an affluent part of town). But most of all, I learned from my mistakes and bugs.

I spent thousands of hours in the school's computer lab, almost every day I spent 3–4 hours, plus the hour long lunch break. I even ran there when I had a 20 minute break between classes (one reason I was almost always a few seconds late to class).

That is how you learn to program. You write all kinds of small programs, then work your way up to bigger and more complex programs. Do not start with something large, you will get stuck, get frustrated and quit. Learn the fundamentals first, like different kinds of loops and branching, what a function is, different data types, etc. And practice. Practice a lot!

The language does not matter. You pick whatever is easily available to you. Don't worry about picking "the best" programming language, you will have to learn several different ones anyway.

I agree with Justin Mullen's answer. Pick something that is easy to start with. Javascript has issues, but to get started quickly with programming, it works. You can create a free account at JSFiddle and write your code right in the browser, then test it. You need an account to be able to save your code and come back to it later.

Or you can use a simple text editor (Notepad, Notepad++) or code editor (e.g. Visual Studio Code) to write your code on your computer and then upload it to your web server.

After you learn to program, then you can start thinking what kind of programs you would like to write, and decide what language(s) to learn. But that is actually a totally different question.

Programming is not to learn a programming language to perfection, or to learn all the latest algorithms or technologies. It is not something you learn by going to classes for a year or two. You need to have the passion, the interest and the aptitude to become a good programmer. Almost anyone can go to college or a "bootcamp" course to learn to write Javascript, C++ or Java. But unless they have an interest and the right mindset, they will only become mediocre programmers. You don't become a programmer because of the high salaries. If you only do it for the money, you will be miserable. And probably not very good.

The reason good programmers makes so much money is that there are not enough people with the right skills. I have worked with many programmers who only sees it as a job, they don't have the passion and/or the problem solving skills needed. They will never be successful.

Programming is to get a computer to perform a particular task by giving it a set of instructions. That task can be repeated over and over again, with exactly the same result. And that is the key to why we have computers. They do exactly as they are told, so under a given circumstance, they will always end up with the same result.

Good luck!


Regards, LongNX

No comments:

Post a Comment

PHÂN BIỆT QUẢN TRỊ VÀ QUẢN LÝ

PHÂN BIỆT QUẢN TRỊ VÀ QUẢN LÝ Hội đồng quản trị, tiếng Anh là BOD (Board Of Directors). Còn Ban giám đốc hay Ban quản lý tiếng Anh là BOM (B...