Hey, so I'm back with the fourth Ask Preethi series today and today's question is
a very, again, a very common one. This person is asking what language should I start with?
Should I start with--and also should I start with the front-end, back-end, machine learning, data science? I have no idea what language or where to start.
Of course this is an overwhelming thing to decide when you're getting started with programming
particularly because there's so much to learn in computer science and programming in general that it's
really hard for a beginner to know where to start. And I remember when I was getting started
I kind of googled this question, and the worst part about googling is that everyone has their own answers.
And they have their own opinions.
And so they all seem right because they have experience, and something worked for some people, something didn't work for other people, so
It's a very good question. I struggled with it, too.
And of course, as for everything in software engineering, I'm gonna say that it depends.
Some of you might be starting off in programming in a very specific
vertical. For example, if you know you want to do machine learning
or you know you want to do data science or you know you want to do mobile
development, iOS or Android, or you know you want to do security stuff for distributed systems.
If you know the vertical already
Then there's usually a few specific languages that those particular verticals
generalize on. For example, with machine learning and data science, a lot of people use Python
And there's a lot of machine learning and data science libraries and math-related libraries written in Python, and so
most of the data scientists I know write in Python.
So I would say if you're going specifically for that vertical, pick the language that that vertical is standardizing on, right? And, like,
why would you go learn Haskell if you're trying to do machine learning? It doesn't make sense.
But let's assume that for this question
you are just kind of starting out new. You haven't really decided where you want to focus. You're starting from a clean slate,
and you really have a choice of anything that you can do.
And that's the question
I'll answer today, so I'm gonna be biased and say the best thing we should start with is JavaScript.
And just to give you a personal background--so I started with
learning to code my first language, which was actually not JavaScript. I started to learn Python and
I learned I was trying to learn it through a book called "Learn Python the Hard Way" and I tried many, many, times and I
failed.
I tried--I remember the first time I stopped it after two weeks, the second time I stopped doing it after five weeks.
I tried a bunch of online courses.
Maybe I thought the video format would help.
Something about it was just not clicking to the point where I was getting really frustrated.
I was like, you know what, maybe programming is not for me. Like it just wasn't working.
And then I remember I was kind of expressing the struggle with my
ex-boyfriend at the time, and he was like, "Why are you learning Python? Go learn JavaScript."
I was like, "What's JavaScript?" And I came home that night, and I did a bunch of Google searching, and I found this
Codecademy course. It's like a 10-hour course or something on JavaScript
And I remember I didn't even go to work the next day
I just sat there and went through the whole JavaScript intro course and after that I was hooked.
It was like I was unstoppable. I fell in love with JavaScript.
There was something amazing about writing some JavaScript,
and then along with it, some HTML and CSS and then seeing--
refreshing the browser and seeing the changes--that just made my heart beat so fast.
I couldn't--I couldn't stop myself from loving it.
After that, I was just unstoppable. I was hooked on JavaScript, and really,
Javascript was like my gateway drug to programming,
if you can think of it that way.
And I think the reason why JavaScript is so beginner-friendly is because a few things. One is
it has that immediate feedback loop that I was talking about. So you can write something in your IDE
and then you can refresh your browser and see it right away.
Whereas some other languages, like Java or Haskell, they require a compile step
where you actually need to compile the code before you can actually
see what happens. Which adds a little bit of burden for a beginner and kind of makes it a little bit more confusing.
Two, there's no complex developer environments. You just set up. For example, if you're coding for iOS or Android,
there's a whole process for setting up Xcode or the Android Studio thing and
That in itself is kind of daunting. Whereas with JavaScript, you can just download any
IDE, or basically Notepad, and code in that and be fine with it.
And you don't need all these complex toolings to get started.
Three, as I said before, you don't need to compile and figure that whole thing out.
Another big reason is because there's no types.
JavaScript is is a dynamically typed language.
And that means you don't have to write types, like whether a variable is a number
or string or whatever, and that removes a huge burden on beginners,
I think. When I was looking at some other code, like Java code, for example, when I was getting started,
it was pretty daunting to see both the code and the types. I didn't know what the difference was
between them. Whereas JavaScript,
you just kind of write code
and you don't worry about the types. And that removes one extra thing to learn. Honestly, sometimes
it makes it visually easy on the eyes for beginners.
I would argue that as you get more advanced
I actually like types now because it makes me--it makes it easier for me to read code.
But when I was a beginner that wasn't the case. I think types added an extra burden
when I was a beginner. So JavaScript has no types, which I think is amazing
for beginners only.
And then the other reason is because it runs everywhere. So if you write JavaScript, it runs in every browser:
Chrome, Firefox.
Whatever it is, it runs on every operating system, every device, so you can--a beginner
can get started with JavaScript and write for various kinds of platforms, and that's pretty cool.
And lastly, I think it's very versatile, too.
So JavaScript you can use it as a scripting language. You can use it to build complex web applications.
You can use it with nodes, you can book sophisticated API backends.
You can even build bots and IoT applications.
You can write native desktop applications using Electron, you can write native mobile applications using React Native.
All in JavaScript. You can even do VR stuff now with React VR.
It's just, it's pretty amazing that you can take
JavaScript and just like do so much with it. Whereas some other languages are not as easy to do that
and are not as transportable in that sense.
So if you're struggling to get started, and you haven't tried JavaScript yet, I say go for JavaScript and see if you like it.
To me, again, JavaScript was the gateway drug into programming.
It's really how I learned to code, and it's really where I learned the fundamentals of programming, and this is things like loops,
conditionals, functions, data types, variables,
classes, inheritance, prototypes. Like, all these things are fundamental to almost every programming language
And I kind of learned the fundamentals of those--of a programming language--through JavaScript.
JavaScript was kind of just the tool to get me there.
And now that I know JavaScript, I can pretty much
apply that and read and
understand code in almost any language. So I can read Python code. I can read Go. I can read Ruby. I can read C++.
I can read
Haskell. Like, I'm not able to maybe write in it as like a super expert programmer.
But I can read and understand it pretty well because the syntax--you start to get familiar with the same types of syntax,
loops, the conditionals, the functions and so forth. And
I guess, like,
the takeaway is the language you just--in the end, just pick the language that makes you want to code. That makes
you want to like really get into programming, and the one that you
specifically like the most.
It doesn't matter what other people tell you, because what other people tell you--people recommended Python to me, like outside,
outside when I got started. The reason for Python is that, because other people recommended it to me,
and it didn't work for me.
So I had to explore other things to find the ones that work for me, and to find the one
that made me fall in love with programming.
And then you can always expand from there. It's not like, just because you started with JavaScript
you have to stick with fun and you have to stick with JavaScript.
Or it's not just because you started with Python, you have to stick with Python.
And you're limited to what only Python offers. Like, why don't you learn one language that is applicable to any language?
And you can kind of learn new languages much more quickly. Like, I was able to learn Python
so much quicker than JavaScript, after I learned JavaScript.
Just because it's very similar. And same with wanting to learn Python. Running, learning Ruby was such a such a breeze.
Yeah, it takes a little bit longer to understand the specific details of how the syntax works.
But once you get past that syntax riddle, most languages are kind of the same.
And I would say
once you actually learn the language, don't get stuck in it, either.
Be broad. So, well, that's one of the things I did when I was
kind of more of a beginner. I was like, even though I learned JavaScript
I was keeping my eyes open for all different things. I learned Node.
I learned--I even start to learn other languages like Python, Ruby. I started to learn more back-end stuff. I started to learn,
like,
things to do with Docker and more like system level stuff. I kind of just kept myself broad because I want to
really be all across the stack and
understand what I like best, what types of problems I like to solve the most. What communities, what programming communities
I like the most, where can I be the most productive.
And so I kept learning new languages, frameworks, technologies, and
through that exploration, I was able to figure out what I really want to do right now,
which is focus on blockchain engineering only for the foreseeable future.
But I wouldn't have been able to go in there if I didn't explore all these other things and figure it out.
Like, taste--got a taste of a bunch of the other ones, and really figured out what really clicked with me.
So, if there's a key takeaway,
the core goal of when you're picking a language or picking where to start is just find the language
that gets you in the door. And then learn all the core
fundamentals of that language. So, learn the core fundamentals of a language and learn computer science through that language. And then,
once you have that core base foundation, you can kind of translate it to any language,
any platform, or literally any industry in the future. So just
find that gateway drug and then you'll be addicted forever. Just like gateway drugs
make you addicted to drugs, the gateway programming language makes you addicted to programming.
So that's the end of this one. I'll create the next one in about a month or so, and I'll see you then.