Archive for the ‘Uncategorized’ Category

Metal from space?

15 October, 2009

BBC reported this story, a 1.8 kg lump of metal it thought to have fallen from space and landed in a loft of a home.

http://news.bbc.co.uk/1/hi/england/humber/8309245.stm

I find it really amazing, I would have thought it would do more damage.

Any one seen pictures or has any more information about this story?

Daily mail have a larger picture.
http://www.dailymail.co.uk/news/article-1220621/Red-hot-piece-space-junk-crashes-pensioners-roof.html

Nobel Prize Game

28 September, 2009

Nobel prize website has a kids game were we can make steels, don’t give much scope for allowing us to alter the allows, but shows which elements make up the compositions of some steels, and what they are used for.

Nobel information about steel making and Invar

Click Image to Play:
nobel prize invar and steels game

Do feel free to let me know your score.

Making new criminals

24 September, 2009

Making new laws is the fastest way to make more criminals… a government minister who drafted a law on employing illegal immigrants has fallen foul of the same law. She’s had to pay a £5000 pounds fine, for what she described as a administrative error. She says she did examine the documents of her cleaner when starting her employment, but she failed to make a copy of them as a proof. BTW as she explains this is a civil case we can’t say she is a criminal. I’m not sure if that this distinction applies to everyone who employs illegal immigrants or not.

It’s really amazing that she can’t follow these rules, after drafting the documents, and argueing for the adoption of them in parliament.

Does this mean the law is to complicated, the rules were too difficult to follow, she should surely have known the rules? Or is she just incompetent, I think lawyers are usually careful not to break the law?

BBC report:

As mentioned at the end of the video, she is the first individual to be prosecuted under these rules, all previous cases were businesses.


Addendum
According to the house keeper, who nobody in the judicial system thought to ask before the case was heard, the baroness did not see here passport. BBC Story:Baroness ‘did not see passport’ .

Pret A Manger Against Science?

9 September, 2009

I really like the sandwiches that Pret make, but after reading the blurb on the back of my sandwich yesterday, I am a bit worried about their stance on science.

Pret A Manger Sandwich Pack

Pret A Manger Sandwich Pack

So if scientists are so terrible what lengths do they go to to avoid them? Does this mean they only employ liberal arts students in their shops were the sandwiches are made? Do they avoid using any scientific theories about hygiene? Are they going to remove the refrigerators and monitoring methods they use? What about their Coffee makers? They seem quite complicated, how can they be sure no science was used in the design?

Of course I appreciate that they make their sandwiches from recognisable ingredients rather than synthesising them using industrial chemicals, but I also think it is a bit spurious to claim that this doesn’t interfere with nature. Most of the food we eat isn’t really ‘natural’ they have been domesticated by the introduction of farming. (A notable exception are berries, because although we grow them we can’t really propagate them better than birds can, so can’t interfere with with the selection of the next generation).

Shame on Pret A Manger for propagating FUD, I thought your sandwiches were better than that.

Steel butterflies minimise earthquake damage

8 September, 2009

Scientists in Stanford university and others have developed earthquake resistant steel frames in which yielding of steel is used to dissipate the energy of the earth quake.

The steel frame structure contains replaceable cut steel plate ‘fuses’ which deform during the earthquake, and can be replaced easily afterwards.

Images of cut steel butterfly after simulated earthquake

Read more here: Standford Press release and here: Network for Earthquake Engineering Simulation pages

Industry Losses

20 July, 2009

2 stories from BBC.
BBC is reporting about it’s citizen journalist scheme. One lady from Port Talbot in Wales has made a program about the threat to Jobs at the Corus plant there. She was refused a interview with the Corus’ new CEO Kirby Adams, she went to Mumbai and interviewed the head of Tata Steel – Balasubramanian Muthuraman.

http://news.bbc.co.uk/1/hi/uk/8152853.stm

The second story is scandalous. Workers are staging a sit-in protest over closure of the UK’s only wind turbine plant, and the loss of 625 jobs at Newport in the Isle of White (525 jobs) and Southampton (100). The Dutch parent company says Northern European orders are falling, but at the same time the UK government says we need more “green jobs”. The parent company at the same time reported a quarterly sales rise of 59% to 1.11bn euros.

http://news.bbc.co.uk/1/hi/england/hampshire/8160218.stm

UK Government sets Unrealisitic Climate Targets

8 July, 2009

The institute of physics have published a paper by Roger A Pielke Jr, in which he says the (UK) governments targets for climate change are unrealistic. In his paper The British Climate Change Act: a critical evaluation and proposed alternative approach he shows that the rate of change proposed by UK government is much higher than the rate of change made by the French in the past. More can be found on the IOP news feed.

Wind turbines in an Danish Storm

I think we are off to a good start because of the drop in the economy, but I don’t think that is a sustainable way to reduce CO2 which requires investment in nuclear power stations (short term) and renewables like wind. I think it is good to set a target, but I am a bit worried that there is a lack of consensus over what needs to be done.

Take a look at David Mackay’s book Sustainable Energy – without the hot air for a reasoned plan of how we can meet our future energy needs in the UK.

BBC: UK energy customers ‘overcharged’

25 June, 2009

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

http://news.bbc.co.uk/1/hi/business/8117962.stm

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

17 June, 2009

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!

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

17 June, 2009

I downloaded the example files from here:

http://www.cs.bu.edu/teaching/cpp/separate-compilation/

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
{
public:
Point();
Point(int xval, int yval);
void move(int dx, int dy);
int get_x() const;
int get_y() const;

private:
int x;
int y;
};

#endif

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++
CXXFLAGS =

# ****************************************************
# 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

17 June, 2009

test.cpp is a text file containing:

#include

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

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

Missile Tests!

1 June, 2009

A quick look at http://www.spacewar.com/ will show the surprising news that North Korea aren’t the only ones testing missiles!

For USA news you can also see here: http://www.mda.mil

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.

Pdf from windows prn file, MS Powerpoint, MS Excel, MS Word (On Linux).

31 May, 2009

Having a ps file of your presentation is Dandy for printing, but to send it by email it would be better to reduce the size below 10 MB.

Our mission, to make powerpoint presentation file into reasonably sized pdf. (Note all of this was done on Linux, we tried with MS XPS printed to file and fell at the ps2ps stage).

Print to file to generate a prn file (I think this is microsoft version of a postscript file). Select paper size A4. Landscape mode. Note we used postscript driver in our emulated version of windows. (Using Wine). You may need to install a postscript driver for a printer, and select that printer, before printing to file. This hasn’t been tested by the author of this blog.

Printing to Postscript in MS Office 2003 on Linux using Wine

Printing to Postscript in MS Office 2003 on Linux using Wine

Move to the linux terminal (we tried on debian lenny but these commands are very basic – install psutils if not available).

Try to clean up file by converting to postsript, not sure this is necessary or not.
ps2ps -sPAPERSIZE=a4 file.prn file.ps

If you want to put 2 pages per size use
psnup -l -2 -s.7 file.ps double.ps

convert to pdf – downsize images to make file reasonable size. Other commands to do this automatically seemed not to work (ps2pdf14 -dPDFSETTINGS=/screen)
ps2pdf -dGrayDownsampleType=2 -dAutoFilterColorImages=false -dDownsampleColorImages=true double.ps

Cross over office is a compatibility tool which helps migration away from Microsoft Windows, they provide software to let you run many windows programs on Mac and Linux. Here is a link to the cross over office site:
CodeWeavers

2007 TED lectures and Flu

17 May, 2009

This video from 2007 of a lecture by Barry Schartz, in which he says we may be disappointed due to having too many choices. This leads to higher expectations, which are harder to satisfy. It’s all reasonable except he says that this is something that advertisers don’t know. This is something they really do understand better than anyone.

A very energetic talk also from 2007 talk my Prof. Hans Rosling who presenting statistics about development in different countries, and has made tools available at gapminder.com.

The gap minder website lets you make your own graphs, and the data is also available in the documentation section.

Prof. Rosling gave a warning about the swine flu on 6th May suggesting that it is overhyped in terms of deaths/news report. For this he compared the number of deaths from the flu and tubercolosis in the same peroid against the number of news reports available from searching on google news. The ratio was 8176 vs 0.1.

Flu Pandemic, How worried should we be?

8 May, 2009

Just for a little fun, a model was made for the number of flu cases in the various countries which are reporting data. A neural network was trained which predicts the amount of flu cases given the number of cases the day before. GDP(PPP), size of population and population density were also included as inputs. Obviously living in the UK it is more important to consider the cases in UK first.

Confirmed Flu cases in UK

Confirmed Flu cases in UK

Confirmed cases of flu in Mexico

Confirmed cases of flu in Mexico

Confirmed Flu cases in USA

Confirmed Flu cases in USA

Confirmed flu cases in Canada

Confirmed flu cases in Canada

Here are the predictions for todays flu cases in the various countries, WHO will usually release these data at around 6pm-8pm UK time, so we should be able to see how good is the prediction in about 5 hours time.

Country Predicted Cases Uncertainity in prediction
NewZealand 6 1
Ireland 1 1
CostaRica 1 1
Denmark 1 1
ElSalvador 2 1
HongKong 1 1
Israel 7 1
Switzerland 2 1
Austria 1 1
Portugal 1 1
Netherlands 3 1
Canada 232 23
Colombia 3 1
Spain 101 5
Korea 4 1
Italy 7 1
UK 43 2
France 7 1
Germany 14 1
Mexico 1419 155
US 1207 544
Guatemala 3 2
Sweden 1 1
Poland 2 1

Here are the predictions using the same data, for tomorrow cases (using the number predicted above).

Country Predicted Cases Uncertainity in prediction
NewZealand 6 1
Ireland 2 1
CostaRica 0 1
Denmark 2 1
ElSalvador 2 2
HongKong 2 1
Israel 7 1
Switzerland 2 1
Austria 2 1
Portugal 1 1
Netherlands 4 1
Canada 253 61
Colombia 5 1
Spain 127 8
Korea 6 1
Italy 10 1
UK 57 2
France 10 1
Germany 20 1
Mexico 1910 748
US 1520 643
Guatemala 4 2
Sweden 2 1
Poland 3 1

The model should be improved as more data can be included, as the outbreak proceeds. It is planned to train using the days since the start of reporting, and also the level of Alert set by the WHO. The model shows the number of cases increasing approximately linearly in most cases.

Copy files, preserve dates and permissions in unix

6 April, 2009

tar and feathers

This is a way to copy files in unix and keep the same time stamps, using the tar package:

tar cf – . | (cd wherever; tar -xvf -)

e.g.
change directory to path of USB stick and use:
tar cf – . | (cd /space/BACKUP/UDISK/;tar -xvf -)

kitchen rysnc

This is a another way to make a copy of a directory, the same command can be used again later to update the copy with any new files from the target directory:

rsync -va directory ~/BACKUP

e.g.
rsync -va /media/MJP_8GB_Ext2/mathew/ /space/BACKUP/8GB-disk/

Read an rysnc how to.

Thanks for your Patents

31 March, 2009

What is a Patent?
A patent is a monopoly right granted on an invention by a government of a country, allowing the holder the right to prevent the copying of the invention.

Patents are applicable only to particular countries, and for a set time period, and must be applied (and paid) for. Having a patent doesn’t mean you have been granted the right to profit from your invention, someone else might have a patent on something required to make your invention useful. Patent law is naturally different in different countries, although there are some moves to harmonise patent law (European Patent Ofiice and Reforms of Chinese patent law due to WTO).

Patent offices:

Patents are awarded in return for the public disclosure of information sufficient to reproduce the invention. In recognition for the benefit to society from the increased public knowledge, the government gives the right to prevent unwarranted reproduction of the invention. This gives a greater return for their research expenditure, and it meant to act as an added incentive.

The applicant discloses information about the invention, and must pay application and maintenance fees if the application is granted. In return he receives the patent, which is an exclusive right to use his invention, and can have considerable strategic value.

What is an invention?
An invention could be something completely new, or an improvement to an existing invention, an alternative to an existing method, or even a new combination of existing technologies. For a patent to be granted the invention has to be technical in character (rather than just decorative), novel, inventive, and useful.

There are differences as what counts as novel, and inventive between different countries, as this is difficult to generally define.

Olympic Torch Relay Protests 2012.

27 March, 2009

BBC is reporting there will be no torch relay for London Olympics, after protests against the carrying on the torch for the 2008 Beijing Olympics. This must mean that London has looked at it’s human rights record, in light of recent violations, detention without trial, participating in torture, lying about the reasons for the invasion of Iraq, snooping on it’s own citizens, and realised it should be no less controversial than China.

IOC executive director Gilbert Felli said:

“After the (2004) relay in Athens, which was the first international relay, we came to the conclusion it was easier for the torch to stay inside the (host) country… There were difficulties with the NOCs (National Olympic Committees), and we also saw the risk with a torch relay going around the world… Beijing had planned an international torch relay and we accepted it. We saw in the debrief that the risk was there and the IOC decided not to do it… I think when the torch relay is inside the host country there is more control.”

But surely we all know that the Olympic torch has to be carried from Athens to the host country to make the Olympics official. Surely they can’t think it would be difficult to carry the torch across Europe? It seems like London will be trying to organise the first ever ‘low key’ Olympics.

God won’t help says bishop

26 March, 2009

BBC is reporting comments from the archbishop of Canterbury. The archbishop, leader of the church of England (after the Queen), has warned about the destruction of the environment, saying that we can’t expect God to intervene to save the planet.

“I think that to suggest that God might intervene to protect us from the corporate folly of our practices is as unchristian and unbiblical as to suggest that he protects us from the results of our individual folly or sin,” said he.

It’s good to see confirmation from the Church that we should live our lives as if God doesn’t exist. Hopefully one day they will admit he doesn’t, or at least that they know no better than the rest of us.

Tata Nano hits the roads soon.

23 March, 2009

BBC is reporting on the launch of the nano, and asking people is the Nano good for India?. Nay-sayers are complaining about the possible environmental impact of western style development in India. Yay-sayers support the effort to include those unable to purchase a car. Tata nano could have a positive impact upon air pollution in cities if it replaces older two-stroke two-wheelers, since I understand it should run on cleaner burning LPG fuel.

The release of the nano should add around 3% to the earnings of TATA group, which made losses in the last quarter after problems re-financing aquisitions in such as that of Jaguar and range rover from ford, due to the credit crunch. The manufacture of the nano has been delayed by cynical protests against building of the plant, and is currently being made in lower numbers in existing TATA motors plants, while a new facility has had to be relocated.

The world is still waiting to see if TATA can also develop an electric version.