Monthly Archives: August 2015

Another round!

I managed to get through subdividing the “Conceptual Culture” function of the demonstration program: Graphics, language, mathematics, and applied science.  I’m not quite through the testing part of the subdivisions overhead: This is positively infested with bugs.   The other round is subdivision of the math section, because there are enough pieces of programs that I can categorize them.

The itty-bitty PhysicsSystem is working. Now I can start enlarging the system and adding new functions to it. This will also mean rewriting the test driver.



The culture section of my demonstration program was by far the largest, so I attempted another layer of division for it. This is subdivided into three categories, material culture, conceptual culture, and material culture. This wasn’t much help, because two of those sections don’t have any content yet. I need to go into another round of division, before I can go back to adding functions.

The Physics section is actually the more interesting. So far, I have the seed of a physical system which is said to contain objects. The functions to tell whether it is full or empty,  whether there is or is not an object at a given position, and to add an object to the system are now in place and I have tested them. I just need to add a function to remove an object, and then I can start expanding the system.


I’ve been working on my demonstration program. This has incorporated quite a few of the figures and exercises from my prime study reference, Deitel and Deitel. When there got to be about 30 functions and pieces of programs, I decided that I needed to sort them into categories.

One of these is science. This is my own work, and will incorporate various speculations and experiments on scientific and natural systems.  Another is Personal studies. I intend to include concepts from various role-playing game systems in order to explore psychology and social interactions. Anthropology is mostly a stub now, but will do similarly.

Most of the exercises so for fall in the category of culture. This will include language, graphics, mathematics, games, and miscellaneous applied sciences, and is likely to be subdivided before long.

The fifth category includes social institutions: So far, the exercises and suggestions fall into the categories of education and economics.

Now that I have subdivided and sorted my various functions, I can start adding a few more.



I added a few more sub-programs to my demonstration program. The number is growing, so that I need to begin dividing the various functions into categories.  One of the areas I especially want to work on is a physics package,  with other science categories to follow.  I’ve been distracted today from my computer studies: This was one of the “couldn’t properly concentrate” days.


Always looking forward

I had a family deal yesterday, so  got not much done in programming or programming study.  I’ve been itching to get through the early chapters in C++ Programming.   I have made some progress on Technical matters on use of pointers, searching techniques,  and an introduction to the use of data structures.   Right now the biggest obstacle seems to be appropriately incorporating concepts from the exercises into my demonstration program.

There are dozens of possibly interesting concepts that appear in the exercises. that I would like to include and integrate into a functioning system.  My demonstration program is developing a ramshackle appearance.  is  I need to include more techniques and tighten things up.


Getting warmer

I have finished reviewing the text for chapter 2, and condensing the figures to a single source file.  Now I only have about 40 programming exercises to go in the chapter. Pieces of them will be important in my main display program. One of the important ideas is the validation of input: That is, error checking.  It appears that I will need to understand the stream input/output functions, several chapters ahead,  quite a bit better in order to do the error checking I need for a commercial quality program.

Chapter 3 has the same style of progression, although it hasn’t gone as far.   Most notably, I covered a section on in-line functions.  Chapter 4 included a section on different styles of function calls.  Chapter 5 introduced searching an array for values and covered a linear search. Chapter 6 had preliminaries on classes and objects.

I had been looking forward to the next book,  Data Structures and Program Design in C++, by KryRobert L. Kruse and Alexander J. Ryba, Prentice-Hall, 1999. ISBN 0-13-768995-0. This was the text used in my “Data Structures” course, and I held onto it. This so far has one useful application, and a discussion of programming style and documentation that I have found useful.  However, I need to examine the previous book in order to progress much farther in this one.


Rolling along

Sometimes I have the energy for study, sometimes I don’t.  Yesterday I didn’t, today I did.   Visual Studio 15 keeps a whole folder for each individual project: but for review purposes, I just need the source code, so I can decide what to incorporate. I have done this for chapter 1 of my current primary text and incorporated all the ideas from it I wanted to into my sample test program.

I have also finished the text and figures of chapter 2 (Control structures): there are still a whole lot of exercises to do.   For chapter 3 (functions) the exercises are significantly more complicated and slower going.  For chapter 4 (Arrays) I really need to finish the text before I can do much with the exercises. This had a digression into basic statistics. For chapter 5 ( pointers and strings) there is a discussion on methods of calling functions, before I go on to structures and classes.

We must do our exercises

It occurred to me over the weekend that, rather than saving the programming exercises until the end of the chapter, I need to start working on them as soon as I have covered the relevant material.

As I have been studying the development of spacecraft, It occurs to me that the key to development, and the difference between ventures that succeed and those that fail, is the speed of the cycle: design, build, and fly: design, build, and fly.   The same thing is true in programming: Design, build, and test. So, an approach to learning programming must do the same thing: Design, build, and test.  So, rather than progress much through the books, I have gone back to the exercises.  For the introduction, I am nearly done, but I am just beginning the exercises on control structures and functions. I expect this to be a slower, but more thorough approach to study and review.

Another direction shift

For a couple of months I was intensely involved in family history, and haven’t been writing much on the blog. I have set that aside for a while, and work on something else.  In about 1997-1999, I was studying Computer Science at UVSC (now UVU) in Orem.  I was having various personal struggles and failing in school, but I escaped with an Associates’ degree and some knowledge of Computer Science.   I have recently decided to scrape up the rust off my computer programming skills and  work on developing the computer version of my knowledge base.

Some time ago, I had taught myself C Programming by working through a textbook on the subject.  In the Computer Science field, things had moved to C++. Now, I understand that the standard had moved to C#, but I’m not quite ready to jump into that. I prefer to continue with the older style, and then gradually move into newer techniques.

So, I’m reviewing my old CS basic C++ text ( C++: How to Program, Deitel & Deitel, 2nd edition. ISBN 01-12-528910-6.  There are newer editions and probably better textbooks by now, but this still work.  I’m using Visual Studio 2015  (Community version) for a compiler. This works, although I’m probably not using most of its functionality.  I’m so far doing old-style console applications, not yet anything Windows oriented, although I would like to work into that.

I’m not working through the book in a serial fashion, although I am copying and running the sample programs and illustrations,  working through the exercises, and building an application of my own to attempt to integrate the pieces.

I’m nearly through the exercises in Chapter 1: Introduction, although I have a few more to go.  In Chapter 2, Control structures, I’m most of the way through and have reviewed the break and continue statements in loops. For chapter 3, Function, I’ve gone through recursion with the fibonacci series. For chapter 4, I’ve reviewed passing arrays to functions. For chapter 5, I’ve reviewed the pointer operators. For chapter 6, structure Definitions.  The idea here is that if a topic in the later chapters is too advanced, I will hold up and do work in earlier chapters until I can grasp it.

From time to time I may be commenting on my trial application.