I will be fully honest here. If you don't learn how to think like a programmer you will never
become a programmer. So today I'm going to break it down to you into easy to follow steps how
to learn, how to think like a programmer. So if that's something that you'd like go ahead and
smash that LIKE button, SUBSCRIBE to the channel and let's dive in. How to think like a programmer?
Are rubber ducks better at programming than me? Today we are going to find that out but
the most importantly we are going to learn how you can think like a programmer so you
can write better code. And what is actually programming because that is the question here.
Programming is actually solving a problem, like you most probably heard this like programming
is problem solving but what is actually that? Programming is like 95% of the time
thinking about the program, problem solving and 5% typing out the code. Many of
your friends or relatives or family might think that okay if you are a programmer you are just
typing out all of that code and maybe if you are starting out learning to code you most probably
think that you have to learn the code itself, the language of course you do have to do that but
most of your time will not be typing out syntax. It will be about problem solving.
Now how does problem solving work? Well the first step is understanding the problem. Now this might
sound obvious of course. You have to understand the problem but I see that many developers
kind of skip over this. They just want to have a solution, they know okay let's just type that out
it's a really, really great framework or I do know how to fix this. No, you have to stop, pause, take a
little breath, take a little time with this and understand the problem. You really need to focus
on this first because otherwise yeah that's our first step to solving these problems. Make sure
that you write down all of the issues, what you want to build and try to have an overarching
view of what you are trying to build. Now once you have that you have that okay you want to build
this and these are the problems that I'm solving with this build, then you want to break it into
parts. Now this is something that most people don't really understand that this is actually a really
important part of programming. You have to break things apart like you have a huge problem and then
you just take it, okay what are the small problems that this large problem can be broken up into.
So you see a big problem equals small problems plus another set of small problems,
another set of small problems and even you can also go further like the small problems. If they
are named, if you can just break it down into even smaller problems that you have to solve
that's even better. So breaking things down into its parts it's really essential for you to know
as a programmer. Now if you want to learn how to do this go ahead and check out rebeloper.com/mentoring
where you can hire me on a 60 minute Zoom call where I can feed you all of this, not just SwiftUI
or Swift programming, I can also teach you how to think like a programmer and how you can learn
better the programming languages or be better at programming in general. It's at rebeloper.com/mentoring.
Now another thing that comes to mind is the rubber duck debugging and let's get this out
of the way straight at the beginning, no rubber ducks are not better at programming than me or
they are actually not better at programming than you. You most probably knew that but what is this
rubber duck debugging? Well as you can see it says talk to a duck. What does that mean? Well whenever
you have this kind of plan and you just chunked it down into these smaller sub problems then
you come up with ideas, okay. So this is how I'm going to solve this problem and this is how
I'm going to solve that problem but the key point here is that you want to word it
in a way that even a rubber ducky could understand it. So go ahead take a duck whatever
just place it on your desk and then just say it out loud. This is what I'm going to do. I'm going
to put up a text field then I'm going to create a state variable, state private variable for that
text field. So it can be binded to that text field. I'm going to create a text field style of rounded
border. So you want to make it this dialog, that it's not a dialogue, sorry. It's a monologue to
that rubber ducky as precise as possible. Also you might take down your notes so all of these steps
because if you do this then you will clearly see what you have to do, because yeah you are
explaining it to a rubber ducky. Make sure that you go into detail as much as possible. Now you
are done with this part and now you are starting to type out some code. You are at that 5%.
Of course you do come back and forth between thinking and planning and actually typing.
If you were to put a camera on my desktop you would see that I'm always kind of like 90 - 95%
of the timeIi'm just thinking, thinking, thinking just walking around and trying to solve
the problem at hand and then I'm just typing that. But the actual typing is really, really like
small percent of of my time. Now when you do type please consider this that computers are dumb
and most people where are they are starting out learning how to code they don't really
realize this and what I mean here is that they will do exactly what you tell them to do.
If you type out okay do this they will do it. You don't have to actually you
do have to go in and think beforehand of that structure of how you are writing out your code.
You do have to feed your computer with actually nearly everything they have to do, because they
will do exactly what you want and if you kind of okay I assume that you are going to do this,
no computers don't assume that computers will do something. You have to feed them what they have to do.
And today is again a day where I a pickup winner for the previous YouTube
video and that previous YouTube video was this one, so let's just copy out that link and just paste
it in there right over here. So if you do want to be picked out as a winner all you have to
do is Like, Share and Comment on this video and then on the next one I will pick out
one winner to be with me on a 60 minute Zoom call. So let's pick a winner right over here. It says
Gisela Ramos. Now Gisela make sure that you contact me at support@rebeloper.com with the
email address that you typed in your comment right over here and yeah I will meet you on a 60 minute
Zoom call. Now let's go back to our way of how to think like a programmer
and this is something that many, many people fear. They fear to fail. But in programming especially
you have to fail, fail, fail. You have to practice a lot you have to fail and learn from your failures.
So if I have a problem okay I just search for the solution I just implemented and then it doesn't go
like that. Okay, then I think again, this is what went wrong, I search and try to figure out if
from another angle. Okay, then I fail again and this goes on and on and on till you get experience, till
you get to the solution that's actually working. So don't be afraid to fail. You have to fail, fail, fail.
You have to practice a lot and on that practice you will fail a lot. Don't be afraid to fail,
be afraid of not learning from your failures. But yeah you have to learn quite a lot here.
One thing I usually see with beginner developers as they want to actually be a
smart developer. They kind of come up with these quirky libraries or quirky solutions that are
okay and are really, really like yeah quirky is the right word. Quirky for that problem at hand
but always clean code is better than smart code. Don't be a smarty pad just do the clean code with
the usual stuff that you have in let's say in Swift or SwiftUI, don't be as smart as you
can see. Don't put your sunglasses or glasses below your nose just because you want them to
look cool or just solve a problem, okay. Now I have to warn you there are three types of developers
and if you don't know about this then you might get frustrated or burn out or yeah this is kind
of my road of staying sane along the way. I've been doing this for more than 11 years now and this is
my go-to when I take a look at other programmers. So as you can see there's some always somebody
better than you and there's always somebody worse than you. So when you take a look at these
programmers and of course you are kind of in the middle of this of course, when you take a look at
these developers try to learn as much as possible from the programmer that is better than you and
try to teach as much as possible to the programmer that you think that is worse than you and then
you will not have impostor syndrome, you will not have the syndrome that you are left out of
somebody, something or you are worse than somebody yeah make sure that you are 1% better
every day. This is your job, just be 1% better every day. Take that 15 minutes 20
minutes, 1 hour, 2 hours or even 3 hours and code, code practice your coding and
then you don't have to worry about all the others. Now but what you do you want to build and
make no mistake. You can build out, you can follow along a lot of tutorials, but there is a kind of a
tutorial purgatory where you can just be doing tutorials over and over again and you don't really
know what type of project to build. Now with this video you will know the types of projects that
you need to build in and the right types of projects. So go ahead and check out what you
should build next for your hobby projects or yeah for you to learn to be a better programmer.