<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Quantumstate's Blog</title>
	<atom:link href="http://blog.quantumstate.co.uk/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.quantumstate.co.uk</link>
	<description></description>
	<pubDate>Sat, 13 Dec 2008 18:41:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>Scratch building a model house</title>
		<link>http://blog.quantumstate.co.uk/scratch-building-a-model-house.html</link>
		<comments>http://blog.quantumstate.co.uk/scratch-building-a-model-house.html#comments</comments>
		<pubDate>Sun, 24 Feb 2008 16:07:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Things I make]]></category>

		<guid isPermaLink="false">http://blog.quantumstate.co.uk/scratch-building-a-model-house.html</guid>
		<description><![CDATA[Quite a few years back before I moved house I decided to draw up some plans of my house.  I walked round the outside with a tape measure and recorded all of the distances and then drew then up to the scale of about 1:76 which is 00 gauge for model railways.  I [...]]]></description>
			<content:encoded><![CDATA[<p>Quite a few years back before I moved house I decided to draw up some plans of my house.  I walked round the outside with a tape measure and recorded all of the distances and then drew then up to the scale of about 1:76 which is 00 gauge for model railways.  I have a small railway layout which is nowhere near finished and has laid abandoned for a good while at this scale.</p>
<p>A while after drawing the plans I decided to actually try and scratch build the house, scratch building was obviously the only possibility since there is not a kit, also the house is a fairly unusual shape so a conversion wouldn&#8217;t work.</p>
<p>I started off by buying a bit of brickwork which is embossed plastic.  I soon set about cutting this to shape which wasn&#8217;t the easiest of jobs since the tiles I had bought, although very nice quality were about 1.5mm thick which makes it difficult to cut out small windows with a craft knife.  It hasn&#8217;t come out too badly and hopefully I will be able to disguise most of the bad points with a bit of paint and some filler.</p>
<p><img src="images/brickwork.jpg" alt="Some of the cut brickwork for the house." /></p>
<p>At this point the work stopped for a while since I hadn&#8217;t ever actually made a building at this point, not even from a kit so I got a bit stuck, having no roof and the prospect of trying to glue together these rather roughly cut pieces of plastic wasn&#8217;t inviting.  I have since trimmed the plastic into a somewhat better state.</p>
<p>Later on I visited the Warley National Model Railway Exhibition which was very good.  Here I saw a man who had created some wonderful buildings in 0 gauge which is a bit larger than 00.  I took most of his ideas and am using them to build my model.</p>
<p>For the main structure of the house foam centred board is used.  This consists of foam sandwiched by a piece of card either side, making it very light which still remaining rigid and fairly strong.  This is fairly easy to cut with a craft knife although it is harder than you would think to get it nice.  It definitely looked easier when the man at the show did a demonstration.</p>
<p><img src="images/foamboard.jpg" alt="The foam board used, roughly 5mm thick." /></p>
<p>I pinned and glued this together which formed a structurally solid building.  I will be able to stick the brickwork onto the outside of this later on in the process.</p>
<p>Importantly this structure gave me a base for the roofing tiles.  I again used the method shown at the show which is; to take paper/card depending on the scale and then cut a series of slits the right width for the tiles.  I used graph paper from an old exercise book which was fairly thick paper and the graph paper is excellent because you can see how far apart the slits should be.  You then cut off a strip with the slits on one side and a solid strip on the other so you can pick it up as one piece.</p>
<p><img src="images/strip.jpg" alt="One of the strips of paper used for tiling." /></p>
<p>Then you can simply lay the strips on the roof, starting from the bottom and overlapping them so that only the slits are shown.  This creates the proper effect because this is how tiles are laid on a real roof.  The first time I tried this the lines kept going wonky so I scrapped the area and stuck graph paper over the entire roof which now acts as guidelines to keep it horizontal and maintain proper spacing.</p>
<p><img src="images/roof.jpg" alt="Some of the tiled roof." /></p>
<p>This process is time consuming since a lot of little cuts need to be made and they must also be laid carefully onto the roof making sure that they are straight.  I am in the middle of the process currently and have about a third of the roof done and probably about enough strips cut to get me past half way.  After this is done things should quickly progress to the stage where I can paint since the tiling is already cut to shape.</p>
<p>Here is a picture showing the model, The garage is missing form the near end which is why there is a gap.  I found that since it is connected via a narrow strip it was better to work without it attached.</p>
<p><img src="images/whole.jpg" alt="A view of the whole building, as you can see it is a fairly unusual design." /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.quantumstate.co.uk/scratch-building-a-model-house.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Sunken Ice</title>
		<link>http://blog.quantumstate.co.uk/sunken-ice.html</link>
		<comments>http://blog.quantumstate.co.uk/sunken-ice.html#comments</comments>
		<pubDate>Wed, 20 Feb 2008 16:30:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.quantumstate.co.uk/sunken-ice.html</guid>
		<description><![CDATA[I was walking in the Cotswolds over the last couple of days and along the route I noticed an interesting phenomenon.  There was a puddle of water which had some ice in it, since the temperature was pretty chilly, but what was unusual was that the ice was at the bottom of the puddle.
Ice [...]]]></description>
			<content:encoded><![CDATA[<p>I was walking in the Cotswolds over the last couple of days and along the route I noticed an interesting phenomenon.  There was a puddle of water which had some ice in it, since the temperature was pretty chilly, but what was unusual was that the ice was at the bottom of the puddle.</p>
<p>Ice normally floats so it tends to be on top of the water but in this case the ice must have frozen into some cracks in the ground which would have kept it locked in place.  Then when some more water flowed over the top of it the ice couldn&#8217;t float up the the surface because it was stuck.</p>
<p>Unfortunately I did not have a camera with me at the time, otherwise I would have taken a photo of it.  I haven&#8217;t noticed the effect at any other time.  There was about 5cm of water above the ice.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.quantumstate.co.uk/sunken-ice.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>The Shape of Falling Water</title>
		<link>http://blog.quantumstate.co.uk/the-shape-of-falling-water.html</link>
		<comments>http://blog.quantumstate.co.uk/the-shape-of-falling-water.html#comments</comments>
		<pubDate>Sat, 09 Feb 2008 16:57:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.quantumstate.co.uk/the-shape-of-falling-water.html</guid>
		<description><![CDATA[If you have ever looked at water being poured or coming out of a tap you will probably have noticed the shape.  The stream of water is wider at the top than the bottom.  If you look carefully then you see the shape is a curve.  The decrease is much more pronounced [...]]]></description>
			<content:encoded><![CDATA[<p>If you have ever looked at water being poured or coming out of a tap you will probably have noticed the shape.  The stream of water is wider at the top than the bottom.  If you look carefully then you see the shape is a curve.  The decrease is much more pronounced at the top than the bottom.</p>
<p>The reason for the shrinking width is fairly obvious.  The water is falling under gravity so like everything that falls, it accelerates.  This means that the water at the top is moving more slowly than the water at the bottom.  We also know that the amount of water flowing stays constant.  Virtually all of the water that leaves the tap reaches the sink below.</p>
<p>If the water is moving faster then for the same cross sectional area, more water will be flowing.  Therefore because the flow stays constant the cross sectional area must decrease so the hence the width decreases.</p>
<p>Now all that is left is to explain why the shape is a curve rather than a cone shape.  There are in fact two separate reasons for this.</p>
<p>Firstly the cross sectional area is inversely proportional to the velocity to maintain a constant flow.  What you see, when you look at the flowing water from the side, is the width of the flow.  This means that the velocity is inversely proportional to the square of the width.  This will cause a curve.</p>
<p>The second reason is because the velocity increase linearly with time not distance.  So the increase in velocity over 1 second will be the same at any point.  However further down the water is moving faster so over that second the water have moved further.  So over 1 cm the velocity will increase by a smaller amount at the bottom than the top.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.quantumstate.co.uk/the-shape-of-falling-water.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>In Praise of Advanced Options</title>
		<link>http://blog.quantumstate.co.uk/in-praise-of-advanced-options.html</link>
		<comments>http://blog.quantumstate.co.uk/in-praise-of-advanced-options.html#comments</comments>
		<pubDate>Mon, 04 Feb 2008 17:08:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://blog.quantumstate.co.uk/in-praise-of-advanced-options.html</guid>
		<description><![CDATA[One of the challenges in designing a program is to provide a user friendly interface for the user.  If the program is too complicated then it will not be used as much.  This has sometimes led to a reduction in how much the program can be customised and configured to the way the [...]]]></description>
			<content:encoded><![CDATA[<p>One of the challenges in designing a program is to provide a user friendly interface for the user.  If the program is too complicated then it will not be used as much.  This has sometimes led to a reduction in how much the program can be customised and configured to the way the user likes it.</p>
<p>The main problem is, of course, that there are different users, who will each have a different amount of experience and expertise.  Basic users will be confused by too many options yet more advanced users will want to be able to change many of the details to the way they want.</p>
<p>This is where I think the advanced options become useful.  This removes the complicated configuration possibilities away from the basic users who will probably never look at the advanced options.  Yet for the more advanced user there can be huge possibilities within the advanced configuration to do whatever they like.</p>
<p>I think this is probably the best way to deal with the conflict of keeping things simple and allowing for more advanced things.  Now the only problem is working out what is simple enough to keep in the basic options and what is advanced enough for the advanced options.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.quantumstate.co.uk/in-praise-of-advanced-options.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Glest 3 beta released</title>
		<link>http://blog.quantumstate.co.uk/glest-3-beta-released.html</link>
		<comments>http://blog.quantumstate.co.uk/glest-3-beta-released.html#comments</comments>
		<pubDate>Mon, 28 Jan 2008 19:05:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.quantumstate.co.uk/glest-3-beta-released.html</guid>
		<description><![CDATA[Glest is one of the most advanced open source rts games.  If you have not come across it before I would highly recommend downloading it and trying it out.  It is fully 3D.
&#8220;The core game allows the player to take control of two completely different factions: Tech, which is mainly composed of warriors [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.glest.org/">Glest</a> is one of the most advanced open source rts games.  If you have not come across it before I would highly recommend downloading it and trying it out.  It is fully 3D.</p>
<p>&#8220;The core game allows the player to take control of two completely different factions: Tech, which is mainly composed of warriors and mechanical devices, and Magic, that prefers mages and summoned creatures in the battlefield.&#8221;</p>
<p>The recently released 3.0 beta can be downloaded as either pre-compiled binaries for windows or as source code which you can compile for Linux.  The main new feature is the much needed multiplayer which should allow for far more enjoyable games against good human opponents.</p>
<p>There have also been a few other minor improvements such as balancing.  I am looking forward to trying this out, the download link is on <a href="http://www.glest.org">their site</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.quantumstate.co.uk/glest-3-beta-released.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>10 PHP Optimisation Techniques</title>
		<link>http://blog.quantumstate.co.uk/10-php-optimisation-techniques.html</link>
		<comments>http://blog.quantumstate.co.uk/10-php-optimisation-techniques.html#comments</comments>
		<pubDate>Sun, 20 Jan 2008 17:16:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.quantumstate.co.uk/10-php-optimisation-techniques.html</guid>
		<description><![CDATA[Many people write php code without knowing how to optimise it properly to make it run faster.  By applying some simple coding techniques your php script can run faster and save cpu workload.  Also if your script is large then pages will load faster if the script is optimised.
1. Arrays are slower than [...]]]></description>
			<content:encoded><![CDATA[<p>Many people write php code without knowing how to optimise it properly to make it run faster.  By applying some simple coding techniques your php script can run faster and save cpu workload.  Also if your script is large then pages will load faster if the script is optimised.</p>
<p>1. Arrays are slower than normal variables.  The speed difference is significant.  Obviously only applicable to when you use small arrays.  I calculated the array to take about twice as long.</p>
<p>2. Arrays are faster than objects.  This is again a significant speed difference.  Decide whether is is worth having objects in all cases.  Consider using an array instead.  The objects took about twice as long.</p>
<p>3. Functions outside of objects are slower than functions inside of objects.  The function within the object takes roughly 50% longer.</p>
<p>4. Local variable inside a function are fractionally faster than global variables.  Consider setting local variables to the value of the global variable if it is going to be used in a loop.  The global took roughly 15% longer.</p>
<p>5. Multiplication is slightly faster than division.  So it is better to multiply by 0.5 than divide by two.  Consider pre calculating a division outside of a loop by storing 1/value and then multiplying with the new value.  the division took about 10% longer.</p>
<p>6. Multiplication is a lot faster than the pow() function.  Use $x * $x rather than pow($x, 2).  the pow() function took roughly four times as long.</p>
<p>7. Receiving the return value from a function is slower than if you do not receive it.  When your script is complete then the error checking by looking at the return from a function may not be necessary.  Setting the variable took roughly 18% longer.</p>
<p>8. Using a loop is faster than using a recursive function.  See if it is possible to code with a loop.</p>
<p>9. echo() is faster than print().  This is due to generally unnecessary error checking in print().</p>
<p>10. Single quotes are faster than double quotes.  This is because with double quotes the text inside the quotes is checked for variables and other things.  There are times to use each one but I will not go into it in depth here.  Basically use single quotes when the text is completely static.</p>
<p>11. (Contributed by InSp3KtaH) You should not change the type of a variable.  It you set $foo = 1 then you should keep it as a number.  It takes time and memory to change the type.</p>
<p>You may have noticed that some of these techniques could come into conflict with keeping well written object orientated code.  In each case you have to consider the pros and cons.  There are no fixed rules so you will have to decide whether to sacrifice feed for code clarity.  If large loops are to be found in your code look at optimising these very carefully as that is where a lot of performance goes.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.quantumstate.co.uk/10-php-optimisation-techniques.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Javascript Physics Engine 3</title>
		<link>http://blog.quantumstate.co.uk/javascript-physics-engine-3.html</link>
		<comments>http://blog.quantumstate.co.uk/javascript-physics-engine-3.html#comments</comments>
		<pubDate>Sun, 13 Jan 2008 18:17:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.quantumstate.co.uk/javascript-physics-engine-3.html</guid>
		<description><![CDATA[Here is another update on the physics engine.  This time it is all about circles colliding with other circles.  Still perfectly elastic collisions.  The collision mechanism can now cope with an overlap so stuff doesn&#8217;t stick together.  
Also collisions with different mass objects have been implemented so now big circles are [...]]]></description>
			<content:encoded><![CDATA[<p>Here is another update on the physics engine.  This time it is all about circles colliding with other circles.  Still perfectly elastic collisions.  The collision mechanism can now cope with an overlap so stuff doesn&#8217;t stick together.  </p>
<p>Also collisions with different mass objects have been implemented so now big circles are heavier and the effects on the collisions are apparent.  This version is more interesting to watch since the balls bounce off at lots of different angles depending how they hit each other.</p>
<p>Rectangle collision has been removed because it was only a small experimental measure.  It will go under the polygon collision category since rectangles are polygons.  The object creation back end has been modified to add the polygon object.  Creating a rectangle now does in fact create a polygon in the background although you cannot see this.</p>
<p><a href="http://www.quantumstate.co.uk/physics/physics3/">http://www.quantumstate.co.uk/physics/physics3/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.quantumstate.co.uk/javascript-physics-engine-3.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Piracy and Open Source</title>
		<link>http://blog.quantumstate.co.uk/piracy-and-open-source.html</link>
		<comments>http://blog.quantumstate.co.uk/piracy-and-open-source.html#comments</comments>
		<pubDate>Sat, 15 Dec 2007 11:12:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://blog.quantumstate.co.uk/piracy-and-open-source.html</guid>
		<description><![CDATA[Piracy is becoming more widespread.  There are many different things which are pirated via computers however I will just look at software.  Open source software does also seem to be growing in popularity but more slowly than the growth of piracy.
Does piracy have a negative effect for open source software?  I think [...]]]></description>
			<content:encoded><![CDATA[<p>Piracy is becoming more widespread.  There are many different things which are pirated via computers however I will just look at software.  Open source software does also seem to be growing in popularity but more slowly than the growth of piracy.</p>
<p>Does piracy have a negative effect for open source software?  I think it probably does.  First we should look at what attracts people to open source software, what its benefits are.</p>
<p>First they will be attracted if the software is good.  Firefox is a good example of an open source program which became popular because it was well made and better than Internet Explorer.  People will recommend software to each other if they find it good.</p>
<p>The other major factor is that it is free.  Free in the sense that it costs no money.  Most users don&#8217;t know the difference between freeware and open source software.  There will be a few idealistic people but these are a small minority.</p>
<p>I will ignore the quality for now because that isn&#8217;t really affected by piracy, at least not in the short term.  In the long term lack of money could make a difference to quality but I will ignore this.</p>
<p>Piracy makes commercial software available for free.  There is a small risk of being caught which will deter some people who don&#8217;t want to break the law, but it is not a very serious risk.  So this removes one of the major advantages that open source software gives.  So I would imagine that piracy is having a negative effect on open source software&#8217;s acceptance.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.quantumstate.co.uk/piracy-and-open-source.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Christmas Lectures</title>
		<link>http://blog.quantumstate.co.uk/christmas-lectures.html</link>
		<comments>http://blog.quantumstate.co.uk/christmas-lectures.html#comments</comments>
		<pubDate>Wed, 05 Dec 2007 21:22:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.quantumstate.co.uk/christmas-lectures.html</guid>
		<description><![CDATA[Yesterday I went to see a couple of Christmas lectures with my school.  There was both a maths and a chemistry lecture.  Both lectures were pretty good and they definitely made me look forward to what university might be like.  Of course it is hard to tell because they covered some of [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I went to see a couple of Christmas lectures with my school.  There was both a maths and a chemistry lecture.  Both lectures were pretty good and they definitely made me look forward to what university might be like.  Of course it is hard to tell because they covered some of the more fun content.</p>
<p>The chemistry was in the morning and was done by a couple of chemists from Southampton University.  They did plenty of fun experiments.  They started off with cryogenics so they had the dry and and liquid nitrogen to freeze things with.  They lit a balloon full of oxygen and helium to show us a fast reaction which was pretty loud.  Also they showed us some things which glowed.  You really need to see things like this to appreciate them though, my description definitely doesn&#8217;t do them justice.</p>
<p>The Maths lecture was by David Acheson from Jesus College, Oxford.  His talk was really interesting, he showed us some interesting proofs and little mathematical tricks.  He has a <a href="http://home.jesus.ox.ac.uk/~dacheson/">website </a>which has some of the things that he showed us on it.  The programs that he has on there are quite fun to look at and fairly informative.  He also plays the guitar and so he played a bit to us, he says that otherwise he wouldn&#8217;t get to play it to anybody.</p>
<p>Just to finish off here are a couple of the puzzles that he gave us to do over the interval.  They are fairly common puzzles so you may have heard them before.</p>
<p>What is the value of sqrt(1+sqrt(1+sqrt(1+&#8230;))) with the square roots going on to infinity.  The answer is best left in surd form since then it si clear you haven&#8217;t just used a pocket calculator.</p>
<p>If a spider is in the corner of a 1&#215;1x1 cube and the spider wishes to reach the opposite corner how long is the shortest route.  The spider can walk anywhere on a surface but cannot fly.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.quantumstate.co.uk/christmas-lectures.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Javascript Physics Engine 2</title>
		<link>http://blog.quantumstate.co.uk/javascript-physics-engine-2.html</link>
		<comments>http://blog.quantumstate.co.uk/javascript-physics-engine-2.html#comments</comments>
		<pubDate>Sat, 01 Dec 2007 21:07:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.quantumstate.co.uk/javascript-physics-engine-2.html</guid>
		<description><![CDATA[I have now made an update to my physics engine.  I have put in some basic collision detection which is rectangles only so far so there will be no circles in sight this time.  The balls change colour when they collide, I put this in for debugging and I thought it looked pretty [...]]]></description>
			<content:encoded><![CDATA[<p>I have now made an update to my <a href="http://www.quantumstate.co.uk/physics/physics2/">physics engine</a>.  I have put in some basic collision detection which is rectangles only so far so there will be no circles in sight this time.  The balls change colour when they collide, I put this in for debugging and I thought it looked pretty so i haven&#8217;t bother to remove it from the display.js file.</p>
<p>Also there are different size square now (rectangles also work but I prefer squares).  Also they actually bounce off the right hand wall rather than bouncing off something just past the right hand wall.  In my example there is no check to see if the squares overlap at the start and the collision detection can&#8217;t handle the big overlap so if you get this refresh the page and hope you don&#8217;t get an overlap.</p>
<p>At the moment the collision detection is fairly crude because it just handles rectangle to rectangle.  I have planned out a few algorithms for circle-circle collision and more advance square-square collision which should work with rotated square.</p>
<p>If you come across any bugs please tell me.  I have found some bugs that have been quite rare when I was testing before (one happened when the squares collided so that the corners hit each other) so I may bot have picked some of them up.<br />
<a href="http://www.quantumstate.co.uk/physics/physics2/"><br />
http://www.quantumstate.co.uk/physics/physics2/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.quantumstate.co.uk/javascript-physics-engine-2.html/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
