<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0"> <channel><title>Gareth Lennox</title> <link>http://garethlennox.com</link> <description /> <lastBuildDate>Sat, 12 May 2012 21:15:42 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/garethlennox" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="garethlennox" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><title>Embedded ICC profiles and Firefox</title><link>http://garethlennox.com/2012/05/12/embedded-icc-profiles-and-firefox/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=embedded-icc-profiles-and-firefox</link> <comments>http://garethlennox.com/2012/05/12/embedded-icc-profiles-and-firefox/#comments</comments> <pubDate>Sat, 12 May 2012 21:13:49 +0000</pubDate> <dc:creator>Gareth</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[firefox icc images jpeg colour]]></category> <guid isPermaLink="false">http://garethlennox.com/?p=344</guid> <description><![CDATA[I have a separate blog where I post photos I take, and I recently noticed a problem with how the actual JPEGs display in Firefox. It was almost like they were showing the image in a lower colour mode. All other browsers displayed the images fine. Here is an example using a recent photo off [...]]]></description> <content:encoded><![CDATA[<p>I have a <a
href="http://refracted.co.za/">separate blog</a> where I post photos I take, and I recently noticed a problem with how the actual JPEGs display in Firefox. It was almost like they were showing the image in a lower colour mode. All other browsers displayed the images fine.</p><p><span
id="more-344"></span></p><p>Here is an example using a recent photo off the blog. You can see the blurry background is cutoff in firefox.</p><p><a
href="http://garethlennox.com/wp-content/uploads/2012/05/example_firefox.jpg"  rel="lightbox[roadtrip]"><img
class="aligncenter size-full wp-image-347" title="example_firefox" src="http://garethlennox.com/wp-content/uploads/2012/05/example_firefox.jpg" alt="" width="615" height="340" /></a></p><p>The difference is that Firefox is one a couple of browsers in the market (Safari and possibly IE10 seem to be supporting it too) that applies embedded ICC colour profiles in images when displaying them.</p><p>I was saving my JPEGs with the ICC profile (sRGB) embedded in them and therefore Firefox was adjusting the colours to match the profile, messing things up.</p><p>I&#8217;m not 100% sure as to what is happening, but I can hazard a guess. The ICC profile is intended to remove the link between a device dependent colour space (e.g. the camera or your screen) and an independent colour space. I think the image is saved with the colours already converted to the target colour space, but with the profile embedded, Firefox applies the transformation again, thereby effectively applying the conversion twice. I couldn&#8217;t find much information about this on the web, so this is just a guess.</p><p>The information on the web is a bit thin&#8230; I did find <a
href="http://www.gballard.net/psd/go_live_page_profile/embeddedJPEGprofiles.html">this page</a>, but it doesn&#8217;t seem to explain the issue I&#8217;m having.</p><p>So, after all that, what is the fix? Just save the image without the profile in it, and everything displays as intended, across all browsers and image viewers that I tested on (you can also remove the profile of an existing image using tools like <a
href="http://www.sno.phy.queensu.ca/~phil/exiftool/">exiftool</a>).</p> ]]></content:encoded> <wfw:commentRss>http://garethlennox.com/2012/05/12/embedded-icc-profiles-and-firefox/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>XTS-AES implementation: SectorStream</title><link>http://garethlennox.com/2012/03/22/xts-aes-implementation-sectorstream/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=xts-aes-implementation-sectorstream</link> <comments>http://garethlennox.com/2012/03/22/xts-aes-implementation-sectorstream/#comments</comments> <pubDate>Thu, 22 Mar 2012 08:00:33 +0000</pubDate> <dc:creator>Gareth</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[.net]]></category> <category><![CDATA[c#]]></category> <category><![CDATA[encryption]]></category> <category><![CDATA[open-source]]></category> <guid isPermaLink="false">http://garethlennox.com/?p=329</guid> <description><![CDATA[As a by-product of the XtsSharp project, I implemented a SectorStream, which is a stream that reads and writes whole sectors (the size of which is configurable) to enable the XTS algorithm to operate on standard .NET streams. I also implemented another stream based class that provides random access to an underlying SectorStream. This simulates random access [...]]]></description> <content:encoded><![CDATA[<p>As a by-product of the <a
href="https://bitbucket.org/garethl/xtssharp">XtsSharp project</a>, I implemented a <a
href="https://bitbucket.org/garethl/xtssharp/src/0e6a81a823e9/src/XTSSharp/SectorStream.cs">SectorStream</a>, which is a stream that reads and writes whole sectors (the size of which is configurable) to enable the XTS algorithm to operate on standard .NET streams.</p><p>I also implemented another stream based class that provides random access to an underlying SectorStream. This simulates random access by reading and writing entire sectors at once. This stream is called (yep, you guessed it) <a
href="https://bitbucket.org/garethl/xtssharp/src/0e6a81a823e9/src/XTSSharp/RandomAccessSectorStream.cs">RandomAccessSectorStream</a>.</p><p>The result is that you can use the random access stream to wrap a SectorStream and read and write to it as if it was just a normal .NET stream. It supports seeking to arbitrary points and reading / writing. The class handles the sector by sector reading and writing, which when using an XTSSectorStream, encrypts (when writing) and decrypts (when reading).</p><p>I&#8217;m not sure if this is usable outside of the XTS project, but it is completely separate code-wise, so maybe someone will find a use for it.</p> ]]></content:encoded> <wfw:commentRss>http://garethlennox.com/2012/03/22/xts-aes-implementation-sectorstream/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>XTS-AES implementation in .NET</title><link>http://garethlennox.com/2012/03/19/xts-aes-implementation-in-net/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=xts-aes-implementation-in-net</link> <comments>http://garethlennox.com/2012/03/19/xts-aes-implementation-in-net/#comments</comments> <pubDate>Mon, 19 Mar 2012 20:01:43 +0000</pubDate> <dc:creator>Gareth</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[.net]]></category> <category><![CDATA[c#]]></category> <category><![CDATA[encryption]]></category> <category><![CDATA[open-source]]></category> <guid isPermaLink="false">http://garethlennox.com/?p=314</guid> <description><![CDATA[I&#8217;ve been meaning to write about this for some time, but laziness, procrastination and work have managed to get in the way. DISCLAIMER: I am not a cryptographer, cryptography is something that interests me and the library is a proof of concept; you use it at your own risk. I recently (i.e. a year ago!) [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;ve been meaning to write about this for some time, but laziness, procrastination and work have managed to get in the way.</p><p>DISCLAIMER: I am not a cryptographer, cryptography is something that interests me and the library is a proof of concept; you use it at your own risk.</p><p>I recently (i.e. a year ago!) wrote an implementation of the <a
href="https://bitbucket.org/garethl/xtssharp">XTS algorithm in .NET (C#)</a>. I had asked <a
href="http://stackoverflow.com/questions/1558854/xts-aes-mode-in-c-sharp">a question on stackoverflow</a>, but didn&#8217;t get much of a response. The only other implementations I found were in C or C++.</p><p><span
id="more-314"></span></p><p>I eventually implemented it myself by looking at the <a
href="http://libtom.org/?page=features&amp;newsitems=5&amp;whatfile=crypt">LibTomCrypt</a> library as well as the actual <a
href="http://grouper.ieee.org/groups/1619/email/pdf00086.pdf">IEEE standard document</a>. The implementation supports AES-128 and AES-256 and is licensed under the BSD license, so do with it what you will!.</p><p>XTS&#8217;s main purpose is to enable encryption on block level devices (e.g. hard drives) while allowing random read / write access to the data. The key here is that each block can be encrypted / decrypted without touching the other blocks. Standard modes (like <a
href="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Cipher-block_chaining_.28CBC.29">CBC</a>) chain the blocks together, so to decrypt block 1000, you have to decrypt the previous 999. Encrypting each block separately using a mode like ECB is not secure as two blocks with the same content will encrypt to the same cypher text.</p><p>XTS gets around this problem by chaining two encryption steps together with a tweak step in the middle. The key input that is quite different from other cipher block modes in that XTS uses the sector number as part of the tweak step. This works quite well, as it is easy to calculate the sector number. Most available disk encryption software uses XTS mode.</p><p>The library uses the built in .NET AES implementation internally, and coordinates the two AES encryption transforms along with the actual tweak.</p><p>You can see my implementation in <a
href="https://bitbucket.org/garethl/xtssharp/src/7d45bc6b975c/src/XTSSharp/XtsCryptoTransform.cs">my bitbucket repository</a>, and the LibTomCrypt one in <a
href="https://github.com/libtom/libtomcrypt/blob/master/src/modes/xts/xts_encrypt.c">their github repository</a>. The entire algorithm is basically implemented in the single XtsCryptoTransform class. It is actually simpler than the LibTom one due to the nature of the .NET ICryptoTransform interface being the same for encryption / decryption. It can also be extended quite easily to use other encryption algorithms, as it depends on the ICryptoTransform interface only.</p><p>The library has unit tests that test it against the test vectors in Annex B in the <a
href="http://grouper.ieee.org/groups/1619/email/pdf00086.pdf">IEEE standards document</a> (which it obviously matches!)</p> ]]></content:encoded> <wfw:commentRss>http://garethlennox.com/2012/03/19/xts-aes-implementation-in-net/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>A new home for my blog</title><link>http://garethlennox.com/2012/03/10/a-new-home-for-my-blog/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=a-new-home-for-my-blog</link> <comments>http://garethlennox.com/2012/03/10/a-new-home-for-my-blog/#comments</comments> <pubDate>Sat, 10 Mar 2012 11:42:52 +0000</pubDate> <dc:creator>Gareth</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[blog]]></category> <guid isPermaLink="false">http://garethlennox.com/?p=310</guid> <description><![CDATA[This site has now moved to it&#8217;s own domain (garethlennox.com), rather than sitting in a subdirectory under another domain. I managed to move it in the space of a couple of hours, without too many hassles. The main problem was that wordpress doesn&#8217;t like to have it&#8217;s main url changed from underneath it, so I [...]]]></description> <content:encoded><![CDATA[<p>This site has now moved to it&#8217;s own domain (<a
href="http://garethlennox.com/">garethlennox.com</a>), rather than sitting in a subdirectory under another domain.</p><p>I managed to move it in the space of a couple of hours, without too many hassles. The main problem was that wordpress doesn&#8217;t like to have it&#8217;s main url changed from underneath it, so I had to get into the database and tweak some values. There is a good guide in the <a
href="http://codex.wordpress.org/Moving_WordPress">wordpress codex</a> on how to do this.</p><p>Otherwise, marring some obscure file permission problems, it was very straight forward.</p><p>One other benefit of having my own domain is that I get to set the favicon for it, which is a smaller version of my logo. I used <a
href="http://www.favicon.cc/">this handy tool</a> to convert the favicon into a .ico format.</p> ]]></content:encoded> <wfw:commentRss>http://garethlennox.com/2012/03/10/a-new-home-for-my-blog/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>New design!</title><link>http://garethlennox.com/2011/12/20/new-design/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=new-design</link> <comments>http://garethlennox.com/2011/12/20/new-design/#comments</comments> <pubDate>Tue, 20 Dec 2011 19:35:45 +0000</pubDate> <dc:creator>Gareth</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[design]]></category> <category><![CDATA[html5]]></category> <category><![CDATA[site]]></category> <category><![CDATA[wordpress]]></category> <guid isPermaLink="false">http://blogs.dwakn.com/g/?p=252</guid> <description><![CDATA[Finally, I&#8217;ve updated the design of this site, to brand-new spanking HTML5, including a fluent layout, that adjusts for larger and smaller screens (it looks great on a phone too!). I created the previous design in 2005, so it was time for a refresh. The site should work in any modern browser, as well as [...]]]></description> <content:encoded><![CDATA[<p>Finally, I&#8217;ve updated the design of this site, to brand-new spanking HTML5, including a fluent layout, that adjusts for larger and smaller screens (it looks great on a phone too!). I created the previous design in 2005, so it was time for a refresh.</p><p><span
id="more-252"></span></p><p>The site should work in any modern browser, as well as reasonably modern phone browsers. It even looks kinda ok in IE6!</p><p>I am still running <a
href="http://wordpress.org/">WordPress</a>, with a large bunch of plugins. The new design is based off the <a
href="http://starkerstheme.com/">Starkers theme </a>- an extremely minimalistic theme (to see how minimialistic, <a
href="http://starkerstheme.com/demo/">see the demo</a>). It is awesome in that it gives you the HTML framework without any CSS. The end-result? Much less CSS than if you&#8217;d started with an existing theme.</p><p>The design is intended to be minimal as well, with a focus on the content. I&#8217;ve stripped out all the twitter and delicious feeds. If you want those, links to them are at the bottom of the page.</p><p>Notable plugins that make this site run:</p><ul><li><a
href="http://ocaoimh.ie/wp-super-cache/">WP Super Cache</a>: The standard WordPress caching plugin. I&#8217;ve been using this for years, and it works really well.</li><li><a
href="http://omninoggin.com/wordpress-plugins/wp-minify-wordpress-plugin/">WP Minify</a>: Combines and minifies all the CSS and javascript files into single requests. This one is new, so we&#8217;ll see how it goes. Seems to work nicely.</li><li><a
href="http://akismet.com/">Akismet</a>: For comment spam. Also brilliant.</li></ul><div>It always seems that re-designing this site is way more fun than actually posting on it, which is rather worrying. As usual, I&#8217;m going to try to find time to post here more often&#8230;</div> ]]></content:encoded> <wfw:commentRss>http://garethlennox.com/2011/12/20/new-design/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Picasa: Moving albums to another computer</title><link>http://garethlennox.com/2011/10/04/picasa-moving-albums-to-another-computer/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=picasa-moving-albums-to-another-computer</link> <comments>http://garethlennox.com/2011/10/04/picasa-moving-albums-to-another-computer/#comments</comments> <pubDate>Tue, 04 Oct 2011 18:37:00 +0000</pubDate> <dc:creator>Gareth</dc:creator> <category><![CDATA[photography]]></category> <category><![CDATA[picasa]]></category> <guid isPermaLink="false">http://blogs.dwakn.com/g/?p=241</guid> <description><![CDATA[Just spend hours working out how to do this. If you&#8217;re moving pictures to another PC or your Picasa db gets broken, you may lose all your albums. The album information is stored alongside the Picasa database, in xml files with a .pal extension, which is irritating &#8211; you have to back up that folder [...]]]></description> <content:encoded><![CDATA[<p>Just spend hours working out how to do this. If you&#8217;re moving pictures to another PC or your Picasa db gets broken, you may lose all your albums. The album information is stored alongside the Picasa database, in xml files with a .pal extension, which is irritating &#8211; you have to back up that folder too.<span
id="more-241"></span></p><p>It is very simple to get your albums back, just do what this thread says, and all works fine: <a
href="http://www.google.com/support/forum/p/Picasa/thread?tid=4267d3f621027f95&amp;hl=en">http://www.google.com/support/forum/p/Picasa/thread?tid=4267d3f621027f95&amp;hl=en</a>. All you have to do is copy your .pal files into any folder that Picasa is watching, and it will pick them right up.</p><p>This guide worked for me (copied here in case the thread disappears):</p><blockquote><p>Transfer album definitions from Computer A to Computer B. There are the same photos, but placed in different location on the destination computer.</p><ol><li>Edit the Albums in Picasa on Computer A</li><li>Exit the Picasa on Computer A. The PAL files are created in Picasa2Albums by this.</li><li>Copy files to temporary folder and edit the paths to the photos in all the PAL files to conform the photos location on the Computer B.</li><li>Start and exit Picasa on Computer B to refresh the Album status in the Picasa internal database</li><li>Start Picasa.</li><li>All referenced photos from edited PALs have to be visible for Picasa otherwise the Albums are not crated or empty. In order that, make the photos visible for Picasa in Tools -&gt; Folder Manager &#8230;</li><li>Put the PAL files to any monitored folder. If it is &#8220;Scan Once&#8221; folder, you have to trigger licking by opening Folder Manager again &#8211; just enter, end exit by OK button.</li><li>The new Albums are imported to Picasa on Computer B having all photos inside. Source PAL files are deleted.</li></ol></blockquote><p>All the other crap you&#8217;ll find around the net about changing the dbid to null and stuff doesn&#8217;t work in the latest version of Picasa.</p><p>Hopefully the next time this happens to me, I&#8217;ll find my own blog post!</p> ]]></content:encoded> <wfw:commentRss>http://garethlennox.com/2011/10/04/picasa-moving-albums-to-another-computer/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>8 requirements that good backup software needs to fulfil</title><link>http://garethlennox.com/2010/05/20/8-requirements-that-good-backup-software-needs-to-fulfil/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=8-requirements-that-good-backup-software-needs-to-fulfil</link> <comments>http://garethlennox.com/2010/05/20/8-requirements-that-good-backup-software-needs-to-fulfil/#comments</comments> <pubDate>Thu, 20 May 2010 19:26:36 +0000</pubDate> <dc:creator>Gareth</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[backup]]></category> <category><![CDATA[software]]></category> <guid isPermaLink="false">http://blogs.dwakn.com/g/?p=233</guid> <description><![CDATA[I’ve been thinking about backup solutions, and have been trying to find one that fits what I need. I have yet to find one, and this post is the first step in outlining what I need (and hopefully what other people need), with the end goal of building the perfect backup solution. (disclaimer: these are [...]]]></description> <content:encoded><![CDATA[<p>I’ve been thinking about backup solutions, and have been trying to find one that fits what I need. I have yet to find one, and this post is the first step in outlining what I need (and hopefully what other people need), with the end goal of building the perfect backup solution.</p><p><span
id="more-233"></span></p><p>(disclaimer: these are 8 requirements for me, yours may differ!)</p><p>Something to remember: <strong>When</strong> your hard drive dies, do you have your data safely stored somewhere else? A good test would be if all the hard drives in your pc all stopped working right now, would you lose any critical or valuable data? Do you have backups? Can you restore your backups? What about if your whole house burned down?</p><p>I’ve found that available backup software out there is either to complicated, doesn’t do what I want, or too expensive. I’ve listed out what I feel are <strong>my</strong> requirements for backup software (which means that they’re probably not your requirements!). Note that since my primary machine is running Windows, I’m looking at requirements that Windows supports.</p><p>I don’t need a full disk backup, rather on a file-by-file basis. <strong>When</strong> my drive crashes, I’d probably want to use the opportunity to re-install my operating system anyway.</p><h3>1. Simple and easy to use</h3><p>Obviously all software should be easy to use, but why are a lot of backup solutions so complex? Ask me what to backup, where to store the backup and how often to run. Otherwise, leave me alone (obviously if there is a problem, let me know!).</p><h3>2. Simple backup format</h3><p>I should be able to open windows explorer, and view the files in a backup set without having to run any special software. This also helps with the first requirement – if your files are stored as files on the drive, anything <em>should</em> be able to read them. When you lose your main drive, it makes it easier if you can plug in your backup drive, and just copy files off it.</p><h3>3. Actually backup (and restore!) your files</h3><p>This seems obvious, but I’ve seen backup solutions that will silently backup all your files, but then barf when asked to restore them (looking at you, Windows Backup). The only way to be sure is to try restore your data at regular intervals, no matter which system you use. If the storage format is simple, as above, this is less of an issue, but you should still test it on a regular basis!</p><h3>4. Stay out of my way</h3><p>You should not have to remember to run a backup. Backup software should run automatically, and quietly in the background. Once you’ve scheduled it, it should do the rest. Disconnecting an external drive half way through a backup should not cause any problems when you plug the drive in again – it should carry on, ideally where it left off.</p><h3>5. Handle multiple destinations</h3><p>I would like to backup to external hard drives, USB flash drives and network computers. The software should automatically handle things like drive letter changes for external USB drives.</p><p>I want to define a set of files to backup, then point the software at multiple places. When plugging in a USB drive, the software should automatically kick off a backup if one is scheduled. When connecting to a network, if the destination machine is available, start the backup.</p><h3>6. Keep history</h3><p>Being able to go back a couple of months and retrieve a file from then is very handy. The software should do intelligent diffing as well as cleanup of old backup sets. If I’ve changed one 1MB file within of a couple of hundred gigabytes of files, I don’t expect the next backup to take much more than 1MB of extra space.</p><h3>7. Offline</h3><p>I have too much data to realistically store online. Living in South Africa exacerbates it because we have such constrained bandwidth availability (e.g. ADSL with 3GB limit). An online backup solution, while nice, is not really an option for most South Africans. If you have a couple of megabytes of word docs, then by all means install something like <a
href="http://www.dropbox.com/">Dropbox</a> or <a
href="http://www.sugarsync.com/">SugarSync</a> and be done.</p><h3>8. Quick</h3><p>Obviously there is a limit to how quick backup software can be – it still needs to enumerate over all files you’re choosing to backup, but a backup of a couple of hundred changed files (from a typical day of work) should take under 5 minutes to complete.</p><h3>Other nice-to-have features</h3><p>While these would be nice, they are not critical for me at the moment.</p><p><strong>Encryption:</strong> Encrypting your files would be nice, but this would break the “Simple format” requirement above. Maybe have an external usb drive encrypted using <a
href="http://www.truecrypt.org/">TrueCrypt</a>?</p><p><strong>Handle locked files:</strong> Files that are in use should also be backed up. This would involve using Volume Shadow Copy.</p><p>Primarily, a backup solution needs to be simple, just work and stay out of my way. Anything I’ve left out?</p> ]]></content:encoded> <wfw:commentRss>http://garethlennox.com/2010/05/20/8-requirements-that-good-backup-software-needs-to-fulfil/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Wallpaper goodness</title><link>http://garethlennox.com/2010/02/15/wallpaper-goodness/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=wallpaper-goodness</link> <comments>http://garethlennox.com/2010/02/15/wallpaper-goodness/#comments</comments> <pubDate>Mon, 15 Feb 2010 08:00:44 +0000</pubDate> <dc:creator>Gareth</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[photography]]></category> <category><![CDATA[refracted]]></category> <guid isPermaLink="false">http://blogs.dwakn.com/g/?p=220</guid> <description><![CDATA[I&#8217;ve uploaded some hi-res wallpapers on my photoblog site, from photos I&#8217;ve taken. Have a look, I think they&#8217;re quite good!]]></description> <content:encoded><![CDATA[<p><a
href="http://refracted.co.za/wallpapers/"><img
class="alignright size-thumbnail wp-image-222" title="Wallpaper: Cascade" src="/wp-content/uploads/2010/02/cascade_300x200-150x100.jpg"  alt="" width="150" height="100" / rel="lightbox[roadtrip]"></a>I&#8217;ve uploaded some <a
href="http://refracted.co.za/wallpapers/">hi-res wallpapers</a> on <a
href="http://refracted.co.za/">my photoblog site</a>, from photos I&#8217;ve taken. Have a look, I think they&#8217;re quite good!</p> ]]></content:encoded> <wfw:commentRss>http://garethlennox.com/2010/02/15/wallpaper-goodness/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>On Mono</title><link>http://garethlennox.com/2009/09/07/on-mono/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=on-mono</link> <comments>http://garethlennox.com/2009/09/07/on-mono/#comments</comments> <pubDate>Mon, 07 Sep 2009 06:47:50 +0000</pubDate> <dc:creator>Gareth</dc:creator> <category><![CDATA[c#]]></category> <category><![CDATA[programming]]></category> <category><![CDATA[.net]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[mono]]></category> <guid isPermaLink="false">http://blogs.dwakn.com/g/?p=214</guid> <description><![CDATA[So, I’ve been playing around with Mono on a virtual machine for a while now, and want to just put down some thoughts. Note that this won’t be an in-depth review of Mono, but just my initial experiences coming from a MS .net background. (for those of you that don’t know, Mono is an open-source [...]]]></description> <content:encoded><![CDATA[<p>So, I’ve been playing around with <a
href="http://www.mono-project.com/">Mono</a> on a virtual machine for a while now, and want to just put down some thoughts. Note that this won’t be an in-depth review of Mono, but just my initial experiences coming from a MS .net background.<span
id="more-214"></span></p><p>(for those of you that don’t know, Mono is an open-source implementation of the .net CLR. <a
href="http://www.mono-project.com/What_is_Mono">Go here for more details</a>. It is actually quite a bit more than that, but coming from using .net, that is the part the interests me – at least at the moment.)</p><p>Firstly, one of the interesting things about Mono, is that you can take an assembly compiled using Microsoft&#8217;s tools, and run it under Mono, <em>without any changes</em>. Obviously, if you’re talking to the windows registry or using MS specific p-invoke calls, it wont work, but if your code is 100% managed, the chance that it will just work is pretty high.</p><h3>Tooling</h3><p>In terms of actually developing directly on Linux and using the Mono tools (rather than the Microsoft ones), there is an IDE called <a
href="http://monodevelop.com/">MonoDevelop</a> that comes very close to the functionality of Visual Studio – in places its better (it can even open and save Visual Studio solutions and projects).</p><p>All the other usual command line tools are there, most importantly, there is a MSBuild clone called x-build, which lets you use your existing build scripts.</p><p>And something that is important for me, <a
href="http://nunit.org/">NUnit</a> runs fine on mono.</p><p>For porting existing projects to Mono, there is a tool, called <a
href="http://mono-project.com/MoMA">MoMA</a>, which scans your source code, flagging any areas it identifies as being a potential problem.</p><h3>Benefits</h3><p>The most obvious one is that of licensing. Since Mono is open-source, and runs on an open-source operating system, there are zero licensing costs. This is attractive if you’re wanting to have multiple servers running your application. Windows licenses for 20 servers is a non-trivial cost.</p><p>Mono is also cross-platform. It runs in environments and on devices where you won’t find the Microsoft .net framework. Taken from the mono site:</p><blockquote><p>Mono is built to be cross platform. Mono runs on <a
href="http://www.mono-project.com/Mono:Linux">Linux</a>, <a
href="http://www.mono-project.com/Mono:Windows">Microsoft Windows</a>, <a
href="http://www.mono-project.com/Mono:OSX">Mac OS X</a>, <a
href="http://www.mono-project.com/Mono:BSD">BSD</a>, and <a
href="http://www.mono-project.com/Mono:Solaris">Sun Solaris</a>, <a
href="http://www.mono-project.com/Mono:Wii">Nintendo Wii</a>, <a
href="http://www.mono-project.com/Mono:PlayStation3">Sony PlayStation 3</a>, <a
href="http://www.mono-project.com/Mono:Iphone">Apple iPhone</a>. It also runs on <a
href="http://www.mono-project.com/Mono:X86">x86</a>, <a
href="http://www.mono-project.com/Mono:AMD64">x86-64</a>, <a
href="http://www.mono-project.com/Mono:IA64">IA64</a>, <a
href="http://www.mono-project.com/Mono:PowerPC">PowerPC</a>, <a
href="http://www.mono-project.com/Mono:SPARC">SPARC (32)</a>, <a
href="http://www.mono-project.com/Mono:ARM">ARM</a>, <a
href="http://www.mono-project.com/index.php?title=Mono:Alpha&amp;action=edit">Alpha</a>, <a
href="http://www.mono-project.com/Mono:S390">s390, s390x (32 and 64 bits)</a> and more. Developing your application with Mono allows you to run on nearly any computer in existence.</p></blockquote><h3>Distribution</h3><p>I’m not sure about older versions, but the latest version of <a
href="http://www.ubuntu.com/">Ubuntu</a> has Mono installed already. A couple of the pre-installed applications are written in C#.</p><p>To be honest, I’ve only used Mono under Ubuntu, so cannot comment on its availability in other distributions, but the Mono website <a
href="http://www.go-mono.com/mono-downloads/download.html">recommends</a> <a
href="http://www.opensuse.org/">openSUSE</a>.</p><h3>Conclusion</h3><p>So, in conclusion, I’m very impressed, well done guys. I’ve not yet had time to take one of our larger projects and get it running on Mono, but that&#8217;s the next step.</p><p>This is more a note to myself, but below is a list of things I want to investigate further around Mono:</p><ul><li>Ease of porting a largish existing application to Mono</li><li>Do common frameworks run on Mono? (things like <a
href="http://www.asp.net/mvc/">ASP.NET MVC,</a> <a
href="http://nhforge.org/">NHibernate</a>, <a
href="http://www.castleproject.org/container/index.html">Castle Windsor</a> etc)</li><li>Windows Forms support (this was spotty when I looked at it a couple of years ago – its meant to be better)</li><li>Performance vs the Microsoft stack</li></ul> ]]></content:encoded> <wfw:commentRss>http://garethlennox.com/2009/09/07/on-mono/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>MSI version matching upgrade woes</title><link>http://garethlennox.com/2009/07/08/msi-version-matching-upgrade-woes/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=msi-version-matching-upgrade-woes</link> <comments>http://garethlennox.com/2009/07/08/msi-version-matching-upgrade-woes/#comments</comments> <pubDate>Wed, 08 Jul 2009 12:49:15 +0000</pubDate> <dc:creator>Gareth</dc:creator> <category><![CDATA[c#]]></category> <category><![CDATA[programming]]></category> <category><![CDATA[.net]]></category> <guid isPermaLink="false">http://blogs.dwakn.com/g/?p=200</guid> <description><![CDATA[We&#8217;re distributing our .net application using Microsoft&#8217;s MSI installer technology (using the very powerful WiX to do it). We&#8217;ve recently seen a problem with the installer not upgrading older versions, but rather just installing on top of the existing version, which results in the application being listed twice in the &#8220;Add/remove programs&#8221; (Programs and Features [...]]]></description> <content:encoded><![CDATA[<p>We&#8217;re distributing our .net application using Microsoft&#8217;s MSI installer technology (using the very powerful <a
href="http://wix.sourceforge.net/">WiX</a> to do it).</p><p>We&#8217;ve recently seen a problem with the installer not upgrading older versions, but rather just installing on top of the existing version, which results in the application being listed twice in the &#8220;Add/remove programs&#8221; (Programs and Features in Vista) section, one for each version. This results in weird things happening, like uninstalling one of them leaves the other one still installed with all the application files removed.</p><p>I ensured that we kept the same upgrade guid, with the version number incrementing, but all looked good. After searching and trying different things, I finally found <a
href="http://msdn.microsoft.com/en-us/library/aa372379%28VS.85%29.aspx">this gem</a>, hidden away in the MS documentation:</p><blockquote><p>Note that Windows Installer uses only the first three fields of the product version. If you include a fourth field in your product version, the installer ignores the fourth field.</p></blockquote><p>Why?!??</p><p>Our version numbers are in the order of 3.2.0.1234, 3.2.0.1456 (where the 4th number increments based on the Subversion revision number). The installer was seeing the version numbers as 3.2.0, i.e. the same, and not uninstalling the old version. Changing the installer version number to 3.2.1234 fixes this.</p> ]]></content:encoded> <wfw:commentRss>http://garethlennox.com/2009/07/08/msi-version-matching-upgrade-woes/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss><!-- Dynamic page generated in 4.756 seconds. --><!-- Cached page generated by WP-Super-Cache on 2012-05-12 23:16:06 --><!-- Compression = gzip -->

