<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>stephen&#039;s blog</title>
	<atom:link href="http://stephengentle.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://stephengentle.com/blog</link>
	<description>i like computers</description>
	<lastBuildDate>Thu, 10 Jun 2010 09:24:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Playing with NXP&#8217;s Cortex-M3 Microcontrollers</title>
		<link>http://stephengentle.com/blog/tech/playing-with-nxps-cortex-m3-microcontrollers/</link>
		<comments>http://stephengentle.com/blog/tech/playing-with-nxps-cortex-m3-microcontrollers/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 05:10:04 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://stephengentle.com/blog/?p=237</guid>
		<description><![CDATA[I just recently bought a new NXP LPC1764 microcontroller (MCU), which is based on the ARM Cortex M3 processor. Being used to little 8bit Atmel AVR micros that run around 8MHz, the idea of a controller that is full 32 bit and runs at 100MHz is pretty exciting. It also has a lot of cool [...]]]></description>
			<content:encoded><![CDATA[<p>I just recently bought a new NXP LPC1764 microcontroller (MCU), which is based on the ARM Cortex M3 processor. Being used to little 8bit Atmel AVR micros that run around 8MHz, the idea of a controller that is full 32 bit and runs at 100MHz is pretty exciting. It also has a lot of cool features, such as USB and Ethernet, which usually require extra 3rd party chips when you&#8217;re using AVRs. It&#8217;s surprisingly cost effective too when compared to the Atmel chips &#8211; the LPX17xx series are all between $12 and $18, only about twice the price of AVRs that are far less powerful.</p>
<p>I&#8217;m still trying to design a board for this controller. The first problem that I&#8217;ve encountered is that since this chip is quite new, there are no Altium libraries or footprints for it. The version of Altium I have does have the older Cortex-M0 chips in its library, and some of them use the same package as the 1764. I plan therefore to use the footprint from that (a 100 pin LQFP package) and create my own schematic for it. I&#8217;ll have to go through the datasheet and specify all the pins on the chip, which will take ages (since there are so many of them). It could be worse though &#8211; at least I don&#8217;t need to design the footprint.</p>
<p>The chip is a little unusual coming from a background of working with AVRs. The LPC requires 3.3V, as opposed to AVR chips that can be powered at 5V, so there&#8217;s a bit more work involved in power management. Since the chip runs at a lot faster clock rate that the AVRs, good board design becomes more critical. I&#8217;m thinking of making it as a four layer board, having a top and bottom layer as well as two planes (voltage and ground). This will reduce noise, with the benefit of making it a lot easier to route!</p>
<p>In-system programming of the chip should also be pretty easy, as apparently the LPC17xx series comes flashed with a bootloader that sets the USB port up as a mass storage device, so you can just drag and drop applications onto it. I still have to verify how this works. I will put a JTAG header on the board as well, as if I can&#8217;t get the USB ISP working, I can at least get an LCPXpresso board which can program the chip over JTAG.</p>
<p>I&#8217;m going to get the board manufactured with <a href="http://batchpcb.com/">BatchPCB</a>, and will post back with some more info if I can get it working. At this stage, I am just planning to have USB, a serial port or two, Ethernet and a lot of headers for IO on my first board. The LPC1764 doesn&#8217;t support external RAM, but hopefully I will be able to hook it up to some external flash memory (like a Compact Flash or SD card socket) to be able to load programs on even easier! The MCU doesn&#8217;t actually support these out of the box but there are lots of articles online about how to interface microcontrollers to those devices so it shouldn&#8217;t be too hard.</p>
<p>So far these ARM based microcontrollers look really awesome. I&#8217;ve been taking a look at Texas Instrument&#8217;s OMAP3 processors too &#8211; which are proper, discrete processors. Although they are more expensive and require a lot more supporting circuits and chips (such as external memory), they are far more powerful &#8211; running at speeds of around 600 to 800 MHz. I don&#8217;t know if I&#8217;d want to risk soldering a $60 processor onto a board I made though, so I&#8217;ll have to get some experience with the Cortex microcontrollers first! NXP have also announced the LPC177x microcontroller series too, which will feature a memory controller so I&#8217;ll hopefully be able to rig up something like 32 MB of RAM to it, which would give me far more headroom for dealing with graphics, multitasking, Ethernet transfers, and so on.</p>
]]></content:encoded>
			<wfw:commentRss>http://stephengentle.com/blog/tech/playing-with-nxps-cortex-m3-microcontrollers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New TVs and frame interpolation</title>
		<link>http://stephengentle.com/blog/tech/new-tvs-and-frame-interpolation/</link>
		<comments>http://stephengentle.com/blog/tech/new-tvs-and-frame-interpolation/#comments</comments>
		<pubDate>Wed, 05 May 2010 02:30:45 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Digital Cinema]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://stephengentle.com/blog/?p=234</guid>
		<description><![CDATA[It&#8217;s strange how quickly new TVs have adopted fancy new frame interpolation systems, with the promise of a beautiful, smooth image as opposed to the nasty, jittery 24p image that we never realised we didn&#8217;t like in the last century of cinema. Now that pretty much all new TVs have the same resolution (1080p), it [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s strange how quickly new TVs have adopted fancy new frame interpolation systems, with the promise of a beautiful, smooth image as opposed to the nasty, jittery 24p image that we never realised we didn&#8217;t like in the last century of cinema. Now that pretty much all new TVs have the same resolution (1080p), it seems that the manufacturers need another number that that can wow consumers with. Yes, suddenly we&#8217;re being made to feel that we need a 100Hz, 200Hz, or even 500Hz TV. And it must be good, since it has a big number, right?</p>
<p>The reality is that these frame interpolation features make the image look terrible, at least in my opinion. Now, instead of an almost unnoticeable jitter, we have horrible motion artefacts whenever a character moves more than a slow walk. The motion looks wrong, taking an almost sped up appearance. And the noise and grain found in different films or videos interferes with the interpolation, taking on a far more noticeable look. I think that really these features dramatically reduce the quality of the media, and are generally a bad idea.</p>
<p>But apart from the aesthetic reasons, I think a very good reason not to use these features is that it&#8217;s an insult to the craft of filmmaking. With new digital cinema cameras, it&#8217;s now possible to shoot 48 or 96 frames per second if the director wants to. But the vast majority of the time, they don&#8217;t. The thing is that the choice to shoot 24 frames per second is an artistic choice by the director and the director of photography. The film is meant to have that aesthetic, and not have extra frames in between generated in the TV. Imagine if somebody took a Monet and added sharpening to give it &#8220;150% better definition!&#8221;. I&#8217;m sure most would agree that doing so would just be ridiculous &#8211; it&#8217;s taking an artistic choice away from the artist, and really doesn&#8217;t offer any improvement.</p>
<p>Although some might prefer the motion of an interpolated image, I think most people use this simply because their TV had a bigger number than the other ones (600 Hz!). I don&#8217;t have a problem with giving people the option to destroy the image they&#8217;re watching, but having it on by default and advertising it as if it is a good thing is just wrong.</p>
]]></content:encoded>
			<wfw:commentRss>http://stephengentle.com/blog/tech/new-tvs-and-frame-interpolation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Internet Filtering Can&#8217;t Work</title>
		<link>http://stephengentle.com/blog/tech/why-internet-filtering-cant-work/</link>
		<comments>http://stephengentle.com/blog/tech/why-internet-filtering-cant-work/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 15:51:28 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://stephengentle.com/blog/?p=225</guid>
		<description><![CDATA[I&#8217;ve seen some renewed interest in the Australian Government&#8217;s terrible idea to try and filter the internet, and there&#8217;s even a protest planned for people to black out their websites and profile images soon like what was done in New Zealand to protest against the &#8216;guilt upon accusation&#8217; plan to block people&#8217;s internet if somebody [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve seen some renewed interest in the Australian Government&#8217;s terrible idea to try and filter the internet, and there&#8217;s even a protest planned for people to black out their websites and profile images soon like what was done in New Zealand to protest against the &#8216;guilt upon accusation&#8217; plan to block people&#8217;s internet if somebody just accused them of copyright infringement three times. The <a href="http://nocleanfeed.com/"><strong>No Clean Feed</strong></a> group have <a href="http://nocleanfeed.com/learn.html">some pretty good reasons</a> as to why an attempt to filter the internet would have absolutely no beneficial effects and be a general disaster. Here&#8217;s my take:</p>
<h3>There are too many protocols which can&#8217;t be filtered</h3>
<p>The government plans to filter exactly one (1) protocol on the internet, which is HTTP. Think about that for a second &#8211; it&#8217;s essentially like banning particular subjects from bookstores, and expecting that now the public can&#8217;t access them, which is utter rubbish. In this situation, people could still mail the information to each other. They could share the books around. They could put the information up on noticeboards and other public places. The internet is exactly the same. The <strong>vast majority</strong> of the content that the program aims to filter out is <strong>not using the protocol they are going to filter</strong>. There&#8217;s FTP, bittorrent, email services, and many other peer to peer protocols that not only won&#8217;t be filtered, but really can&#8217;t. This first point essentially renders the whole scheme useless, but wait, there&#8217;s more!</p>
<h3>There&#8217;s too much content to filter</h3>
<p>Just on the HTTP protocol, which the government is going to attempt to filter, there are literally billions of pages of information. How can anybody really expect that they could even attempt to find all the illegal or adult content on it? There is just too much information to filter, and even if it was possible to find every illegal site on it, hundreds of new sites will inevitably pop up within weeks to replace those blocked ones. This is just the way the internet is &#8211; it&#8217;s not provided from just a few sources like most other forms of media. Anyone can create content on it, good or bad, and new content appears so quickly that any effort to filter it is quickly rendered futile. It&#8217;s not like trying to find a needle in a haystack &#8211; it&#8217;s like trying to find one in a field of millions of haystacks that&#8217;s rapidly expanding!</p>
<h3>It&#8217;s too easy to bypass</h3>
<p>There&#8217;s one other massive problem that renders the internet filtering plan completely ineffective, and that is encryption. It&#8217;s fairly simple to open up an encrypted connection to a network in another country, which gives anybody the ability to completely bypass the whole filtering system &#8211; because they can&#8217;t see the information that is passing through it. Now, in an environment like a school, the ports that are required to do this can be simply blocked, but in the real world any action like that would cripple many Australian businesses by removing the channels they use to do business with other countries, and cost billions to the economy. </p>
<p>But at least these virtual private networks are too complex for a child to set up, right? Surely we are still protecting them with the scheme? Turns out that the answer is a resounding <strong>no</strong>, given that there are thousands of (completely legal) websites that make bypassing the filtering even easier. They use secure socket layer (SSL) encryption, which is used to secure bank websites and credit card payments, to anonymously and securely view websites without having them filtered at all. It&#8217;s as simple as going to a website and typing a web address in the box. Seriously, this is like locking the front door but leaving all the windows open &#8211; <strong>there&#8217;s simply no way the internet filtering can be effective</strong>. Again, they could try to block these sites, but given that they&#8217;re legal and have a vast range of legitimate uses, this wouldn&#8217;t be possible at all.</p>
<h3>There will be many sites incorrectly blocked</h3>
<p>A <a href="http://www.acma.gov.au/webwr/_assets/main/lib310554/isp-level_internet_content_filtering_trial-report.pdf">report summing up the results of a trial</a> undertaken by some ISPs showed that the internet filtering technology would incorrectly block 10,000 completely legal web sites out of every million sites blocked. Really, that error rate is unacceptable. Many of these incorrectly blocked sites may be reputable companies, for whom the internet is their only point of business. Is it fair that we eliminate all their Australian customers in the sake of a filtering scheme that is ineffective? And how will these people apply to get their sites unblocked? Given that the people creating the blocklist are going to be trying to search through billions of sites</p>
<h3>It will slow down the internet</h3>
<p>Let&#8217;s face it &#8211; here in Australia, our internet is already slow enough. Given that all the internet companies in the country have to use a telecommunications network (mis)managed by a single monopoly, we don&#8217;t have the luxury of fast, cheap internet that many other countries like Japan, Sweden and even South Korea have. So why is the government not only chasing after a plan that can&#8217;t possibly work, but one that also reduces the speed of our internet by up to 80 percent? This is exactly the kind of speed reduction that the report linked in the above predicts this filtering will cause.</p>
<h3>Where&#8217;s the accountability?</h3>
<p>Having a small, government controlled group deciding what information people should and shouldn&#8217;t be able to see is worrying, to say the least. Sure, the line right now is that they&#8217;re only going to block illegal material, but how can we know this is the case as time goes on? Perhaps now this is all about &#8220;protecting children and families&#8221;, but how do we know if eventually they start to increase the range of subjects being blocked? The &#8220;Great Firewall of China&#8221; has been widely criticised for essentially removing free speech on the internet by blocking thing like Google searches for &#8216;freedom&#8217;, information about subjects such as capitalism and blogs and websites that criticise their government. Given that our government refuses to release the blocklist proposed for this new filter in Australia, how can we be sure that they aren&#8217;t going to start doing the same thing and just pull the plug on websites they don&#8217;t agree with for us? At least with the review board that classifies films and so on, we know when something&#8217;s banned. With the new Internet filtering, the government can restrict access to any site they want, without the public having a clue. I&#8217;m sure that they&#8217;ll insist that it&#8217;s all in our best interest, and ask us to trust them, but with absolutely no accountability, I know I don&#8217;t.</p>
<h3>It&#8217;s a waste of money</h3>
<p>So the government wants to bring in a scheme that can&#8217;t possibly work. How much is this debacle going to cost? Turns out that they&#8217;ve budgeted more than $44 million dollars to this scheme. That kind of money could easily have gone into our hospital system, or creating jobs, or any other number of worthy causes. But instead they choose to burn it in this useless mess.</p>
<h3>The only people who support it have no idea about the how the internet works</h3>
<p>I think these points are pretty compelling as to why it&#8217;s a stupid idea to attempt the impossible task of filtering the internet. Really, the <strong>only people</strong> who want this filtering installed are the ones who have <strong>no idea</strong> how the internet works. Unfortunately it seems that these are exactly the same people who are making the legislation that we have to adhere to &#8211; which is about as effective as having somebody who&#8217;s never held a scalpel try to perform open heart surgery on you. It&#8217;s very important that everyone who understands the futility of the internet filtering plan to take action. The <a href="http://nocleanfeed.com/action.html">No Clean Feed group</a> have some petitions you can sign and other suggestions for ways to speak out against this terrible plan.</p>
<h3>In the end&#8230;</h3>
<p>The government says that the scheme is all about protecting children from inappropriate content on the internet, but it is so horribly broken that it will be completely and utterly ineffective. All it really does is bring Australia down to China&#8217;s level (who censor search terms like &#8216;freedom&#8217;) in the eyes of the rest of the world. It won&#8217;t make a difference at all to internet safety, except perhaps by slowing the internet down so much that nobody can stand to use it.</p>
]]></content:encoded>
			<wfw:commentRss>http://stephengentle.com/blog/tech/why-internet-filtering-cant-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>‘The Cloud’ is a stupid, redundant buzzword</title>
		<link>http://stephengentle.com/blog/tech/%e2%80%98the-cloud%e2%80%99-is-a-stupid-redundant-buzzword/</link>
		<comments>http://stephengentle.com/blog/tech/%e2%80%98the-cloud%e2%80%99-is-a-stupid-redundant-buzzword/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 06:03:01 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://stephengentle.com/blog/?p=222</guid>
		<description><![CDATA[I&#8217;m sure everyone has noticed that ‘the Cloud’ has suddenly become the flavour of the month, just like ‘Web 2.0’ did last year. But just like Web 2.0, the Cloud is a stupid, redundant buzzword that really means nothing. I mean, let&#8217;s just take a look at what Wikipedia says about Cloud computing &#8211; The [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sure everyone has noticed that ‘the Cloud’ has suddenly become the flavour of the month, just like ‘Web 2.0’ did last year. But just like Web 2.0, the Cloud is a stupid, redundant buzzword that really means nothing. I mean, let&#8217;s just take a look at what Wikipedia says about <a href="http://en.wikipedia.org/wiki/Cloud_computing">Cloud computing</a> &#8211; </p>
<blockquote><p>The term cloud is used as a metaphor for the Internet</p></blockquote>
<p>What&#8217;s that? You mean that &#8216;cloud storage&#8217; is really just internet storage? Yes it is &#8211; it&#8217;s exactly the same as what I&#8217;ve been doing for several year with some web-space and an FTP client. The Cloud is the kind of buzzword that marketing departments come up with to make things that we&#8217;ve had for years sound new and interesting again, and it really annoys me that it has crept into the vernacular of many computer users as well. I&#8217;m all for having backups on the internet, and using web applications (of course, most of the applications I use won&#8217;t be able to be run over the internet for a very long time, but that&#8217;s a different story). But calling these ‘cloud services’ or ‘cloud computing’ is just stupid. </p>
]]></content:encoded>
			<wfw:commentRss>http://stephengentle.com/blog/tech/%e2%80%98the-cloud%e2%80%99-is-a-stupid-redundant-buzzword/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SI prefixes for hard drive sizes</title>
		<link>http://stephengentle.com/blog/tech/si-prefixes-for-hard-drive-sizes/</link>
		<comments>http://stephengentle.com/blog/tech/si-prefixes-for-hard-drive-sizes/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 01:02:09 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://stephengentle.com/blog/?p=219</guid>
		<description><![CDATA[An interesting change in Mac OS X 10.6 is that Apple switched the representation of file and hard drive sizes to base-10 SI units instead of using binary prefixes. This means that a 60 GB hard drive which usually shows up as 55.8 GB will now appear within a few megabytes to the advertised 60 [...]]]></description>
			<content:encoded><![CDATA[<p>An interesting change in Mac OS X 10.6 is that Apple switched the representation of file and hard drive sizes to base-10 SI units instead of using binary prefixes. This means that a 60 GB hard drive which usually shows up as 55.8 GB will now appear within a few megabytes to the advertised 60 GB. I wasn&#8217;t really that happy with the idea at first, but when you think about it, it actually makes a lot of sense.</p>
<p><strong>Bits and bytes</strong><br />
Now, it seems logical that since a computer works in binary, file sizes need to be represented with binary prefixes too. But in reality, the number of bytes in a kilobyte is completely arbitrary &#8211; since the operating system and the applications that run on it only represent file sizes in bytes. We could decide that there were 2504.25 bytes in a kilobyte and the computer wouldn&#8217;t care at all. If we&#8217;re just shortening the sizes for our convenience, why make it so hard for ourselves? Doesn&#8217;t it make more sense that a 1500KB file is 1.5MB, and not 1.464MB?</p>
<p><strong>But what about file transfers?</strong><br />
I&#8217;ve heard people say that changing file sizes to SI units will make working file transfer speeds confusing, but the opposite is actually true &#8211; bitrates are actually already represented in SI units, so changing how files are represented on disk would make it easier to work out how long files would take to transfer.</p>
<p><strong>Ram and SSDs</strong><br />
Now, since hard drives are designed around SI units, it makes sense to use SI units to represent its capacity and file size in SI units. But what about solid state drives and RAM? Well, RAM should stay as binary sizing, but as for solid state drives, it doesn&#8217;t really matter. The only difference is that a SSD sold as 256 GB (which is actually 256 GiB using the correct prefix) would show up as being 274.9 GB instead. Does this really matter? We&#8217;ve put up with our hard drives showing up as being smaller for so many years (a 1TB drive appears to be 92.677GB smaller), so I don&#8217;t think it&#8217;d be too bad.</p>
<p>Really, all we need is standardisation. A good first step to this would be to show RAM, solid state drives and hard drive sizes using the correct prefixes (GB and MB for SI units and GiB and MiB for binary). Unfortunately &#8216;mebibyte&#8217; and &#8216;gibbibyte&#8217; sound pretty stupid compared to megabyte and gigabyte though&#8230; But that&#8217;s all the more reason to switch to SI units.</p>
]]></content:encoded>
			<wfw:commentRss>http://stephengentle.com/blog/tech/si-prefixes-for-hard-drive-sizes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C++0x is insanely awesome</title>
		<link>http://stephengentle.com/blog/tech/c0x-is-insanely-awesome/</link>
		<comments>http://stephengentle.com/blog/tech/c0x-is-insanely-awesome/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 23:43:18 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://stephengentle.com/blog/?p=212</guid>
		<description><![CDATA[I came across an FAQ that outlines some of the features coming in the new C++ standard, C++0x, which should be finalised sometime this or next year. It really has some awesome features that, in my opinion, brings some of my favourite features of managed languages like C# to the much faster and more efficient [...]]]></description>
			<content:encoded><![CDATA[<p>I came across <a href="http://www.research.att.com/~bs/C++0xFAQ.html">an FAQ</a> that outlines some of the features coming in the new C++ standard, C++0x, which should be finalised sometime this or next year. It really has some awesome features that, in my opinion, brings some of my favourite features of managed languages like C# to the much faster and more efficient C++. I&#8217;m already using some of the features in my applications, as a few are available as part of the Technical Report 1, in the <em>std::tr1</em> namespace. A lot of the best features (like the concurrency features) are still to come in most compilers though.</p>
<p>Here are some of the new features that stand out to me:</p>
<h3>Smart Pointers</h3>
<p>One of the biggest complaints about C and C++ is that you have to manage your own memory, which means that allocating memory and then forgetting to free it can cause problems like memory leaks. The current version of C++ does have a smart pointer, called <em>std::auto_ptr</em>, that can help with this, but it&#8217;s not really very good, because you can only have one reference to the pointer it manages. C++0x now features the <em>std::shared_ptr</em>, which is far better. </p>
<h3>Concurrency</h3>
<p>C++ by itself has been a completely single threaded language in the past, but in C++0x, we will be able to use threading, locks, and other concurrency features without having to rely on third party libraries, which are usually quite platform specific. </p>
<h3>Hash tables</h3>
<p>C++ already has the <em>std::map</em>, which can map an object to a key, such as a string, but this has a log(n) lookup time &#8211; that is, retrieving a result will get slower as you put more items in it. C++0x now features the <em>std::unordered_map</em>, and three other hash tables which have a faster, constant lookup time. The tradeoff is that adding items to a hash table can be slower, because it has to dynamically resize the table.</p>
<p>The u<em>nordered_map</em> should really be called something like hash_map, but there are some compilers and third party libraries that already use that name.</p>
<h3>Range For</h3>
<p>This is one of those things that is going to be a big timesaver in writing C++ code &#8211; whereas previously for iterating through a container like a map, you&#8217;d have to do something like this:<br />
<code>for(std::tr1::unordered_map<std ::string, Element::Ptr>::iterator it = m_Elements.begin();<br />
it != m_Elements.end(); ++it)<br />
{<br />
    // Draw the widget<br />
    it->second->Draw();<br />
}<br />
</std></code><br />
now you can use the range for statement, which lets you do this:<br />
<code>for(Element::Ptr x : m_Elements)<br />
{<br />
    x->Draw();<br />
}<br />
</code><br />
This is a lot like the foreach statement in C#, which is really nice.</p>
<h3>Tuples</h3>
<p>Tuples are like arrays that can hold different types, and they are really handy if you want to return more than one value from a function. Instead of constructing a class or struct to hold the data, which would take a lot of extra code, you can just construct a tuple for it. Tuples are extensively used in Python, and are extremely handy.</p>
<p>There are a lot of other great changes coming to the language, and <a href="http://www.research.att.com/~bs/C++0xFAQ.html">the FAQ</a> has a lot of good examples. The only problem now is waiting for the compilers to support the new standard&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://stephengentle.com/blog/tech/c0x-is-insanely-awesome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac OS X Snow Leopard</title>
		<link>http://stephengentle.com/blog/tech/mac-os-x-snow-leopard/</link>
		<comments>http://stephengentle.com/blog/tech/mac-os-x-snow-leopard/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 06:33:02 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://stephengentle.com/blog/?p=205</guid>
		<description><![CDATA[Ars Technica has an excellent review of the new Mac OS X version recently released &#8211; Snow Leopard. As they say, Snow Leopard is all about the internal changes to the operating system, and there&#8217;s some really exciting stuff going on under the hood that will be very useful in the future. Here&#8217;s my thoughts [...]]]></description>
			<content:encoded><![CDATA[<div class="imagebox"><img src="http://stephengentle.com/blog/wp-content/uploads/2009/09/snow-leopard-web-banner.jpg" alt="Snow Leopard" title="Snow Leopard" width="636" height="336" class="aligncenter size-full wp-image-208" /><br />
<a href="http://arstechnica.com/">Ars Technica</a> has an <a href="http://arstechnica.com/apple/reviews/2009/08/mac-os-x-10-6.ars">excellent review</a> of the new Mac OS X version recently released &#8211; Snow Leopard. As they say, Snow Leopard is all about the internal changes to the operating system, and there&#8217;s some really exciting stuff going on under the hood that will be very useful in the future. Here&#8217;s my thoughts on some of the things brought up in the article:</p>
<h3>Quicktime X</h3>
<p>Quicktime X in an interesting new feature. Quicktime is a rapidly aging framework that is way past its prime, and Quicktime X is here to completely replace it. Quicktime X is, I&#8217;m sure, going to be a very good, modern, 64 bit multimedia framework in the future, but for now it&#8217;s fairly underpowered. Why are Apple throwing it in already then? Well for a while now, Apple have provided an Objective-C interface to Quicktime for applications to start moving over to the new architecture. Quicktime X now works with this interface, but transparently uses Quicktime 7 to do a lot of its internal processing. This means that applications can work with full functionality through the transition to QT X, and there won&#8217;t suddenly be hundreds of applications that just stop working when Quicktime 7 is completely pulled (which will likely be Mac OS X 10.7). Therefore, it is a good move on Apple&#8217;s part to put Quicktime X in in my opinion.</p>
<h3>Clang</h3>
<p>To me, Clang is probably the most exciting thing about Snow Leopard. Although GCC is still the default compiler for C languages on the system, now Mac OS X ships with the Clang compiler (which is a front end to the LLVM virtual machine project) and is recommending that developers switch to it. This is very cool, because not only is Clang heaps faster than GCC, it is also a much more modern architecture, has far better error reporting, and makes  faster executables. The biggest downside though is that Clang&#8217;s C++ support is in its fairly early stages, but Apple (who have hired most of the developers of the LLVM and Clang projects) has said that they are aiming for full C++ compatibility for the compiler.</p>
<h3>OpenCL and Grand Central</h3>
<p>OpenCL and Grand Central are pretty exciting as well, and have the potential to really speed up the whole Mac OS X system. OpenCL allows developers to easily code applications that take advantage of the computer&#8217;s graphical processing unit, or GPU. This is one area where Apple&#8217;s investment in LLVM will really pay off &#8211; the OpenCL code will be compiled to bytecode, and LLVM will be used to generate code to run on the GPU if it is available, or on the regular CPU if not. Grand Central will make it far easier to program for multi threaded environments too, with a lot less overhead than regular POSIX threading. </p>
<p>All in all, Snow Leopard brings some massive changes under the hood that will allow developers to make much higher performance applications, and provides some better APIs to do so than we have seen in the past, with a few nice user-visible features thrown in to make the (extremely cheap) upgrade seem more worthwhile to those who don&#8217;t realise how much of a massive architectural advancement it is. I&#8217;m looking forward to giving it a spin.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://stephengentle.com/blog/tech/mac-os-x-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Elegance in Gnome</title>
		<link>http://stephengentle.com/blog/linux/elegance-in-gnome/</link>
		<comments>http://stephengentle.com/blog/linux/elegance-in-gnome/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 09:06:22 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://stephengentle.com/blog/?p=203</guid>
		<description><![CDATA[It&#8217;s a bit old now, but Hylke Bons posted a great wrap up on elegance in software user interface design, and some big problems that application designers in the Gnome community need to work on fixing. Things like multiple borders when only one is needed, redundant labelling, lack of whitespace and so on. Gnome does [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a bit old now, but <a href="http://www.bomahy.nl/hylke/blog/">Hylke Bons</a> posted a great wrap up on <a href="http://www.bomahy.nl/hylke/blog/on-gnome-and-elegance/">elegance in software user interface design</a>, and some big problems that application designers in the Gnome community need to work on fixing. Things like multiple borders when only one is needed, redundant labelling, lack of whitespace and so on. Gnome does look pretty good (especially when you change the fonts) but there are still a lot of things that could be improved.</p>
]]></content:encoded>
			<wfw:commentRss>http://stephengentle.com/blog/linux/elegance-in-gnome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gnome Global Menu</title>
		<link>http://stephengentle.com/blog/linux/gnome-global-menu/</link>
		<comments>http://stephengentle.com/blog/linux/gnome-global-menu/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 12:58:41 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://stephengentle.com/blog/?p=201</guid>
		<description><![CDATA[I recently blogged about integrating menus in an X11 window manager&#8217;s window borders, and I assumed that this would require quite a lot of changes to both GTK+ and the window manager, with an API to communicate between them, but it seems that it may be far simpler than that. I came across a project [...]]]></description>
			<content:encoded><![CDATA[<p>I recently blogged about i<a href="http://stephengentle.com/blog/linux/on-window-managers-and-menus/">ntegrating menus in an X11 window manager&#8217;s window borders</a>, and I assumed that this would require quite a lot of changes to both GTK+ and the window manager, with an API to communicate between them, but it seems that it may be far simpler than that. I came across a project called <a href="http://code.google.com/p/gnome2-globalmenu/">gnome-globalmenu</a> which takes window borders out of applications and places them in the panel, without any changes to the applications. Using a similar method, the window border could grab the menus, and then a transparent theme could used to blend in toolbars, tabs, scrollbars and so on like in <a href="http://stephengentle.com/blog/linux/extending-the-applicationwindow-manager-integration/">my other post on the topic</a>, if the theme so wanted.</p>
<p>The only problems is that it seems to work with GTK applications, so KDE and other toolkit applications, as well as applications like Firefox and Wine which draw their own menus wouldn&#8217;t be able to integrate. In this case, and for windows with no menus, a normal sized window border could just be used.</p>
]]></content:encoded>
			<wfw:commentRss>http://stephengentle.com/blog/linux/gnome-global-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Site</title>
		<link>http://stephengentle.com/blog/news/new-site/</link>
		<comments>http://stephengentle.com/blog/news/new-site/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 11:57:08 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://new.stephengentle.com/blog/?p=198</guid>
		<description><![CDATA[Over the last month or two I&#8217;ve been re-designing and recoding my website, and today I changed over to the new codebase and design. It&#8217;s a lot brighter than the old site, and has a far better photo gallery. There are still some parts missing from the site, like the production section and most of [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last month or two I&#8217;ve been re-designing and recoding my website, and today I changed over to the new codebase and design. It&#8217;s a lot brighter than the old site, and has a far better photo gallery. There are still some parts missing from the site, like the production section and most of the development part, but I think that generally it&#8217;s far better than the old one.</p>
<p>You can <a href="http://new.stephengentle.com/news/revision-5/">read about the changes in the news section</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://stephengentle.com/blog/news/new-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
