We present a list of programing tips and tricks. With these tips users can increase their productivity on the computer programming and make their overall computer experience a lot more enjoyable. This section will grow over time as new entries are added and current entries updated. We will cover a wide range of topics in C++ programming applied to scientific programming. You are welcome to bring your own suggestions
This page is an on-going work in progress and will be updated periodically, stay tuned.

Some Thoughts About Modern C++ in Scientific Programming

Perfect forwarding (Modern C++) In the refactoring project I’m currently working, I prototype many implementations and lately I’ve been testing the use of perfect forwarding (Modern C++ feature) in our scientific programming environment. The reason is that some of the legacy code I started from used functions with different signatures. As the name perfect forwarding […]

The 4 Most Important Skills for a Software Developer

I don’t remember where I took that from, but I think it’s worth sharing. I have been developing software for almost 25 years and this is what I think that’s the 4 most important skills for a software developer. Software development is 100% about solving problems If you can quickly adapt to the rapidly changing […]

An Example of a C++ class Implementation Of Euler Angles

C++ has many features which make this language very attractive for scientific programming, and one of them is the operator overload functionality. I present an example taken from our programming environment (math3D library) that use this to represent a rotation class (Euler angles).

C++ scientific code snippet

An example of how STL (Standard Template Library) can be used to write scientific code. In our programming environment we make an extensive use of this kind of technique. From our experience, it helps to write better code that is easier to understand and less error prone.

Basic Things worth Knowing About Bind Adapter

C++11 added a new adapter called bind (bind1st and bind2nd are now deprecated since C++11). I give some hands-on examples of everyday life usage as a scientific programmer of this adapter.

Creating Pair of Objects Using Boost Range and Lambda

We present a little example of the use of boost range and the lambda expression, supported by C++11, that show manipulating range is made easy and don’t need extra programming of function for simple task.

Basics of Container of pointers: Part I

Containers of pointers are common and important. For example, if you want to implement reference semantics you need to store objects’ addresses in a container. Another good reason to create such containers and the most important one is polymorphism. In this blog I discuss some of the issues when working with pointer containers and give a brief introduction to boost container of pointer library.

Useful Tools When Testing And Prototyping

Everyday programmers are faced with testing and quick prototyping. Boost::Assign library really shines in simple throwaway programs and test harnesses, where small, simple and easily modifiable code is the goal. I present some utility (examples) and show how it can make you more efficient in your everyday task.

Object-Oriented Numeric: A New Approach

Developing numerical (scientific) software imposes two important demands on their implementation; those regarding flexibility and complexity. Another developing approach called Object-Oriented Numeric (OON) has been proposed. I discuss this new approach and give a short introduction about this new way of developing scientific software.

Example of STL Numeric Algorithm

We show by a simple usage of the numeric algorithm “accumulate” how STL can make code cleaner, short and can save you time and write better code. Fewer lines of code means less bugs, 90% of the time, simpler code runs faster and easier to maintain.