YTread Logo
YTread Logo

How To Think Like A Programmer

May 30, 2021
Any way to find out what type of data there is? Yes, is it type or type? I get JavaScript and Python. confused every time I always guessed wrong the first one, its type, okay, so apparently we can add text, yes, concatenation and wonderful things, two or three or text, we look for a tool, the type function tells us what we want to know, okay, now we add a new tool to our toolbox, you see what I'm saying, now we add a new tool to our toolbox and we say cool, I need a new piece of algorithm, convert to integer, look it up, find out what you have to do, it looks like we have an old in a variable and an int variable and convert an old variable to an integer store an int variable oh look, there's code for that, that's a lot of fun, isn't it?
how to think like a programmer
Now we have a new tool and this is how we continue to grow. As we find a problem, we develop a new algorithmic tool to get there, does that make sense? So this is pretty fun, right? It's really in a geeky way, okay? Now we can try again with a new tool. Notice what I did. I killed my code I can't believe it took me hours to write it that now we did it it took you about 30 seconds to write it it took you hours to understand it and you understood it wrong it's really hard to get people to throw away the code right? we like it, okay, fine, put it in a subdirectory, but start over, get again, man, I love to get, but start over, because if it was worth keeping, it would have worked and you didn't lose the thought process, You just got into a bad place. so I'm going to rewrite my algorithm now and tell you the truth.
how to think like a programmer

More Interesting Facts About,

how to think like a programmer...

I wrote this wrong the first time, I put it in the wrong order, but before I wrote electronic code I thought, man, if it's in the wrong order, it's not going to work. work you see thisI'm

think

ing about programming before writing code because it's often easier to see the order of things. I converted to Earth, but now I see that it makes sense. You could do it on a whiteboard. I can be the computer. and now we will put some code to make this work, yes, we could try it. I can run it, but it works.
how to think like a programmer
There are ramifications. There are four loops. I want to talk a little bit about while loops and then we'll be done. okay with that, I don't know how long we're supposed to last, but you know it could be the next election cycle before it's over, it's an endless loop, that's the problem, yeah, let's skip this one, okay, so we can know. People sometimes get mad at Python people when they see the way I teach for loops because I say a for loop has many parts, it has a century, it has a beginning, it has an end, it has a change and you say that that's how it is. a C++ for loop, what's wrong with you?
how to think like a programmer
Yeah, and I teach for loops in Python, you can see my code for Iron Range, start, end, switch, oh that's so unpacking, yeah, it is, yeah, it's because sometimes I want to teach Python and sometimes I want to teach programming and when I teach beginners I will do this, if Python uses chicken or a third language, we will do it with iterators, but this traditional structure aligns better with other languages, but it is much more important, it is much better for learning how to debug properly because when you have a loop, what are three things you always

think

about in a loop?
Well, four things really first is this century, what is this variable that controls everything correctly and then what are the three things about the century? I need to know people who sing you know this how it starts how it ends has changed what seems so simple right but how many loops have you had that have gone terribly wrong what is the basic code structure most likely a loop to go wrong especially if you see a boolean operator in that son of a gun death, two boolean operators, yeah, yeah, or falsehood there gave me that one that was too easy, we'll get back to that thought real quick anyway, a while loop, so what? are the four things you need to know about a while loop what is the century how it started how it is how it changes but no, that's not true Andy the while loop has only one parameter that's the problem with while loops the while loop involves many things doesn't require it and that's why while loops go wrong so often, isn't it?
Because if you're going to do a while loop you also have a sacred obligation to think about what Sentry is, even though the while doesn't require that you have to initialize this input before you get there, which means you have to plan ahead, which means why you are writing code, you should be doing algorithms and then somewhere inside the loop we don't know where you have to change. this century and you have to change it in a way that guarantees that at some point you will trigger the condition oh yes, we need a condition, but never forget that sometimes you will create a condition that is impossible to satisfy, although it won't. your marriage seminar or something like that, but no, so these are the same things that are required in a while loop and that's why I teach them first in the for loop because how easy it is to mess that up now, you don't do everything right here. come on, here is the basic password loop example, skip this one, right, it comes out with a positive recitation result if the user chooses the correct password, but if he gets it wrong, it throws faults, so if he gets it wrong three times, sorry for your luck sending. the missiles, okay, we could all do this, how are you going to cover it, okay, really, how are you going to cut it?, okay, we'll use a compound condition with a boolean.
Now I love boolean variables, don't get me wrong, they are boolean operators. Bother me because here's why, what condition do we need on this thing? Let's see, the guesses are greater than 3 and the guess is not equal to the correct one, yes, that's it, or is it because now the guess is negative and Morgan's law is boolean. variable okay take a picture because it disappears just as right as in d pi try 0 move on it's true well move on you know what I love about boolean variables there's just not a lot that can go wrong it's all about the cleaner variable type.
You're right. I love boolean variables. I don't like boolean operators that much unless I'm just working on boolean variables with them, but we'll move on if this is true and it better be that way. I will remain true. make whatever code you want yes, I deliberately didn't make the format because I don't want to scare beginners, it's really cool, but not today, now see if the gas equals correct, then we'll say it's cool, here's the treasure. and then look at this beautiful thing that's where the breakup statement goes, right? Now we should never write break, we should know change statements, thanks for not including those you know, yes, continue, it's false, that means next time it evaluates this loop, we've figured out how clean that is and what I really mean by this line.
I don't want to continue like this, it will be much easier to continue home if that goes up. I didn't really do it Elif Elif is like a dwarf but he's taller and then the years, if the attempts are greater than or equal to 3, then we will print, hey, too many wrong attempts, launching the missiles once again, we won't get out of the loop directly , but we will tell you the Next time you evaluate, I don't want to continue any further. You know, the funny thing is, no, the last time I wrote a while loop that didn't just say "Continue," because once you get used to this guy, he's beautiful.
Just beautiful and I read a lot of games. You know, the game code gets confusing. Couldn't the game code get dirty in part because we don't design for game maintenance? You know it will be obsolete and in a year. in games you don't design it to stick, you designed it to be fast and that's why you're in garbage, okay, eventually we'll teach all this stuff in due course, but not today, you're okay with that, yeah, no, just let's stop. With this, why Python? I mean, I've taken a lot of time to tell you tonight that language doesn't matter yet, it's a Python group and I love Python, so if language doesn't matter, why do we choose Python?
Well, I'll show you, okay, you recognize this, what language do we use in the old school? Look man this is the way God intended pointers everywhere with no strings attached, those strings are for cowards okay there's a seat and there's something like you know what the world is like. Too simple to really understand a language, isn't it? So I say we really have to do "hello user", that is, ask the user's name and then do something with it. That is the smallest program. I think we can really understand it. of a type of language, would you agree?
Would it be possible for me to take that little box we just made and show you how to do all that stuff in C? Absolutely there, C, but don't worry, hey, Buren, how are you doing them? Look at all these people in the open source world, they have the best names, don't they? Do you know Vito and Bjorn and stuff like that? Yeah, I thought that's the only reason I'm not on top of the open source world is because my name is too obvious, I was going to pick one of the sub-Saharan languages ​​by clicking and stuff, my name is David Harris, either that or they just change, skip human language, all together go to Dolphin, sorry, okay, so C++ Go with this.
The C++ level seems like a dream, doesn't it? It no longer prints different C++ should be easy, yes, if you've done anything, yes, yes and definitely, yes, yes, okay, C++ is pretty good at this level, but it gets difficult quickly, here's my favorite. right public static void main string args Have you ever tried teaching Java to a beginner? Have you ever attended a beginner's Java class? I mean all the Java teachers in the world who have to teach beginners and this was me, that's what they wanted. Nicaragua please teach this in Java please wave a dead chicken over your shoulder turn around three times it's a ritual throw salt write this line and they say we don't have chicken it doesn't matter I really don't want to say it's just a ritual because I still don't want to teach you what a static method is, that doesn't make sense if we haven't made objects and we shouldn't be making objects, but you're just trying to create a variable so this drives me crazy. you know, I love some Java, I love Java and I love Java for more advanced

programmer

s because it doesn't let you do some stupid things that we like to do anyway, right, dual inheritance.
Now I looked at my children. I think multiple inheritance is a good idea, so there's Java, yeah it makes sense, couldn't we like all these languages ​​again? Could you take that character to make it work for Java? I sure have, so why Python? So if you want to teach a beginner to program which of these languages ​​is easiest to translate from algorithm to code that actually works, that's what I love about Python because since I don't care about the language, how about we choose one that gets out of the way and brings you success? to be successful I want them to feel proud I want them to fail because that is going to happen but I want them to overcome that failure and that is why a language that helps us do what makes me happy makes me happy and I like successful students and here is the Other What's going to want to do games well, we can do it, that someone is going to want to write a database sequel.
Built-in lights are good, now everyone wants to do them. Your eyes, okay, TK, yes, TK, but hey, it's integrated, what do you want? Make sure we can do it, get it out of your sister. Do you want to make web applications? I taught that tonight. I showed them they were still there. This is your first Python class. I showed them the bottle because there is no installation. I don't want to deal with that. I don't like the flask on the computer, yeah that's cool, this isn't that fun so that's where I'm really at. I love teaching beginners because I love the learning process and I always learn a lot more than them, so thank you for your time.
I will be available to answer any questions. You guys have been amazing, so much fun.

If you have any copyright issue, please Contact