Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Prentiss Knowlton

+ Follow
since Dec 18, 2009
I am an independent software systems engineer, and have consulted with Jet Propulsion Laboratory in the Modeling and Simulation Technologies Group of the Engineering and Communications Infrastructure Section, developing modeling software for the Mars Exploration Rover (MER) Spirit and Opportunity Rovers (recently depicted on a float at the 2008 Rose Parade, commemorating JPL's 50th anniversary).

Prior to this task, I completed a collection of training materials for JPL's Network Simplification Project (NSP) infrastructure within the Deep Space Network (DSN), helping them establish consistent operations procedures at their three deep-space tracking stations in Madrid, Spain; Canberra, Australia; and California, United States. This effort resulted in remote delivery of more than 12 hours of Computer-Based Training (CBT) with expert presenter voiceovers converted to HTML (for use by Microsoft Internet Explorer 6) and PDF (for use by Adobe Acrobat 6), over the web and also via a single CDROM, reducing materials costs from $195.94 per printed binder of 862 PowerPoint slides to $0.45 per CDROM of the same information, complete with voiceovers.

Other recent JPL activities include consulting in their Enterprise Information System (EIS) infrastructure, helping them establish consistent operations procedures in various lab-wide services such as email, enterprise file management, and security; selecting and setting up of hardware and software needed to improve workstation interoperability, simulation and modeling of microprocessors aboard the current Cassini spacecraft that recently successfully landed on Saturn; and developing software for operation of tracking station ground support telecommunications systems.

I've also worked with companies in computer factory automation, as well as on projects for various telephone service companies and long-distance carriers in the areas of traffic analysis, automated billing, and computer-assisted handling of calls by live operators.

I've been a UCLA Extension instructor for more than 20 years, and have also taught C, C++, Visual C++, C#, and Java courses to more than 2000 students.

I have a Ph.D. in Computer Science from University of Utah, which was earned getting a computer to capture, organize, and display music notation. Later, circumstances led to the opportunity of connecting a computer to a large pipe organ and performing several public concerts.
Westlake Village, California
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Prentiss Knowlton

Thanks, Henry, for the opportunity of exchanging ideas within your extraordinary website. Congratulations to all the winners!


Henry Wong wrote:
First, a big thanks to Prentiss Knowlton for being here to promote the book Murach's C++ 2008.

12 years ago
Greetings, Raghavan --

I've been using C and C++ from their beginnings in the 1970s, and I've been teaching C, C++, Visual C++, C#, and Java for UCLA Extension for more than 20 years. When I was getting ready to teach C#, my course rep introduced me to Murach's C# and I immediately fell in love with their paired-pages presentation. I was hoping they would soon be introducing Murach's C++. While talking with my course rep about this he said five fateful words: "Why don't you write one?" A few conversations with Mike Murach followed, and one year later, here it is.

A highlight in preparing this book was working with my editor, Anne Boehm, also an established Murach author, who diligently validated the material for conciseness, consistency, and technical accuracy. It was a joy to work with a person possessing both polished professional writing skills and deep technical understanding.

Best wishes in your technical enterprises,

Raghavan Muthu wrote:Welcome Prentiss Knowlton to the book promotions

I am a great fan of Murach's books nice to see one of the books in this promotion list!

12 years ago
Hi, Henry --

The pattern you've shown instantiates a value object, common in native C++, and would be allocated on the stack.

The C++ 2008 .NET coding of this pattern would likely be instead to instantiate a reference object, to wit:

Then, instead of using var.element notation in the use of this object, you would use var->element notation instead.

Since, per your example, no explicit use is made of the var reference object, the destructor is automatically invoked (by the managed code garbage collector) when the object is no longer needed.

At your service,

Henry Wong wrote:
Since we have a C++ expert here this week, I am going to take advantage of it...

I only use C++ for about 20% of the time, so bear with me. But while maintaining code, which has been developed by others, I found a coding pattern which seems... weird.

The code pattern looks like this...

At the top of a code block is a variable declaration -- and instantiation. The variable isn't directly used in the block at all -- and about the only communication with the variable is the parameters when calling the constructor.

Basically, the constructor of the variable will allocated resources, and the destructor will clean up after it, when it leaves the block (goes out of scope). It looks quite elegant, but the first time I saw this, it took me quite a while to figure out the purpose.

Is this pattern common?


12 years ago
Good afternoon, Rogerio --

You don't need to know pointers to manage memory. The gcnew operator in C++ 2008 is the counterpart to the new operator in Java. The only visible difference in C++ 2008 is that you use explicit ^ notation to specify reference variables initialized with gcnew.

For example,

Otherwise you work with reference data in much the same way as you work with it in Java.

Additional notational patterns in C++ .NET explicitly has you document the nature of each of your programming elements (e.g., object, class, reference element, value element). This better reveals the inner workings of your code and helps you and and other programmers working with you make better efficiency and design trade-offs. The book is full of ample examples to make these code patterns easy to understand and comfortable to work with.

Like Java, reference elements created with gcnew are automatically deleted when they are no longer needed.

In addition to this Java compatibility of usage, you still have the benefit of access to native C++ and legacy C pointers along with backward compatible operation of the native C++ new and delete keywords covering the 40+ years of C, native C++, and C++.NET language syntax evolution as discussed in chapter 19.

Best regards,

Rogerio Kioshi wrote:Hi,

Is it necessary to know pointers and how to manage memory allocation to program in C++?

If it is, I prefer programming in Java...

12 years ago
Greetings, Vyas --

One unique factor offered by C++ 2008 is its backward compatibility to native (unmanaged) C++ and legacy C. This offers the programmer the ability of using proven and tested code written more than 30 years ago. The world's first Hello World program illustrated in the 1978 first edition of The C Programming Language (called Hello, Earth on page 527) still runs without change, as does the same program in The C++ Programming Language (called Hello, Mars on page 529).


Vyas Sanzgiri wrote:Why would you want to go back to C++ when there are other free and equally powerful languages like Java. I work with machines and manufacturing and still I can take the performance hit of Java and make it work.

Why do people still code in C++ and esp C++ in .NET which is a commercial license? There are so many tools/plugins/IDEs/components available in other languages to get up and started with.

12 years ago
Greetings, Riaan --

As I mentioned in my reply to Gian, C++ 2008 greatly closes the gap that previously existed between C++ and C# or C++ and Java. Because C++ 2008 operates within the .NET framework, it's much easier to create multi-lingual applications, a common underlying intermediate target language of all language compilers that runs on the same virtual machine (much like the Java virtual machine). The downside of this is slower execution time and the upside is automatic memory management and more bullet-proof code owing to powerful debugging and troubleshooting tools.

C++ overcomes the slower execution time when the programmer is willing to let portions of his or her program to be compiled as plain old C++ (native C++ or legacy C) unmanaged code through use of the #pragma unmanaged directive discussed in chapter 19.

Though C++ .NET is currently Windows-centric, I expect that your no-no considerations regarding other platforms will soon be obviated.

The book gives preference to C++ .NET over native C++, as plain old C and C++ information is already readily available in Kernighan and Ritchie's "The C Programming Language" and Stroustrup's "The C++ Programming Language." I was pleased to find that the complete text of both of these books is available online free in PDF format (by consulting the all-knowing Google). For this reason, all the space is devoted to what is new and significant in C++ .NET without spending space describing what is already well known and readily available from other books and sources.


Riaan Nel wrote:Hi Prentiss

In the same vein as Gian's question in another thread on this forum - How does plain old C++ (before .NET) compare to C++.NET? Has the .NET framework had a generally positive effect on C++ in terms of things such as execution speed and ease of use? I played around with C++ a couple of years ago, and I'm interested in taking it up again.

When taking (hobby) game programming as an example, I assume that C++.NET will be better suited to the task, as I'm guessing that it has a bunch of useful graphic libraries. On the other hand, when writing applications in which speed is absolutely crucial, will plain old C++ be better? I'm not intimately familiar with .NET, but since it's a Microsoft framework, I'm guessing that C++.NET is a no-no when applications have to be platform independent?


Edit: Just for interest's sake; does your book give preference to either C++ or C++.NET?

12 years ago
Dear Gian,

It has been to your benefit to have been in your cave, because C++ has been in a state of considerable change until recently. In a nutshell, automatic memory management provided by "new" as offered by Java and C# is now available in C++ 2008 (also known as managed C++) through the gcnew keyword. In the meantime, the original new and delete keywords still work as they always have in native C++.

The beauty of C++ 2008 compared to other languages is that it remains upward compatible with native (or unmanaged) C++ and legacy C (going back to 1969). This is discussed in chapter 19. When the code you wish to run is unmanaged (from programs written 20 years ago), you can inform the compiler through the #pragma unmanaged directive, and it can run up to twice as fast as managed code.

12 years ago