So in this lecture, we are going to discuss how you, as a beginner, should approach the coding lectures
in this course.
The reason I've created this lecture is that I've noticed some beginner students are a bit confused
about the approach we take to the code lectures.
Specifically, they might be wondering why I'm not coding live on the screen or why they can't code
along.
What I hope you'll see by the end of this lecture is that these questions are just misinformed.
Any confusion you may have is based on incorrect assumptions.
Specifically, this lecture is going to answer a few questions, namely no one should you code along.
The answer is no.
Number two, can you call along if you really want to?
The answer is yes.
Number three, how can you practice what you've learned in this course?
And what are the exercises in this course?
So if you had any or perhaps all of these questions, this lecture is for you.
OK, so the first question we're going to tackle is, should you call along, as stated in my recommendation
is no.
This may surprise some of you, especially if you are a beginner or if you've taken other beginner courses
online.
In those courses, coding along is typically encouraged from my experience.
In fact, I'm not immune to this myself.
If you take some of my oldest courses, which came out approximately five years before this course,
I also encourage students to code along because I assume that this was the normal thing to do.
Of course, after five years of teaching, I've realized why this is not a good idea at all.
In fact, this live coding approach is not good for either of us, neither you nor myself.
So let me start with why coding along is bad for you.
Firstly, it gives you an extremely false impression of how this code is written.
This is not how code is written in the real world, especially complex code like the code in this course.
Doing things by going along with the instructor makes sense in other areas like playing guitar or doing
yoga, but it makes no sense in coding.
Unlike guitar and yoga, coding is a mental thing.
It's about what goes on inside your mind.
Guitar and yoga are physical things.
They are about what you can do with your body.
A coding lecture where the instructor types everything from start to end might take maybe 10 or 20 minutes,
but this is only because the code was prepared beforehand.
In reality, this code required thinking in order to design the structure research in order to learn
the syntax for any APIs that were used and debugging to fix mistakes.
This does not teach you how to write the code from scratch because this code was not written from scratch
as you were seeing it typed lot.
And by the way, if anyone tells you they write code without making mistakes, they are not only lying
but also too inexperienced to even know that what they are saying is impossible.
In effect, all you are really doing is wasting time watching the instructor type in the screen.
What you should be paying more attention to is the thinking process behind the coding, that is to say
coding is more about thinking, not about typing.
Coding complex problems does not happen linearly from start to end.
One example of that is test driven development, also known as TDD, which is a common process used
in modern software engineering companies such as Google and Facebook.
This process is used with the expectation that you will make mistakes, and thus it is much more realistic.
So let's reiterate this coding lie from start to end.
Not realistic, test driven development.
This is a real coding process that is used by professional companies around the world.
So instead of mindlessly watching someone type on the screen and believing that anyone actually codes
anything this way, let's review what you should be doing instead.
Firstly, you should be thinking about the overall structure of the code.
As I describe it to you, and as I describe the reasons why it is structured the way it is.
Secondly, you should be paying attention to the syntax.
And of course, without knowing the syntax, you can write any of this code yourself, which is presumably
what you want to do in the future.
So now let's enter the other side of this question, which is why coding live is bad for me.
We've just established why it's not going to help you.
Well, it's pretty simple.
If I'm trying to type and talk at the same time, then I'm trying to do two things at once.
But if I'm only talking, then I can focus on that one thing.
And therefore, I can go into much greater detail and be much more precise in what I say.
This ends up being good for you because it means you're getting better information transfer.
And what I'm saying will be much smoother than if I tried to come up with it while typing at the same
time.
So not only is typing pointless as we previously established, it's also better to not type because
it helps me communicate better with you.
OK, so now let's move on to question number two, which is, can you quote along if you really want
to disregard my previous advice?
The answer to this question is yes.
Now, before some student comes along and asks, Why do you even have to say this?
Isn't this obvious?
Let me just shut that down right now and tell you for some students, it's not obvious, given that
I've been asked this question a few times.
You see, I think these students may have been confused, perhaps assuming that because I wasn't typing
that they also could not type.
Of course, now that I'm saying this out loud, you should realize this is complete nonsense.
For example, I can show you this piece of code.
You can type this out right now if you like.
I don't have to type it for you to type it.
There is no requirement that I'm actually typing on the keyboard for you to start typing.
Again, this is not like yoga for yoga.
Yes, you want to see your teacher doing the moves.
Now again, I know this is obvious, but some students really have asked me this question, so please
bear with me.
OK, so now let's move on to question number three, which I've also discussed elsewhere, but I'll
answer again here for good measure.
And this is how can you practice what you've learned in this course, given that I've now deprived you
of this interactive exercise of coding a law?
Well, let's remind ourselves that coding along is not actually a good exercise.
Remember, you were not learning anything about the coding process when you do that, because that's
not even how the coding process was done.
If the coding lecture was 10 minutes, the coding process probably took maybe 60 minutes, maybe even
days.
So that should be the time commitment you're looking at when you do an exercise, at least at this level
of machine learning.
Now, to really answer this question, we have to go a bit meta, and that's to discuss the two kinds
of courses that can exist in machine learning.
The first kind, of course, is the theory course, where I teach you, say, the naive Bayes algorithm
and then you go and implement that algorithm in code in that kind, of course, implementing the algorithm
is the exercise, and that's a really powerful skill to have.
That means you can take an idea and make that idea practical by turning it into a working computer program.
And of course, anyone who invents a new machine learning models must have this skill.
By definition, if you invent a new machine learning algorithm, then there is no existing code for
it.
You will be the one who makes the first working example.
And if you can't code, then it will never be made.
So in this case, the concept of exercise is very straightforward.
You're given an idea, an algorithm, and your exercise is to put that into working code.
And obviously, you should do this before looking at my code, which is the solution to the exercise
that is, don't look at the solution to the exercise before doing the exercise yourself.
Now, that doesn't really apply to this course, because this is not a theory course.
This course is an API course.
I'm teaching you how to use an existing library where your goal is mostly to learn about the syntax
rather than the concepts.
Although we do still touch on concepts in this class, we're not going to do something like derive back
propagation because that's irrelevant to the library we're learning about.
So in this type of class, it would be impossible for you to write out any code before I show it to
you, because obviously you simply won't know the syntax in this type of class.
There are two kinds of exercises and projects.
The first kind is the kind I'm going to explicitly give you.
That is, you'll hear me say in the lecture, Please do this exercise.
And after hearing there, it will be your choice, whether or not you want to go ahead and do that exercise
as a side note.
Please note that for this class, the explicit exercise prompts and data sets are included only in the
VIP version.
If you don't know what that means, please contact me using the contact form on my website, which is
that lazy programmer taught me.
Now, the second kind of exercise is implicit, that is, although I'm not going to explicitly tell
you to do something, it should be obvious that you would do it anyway.
My assumption is that we're all responsible, mature adults.
You know why you're in this course and you know why you want to learn about machine learning.
And that's probably because you want to apply it to some data set you have.
For example, if you work in manufacturing, perhaps you're interested in using computer vision to identify
defective parts.
Well, after taking this course, you should be able to apply the code I've shown you to your own data
sets.
Now, here's the really neat thing about machine learning.
This process does not require any new code.
Therefore, you're going to simply be applying the code you've already learned.
This will give you practice in writing that code yourself.
But again, this code is more or less the same as what you've learned in this course.
I encapsulate this with my rule.
All data is the same.
What this means is that the same code will work no matter the data sets.
For example, take a neural network.
We know that neural networks can work for something like fraud detection.
Well, now suppose that I want to use a neural network for a new task like disease prediction.
Surprisingly, this does not require any new code at all.
All that's left to do is to simply plug in your data set.
And this is why we can have libraries like Circuit Learn, which is used by researchers in many fields
like climate prediction, biology and finance.
The data in biology is completely different from the data in finance.
And yet the machine learning code to process this data is exactly the same.
And this is what we mean when we say all data is the same in the eyes of your machine learning model,
and that is how you will practice what you've learned.
Although you can't come up with the syntax for an API out of thin air, what you can do is internalize
it by rewriting it again and again on new datasets, which are not just the generic data sets from this
course, but data sets you really care about in your life.
Furthermore, you'll need to test different hyper parameters on your own, which will force you to think
about things like choosing the best learning rate.
Finding the right number of layers and so forth.
Now, of course, not all of you already have jobs where you have access to data sets that you want
to use.
In this case, you can still apply this approach by choosing any dataset you want to use.
The beauty of this is you get to choose what you care about.
I can't tell you what that is, but I'll trust that you can figure this out on your own.
And so let me just make this explicit.
You shouldn't depend on me to tell you to do this.
This is just the obvious thing to do if you know why you're here and you're a productive and proactive
student who is serious about learning the subject, then this is simply the obvious course of action.
Now I want to end this lecture with a question for you, the students of this course, over the years,
I've seen students get triggered by this lecture, meaning that they got really angry or offended by
the things I've said.
Now, personally, I don't understand why that's the case.
So if that was the case for you or if you disagreed with anything I said in this lecture, please let
me know about it on the Q&A.
I'm always available to listen to your concerns, so the sooner you can let me know, the sooner they
will be dealt with.