The Free Debugging C++ Lectures Are Available

Free Debugging C++ Lectures

By popular demand, I am making available all the original “bugged” programs, along with the fixed versions and the video that illustrates the debugging steps. Download them and see if you can replicate my debugging steps. Also, I’ve included the various documents shown in the videos so you can have those tips as well.

Some of the samples are simple C++ programs, some involve C++ classes, and some are Windows MFC examples. Expect a wide variety of “bugging” examples.

Have fun with these. Here’s the direct link:

Free Debugging C++ lectures and samples used in the demos.

Vic

Share Button

The Fourth Debugging C++ Video Is Up on YouTube

The Fourth Debugging C++ Video Is Up on YouTube

Hi All,

I’ve just uploaded he fourth lecture on Debugging C++ to YouTube. This time, I present the 8 Steps to Effective Debugging. Failure to follow these makes debugging a nightmare. Following them makes your task easier and more productive. I also provide four key definitions that people often are a bit shaky on and also the Four Classes of bugs.

This is the starting point for our examination of more difficult debugging examples as well. However, in this video, I’ve chosen a simple Windows application that illustrates a hard crash as well as a memory leak. You don’t need to know Windows programming to follow the debug session, though.

In the near future, all of these debugging programs will be available as a free download on this website. That way, you can experiment with them directly.

Have fun with this one,

Vic

Share Button

What I Like Most About Writing Science Fiction Part 2

What I Like Most About Writing Science Fiction Part 2

I wanted to share what I most like about writing in the science fiction genre: Evolution of people and societies over long time spans. Another example of what I mean is Isaac Asimov’s Foundation series. this also means I am talking about writing a whole series of connected novels. In my last post, I began to identify what I mean by “evolution.” In it, I looked at how a society grows and changes over many centuries.

Today, I’m looking at my second viewpoint of evolution – that of aberration or how traumatic events propagate down the ages. For example, a parent abuses child; child grows up and abuses his children in a similar manner. Or a person is raped and thereafter the person is afraid, fearful of … Many of current TV shows are dramatizing this type of situation.

Coupled intimately with this is my personal belief that we are all immortal spiritual beings who have a mind and who are generally inhabiting human bodies. Call it Karma or whatever, but this notion is reflected in many religions. A short illustration might show you what I mean by this union.

Take a minute and imagine a black cat in your mind. Get a good image of it, if you can. Now turn it red or some other color. Okay. That is your mind, sometimes called the conscious mind or the analytical mind. Pinch yourself. That is your physical body, human I hope. (Tease). Now the key question. Who is looking at that picture of the cat? That is you, the being, the person, the personality, you.

Okay, now that you have some idea what I am talking about, let’s see why this is so key to why I write long series of science fiction novels.

An individual person can suffer very traumatic events, events that cause severe pain and unconsciousness or tremendous personal loss. Likewise, a whole society can also undergo a severe trauma. While society is beginning to accept the fact that these traumas can adversely affect the person for the rest of their lifetimes unless healed, my proposition is that since the person, the being, is immortal and will have further lifetimes (Karma or whatever), that trauma is still there and can still impact them in their future lives.

Worse, we tend to forget previous lifetimes. We try to avoid pain, and that other body did just die somehow. Also, the old out of sight, out of mind kicks in. We forget things, especially if those things are no longer present anywhere in our lives. Best left forgotten is frequently the norm. Yet, that un-erased, un-handled trauma is still there, buried deep in what many call our unconscious minds and can still impact our lives.

Just how do, why, and what do such traumatic events have on people and upon a society as a whole? This, then, is the second aspect of evolution that so intrigues me and which I often explore when writing science fiction novels.

Case in hand: The Adventures of Elizabeth Stanton, Being at Large, Volumes 1-13.

The first novel begins with the six year Elizabeth living in a rural village. The world consists of small isolated villages and Druwids are watching over and protecting these farmer villages in the land called the Greenway. Her local druwid begins training her to follow in her footsteps. At this time, the druwids are organized into circles of seven, each member providing a different focus of their skills. One is their healer, an expert in the art of healing. One is their protector, an expert in fighting and the combat arts. The leader of the circle is called the Wid, because they need to know the most about everything.

Beyond their land, there are other societies, burly Axemen of the far north, wild horsemen to the east. South of their land likes the 7 Sea Prince kingdoms who deal heavily in trade using their large fleets. More critically, far to the south lies an island kingdom known as Megalos. They have a powerful army of Centurions, who are out to conquer the known northern lands.

Far, far to the east lies another giant kingdom, wholly unknown to these western countries at the start of the series. And there are many other lands on other continents, unknown as well.

Initially, the novels document the expansion of the druwids as they try to prevent the Centurions from attacking the Greenway. As unrest and random raider attacks grow, her family and her druwid teacher abandon their small home heading for safety. They are brutally attacked before they can reach safety and Elizabeth endures a very severe trauma, both physical and emotional, one which continues to severely impact her life from this point onward, even though she soon becomes the Wid of her Lightening Circle. Her trauma continues to plague her and if she’s not careful, it can drive her insane. With her circle, she visits the Sea Princes, charged with spying on the Centurions in hopes of discovering how they could be defeated.

The series of novels then follow her through many successive lifetimes. World circumstances constantly change, but she and her associates continue to try to bring peace and tranquility to at least that part of the world where they live.

Across lifetimes, societies evolve, grow, and expand, giving an ever changing background to the events of her lives and those around her.

What no one knows at the start is that their world is actually a penal colony for three alien races. They dump their unwanted, undesirable beings here on this world. Criminals and intellects and artists and non-conformist and political dissidents – all get heavily implanted with a severe trauma and dumped onto this penal colony. How are these beings kept in their cells? Their cells are their human bodies. After all, when was the last time that you stepped out of your body and headed off to another location to see the sights?

While the alien races believe this is the ideal solution for their undesirables, the fatal flaw is that they also dump some extremely intelligent and bright beings here, plastering them into human bodies. One of these realizes the truth: that he and everyone else is a spiritual being, immortal, with a mind and a body. He sets out in the second novel to change the world, educating people about this fact: the Great Messiah. The Centurions exterminate his body for his efforts are seen as threatening their iron handed rule. He and Elizabeth continue on their chosen path of trying to find a way to free the beings from a constant dependency upon physical bodies, restoring their original native powers and abilities.

As lifetimes go by, they and their close associates learn of the existence of the three alien races who are hiding behind the scenes, controlling the behavior of the humans in their areas. The Grey Creatures control the northern lands at the start, while the giant fifty-foot mantis creatures control the south. Each group of aliens is trying to get their humans to go to war and wipe out the opposite group of humans. Thus, Elizabeth must find a way to get rid of these ultra-powerful aliens and eventually does.

As technology grows, so does ship building. At long last caravels are built that permit lengthy ocean travel and Elizabeth and her crew head off to explore all the rest of their world, discovering many other civilizations on other continents, including those in the Far East, who are under the control of the third alien race, still around.

With the world now opened up by her voyage of exploration, vast new trading routes are established among all the dominate countries. Far to the south on the southern continent, the giant Demokritos, from which those on Megalos are descended from ancient times, becomes the giant power and begins to threaten to take over the entire world by force. They have to be stopped somehow.

Through these centuries, the technology to actually erase the horrible traumas a person has suffered begins to grow and produce results. Later on, Elizabeth and the Great Messiah discover that there is even a way to help a being regain the vast powers that he or she once had had, before becoming convinced that they were nothing more than a physical body and only live once. But in order to do this special therapy, the Great Messiah must have a peaceful, tranquil environment in which to work. Certainly no wars ongoing. Thus, Elizabeth devotes her lifetimes to maintaining that peaceful environment so Jes can carry out his therapy, rehabilitating the human beings.

These many lifetimes illustrate how traumas impact people and in different ways. With the right therapy, the traumas can be erased to the betterment of the person.

Just as Elizabeth and Jez are about to really produce stellar and widespread results, the aliens return. By now, they’ve mutually decided to abandon this penal colony and are making their last dump runs. However, the mantis creatures who were primarily responsible for genetically making the human bodies have other ideas. Upon arrival, the mantis creatures are shocked to find some of their prisoners are escaping their cells, that is their physical bodies. Immediately, they embark on a new program to somehow force them back into their cells, to undo the spiritual gains made by Elizabeth and Jes and their therapies. They almost succeed too.

This series then explores just how traumas impact a person and across lifetimes. Does it have a parallel to what’s going on Earth? Something to think about.

Vic

Share Button

What I Like Most About Writing Science Fiction

What I Like Most About Writing Science Fiction

I wanted to share what I most like about writing in the science fiction genre: Evolution of people and societies over long time spans. I was inspired to tackle such a broad span by Marion Zimmer Bradley’s Darkover series of many novels, which still ranks as one of my favorites of all time.

Okay, what exactly do I mean by “evolution?” There are many, many good sci-fi novels but it takes a whole series of novels to cover say five hundred years of a society’s development. Perhaps, my background in anthropology also tends to push me along these lines. The fourteen novels (more on the way) in the series Planet of the Orange-red Sun begins with a primitive society located on the fringes of the galaxy stuck in what one might call the Bronze Age of development. Their planet has almost no heavier elements. Iron is so rare that a steel sword is worth “millions.” How can such a society develop beyond such a point?

As the first novel in the series begins, the “civilized” space faring rest of the galaxy has discovered this world and are sending a colonizing group, preparing for landing. The vast Imperium with its mighty space fleets does recognize more primitive worlds and should designate them “Closed Worlds,” a classification that prohibits interference in such world’s natural development. The Imperium is keenly interested in this remote world because it is rich in the ore that the Imperium refines to make the fuel for its space fleet. Thus, this first novel explores what happens to the people of this remote world when greedy, highly advanced people arrive and fail to treat them as a Closed World. As you might guess, the result is disastrous, very nearly physically destroying that world.

Ah, but what happens to that world and its people a hundred, two hundred, three hundred years later? The Imperium does recognize its error and tries to rectify it. On a world such as this one and with some contact with “modern” worlds, how will the society and its people grow and develop? Unable to effectively move into an Iron Age and into an Industrialized Age, to say nothing of eventually moving into space, substitutes will appear. In this case, clothing and apparel become the “status symbols” of wealth and class. Beginning small, Elegant Fashions Inc within several generations becomes a major driving force within their society.

However, there is another angle to explore. Telepathy. Because of the unique properties of the world’s near total lack of all heavy elements, in the first novel, certain “witches” are able to use special crystals that act as a mental amplifier, allowing them to have a low level of telepathy with other similar witches. After the near destruction of the world in the first novel, the explosive catastrophe scatters volumes of dust from the crystals over much of the world. Evolution in physical bodies occurs. Suddenly, many ordinary people begin to develop telepathic abilities and many other mind-related skills, now being called the mentales gifts. Thus, beginning in the second novel in the series, the people of the world have to adjust to this new change, and prejudice kicks in. Such people are often burned at the stake, compliments of the Church of God.

Out in the Imperium, an individual with telepathic abilities is highly sought after. They are exceedingly rare and extraordinarily highly paid for their work. Only the Closed World status prevents the Imperium personnel from simply “confiscating” such people from the world, though the black market certainly does.

Just how can a people develop and progress as a society if some have such powerful gifts, while others lack them totally? One solution that is followed is to allow these incredibly powerful people to be the sole rulers of the various kingdoms. Ah, with such ultimate power and no checks on their powers one might well anticipate major disasters will follow. Does this relate to our own time where giant corporations control so much of our society and dump billions into getting certain candidates elected to political offices?

After nearly bringing their world to its destruction, another solution is found. Life goes on, but now in different ways, as the Age of Chaos ends with the installation of an Emperor and Empress to rule the world, who keep the powerful mentales gifted under control.

While peace thrives for a time, soon this system of government is undermined as well. Powerful men and women simply can’t stand to have an ultimate Emperor and Empress dictating what they can and cannot do, especially since the world now has their own Senator to represent them in the Imperium in the ruling Senate. Individual kings and queens, backed by the now submissive mentales gifted, rule their lands. Once more, a different kind of oppression results, as one might well anticipate.

However, sitting in the background all these years are the merchants and guilds, who toil to produce the commodities of life. Now, it’s their turn to revolt and don the mantle of power. People have to eat and have clothing. In a way, this evolution to a guild-run world might be their only avenue to a stable, peaceful world. What shop owner wants to fight in a war? No profit, no benefit.

During all these years, the world slowly makes its mark on the Imperium. However, the Imperium has its own troubles. They control one arm of the galaxy, while another group, the Federation of Planets, controls the other arm. At last, the two meet and a war develops. The remote world finds itself squarely in the middle, since their moon now is a huge fuel refinery for the Imperium.

In any war, the sides do their best to develop new and better weapons of destruction. Just look at history, such as Germany in WWII. Unknown to nearly everyone, the Imperium set up a biological – genetic research station on an uninhabited world, the sister world to this one. Their objective: develop a nasty biological weapon that alters human DNA, rapidly altering infected bodies to match this new “blueprint.” Imagine what would happen if such an agent could be released over say Iran, and within say four days, all humans living there had their bodies mutated such that they had no arms, for example. Well, that’s just what this ultimate weapon was designed to do: totally incapacitate those on whom it was unleashed.

Ah but such research facilities have numerous safeguards. Accidents happen. While this horrible bio weapon was never used during the war, an accident released the agent and many were horribly impacted by the genetic mutations in their bodies. However, bright minds saw another use for such an agent. Penal colonies are costly to maintain and run. Just look at the penal systems in the US today, for example. Bright idea: genetically modify the hardened criminals by turning them into nearly helpless people. Now, they can close down these costly maximum security prisons and simply put the helpless criminals into assisted living housing, for they can never again be a threat to society. Wonderful, cost-saving solution. The Imperium implemented this widely.

But wait a second. Bright political leaders also saw an ultimate weapon here. Secretly, a number of Imperium worlds began manufacturing large quantities of this horrid bio-agent, along with release mechanisms. Purely defensive, just like the Cold War. They won’t nuke us cause we’d nuke them back. Wonderful idea. Guess what? It began to happen, first as an accident and later intentionally. Populations of whole worlds suddenly found themselves waking from genetic mutation comas to find themselves helpless. Imagine the disaster that would result if everyone in the US woke up one morning to find they had no arms and worse.

Bright minds attempted to rescue some of the victims, but how do you get to and rescue ten billion people on a world? While millions were rescued over time, each now had to be housed in an assisted living facility for extended durations, totally overwhelming such facilities on all known worlds. Bright idea: save only the best and brightest young students from these worlds.

Enter robotics to save the day. Fancy humanoid like robots were developed to assist these victims get by in every day life. Even better bright idea: house all of these mutant humans with their humaniform robots on their own world. Then, we don’t have to see or deal with them at all.

At first, this actually began to work, more or less, if you were a bright individual, horribly so if you were not. Still, in time, these bright mutant humans got the notice of the rest of the Imperium. Once more, some in the Imperium felt threatened by these homo sapiens nova and simply nuked the world and attempted to destroy all samples everywhere of this nasty biological-genetic agent.

Evolution of societies: one of the key principle that unfolds is that “the solution to today’s problem becomes tomorrow’s problem.” A secondary key principle is that aberration in behavior is and can be easily transmitted down through many generations, though it can become twisted and distorted as it carries on through the centuries.

In my next sci-fi blog, I’ll discuss a different evolution – that of a society found in the nearly as long series, The Adventures of Elizabeth Stanton.

Vic

 

Share Button

The Third Video in the How to Debug C++ Programs Is On YouTube

How to Debug C++ Programs Lecture 03

The third video in this series is now up on YouYube. In this video, I show you how to use the Call Stack feature of the debugger to help locate the errors in programs. In this session, the Dice class is discussed with two hard crash errors as well as a minor incorrect output. At the end of the video, I’ve added a Take Away list of the key points from these first three beginning lectures.

See how to more effectively and rapidly find the errors in your C++ programs. Watch the video. Subscribe to the channel to get automatic updates when subsequent videos in the series are released.

You can also comment on them and I am open to your suggestions on what other topics you would like to see hints and tip on – just let me know.

Here’s the fast link to the video:
Debugging Lecture 03

Vic

Share Button

Updates to Windows MFC Programming II Ebook

Hi

I’ve updated the Windows MFC Programming II ebook samples to VC.NET 2010 and fixed a few problems that appeared when running the newer compiler and Windows 7. The changes are minor. To download them, go to the Windows MFC Programming II page and scroll to the bottom. There you will find two new links. One retrieves a zip file with a list of changes and the 2010 set of project folders. The other link is just to the small txt file of the changes.

Have fun,

Vic

Share Button

Attention You Bloggers Out There

Hi,

Do you have a blog? Have a place to post book reviews? If so, read on.

If you already own one of my ebooks, whether it is a computer ebook or novel, how about writing a blog review of the book or books for me? If you do and link to my site (perhaps directly to that book’s promo page), then I will give you your choice of another ebook to thank you.

If you don’t already own one of my ebooks and would like to review one or more and write a blog review on it(them) including a link to my site, I’ll send you the ebook to review at no cost to you.

Here’s a golden opportunity to add to your library of books.

Thanks,
Vic

Share Button

Downloads of Free Sample C++ Programs from the Ebooks

Hi Everyone,

I’ve now got some free sample C++ programs download of key items from a number of computer programming ebooks now available.

The data structures zip file includes key and highly useful basic classes, including the growable array, double linked list, stack, queue, and a binary tree. They are presented in full detail in the two data structures ebooks.

Plus games. Ah, games. I’ve included some key production version games from the Programming Non-graphical Games in C++ as well as the complete coding for most of them. This way, you can see the many different kinds of game engines that you can learn to program.

Also I’ve included key free sample C++ programs from the Games Programming Theory in C++ so you can see the many different aspects of realism that can easily be added into your game to make it more exciting for your players. All you need to do next is add in a fancy graphical interface which you will be able to do once you’ve been through the two MFC Programming ebooks.

I’ve included some relevant and sometimes fancy samples from the two Windows MFC (Microsoft Foundation Classes) ebooks. Here is where you can learn to make good looking graphical interfaces to your applications.

So have at the free sample C++ programs. Download them and experiment with them. See what you could learn to program yourself!

Yes, I have copyrighted the the free sample C++ programs, but you are free to use them in your applications, that is, they are open source, but I would like an acknowledgement if you do so.

Vic

Share Button

The Second Video in the How to Debug C++ Programs Is On YouTube

How to Debug C++ Programs Lecture 02

The second video in this series is now up on YouYube. In this video, I show you how to use the basic features of the debugger to find the errors in programs. Step Into and Step Over are explained along with Continue and how to set and remove breakpoints at key locations. The Watch window, Auto, and Local windows are used effectively to keep track of variable contents.

See how to use these in combination to more effectively and rapidly find the errors in your C++ programs. Watch the video. Subscribe to the channel to get automatic updates when subsequent videos in the series are released.

You can also comment on them and I am open to your suggestions on what other topics you would like to see hints and tip on – just let me know.

Here’s the fast link to the video:
Debugging Lecture 02

Share Button

The First Debugging C++ Programs Video Is Up on YouTube

Debugging C++ Programs Video Series

I’ve begun a series of videos on Debugging C++ Programs . Debugging: is it an art or science? When I’m helping my students with theirs, some claim that it could well be a magical art ! This series is intended to illustrate many methods for locating run time errors in many kinds of C++ programs. Perhaps, it is a bit of both. This series will help you learn more about the tools that are available to you, how to use them to track down errors, and something about the “art” as well.

The first step is “an ounce of prevention.” In this video on debugging C++ programs, I show you positive steps that you can take in your coding practices to keep bugs minimized. Of course, if you love to debug, then ignore and skip this video and just look at the ones to follow. In this video, I show you two excellent methods to prevent run time errors, including using the C++ error handler (i.e. try-catch logic).

Link to video

Let me know what you think of this series. Also, I’m open to suggestions for further “how to” videos that you’d like to see. Let me know your ideas and we can make a fun project of learning.

Vic

Share Button