On several projects I’ve seen that a test and development environment needs a email server. Most of the times it’s not wanted that the emails are really send out. So I started a search on the web and found Dumbster. Dumbster is a Fake Mail Server, it supports the SMTP protocol, written in Java. It’s easy to integrate with unit tests and mocks.
Personally I use it for a support and test environment which has the feature to generate loads of email, I really don’t want to end up in a mailbox. It’s running as SMTP deamon in a stand alone application out of the box. I added code to generate some logging, which can be handy.
In this post I describe how to install a Ubuntu c++ development environment.
To protect myself from reinstalling this environment while switching hardware, etc. I used vmware player.
Step 1: Download vmware player and get yourself a free license.
The software can be retrieved here: http://www.vmware.com/products/player/
Step 2: Download the Ubuntu Desktop 10.10 edition.
The software can be retrieved http://www.ubuntu.com/desktop/get-ubuntu/download
vmware will do an easy install for you. The configuration you provide is your full name, username and your password. Optionally you can change the hardware attached to this virtual machine and change the amount of disc space the vmware image is allowed to reserve.
I removed the floppy drive and printer and changed the Network Adapter to ‘Bridged’.
Step 3: Change your root password.
Login with the username and password you provided at the Easy install. Open a terminal and type: sudo password root, and set your new password.
Step 4: Install Development Tools and there Dependencies
To get the Eclipse IDE working you have to install Java Runtime environment first. This can be done through the Ubuntu Software Center.
After that I installed Eclipse IDE by extracting the tar.gz file to /opt/.
When I tried to compile my first “Hello World” piece of code I got the error that g++ couldn’t be found. To fix this problem the g++ should be installed. This can be done by entering the command sudo apt-get install g++, alternatively sudo apt-get install build-essentials can be used.
After this it’s possible to build and run the Hello World application.
Additionally version control clients or other software can be installed.
For a new project at work I came along this design pattern. On the web I found some interesting posts about this one I really like to share with you.
The Unit of Work design pattern solves the problem, that other components / layers in your software then the persistency layer needs to keep track on which data needs to be inserted, updated or deleted. Also this pattern makes sure that all the data is saved within one transaction.
- The Unit of Work Pattern:
- Implementing a persistence ignorant Unit of Work framework:
- Confusing unit-of-work with threads:
Nowadays in the world of software engineering the problems are getting more complex. Luckily for us there are proven solutions for parts we need to solve. These proven solutions we call design patterns.
At least a design pattern contains a name, description, what problem is solves, the advantages and disadvantages and also the solution. The most famous book, pretty good book to learn design, is the book written by the Gang of Four. This book describes a classic set of patterns which are most used today. Patterns like Model-View-Controller (MVC), Observer, Factory and Iterator. Even if you think you didn’t used design patterns in the past, lots of them are embedded in the new generation programming platforms nowadays like Java and .NET. So you should be familiar with them already. Continue reading “Design patterns” »