BBC: UK energy customers ‘overcharged’

A story by BBC on reports that UK households are being charged by 1.6 billion pounds.

The report is denied by the Energy Retail Association. Who say they need to hedge their purchases to guarantee supply.

We need to keep an eye on the reported profits of these energy suppliers (Big 6).


Latex Poster/ Modelling Thermal Conductivity

Norman Gray and Graeme Stewart at Glasgow have provided useful examples to make posters using Latex.

I used these to make a tex file, which produced a poster using pdflatex. Should also be possible using latex command if you include graphics as eps rather than pdf. Make sure if you convert graphics to pdf or ps that you have a bounding box (use pstoeps command for example), otherwise your poster will break horribly. It was important to convert from eps to pdf using the epstopdf command rather that ps2pdf.

This saved me time by allowing me to use the equations from latex directly, and allowed me to include my graphs at high resolution – it doesn’t make sense to convert to jpg or other bit map to include in a powerpoint presentation file.

You can find the poster here: Poster (best viewed with xpdf)
and the latex file to make it here: Poster source file

Thanks to the people who showed an interest in the poster. I wish I had taken picture at the conference to make this post more dynamic!

You can also see this poster on my website

My second g++/cpp program – Using a Makefile

I downloaded the example files from here:

This demonstration explains how to compile using the make file. In this example you split up the program into separate modules, and use a make file to compile. This has the advantage that after making a change, only that part of the program needs to be recompiled.

Read the instructions on the web page, after downloading you need to edit Point.h to prevent it being included twice.

#ifndef POINT_H
#define POINT_H
* File: Point.h
* Last Modified: January 31, 2000
* Topic: Modules, Separate Compilation, Using Make Files
* ----------------------------------------------------------------

#include // one of two
using namespace std; // two of two, yay!

class Point
Point(int xval, int yval);
void move(int dx, int dy);
int get_x() const;
int get_y() const;

int x;
int y;


otherwise you will get the error:
g++ -c -o main.o main.cpp
In file included from Rectangle.h:13,
from main.cpp:9:
Point.h:13: error: redefinition of 'class Point'
Point.h:14: error: previous definition of 'class Point'

The files you download are: main.cpp, Makefile, Point.cpp, Point.h, Rectangle.cpp, Rectangle.h

and the Makefile looks like this:

# Makefile for Separate Compilation Example

# *****************************************************
# Parameters to control Makefile operation

CXX = g++

# ****************************************************
# Entries to bring the executable up to date

main: main.o Point.o Rectangle.o
$(CXX) $(CXXFLAGS) -o main main.o Point.o Rectangle.o

main.o: Point.h Rectangle.h

Point.o: Point.h

Rectangle.o: Rectangle.h Point.h

after running the make command you will have a bunch of object files (.o) and an executable. If you edit Rectangle.cpp and run make again then only Rectangle.o needs to be made again. The programs fragments of binary are linked by the .h header files.

if you run without preventing the multiple inclusion you get this error:

$ make
g++ -c -o main.o main.cpp
In file included from Rectangle.h:13,
from main.cpp:9:
Point.h:13: error: redefinition of ‘class Point’
Point.h:14: error: previous definition of ‘class Point’
make: *** [main.o] Error 1

After correction you get this:

$ make
g++ -c -o main.o main.cpp
g++ -c -o Point.o Point.cpp
g++ -c -o Rectangle.o Rectangle.cpp
g++ -o main main.o Point.o Rectangle.o

Edit Rectangle.cpp and run again; (e.g. open and save to update time, or just type “touch Rectangle.cpp“.

e$ make
g++ -c -o Rectangle.o Rectangle.cpp
g++ -o main main.o Point.o Rectangle.o

My first g++/cpp program

test.cpp is a text file containing:


using namespace std;
int main()
cout<<"test test"<<endl;
return 0;

This is compiled using the command:
g++ -o test test.cpp

Missile Tests!

A quick look at will show the surprising news that North Korea aren’t the only ones testing missiles!

For USA news you can also see here:

Excocet Missile Launch from wikipedia.

With so much news about North Korea launching a few rockets, you might be shocked to know that USA, Britain, France, Israel, India, Pakistan, Russia, China are all testing missiles regularly!

March 29, 2009 Indian tests cruise missile: official (developed with Russia).
Apr 02, 2009 Raytheon Standard Missile-2 Destroys Target
May 07, 2009 Raytheon Develops Anti-Surface Warfare Capability For Tomahawk Block IV Missile More than 1900 Tomahawk missiles launched in combat since 1991.
May 20, 2009 Iran hails successful test of new medium-range missile
May 29, 2009 KMSAM Program Achieves Significant Milestone (USA and South Korea)

May 28, 2009 NKorea blast likely less powerful than hoped: expert

The explosive, while larger than the first test in October 2006, was still far short of the expected yield of a crude Hiroshima-type bomb, according to Jeffrey Park, director of the Yale Institute for Biospheric Studies.

“More than likely this means North Korea tried and failed to get a simple plutonium bomb to detonate correctly,” Park wrote in an article on the website of the Bulletin of the Atomic Scientists.