Declaring that a class is another class type is only part of the reason to use inheritance. It is actually much more powerful than just allowing you to refer to a group of different class instances all by some common base type. When you create a new class that derives from a base class, you can actually change the behavior of the base class methods to adapt them to the specific needs of the new derived class.
Dec 23, 2015•13 min
Class relationships bring out the full power of object-oriented programming. Inheritance allows you to create classes that specialize or extend other classes. You can create entire hierarchies of classes but there are enough gotchas that some languages have restricted inheritance. This episode will not only explain what inheritance is but give you some guidance on how to use it wisely.
Dec 22, 2015•9 min
When defining what data and methods belong to a class, you also get to set accessibility levels so that some things are available for general use while other members are more restricted. Why not just make everything available? Then you do not have to worry about it, right? Learning proper access control will help you write code that is actually easier to understand and easier to use. This episode will explain why.
Dec 21, 2015•11 min
What are logical operators? I sometimes find this question asked online and thought it would be good to explore. There are only three and you might think you already know how to understand them. But have you heard of short circuit evaluations? If you do not fully understand how logical operations can sometimes exit early, then at best, you are going to write some inefficient code. And most likely, you are going to introduce some hard to find bugs.
Dec 18, 2015•9 min
Creating instances in C# is a bit different because there is a difference between value types and reference types. You will be able to navigate your objects with ease after this episode.
Dec 17, 2015•11 min
You are ready now to apply what you have learned about class definitions, pointers, and constructors and destructors to be able to create new instances in the main computer memory. There are some fundamental differences between C++ and C# that we are going to again focus on just C++ first and then explore C# tomorrow.
Dec 16, 2015•12 min
C# calls them finalizers and that is strangely appropriate because all you really know about them is that they might eventually be called, finally. This is because C# decided to manage object lifetimes for you so you normally do not need to worry about leaking memory anymore. This is called garbage collection. The problem with this is that you now have other things to worry about.
Dec 15, 2015•7 min
One of the biggest differences between C++ and C# is in how object lifetimes are managed. I was going to have a general topic on destructors just like constructors but there are just too many differences. So today, we are going to look at C++ destructors.
Dec 14, 2015•8 min
What is the best way to handle errors? Things will not always go the way you expect and you are going to need to plan how to handle errors. Should you use return codes or exceptions? Plus, this episode will help you in other ways. You will be glad you listened.
Dec 11, 2015•7 min
Constructors are your first opportunity to make sure your custom types are well formed. This episode explains the different kinds of constructors and how you should use them.
Dec 10, 2015•10 min
Object-oriented programming, or OOP, is a powerful way of designing software by creating your own types that encapsulate behavior and data. Your types can make use of other types through relationships. When I am teaching programming, I do not start out with this topic right away but I do recommend that you learn it as soon as possible because you will need to get used to a new way of thinking about your software designs.
Dec 09, 2015•7 min
Scope is another concept that is amazingly similar to your everyday experience. Imagine you are at home and ask your mom, Where are my slippers? You mom says, Upstairs. That is scope. And you need to understand it to program. Let me explain.
Dec 08, 2015•7 min
So far, our game does not do much and we are going to fix that. The most important thing for you to realize is that when you are programming, you are not going to write your final code at the very beginning. I know, I have said this before, but I cannot say this enough. Programming is a journey.
Dec 07, 2015•8 min
In the last live weekend programming class, I created a variable called scrambledWord and then later created a method called scrambleWord. What do you do in this situation? Is this okay?
Dec 04, 2015•5 min
Follow along as I explain how to program a word guessing game in C++. This episode builds on a free 5-day email course that shows you step-by-step how to design and build WordGuess.
Dec 03, 2015•6 min
Follow along as I explain how to program a word guessing game in C++. This episode builds on a free 5-day email course that shows you step-by-step how to design and build WordGuess.
Dec 02, 2015•9 min
References behave a lot like pointers and are what many language designers use when trying to claim that their language is simpler because it avoids pointers. Do not fall for it. Take the time to learn pointers and references properly and you will build a foundation that will serve you well in all your future projects. This episode has a bias towards C++.
Dec 01, 2015•7 min
We talk about methods in this episode. There are many kinds of methods and we will need to split this topic into multiple episodes. I will explain how methods are called and how they return when they are done. And a bit about how viruses can sneak in and gain control.
Nov 30, 2015•11 min
The question this week comes from Mark L. and Scott S. who have both noticed some companies hire programmers who all speak the same language. Spanish is a common example. And they want to know why. What are the benefits of a software development team that all speak a language other than English?
Nov 27, 2015•5 min
A double pointer is nothing more than a pointer to another pointer. It is possible to continue this pattern indefinitely having pointers to pointers to pointers, and so on. But you will rarely need more than a double pointer.
Nov 26, 2015•10 min
Now that you know how a pointer can be used to separate groups of items, I am going to explain another use of pointers that helps you work with the individual items in the group through a special concept called pointer arithmetic.
Nov 25, 2015•8 min
If there is one thing that scares people more than void, it has got to be pointers. And rightfully so if they are misused or you get somebody trying to explain them who is already uncomfortable with them. This episode is going to rip the bandage off quick so we can move past this topic and soon you will wonder what all the fuss was about. I mean, really, we point to things all the time. Computers are just copying what we have been doing since childhood.
Nov 24, 2015•7 min
Understanding types is super critical to being able to program. Without this knowledge it would be like trying to go through life where everything you see and feel is unknown to you.
Nov 23, 2015•14 min
The question this week comes from Scott S. who wants to know what are all the files that get created when building an application.
Nov 20, 2015•8 min
Many languages are adopting a model of just-in-time compiling. Do you know how this affects you? This episode will discuss the advantages and disadvantages of just-in-time compiling.
Nov 19, 2015•11 min
Some languages are interpreted and some are compiled. Knowing how your code behaves will allow you to select the best tool for the job.
Nov 18, 2015•9 min
You have probably heard that computers only understand zeros and ones. So how does a computer go from zeros and ones to colorful graphical interfaces with buttons and web browsers?
Nov 17, 2015•9 min
You have probably heard that computers only understand zeros and ones. So how does a computer go from zeros and ones to colorful graphical interfaces with buttons and web browsers?
Nov 16, 2015•10 min
This episode will explain different types of programming in terms that you will be familiar with and then relate everything to computer programming concepts.
Nov 14, 2015•12 min
Getting started is hard. This episode goes into some psychological aspects that will help you start programming and then some specific steps to get your software development environment setup on your computer.
Nov 14, 2015•9 min