C++ Lies, Damned Lies and Statistics

This is the last entry in a sequence of blog posts that resulted due to a conversation with two colleagues regarding the most efficient way to implement a piece of code to address some made up requirements.

Let me start by saying that the first choice for most developers would be the use of vectors.  Once such implementation is tested, if the performance is not there, one should / must look for alternate ways to optimize and / or redesign the software. Continue reading “C++ Lies, Damned Lies and Statistics”

C++ Implementation using an Array

This is the fourth blog entry in the sequence that deals with a conversation with a couple colleagues.

This blog entry shows the implementation using the C++ programming language for the problem described in the first blog entry using an array. As in the previous blog entry, let’s first look at the code used to implement the main() function. Continue reading “C++ Implementation using an Array”

C++ Implementation using a Vector

This is the third blog entry in the sequence that deals with a conversation with a couple colleagues.

This blog entry shows the implementation using the C++ programming language for the problem described in the first blog entry using a vector. As in the previous blog entry, let’s first look at the code used to implement the main() function. Continue reading “C++ Implementation using a Vector”

C++ Implementation using a List

This is the second blog entry in the sequence that deals with a conversation with a couple colleagues.

This blog entry shows the implementation using the C++ programming language for the problem described in the first blog entry using a list. Let’s first look at the code used to implement the main() function. Continue reading “C++ Implementation using a List”

C++ Conversation

c_programming_languageIncidentally, a week or so ago, a couple colleagues and I started a conversation about what might be the best way to implement a piece of code in C++.  A simple outline was jotted on a text document.  Regrettably I have misplaced the piece of paper. The purpose of the conversation was not the optimization of the specific code (at the time none was discussed), but to the approach (thinking process) a senior software developer would take to come up with an efficient implementation. Continue reading “C++ Conversation”