I'm frequently asked some repeating questions from friends and people I meet casually, so I've decided to share my thoughts here. I will try to keep things simple and short.
The questions usually go something like this:
- What programming language should I learn first?
- How can I become a developer?
- Is it too late for me?
- Is it too hard to code X?
- There's a lot of math in programming, isn't it?
- Can you hack people's facebook accounts and credit cards?
How to become a developer?
Before giving more specific answers, let me tell you a couple of things about being a developer.
First - in most countries you can't rely on formal education from universities/schools to gain sufficient coding skills. You have to be the so called self-taught developer. In self-taught I include dedicated coding bootcamps and academies.
Second - being a programmer requires you to sit for about 2-6 hours a day and concentrate on a problem for an extended period. I can say this is the hardest part. This is why you can have a great advantage if you start coding in your high-school years - because you have A LOT of free time and WAY FEWER responsibilities (no matter how it seems to you now).
If you are past your high-school years and have a job, attend university etc. My personal opinion is that it's probably not too late to begin coding. However this is really up to you. If you are willing to give up your leisure activities for learning how to code - then it's not. Otherwise you will struggle to advance rapidly and risk getting burnt out. But it is doable so you should definitely give it a try.
What's so special about being a developer? If you decide to code, basically the only thing you need is a computer. It doesn't require nothing much and when you begin to learn the feedback is instant. You code a bit - you get an error - you learn something. Then repeat. This feedback loop is really fast and it can make you advance really quick. And most of the time reading the theoretical stuff is accompanied by applying it right there on the spot.
If you dream to become a chemist, a doctor or a lawyer - you are virtually deprived of this feedback loop. Those require a great deal of resources (including time) to begin with in order to achieve some hands on experience.
What is the programming language I should start with?
I would suggest you pick some verbose and robust (strongly-typed) language. My personal recommendation is C# (I have to point out that I am biased towards C# and Microsoft in general so you should decide for yourself).
The idea is that by choosing such a language you won't feel a cognitive load by having to learn a lot of language quirks and tricks. C# for example is pretty straightforward, intuitive - you can almost read it like it's plain text and understand the code. This will allow you to focus on building the programming mindset and grasping the general analytical and linear thinking.
In reality, the programming language doesn't really matter. If you stick around long enough you will have to learn a couple more languages anyway. I recommend C# if you are completely foreign to this type of thinking - C# can help you get into things more easily.
And by the way - programming itself is really not about the language. In my personal experience most of the time I write my thoughts on a piece of paper and when I am pleased with the general idea, then I begin with coding and translating it into machine language.
A word on programming languages: a programming language is nothing but a tool. Like any other tool under the sun it just helps you achieve some task and solve an issue. Choosing the right language for the problem at hand is crucial and by all means don't restrict yourself to only one language.
If all you have is a hammer, every problem seems like a nail.
Can I begin with javascript? I know that's a very popular language
Ah, good ol' JS is a tricky one.
It is javascript. It's not Java Script. And it doesn't have anything to do with Java.
Okay, so first off - yes, you can begin with javascript, in fact you can start typing javascript right now in your browser.
However, if you choose JS as your starting language you have to know that it is not such a simple language it is fairly difficult to learn the right way.
I recommend the following book for both beginners and intermediates: Secrets of a Javascript Ninja - John Resig, Bear BibeaultThis book gives a really good introduction to JS and it can help you avoid the trap of misunderstanding the fundamental concepts (which I am sure 95% of JS developers don't know anyway).
Keep in mind the following concepts that javascript may confuse you with regard to other languages:
- Scopes - when a variable is 'alive' and what functions can 'see it'. In JS the concept of scope works a bit different than in other languages.
- Object-orientation - although JS is an object oriented language it uses prototype-based orientation instead of class-based one like most of the other C-like languages.
- Functions - JS is a functional language, so functions are basically the main citizen. You can pass them around, return them from other functions and what not. You use them to create your custom 'types' etc. These don't differ much from functions in other languages, however there are some tricky stuff here as well (like function closures for example).
-
Types - unless you plan to write your JS in Typescript (which is a whole
other story), you will get no types while you code, which is one of the most fundamental concepts in programming.
The lack of compile-time* type checking can lead to unpredictable results during run-time.
*JS is not even compiled
Javascript was built for 10 days in 1995 and it's initial purpose was to validate forms in HTML documents. Back then the web was not that fancy at all and people used it only to read documents and fill out 1-2 text inputs. Nothing more.
As of 2020 we have full-blown 'web frameworks' like React, Angular, jQuery, Vue. We also have a javascript runtime - node.js which enables javascript on the server and basically javascript outside the browser.
You can do everything from handling user interaction on your website (client) to making database queries (server) and you can imagine what it means for a language created for validating forms. In my opinion javascript as a whole is one big hack.
Luckily, we have WebAssembly coming in to save us all but that's for another article.
Although there are definitely pros that js is a multi-platform language I really think that for a newbie developer things can get really messy and confusing.
There's a lot of math in programming, isn't it?
It depends.
If you are into cryptography, video/image processing, neural networks and machine learning - yes, there's a lot of math.
If you are into web/desktop/mobile development - then no, there's barely any math involved. Most of the algorithms are implemented and ready for you to use so you have to know just really basic stuff such as dividing a number with a remainder. Then again, it depends on the type of application you are building.
Is it too hard to code X?
That is a premature question. When I get asked whether or not something is hard to code I don't know how to frame my answer.
First of all we have to set some things straight. Is it hard for who? Are you asking if it is hard for me or for you? I have to assume the question is directed to my skills because most often I am not aware how experienced the other person is.
What does hard even mean? Do I have to code X in less than 10min? If that's the case, well... yeah, I guess it's hard. There are just so many questions arising from this simple uneducated question that it is just irrelevant.
Can you hack people's facebook accounts and credit cards?
No, I can't. But that doesn't have to be true for you.