# cpp-for-programmers-ud210 **Repository Path**: aquajerry/cpp-for-programmers-ud210 ## Basic Information - **Project Name**: cpp-for-programmers-ud210 - **Description**: A Udacity Course at https://cn.udacity.com/course/c-for-programmers--ud210 - **Primary Language**: C++ - **License**: ISC - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-29 - **Last Updated**: 2024-10-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # C++ For Programmers - ud210 * [C For Programmers - ud210](#c-for-programmers---ud210) * [Bjarne Stroustrup Interview](#bjarne-stroustrup-interview) * [What Is C ](#what-is-c) * [Why Learn C ](#why-learn-c) * [Where Is C Used](#where-is-c-used) * [What Makes C Different](#what-makes-c-different) * [Use Comments Judiciously](#use-comments-judiciously) * [How to Learn C ](#how-to-learn-c) * [C Guidelines](#c-guidelines) * [Good Learning Strategy](#good-learning-strategy) * [License](#license) ## Bjarne Stroustrup Interview Bjarne Stroustrup, designer, original implementor of C++ ### What Is C++ > C++ is a programming language. It's quite mainly for applications that are > very demanding on performance, energy consumtion and speed. If you don't have > serious constraints on your problem, then you can probably do with other some > language. But if you're really concerned about the reliability, performance > and response time, C++ becomes a good choice. ### Why Learn C++ > The first is, it's really useful. That is, so many things are programs in > C++. Your camera is probably programmed in C++. Your cellphones have C++ on > it. Data science has C++, self-driving cars, Mars rovers... It's all over the > place. So it doesn't really matter much what you're interested in, there > would be a job for writing C++ in that field. > Secondly, it's a language with lots of features. So you can use it to learn > the fundamentals of quite a few variations of programming. And so you can > learn how to work with data structures, wirte down patterns or high-level > generic code in it and you can fiddle with bits of hardware in it. > A lot of languages are built to one thing: all they protect you against some > of the unpleasantness of the real world to the point where you can actually > learn how to deal with it. And So C++ can be very useful as a learning tool > to learn how to program. ### Where Is C++ Used > As a person I like to see C++ being used in interesting places like your > camera there, the Mars rovers and telescopes. I work in the finance industry > now. A lot of networking is done in C++. The games industry, most of the > graphics and animation, kind of stuff is in C++. So is most of the animation > in Hollywood. (Hollywood, by the way, I've forgotten about that.) The > mentioned cars, there's a lot of C++ in cars. BMW uses C++ to control their > cars. And in these days, the self-driving cars, a lot of that work is in C++ > too. We're talking about the energy industry using it. The wind turbines are > using it a lot. I was aware of them many years ago, teaching C++ to some of > the people to build the biggest wind turbines in the world. So one of the > things I've found really cool about C++ is whatever you're interested in, > it's very a good way of getting hundreds of people doing these interesting > things in interesting places. But the interesting things and unusual things > is what you control about, the smart watches, the smart phones, things like > that. ### What Makes C++ Different > C++ differs from most more modern programming languages by working directly > on the hardware and working very efficiently with the hardware. And then, it > provides really strong attraction mechanisms that are very powerful, very > modern so that you don't have to deal with the low-level stuff all the time. > And you can still be efficient. ### Use Comments Judiciously > Comments should be used to say things that you can't do what in code. > Obviously the code tells you how something's done. It doesn't tell you what > at a high-level is being done or why is being done. Without that comment you > don't really know what the code is supposed to do. ### How to Learn C++ > The way I describe this, it's like when you come to a new city. You want to > have an overview of the city and you can take a city tour. And then, most big > cities have a city tour, right? You go on a bus and somebody would tell you, > look, there's a big church, there's a museum and there's a good restaurant. > And, after a while you'll get some kind of idea. And if you have more time, > you'll go and begin to see if the food really was good and see if the church > was worth visiting for art or whatever. And I think that's the model for > learning programming: get an overview and then take into the details. Teach > the concepts in the context of concrete examples. People don't get abstract > ideas without examples. They just don't get it. ### C++ Guidelines > You can do many things in C++ and yet some of them are quite stupid. And you > know you can write bad code in any programming language so C++ is not unique > in that. Sometimes the education is weak, so they lead people into writing > some of those stupid things and it pains me! And I think we just have to do > better and not send students into making mistakes. The guidelines project > that mentioned earlier is an effort to focus people's attentions on the good > bits, the things that we know it works. And get them out of the dark corners > of the obvious mistakes. ### Good Learning Strategy > I think first, you need sort of an overview of the language. A lot of > students dig in and want to know everything about some little detail. But the > point is they can't understand it so they "have" some of broader view of the > language. As people are going and they see, "oh, pointers, great, I want to > know everything about pointers". Why would you want to do that? They should > be working together with classes. You shouldn't upset about one little thing > or go in and say, "well, there're 32 different basic arithmetic types". It's > probably right. I can't remember. I mean that's just little time to do > conversions. Most of the time, I don't use all of those types and most of the > time I don't have to think about those things. So instead of digging into a > little details, get on an overview. ## License ISC