C++ Programming Tips

April 25th, 2009

Apart from having the discipline to always do things properly, these are the top 10 principles and concepts I think anyone who wants to be a truly excellent C++ programmer should adhere to and use:

Object Orientated Designs
Design Patterns
Standard Libraries
Templates
Descriptive Names
Const Correctness
Values, References and Pointers
Namespaces
Embedded Documentation
Avoid Macros

1. Object Orientated Designs
Object orientation has been around for so [...]


How to Remove Spaces from Filenames in Linux/UNIX

April 22nd, 2009

This command will rename all files that have spaces in their filenames, in the current directory and recursively in its subdirectories, so that in the new filenames all spaces are replaced with underscores (’_’ characters).

find . -name ‘* *’ | while read file;
do
target=`echo “$file” | sed ’s/ /_/g’`;
echo “Renaming ‘$file’ [...]


How to run MXit on your PC

April 15th, 2009

MXit recently released a libPurple plugin. You can use the plugin to login and chat with your MXit account from your computer, by using an instant messaging client that supports libPurple (e.g. Pidgin).
MXit on Windows
To run MXit on a Windows PC:

Download Pidgin for Windows here:http://www.pidgin.im/download/windows/
Install Pidgin on your computer.
Download the MXit libPurple Plugin for Windows [...]


Code completion (IntelliSense) for C++ in Vim with OmniCppComplete

March 20th, 2009

C++ autocompletion is possible with VIM.

This is officially the coolest tech discovery I’ve made this year.
And it’s easy to setup.
Here’s how to configure C++ IntelliSense for Vim, with an example that demonstrates how to enable code completion for the the C++ Standard Template Library (STL).
1. Download
You need the following:

Vim
Exuberant Ctags
OmniCppComplete

2. Install
With Ubuntu 8.10 you can [...]