<?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>TylerBurton.ca &#187; Linux</title>
	<atom:link href="http://www.tylerburton.ca/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tylerburton.ca</link>
	<description></description>
	<lastBuildDate>Tue, 10 Jan 2012 04:41:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>The Linux Experiment Post Roundup</title>
		<link>http://www.tylerburton.ca/2012/01/the-linux-experiment-post-roundup/</link>
		<comments>http://www.tylerburton.ca/2012/01/the-linux-experiment-post-roundup/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 01:43:17 +0000</pubDate>
		<dc:creator>Tyler Burton</dc:creator>
				<category><![CDATA[Created by Tyler Burton]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[The Linux Experiment]]></category>
		<category><![CDATA[amd]]></category>
		<category><![CDATA[ati]]></category>
		<category><![CDATA[distributions]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[red alert]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://www.tylerburton.ca/?p=656</guid>
		<description><![CDATA[There has been quite a bit of activity on The Linux Experiment over the past little while. Check out the site here or quickly jump to the post that I wrote below. Big distributions, little RAM 3 How do the &#8216;big time&#8217; distributions handle on constrained hardware? Take a look. How to install sun-java6-jdk and [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>There has been quite a bit of activity on The Linux Experiment over the past little while. Check out the site <a href="http://www.thelinuxexperiment.com">here</a> or quickly jump to the post that I wrote below.</p>
<h2><a href="http://thelinuxexperiment.com/guinea-pigs/tyler-b/big-distributions-little-ram-3/">Big distributions, little RAM 3</a></h2>
<p>How do the &#8216;big time&#8217; distributions handle on constrained hardware? Take a look.</p>
<h2><a href="http://thelinuxexperiment.com/guinea-pigs/tyler-b/how-to-install-sun-java6-jdk-and-netbeans-in-ubuntu-11-10/">How to install sun-java6-jdk and Netbeans in Ubuntu 11.10</a></h2>
<p>A simple process to install the <em>official</em> <del>Sun</del>Oracle Java JDK and Netbeans IDE in the latest Ubuntu.</p>
<h2><a href="http://thelinuxexperiment.com/guinea-pigs/tyler-b/ubuntu-11-10s-wifi-crashes-my-router/">Ubuntu 11.10′s WiFi crashes my router</a></h2>
<p>The new Ubuntu release is pretty good. Unfortunately it also causes my router to crash.</p>
<h2><a href="http://thelinuxexperiment.com/guinea-pigs/tyler-b/gentoo-a-k-a-compiling/">Gentoo (A.K.A. “Compiling!”)</a></h2>
<p>My first post for the second Linux Experiment where I speak about my Gentoo first impressions.</p>
<h2><a href="http://thelinuxexperiment.com/guinea-pigs/tyler-b/how-to-enable-rebootshutdown-in-kde-on-gentoo/">How to enable reboot/shutdown in KDE on Gentoo</a></h2>
<h2><a href="http://thelinuxexperiment.com/guinea-pigs/tyler-b/closed-source-amdati-drivers-wireless-networking-and-flash-in-gentoo/">Closed source AMD/ATI drivers, wireless networking and Flash in Gentoo</a></h2>
<h2><a href="http://thelinuxexperiment.com/guinea-pigs/tyler-b/how-to-update-your-whole-gentoo-system/">How to update your (whole) Gentoo system</a></h2>
<p>A trio of small posts that walk new Gentoo users through setting up and doing some basic things in their new desktop.</p>
<h2><a href="http://thelinuxexperiment.com/guinea-pigs/tyler-b/how-to-play-red-alert-2-on-linux/">How to play Red Alert 2 on Linux</a></h2>
<p>I managed to get this classic game to run great on Linux. It even includes a bit of a hack that allows you to play LAN games. I don&#8217;t think you can even do that on Windows any more.</p>
<h2><a href="http://thelinuxexperiment.com/guinea-pigs/tyler-b/oh-gentoo/">Oh Gentoo</a></h2>
<p>My final post of the second Linux Experiment. Includes my conclusions on running Gentoo as a day-to-day desktop system.</p>
<div class="shr-publisher-656"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.tylerburton.ca/2012/01/the-linux-experiment-post-roundup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A couple of new posts on The Linux Experiment</title>
		<link>http://www.tylerburton.ca/2011/07/a-couple-of-new-posts-on-the-linux-experiment/</link>
		<comments>http://www.tylerburton.ca/2011/07/a-couple-of-new-posts-on-the-linux-experiment/#comments</comments>
		<pubDate>Fri, 01 Jul 2011 18:26:02 +0000</pubDate>
		<dc:creator>Tyler Burton</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[loopback]]></category>
		<category><![CDATA[PulseAudio]]></category>
		<category><![CDATA[The Linux Experiment]]></category>
		<category><![CDATA[X.org]]></category>

		<guid isPermaLink="false">http://www.tylerburton.ca/?p=637</guid>
		<description><![CDATA[In case you somehow found your way here and haven&#8217;t already seen them over at The Linux Experiment, I have put up two new posts that deal with fixes for your linux desktop. Two monitors. Different resolutions. One desktop. If you&#8217;ve ever wondered how to use two monitors with different resolutions as a single, unified, [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>In case you somehow found your way here and haven&#8217;t already seen them over at <a href="http://www.thelinuxexperiment.com">The Linux Experiment</a>, I have put up two new posts that deal with fixes for your linux desktop.</p>
<h2><a href="http://thelinuxexperiment.com/guinea-pigs/tyler-b/two-monitors-different-resolutions-one-desktop/">Two monitors. Different resolutions. One desktop.</a></h2>
<p>If you&#8217;ve ever wondered how to use two monitors with different resolutions as a single, unified, extended desktop I highly suggest you do a quick read of this post. I&#8217;ve covered how to avoid, and fix, the &#8216;dead space&#8217; issue where application windows can get lost because of the difference is vertical resolutions.</p>
<h2><a href="http://thelinuxexperiment.com/guinea-pigs/tyler-b/fix-pulseaudio-loopback-delay/">Fix PulseAudio loopback delay</a></h2>
<p>For some reason I encountered an issue where the PulseAudio loopback module introduced a delay in my sound, causing audio and video to be out of sync. Here is a simple solution to fix the issue.</p>
<p>&nbsp;</p>
<p>Hopefully the above two posts can be of use to some of you out there. Let me know if you have any issues getting them to work.</p>
<div class="shr-publisher-637"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.tylerburton.ca/2011/07/a-couple-of-new-posts-on-the-linux-experiment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a GTK+ application on Linux with Objective-C</title>
		<link>http://www.tylerburton.ca/2010/12/create-a-gtk-application-on-linux-with-objective-c/</link>
		<comments>http://www.tylerburton.ca/2010/12/create-a-gtk-application-on-linux-with-objective-c/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 03:12:06 +0000</pubDate>
		<dc:creator>Tyler Burton</dc:creator>
				<category><![CDATA[Created by Tyler Burton]]></category>
		<category><![CDATA[F/OSS]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[GNUstep]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.tylerburton.ca/?p=538</guid>
		<description><![CDATA[As sort of follow-up-in-spirit to my older post I decided to share a really straight forward way to use Objective-C to build GTK+ applications. Objective-what? Objective-C is an improvement to the iconic C programming language that remains backwards compatible while adding many new and interesting features. Chief among these additions is syntax for real objects [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>As sort of follow-up-in-spirit to <a href="http://www.tylerburton.ca/2010/03/the-case-for-objective-c/">my older post</a> I decided to share a really straight forward way to use Objective-C to build GTK+ applications.</p>
<p><strong>Objective-what?</strong></p>
<p><a href="http://en.wikipedia.org/wiki/Objective-C">Objective-C</a> is an improvement to the iconic <a href="http://en.wikipedia.org/wiki/C_%28programming_language%29">C programming language</a> that remains backwards compatible while adding many new and interesting features. Chief among these additions is syntax for real objects (and thus <a href="http://en.wikipedia.org/wiki/Object-oriented_programming">object-oriented programming</a>). Popularized by <a href="http://en.wikipedia.org/wiki/NeXT">NeXT</a> and eventually <a href="http://www.apple.com">Apple</a>, Objective-C is most commonly seen in development for Apple OSX and iOS based platforms. It ships with or without a large standard library (sometimes referred to as the <a href="http://en.wikipedia.org/wiki/GNUstep#Foundation_Kit">Foundation Kit</a> library) that makes it very easy for developers to quickly create fast and efficient programs. The result is a language that compiles down to binary, requires no virtual machines (just a runtime library), and achieves performance comparable to C and C++.</p>
<p><strong>Marrying Objective-C with GTK+</strong></p>
<p>Normally when writing a <a href="http://en.wikipedia.org/wiki/GTK%2B">GTK+</a> application the language (or a library) will supply you with <a href="http://en.wikipedia.org/wiki/GTK%2B#Programming_language_bindings">bindings</a> that let you create GUIs in a way native to that language. So for instance in <a href="http://en.wikipedia.org/wiki/C%2B%2B">C++</a> you would create GTK+ objects, whereas in C you would create structures or ask functions for pointers back to the objects. Unfortunately while there used to exist a couple of different Objective-C bindings for GTK+, all of them are quite out of date. So instead we are going to rely on the fact that Objective-C is backwards compatible with C to get our program to work.</p>
<p><strong>What you need to start</strong></p>
<p>I&#8217;m going to assume that <a href="http://www.ubuntu.com">Ubuntu</a> will be our operating system for development. To ensure that we have what we need to compile the programs, just install the following packages:</p>
<ol>
<li>gnustep-core-devel</li>
<li>libgtk2.0-dev</li>
</ol>
<p>As you can see from the list above we will be using <a href="http://en.wikipedia.org/wiki/GNUstep">GNUstep</a> as our Objective-C library of choice.</p>
<p><strong>Setting it all up</strong></p>
<p>In order to make this work we will be creating two Objective-C classes, one that will house our GTK+ window and another that will actually start our program. I&#8217;m going to call my GTK+ object MainWindow and create the two necessary files: <em>MainWindow.h</em> and <em>MainWindow.m</em>. Finally I will create a <em>main.m</em> that will start the program and clean it up after it is done. <strong></strong></p>
<p><strong>Let me apologize here for the poor code formatting; apparently WordPress likes to destroy whatever I try and do to make it better. If you want properly indented code please see the download link below.</strong></p>
<p><strong>MainWindow.h</strong></p>
<p>In the MainWindow.h file put the following code:</p>
<blockquote><p>#import &lt;gtk/gtk.h&gt;<br />
#import &lt;Foundation/NSObject.h&gt;<br />
#import &lt;Foundation/NSString.h&gt;</p>
<p>//A pointer to this object (set on init) so C functions can call<br />
//Objective-C functions<br />
id myMainWindow;</p>
<p>/*<br />
* This class is responsible for initializing the GTK render loop<br />
* as well as setting up the GUI for the user. It also handles all GTK<br />
* callbacks for the winMain GtkWindow.<br />
*/<br />
@interface MainWindow : NSObject<br />
{<br />
//The main GtkWindow<br />
GtkWidget *winMain;<br />
GtkWidget *button;<br />
}</p>
<p>/*<br />
* Constructs the object and initializes GTK and the GUI for the<br />
* application.<br />
*<br />
* *********************************************************************<br />
* Input<br />
* *********************************************************************<br />
* argc (int *):    A pointer to the arg count variable that was passed<br />
*             in at the application start. It will be returned<br />
*            with the count of the modified argv array.<br />
* argv (char *[]):     A pointer to the argument array that was passed in<br />
*            at the application start. It will be returned with<br />
*            the GTK arguments removed.<br />
*<br />
* *********************************************************************<br />
* Returns<br />
* *********************************************************************<br />
* MainWindow (id):    The constructed object or nil<br />
* arc (int *):        The modified input int as described above<br />
* argv (char *[]):    The modified input array modified as described above<br />
*/<br />
-(id)initWithArgCount:(int *)argc andArgVals:(char *[])argv;</p>
<p>/*<br />
* Frees the Gtk widgets that we have control over<br />
*/<br />
-(void)destroyWidget;</p>
<p>/*<br />
* Starts and hands off execution to the GTK main loop<br />
*/<br />
-(void)startGtkMainLoop;</p>
<p>/*<br />
* Example Objective-C function that prints some output<br />
*/<br />
-(void)printSomething;</p>
<p>/*<br />
********************************************************<br />
* C callback functions<br />
********************************************************<br />
*/</p>
<p>/*<br />
* Called when the user closes the window<br />
*/<br />
void on_MainWindow_destroy(GtkObject *object, gpointer user_data);</p>
<p>/*<br />
* Called when the user presses the button<br />
*/<br />
void on_btnPushMe_clicked(GtkObject *object, gpointer user_data);</p>
<p>@end</p></blockquote>
<p><strong>MainWindow.m</strong></p>
<p>For the class&#8217; actual code file fill it in as show below. This class will create a GTK+ window with a single button and will react to both the user pressing the button, and closing the window.</p>
<blockquote><p>#import &#8220;MainWindow.h&#8221;</p>
<p>/*<br />
* For documentation see MainWindow.h<br />
*/</p>
<p>@implementation MainWindow</p>
<p>-(id)initWithArgCount:(int *)argc andArgVals:(char *[])argv<br />
{<br />
//call parent class&#8217; init<br />
if (self = [super init]) {</p>
<p>//setup the window<br />
winMain = gtk_window_new (GTK_WINDOW_TOPLEVEL);</p>
<p>gtk_window_set_title (GTK_WINDOW (winMain), &#8220;Hello World&#8221;);<br />
gtk_window_set_default_size(GTK_WINDOW(winMain), 230, 150);</p>
<p>//setup the button<br />
button = gtk_button_new_with_label (&#8220;Push me!&#8221;);</p>
<p>gtk_container_add (GTK_CONTAINER (winMain), button);</p>
<p>//connect the signals<br />
g_signal_connect (winMain, &#8220;destroy&#8221;, G_CALLBACK (on_MainWindow_destroy), NULL);<br />
g_signal_connect (button, &#8220;clicked&#8221;, G_CALLBACK (on_btnPushMe_clicked), NULL);</p>
<p>//force show all<br />
gtk_widget_show_all(winMain);<br />
}</p>
<p>//assign C-compatible pointer<br />
myMainWindow = self;</p>
<p>//return pointer to this object<br />
return self;<br />
}</p>
<p>-(void)startGtkMainLoop<br />
{<br />
//start gtk loop<br />
gtk_main();<br />
}</p>
<p>-(void)printSomething{<br />
NSLog(@&#8221;Printed from Objective-C&#8217;s NSLog function.&#8221;);<br />
printf(&#8220;Also printed from standard printf function.\n&#8221;);<br />
}</p>
<p>-(void)destroyWidget{</p>
<p>myMainWindow = NULL;</p>
<p>if(GTK_IS_WIDGET (button))<br />
{<br />
//clean up the button<br />
gtk_widget_destroy(button);<br />
}</p>
<p>if(GTK_IS_WIDGET (winMain))<br />
{<br />
//clean up the main window<br />
gtk_widget_destroy(winMain);<br />
}<br />
}</p>
<p>-(void)dealloc{<br />
[self destroyWidget];</p>
<p>[super dealloc];<br />
}</p>
<p>void on_MainWindow_destroy(GtkObject *object, gpointer user_data)<br />
{<br />
//exit the main loop<br />
gtk_main_quit();<br />
}</p>
<p>void on_btnPushMe_clicked(GtkObject *object, gpointer user_data)<br />
{<br />
printf(&#8220;Button was clicked\n&#8221;);</p>
<p>//call Objective-C function from C function using global object pointer<br />
[myMainWindow printSomething];<br />
}</p>
<p>@end</p></blockquote>
<p><strong>main.m</strong></p>
<p>To finish I will write a main file and function that creates the MainWindow object and eventually cleans it up. Objective-C (1.0) does not support automatic garbage collection so it is important that we don&#8217;t forget to clean up after ourselves.</p>
<blockquote><p>#import &#8220;MainWindow.h&#8221;<br />
#import &lt;Foundation/NSAutoreleasePool.h&gt;</p>
<p>int main(int argc, char *argv[]) {</p>
<p>//create an AutoreleasePool<br />
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];</p>
<p>//init gtk engine<br />
gtk_init(&amp;argc, &amp;argv);</p>
<p>//set up GUI<br />
MainWindow *mainWindow = [[MainWindow alloc] initWithArgCount:&amp;argc andArgVals:argv];</p>
<p>//begin the GTK loop<br />
[mainWindow startGtkMainLoop];</p>
<p>//free the GUI<br />
[mainWindow release];</p>
<p>//drain the pool<br />
[pool release];</p>
<p>//exit application<br />
return 0;<br />
}</p></blockquote>
<p><strong>Compiling it all together</strong></p>
<p>Use the following command to compile the program. This will automatically include <strong>all</strong> <em>.m</em> files in the current directory so be careful when and where you run this.</p>
<p>gcc `pkg-config &#8211;cflags &#8211;libs gtk+-2.0` -lgnustep-base -fconstant-string-class=NSConstantString -o &#8220;./myprogram&#8221; $(find . -name &#8216;*.m&#8217;) -I /usr/include/GNUstep/ -L /usr/lib/GNUstep/ -std=c99 -O3</p>
<p>Once complete you will notice a new executable in the directory called <em>myprogram</em>. Start this program and you will see our GTK+ window in action.</p>
<p><a href="http://www.tylerburton.ca/files/wordpress/2010/12/window1.jpg"><img class="aligncenter size-full wp-image-546" title="window1" src="http://www.tylerburton.ca/files/wordpress/2010/12/window1.jpg" alt="" width="242" height="186" /></a></p>
<p>If you run it from the command line you can see the output that we coded when the button is pushed.</p>
<p><a href="http://www.tylerburton.ca/files/wordpress/2010/12/window2.jpg"><img class="aligncenter size-full wp-image-547" title="window2" src="http://www.tylerburton.ca/files/wordpress/2010/12/window2.jpg" alt="" width="658" height="289" /></a></p>
<p><strong>Wrapping it up</strong></p>
<p>There you have it. We now have a program that is written in Objective-C, using C&#8217;s native GTK+ &#8216;bindings&#8217; for the GUI, that can call both regular C and Objective-C functions and code. In addition, thanks to the porting of both GTK+ and GNUstep to Windows, this same code will also produce a cross-platform application that works on both Mac OSX and Windows.</p>
<p><strong>Source Code Downloads</strong></p>
<table border="1">
<tbody>
<tr>
<td></td>
<td><strong>Source Only Package</strong></td>
</tr>
<tr>
<td><strong>File name:</strong></td>
<td>objective_c_gtk_source.zip</td>
</tr>
<tr>
<td><strong>File hashes:</strong></td>
<td style="text-align: center;"><a href="http://www.tylerburton.ca/files/hashes/objective_c_gtk_source.hashes.txt">Download Here</a></td>
</tr>
<tr>
<td><strong>File size:</strong></td>
<td>2.4KB</td>
</tr>
<tr>
<td><strong>File download:</strong></td>
<td style="text-align: center;"><a href="http://www.tylerburton.ca/files/apps/objective_c_gtk_source.zip">Download Here</a></td>
</tr>
</tbody>
</table>
<div class="shr-publisher-538"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.tylerburton.ca/2010/12/create-a-gtk-application-on-linux-with-objective-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One week, three distributions (Roundup)</title>
		<link>http://www.tylerburton.ca/2010/10/one-week-three-distributions-roundup/</link>
		<comments>http://www.tylerburton.ca/2010/10/one-week-three-distributions-roundup/#comments</comments>
		<pubDate>Mon, 25 Oct 2010 00:38:21 +0000</pubDate>
		<dc:creator>Tyler Burton</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Kubuntu]]></category>
		<category><![CDATA[Linux Mint Debian Edition]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.tylerburton.ca/?p=463</guid>
		<description><![CDATA[These posts were originally featured on The Linux Experiment One week, three distributions (Day 0) With the recent releases of Linux Mint Debian Edition, Ubuntu and Kubuntu 10.10 I am once again starting to feel that need to hop around and try something new out. &#8230;I’ve set myself up a little experiment of sorts: try [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p style="text-align: center; text-decoration: underline;"><a href="http://www.thelinuxexperiment.com"><strong>These posts were originally featured on The Linux Experiment</strong></a></p>
<p style="text-align: left;"><a href="http://thelinuxexperiment.com/guinea-pigs/tyler-b/one-week-three-distributions-day-0/"><strong>One week, three distributions (Day 0)</strong></a></p>
<blockquote>
<p style="text-align: left;">With the recent releases of Linux Mint Debian Edition, Ubuntu and Kubuntu 10.10 I am once again starting to feel that need to hop around and try something new out. &#8230;I’ve set myself up a little experiment of sorts: try each distribution for two days each and on the 7th day choose the best from among the three. Now obviously this isn’t a very fair test, 48 hours is hardly enough to definitely test which of these distributions is truly the best&#8230;</p>
</blockquote>
<p style="text-align: left;"><a href="http://thelinuxexperiment.com/guinea-pigs/tyler-b/one-week-three-distributions-day-2-kubuntu/"><strong>One week, three distributions (Day 2: Kubuntu 10.10)</strong></a></p>
<blockquote>
<p style="text-align: left;">&#8230;When I first booted into the desktop I was very pleasantly surprised. I haven’t used KDE since version 4.3 when I had given up on it because, while beautiful and functional, there were just too many rough edges. It seems to be an Internet cliché at this point but I am going to throw it out there anyway: KDE 4.5 is the KDE release you have been waiting for&#8230;</p>
</blockquote>
<p style="text-align: left;"><a href="http://thelinuxexperiment.com/blog/wp-content/uploads/2010/10/Notifications.png"></a><a href="http://www.tylerburton.ca/files/wordpress/2010/10/Kubuntu1010.png"><img class="aligncenter size-medium wp-image-465" title="Kubuntu 10.10" src="http://www.tylerburton.ca/files/wordpress/2010/10/Kubuntu1010-300x168.png" alt="Kubuntu 10.10" width="300" height="168" /></a><br />
<a href="http://thelinuxexperiment.com/guinea-pigs/tyler-b/one-week-three-distributions-day-4-ubuntu-10-10/"><strong>One week, three distributions (Day 4: Ubuntu 10.10)</strong></a></p>
<blockquote>
<p style="text-align: left;">&#8230;It’s hard to place exactly what makes this theme so nice but Canonical has done a wonderful job iterating the old theme from 10.04 and making some subtle changes that have an incredible overall effect&#8230; This level of polish even extends to the new sound menu. Canonical has implemented new sound APIs which allow media players to integrated natively with the sound menu in a way that is just awesome&#8230;</p>
</blockquote>
<p style="text-align: left;"><a href="http://www.tylerburton.ca/files/wordpress/2010/10/Ubuntu1010.png"><img class="aligncenter size-medium wp-image-466" title="Ubuntu 10.10" src="http://www.tylerburton.ca/files/wordpress/2010/10/Ubuntu1010-300x168.png" alt="Ubuntu 10.10" width="300" height="168" /></a></p>
<p style="text-align: left;"><a href="http://thelinuxexperiment.com/guinea-pigs/tyler-b/one-week-three-distributions-day-6-linux-mint-debian-edition/"><strong>One week, three distributions (Day 6: Linux Mint Debian Edition)</strong></a></p>
<blockquote>
<p style="text-align: left;">&#8230;I have to say that my first impression of LMDE was a mixed one. On one hand it spewed text everywhere as it booted, which I assume came from its Debian heritage. On the other hand the boot was ridiculously fast&#8230; Once at my desktop I was presented with a very familiar Linux Mint set up&#8230;</p>
</blockquote>
<p style="text-align: left;"><a href="http://www.tylerburton.ca/files/wordpress/2010/10/lmde.png"><img class="aligncenter size-medium wp-image-467" title="Linux Mint Debian Edition" src="http://www.tylerburton.ca/files/wordpress/2010/10/lmde-300x168.png" alt="Linux Mint Debian Edition" width="300" height="168" /></a></p>
<p style="text-align: left;"><a href="http://thelinuxexperiment.com/guinea-pigs/tyler-b/one-week-three-distributions-day-7-conclusions/"><strong>One week, three distributions (Day 7: Conclusions)</strong></a></p>
<blockquote>
<p style="text-align: left;">&#8230;What makes a great distribution great? This is a very interesting question that I’m sure would generate a wide array of unique and passionate responses. Some prefer ease of use, while others demand nothing less than complete control over what they can tweak. There are people who swear by using nothing but open source solutions, while others are happy to add proprietary code into the mix as well. This is the great thing about Linux, we get so many choices which means we get to decided what we want&#8230;</p>
</blockquote>
<div class="shr-publisher-463"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.tylerburton.ca/2010/10/one-week-three-distributions-roundup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compile Windows programs on Linux</title>
		<link>http://www.tylerburton.ca/2010/09/compile-windows-programs-on-linux/</link>
		<comments>http://www.tylerburton.ca/2010/09/compile-windows-programs-on-linux/#comments</comments>
		<pubDate>Sun, 26 Sep 2010 18:25:53 +0000</pubDate>
		<dc:creator>Tyler Burton</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Microsoft Windows]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[mingw]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.tylerburton.ca/?p=429</guid>
		<description><![CDATA[Windows?? *GASP!* Sometimes you just have to compile Windows programs from the comfort of your Linux install. This is a relatively simple process that basically requires you to only install the following (Ubuntu) packages: To compile 32-bit programs mingw32 (swap out for gcc-mingw32 if you need 64-bit support) mingw32-binutils mingw32-runtime Additionally for 64-bit programs (*PLEASE [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Windows?? <strong>*GASP!*</strong></p>
<p>Sometimes you just have to compile Windows programs from the comfort  of your Linux install. This is a relatively simple process that  basically requires you to only install the following (Ubuntu) packages:</p>
<p><strong>To compile 32-bit programs</strong></p>
<ul>
<li>mingw32 (swap out for gcc-mingw32 if you need 64-bit support)</li>
<li>mingw32-binutils</li>
<li>mingw32-runtime</li>
</ul>
<p><strong>Additionally for 64-bit programs (*PLEASE SEE NOTE)<br />
</strong></p>
<ul>
<li>mingw-w64</li>
<li>gcc-mingw32</li>
</ul>
<p>Once you have those packages you just need to swap out &#8220;gcc&#8221; in your  normal compile commands with either &#8220;i586-mingw32msvc-gcc&#8221; (for 32-bit)  or &#8220;amd64-mingw32msvc-gcc&#8221; (for 64-bit). So for example if we take the  following hello world program in C</p>
<blockquote><p>#include &lt;stdio.h&gt;<br />
int main(int argc, char** argv)<br />
{<br />
printf(&#8220;Hello world!\n&#8221;);<br />
return 0;<br />
}</p></blockquote>
<p>we can compile it to a 32-bit Windows program by using something  similar to the following command (assuming the code is contained within a  file called <em>main.c</em>)</p>
<blockquote><p>i586-mingw32msvc-gcc -Wall &#8220;main.c&#8221; -o &#8220;Program.exe&#8221;</p></blockquote>
<p>You can even compile Win32 GUI programs as well. Take the following code as an example</p>
<blockquote><p>#include &lt;windows.h&gt;<br />
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)<br />
{<br />
char *msg = &#8220;The message box&#8217;s message!&#8221;;<br />
MessageBox(NULL, msg, &#8220;MsgBox Title&#8221;, MB_OK | MB_ICONINFORMATION);</p>
<p>return 0;<br />
}</p></blockquote>
<p>this time I&#8217;ll compile it into a 64-bit Windows application using</p>
<blockquote><p>amd64-mingw32msvc-gcc -Wall -mwindows &#8220;main.c&#8221; -o &#8220;Program.exe&#8221;</p></blockquote>
<p>You can even test to make sure it worked properly by running the program through <a href="http://www.winehq.org/">wine</a> like</p>
<blockquote><p>wine Program.exe</p></blockquote>
<p>You might need to install some extra packages to get Wine to run 64-bit applications but in general this will work.</p>
<p>That&#8217;s pretty much it. You might have a couple of other issues (like  linking against Windows libraries instead of the Linux ones) but overall  this is a very simple drop-in replacement for your regular <em>gcc</em> command.</p>
<p><strong>*NOTE:</strong> There is currently a problem with the Lucid packages for the 64-bit compilers. As a work around you can get the packages from <a href="https://launchpad.net/%7Epali/+archive/pali" target="_blank">this PPA instead</a>.</p>
<div class="shr-publisher-429"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.tylerburton.ca/2010/09/compile-windows-programs-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trying out the Chakra Project</title>
		<link>http://www.tylerburton.ca/2010/08/trying-out-the-charka-project/</link>
		<comments>http://www.tylerburton.ca/2010/08/trying-out-the-charka-project/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 01:44:17 +0000</pubDate>
		<dc:creator>Tyler Burton</dc:creator>
				<category><![CDATA[F/OSS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Chakra]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[rekonq]]></category>

		<guid isPermaLink="false">http://www.tylerburton.ca/?p=361</guid>
		<description><![CDATA[After a little bit of pressure from the people responding to my previous post (My search for the best KDE Linux distribution), I have finally given in and tried out Chakra. The Chakra Project starts with Arch Linux as a base but, instead of forcing you to build your own distro piece of piece, Chakra [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>After a little bit of pressure from the people responding to my previous post (<a href="http://www.tylerburton.ca/2010/03/my-search-for-the-best-kde-linux-distribution/" target="_blank">My search for the best KDE Linux distribution</a>), I have finally given in and tried out Chakra. <a href="http://chakra-project.org/" target="_blank">The Chakra Project</a> starts with <a href="http://www.archlinux.org/" target="_blank">Arch Linux</a> as a base but, instead of forcing you to <em>build</em> your own distro piece of piece, Chakra comes more or less pre-packaged.</p>
<p><a href="http://www.tylerburton.ca/files/wordpress/2010/08/livecd.jpg"><img class="aligncenter size-medium wp-image-364" src="http://www.tylerburton.ca/files/wordpress/2010/08/livecd-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p><strong>Installation</strong></p>
<p>The installation was one of the best I&#8217;ve ever seen. For alpha software this distribution&#8217;s first point of interaction is already very polished &#8211; even warning me that it is not stable software and might therefore <em>eat my hamster</em>.</p>
<p><a href="http://www.tylerburton.ca/files/wordpress/2010/08/install1.jpg"><img class="aligncenter size-medium wp-image-363" src="http://www.tylerburton.ca/files/wordpress/2010/08/install1-300x222.jpg" alt="" width="300" height="222" /></a></p>
<p>The install process even let me decide to install some very useful packages, like Microsoft Core TTF Fonts and Adobe Flash, right away. Even the Language &amp; Time step was incredible, offering a rotating globe that I could drag around and manipulate.</p>
<p><a href="http://www.tylerburton.ca/files/wordpress/2010/08/install2.jpg"><img class="aligncenter size-medium wp-image-365" src="http://www.tylerburton.ca/files/wordpress/2010/08/install2-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>The only issue I had was trying to create a disk partition to install the OS to. This was because I was trying this out inside of <a href="http://www.virtualbox.org/" target="_blank">VirtualBox</a>, and the virtual hard disk did not have any partitions on it whatsoever. There is a bug and (thankfully) work-around for this <a href="http://chakra-project.org/wiki/index.php/Frequently_Encountered_Problems#Tribe_can.27t_create_partition_tables" target="_blank">known issue</a> with their Tribe installer, and after reading a quick walk-through I was once again ready to install.</p>
<p><a href="http://www.tylerburton.ca/files/wordpress/2010/08/install3.jpg"><img class="size-medium wp-image-365" src="http://www.tylerburton.ca/files/wordpress/2010/08/install3-300x223.jpg" alt="" width="300" height="225" align="center" /></a><a href="http://www.tylerburton.ca/files/wordpress/2010/08/install4.jpg"><img class="size-medium wp-image-365" src="http://www.tylerburton.ca/files/wordpress/2010/08/install4-300x224.jpg" alt="" width="300" height="225" align="center" /></a></p>
<p><a href="http://www.tylerburton.ca/files/wordpress/2010/08/install5.jpg"><img class="size-medium wp-image-365" src="http://www.tylerburton.ca/files/wordpress/2010/08/install5-300x221.jpg" alt="" width="300" height="225" align="center" /></a><a href="http://www.tylerburton.ca/files/wordpress/2010/08/install6.jpg"><img class="size-medium wp-image-365" src="http://www.tylerburton.ca/files/wordpress/2010/08/install6-300x223.jpg" alt="" width="300" height="225" align="center" /></a></p>
<p><a href="http://www.tylerburton.ca/files/wordpress/2010/08/install7.jpg"><img class="size-medium wp-image-365" src="http://www.tylerburton.ca/files/wordpress/2010/08/install7-300x225.jpg" alt="" width="300" height="225" align="center" /></a><a href="http://www.tylerburton.ca/files/wordpress/2010/08/install8.jpg"><img class="size-medium wp-image-365" src="http://www.tylerburton.ca/files/wordpress/2010/08/install8-300x222.jpg" alt="" width="300" height="225" align="center" /></a></p>
<p><strong>The Desktop</strong></p>
<p>The desktop is standard KDE version 4.4.2 after install. Opening up Pacman (or is it Shaman?) showed me a list of brand new software that I could install, including the newest KDE 4.5. One of Project Chakra&#8217;s great strengths will be in this rolling release of new software updates. The concept of installing once and <em>always</em> having the most up-to-date applications is very intriguing.</p>
<p><a href="http://www.tylerburton.ca/files/wordpress/2010/08/shaman.jpg"><img class="aligncenter size-medium wp-image-377" src="http://www.tylerburton.ca/files/wordpress/2010/08/shaman-300x205.jpg" alt="" width="300" height="205" /></a></p>
<p>Unfortunately, as with most alpha software, Shaman is still pretty buggy and often crashed whenever I tried to apply the updates. Also unfortunate is that Shaman started a trend of applications simply crashing for no reason. I don&#8217;t want to give this distribution a bad reputation, because it is still pre-release software, but I think it goes without saying that the developers have some bug squashing to do before a stable release will be ready. Something I found rather strange is that the current default software selection that Chakra ships with includes two different browsers, Konqueror and rekonq, but no office software whatsoever.</p>
<div id="attachment_379" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.tylerburton.ca/files/wordpress/2010/08/rekonq.jpg"><img class="size-medium wp-image-379" src="http://www.tylerburton.ca/files/wordpress/2010/08/rekonq-300x213.jpg" alt="" width="300" height="213" /></a><p class="wp-caption-text">Google Chrome much?</p></div>
<p><strong>Final Thoughts (for now!)<br />
</strong></p>
<p>The Chakra Project looks very promising, albeit very unpolished at the moment. If they can manage to fix up the rest of the distribution, getting it just as polished feeling as the installer, this will definitely be one to look out for. I look forward to trying it out again once it hits a stable release.</p>
<div class="shr-publisher-361"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.tylerburton.ca/2010/08/trying-out-the-charka-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My search for the best KDE Linux distribution</title>
		<link>http://www.tylerburton.ca/2010/03/my-search-for-the-best-kde-linux-distribution/</link>
		<comments>http://www.tylerburton.ca/2010/03/my-search-for-the-best-kde-linux-distribution/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 22:19:24 +0000</pubDate>
		<dc:creator>Tyler Burton</dc:creator>
				<category><![CDATA[F/OSS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Kubuntu]]></category>
		<category><![CDATA[Linux Mint]]></category>
		<category><![CDATA[openSUSE]]></category>

		<guid isPermaLink="false">http://www.tylerburton.ca/?p=265</guid>
		<description><![CDATA[As some of you already know, I am a big fan of the KDE desktop environment (or KDE Workspaces or whatever they&#8217;re calling it these days). In my search to reach Linux KDE perfection I have tested out a number of different distributions. First there was Fedora, which I happily ran throughout the length of [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>As some of you already know, I am a big fan of the KDE desktop environment (or <a href="http://en.wikipedia.org/wiki/KDE#Brand_repositioning" target="_blank"><em>KDE Workspaces</em></a> or whatever they&#8217;re calling it these days). In my search to reach Linux KDE perfection I have tested out a number of different distributions. First there was <a href="http://fedoraproject.org/" target="_blank">Fedora</a>, which I happily ran throughout the length of the experiment. Once that was finished I attempted to install and try both <a href="http://www.kubuntu.org/" target="_blank">Kubuntu</a> and <a href="http://www.opensuse.org" target="_blank">openSUSE</a>. Unfortunately I was <a href="http://thelinuxexperiment.com/guinea-pigs/tyler-b/kubuntu-9-10-part-i/" target="_blank">unable to do so</a> after openSUSE decided not to play nice. However my search did not stop there, and once the community edition was ready I jumped over to <a href="http://www.linuxmint.com/" target="_blank">Linux Mint KDE CE</a>. Finally I decided to once again try openSUSE, this time installing from a USB drive. This somehow resolved all of my installation issues.</p>
<p>Now that I have tried out quite a few of the most popular distributions I figured I would write a little bit to tell you fine people my thoughts on each, and why I will be sticking with openSUSE for the near future.</p>
<p><strong>Fedora 11</strong></p>
<ul>
<li><strong><em>KDE Version:</em></strong> 4.2 &#8211; 4.3</li>
<li><strong><em>Pros:</em></strong> very secure, not too many modifications of the KDE source, cutting edge</li>
<li><strong><em>Cons:</em></strong> could have really used some more modifications of the base KDE packages in order to better integrate GTK+, Bluetooth problems, not always stable</li>
<li><strong><em>Thoughts:</em></strong>
<p>I have written at length about my experiences with Fedora during this experiment. Without re-writing everything again here let me simply say this: Fedora is primarily a GNOME distribution and I could never shake the feeling that KDE got the left-over treatment.</p>
</li>
</ul>
<p><strong>Kubuntu</strong></p>
<ul>
<li><strong><em>KDE Version:</em></strong> 4.3</li>
<li><strong><em>Pros:</em></strong> very easy to use, nice integration of GTK+ and GNOME notifications, access to Ubuntu support</li>
<li><strong><em>Cons:</em></strong> the hardware drivers application (jockey) simply did not work, very bad sound issues, Firefox could not handle opening file types</li>
<li><strong><em>Thoughts:</em></strong>
<p>When I first installed Kubuntu I was thrilled. Ah, this must be what it&#8217;s like to use a <em>real</em> KDE distribution, I thought. Everything seemed smoother and far more integrated then it did in Fedora. For example: OpenOffice.org had a KDE theme and it&#8217;s file browser actually used the native KDE one. Furthermore the notification system was awesome. Now instead of a GNOME application, like Pidgin, generating GNOME notifications, it instead integrated right into the standard KDE equivalent.
</p>
<p>
Then the problems started to show up. Oh I&#8217;ll just download this torrent file and&#8230; hmm Firefox doesn&#8217;t seem to know what to do with it. Why can&#8217;t I set the file type options inside of Firefox for torrents? Why doesn&#8217;t it use the system defaults? Then the sound issues came. YouTube stopped putting out audio all together and all of my attempts to fix it were futile. Maybe it&#8217;s just my hardware but Kubuntu just could not handle multimedia at all.
</p>
<p>
While Kubuntu is definitely one of the better KDE experiences it is by no means problem free.</p>
</li>
</ul>
<p><strong>Linux Mint KDE CE</strong></p>
<ul>
<li><strong><em>KDE Version:</em></strong> 4.3</li>
<li><strong><em>Pros:</em></strong> excellent package manager, easy to use</li>
<li><strong><em>Cons:</em></strong> sound issues, WiFi issues, is this actually a KDE desktop? there are so many GTK+ applications in it&#8230;</li>
<li><strong><em>Thoughts:</em></strong>
<p>After hearing much praise for Linux Mint I decided to give the newly released KDE community edition a go. I must say at first I was very impressed. The package manager was far superior to KPackageKit and even included things like user ratings and comments. It also came bundled with many tools and applications designed specifically for Linux Mint. Sadly very few of these were re-written in Qt and so I was forced to deal with GTK+ skinning almost everywhere.
</p>
<p>Sound issues similar to those in Kubuntu (maybe it&#8217;s something in the shared source?) started to crop up almost immediately. Again YouTube just did not work no matter how much I tried to fix it. Finally the WiFi connection was very poor, often disconnected on what seemed like a  specific interval.
</p>
<p>
While I think this distribution has a lot going for it I can only suggest the GNOME desktop for those who want to give it a try. The KDE version just does not seem polished enough to be recommended for someone looking for the ultimate KDE distribution.</p>
</li>
</ul>
<p><strong>openSUSE</strong></p>
<ul>
<li><strong><em>KDE Version:</em></strong> 4.3</li>
<li><strong><em>Pros:</em></strong> very responsive, a lot of streamlined tweaks, rock solid WiFi, excellent audio</li>
<li><strong><em>Cons:</em></strong> slower to boot, uses quite a bit of RAM, too much green <img src='http://www.tylerburton.ca/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </li>
<li><strong><em>Thoughts:</em></strong>
<p>Installing openSUSE seemed like an awful idea. After reading all of the complaints that both <a href="http://thelinuxexperiment.com/category/guinea-pigs/phil-d/" target="_blank">Phil</a> and <a href="http://thelinuxexperiment.com/category/guinea-pigs/dave-l/" target="_blank">Dave</a> had written over the course of the experiment I have to admit I was a little hesitant. However, I am very happy I decided to try it anyway; openSUSE is an excellent KDE distribution.
</p>
<p>
Everything about it, from the desktop to the little helpful wizards, all seem to be designed with one purpose in mind: make openSUSE the easiest, or at the very least most straightforward, distribution possible. <a href="http://en.wikipedia.org/wiki/Yet_another_Setup_Tool" target="_blank">YaST</a>, often a major source of hate from my fellow Guinea Pigs, does indeed have some quirks. However I honestly think that it is a very good tool, and something that streamlines many administrative tasks. Want <a href="http://en.wikipedia.org/wiki/Samba_%28software%29" target="_blank">SAMBA</a> network sharing? Just open up YaST and click on the wizard. Want restricted codecs? Just hop on over to <a href="http://opensuse-community.org/Restricted_Formats/11.2" target="_blank">openSUSE-Community</a> and download the ymp file (think of it like a Windows exe).
</p>
<p>
My time with openSUSE so far has been wonderful. My network card seems to actually get better range then ever before, if that&#8217;s even possible. My battery life is good and my sound just plain works without any additional effort. If I had one complaint it would be with the amount of RAM the distribution uses. After a quick reboot it takes up a very small amount, around ~350MB or so. However after a couple of hours of general use the RAM often grows to about 1-1.5GB, which is far more than I have seen with the other distributions. Thankfully I have 4GB of RAM so I&#8217;m not too worried. I wonder if it has something to do with the fact that I am running the x64 version and not the x86 version. Perhaps it assumes I have at least 4GB of RAM for choosing the newer architecture.
</p>
<p>
Whatever the case may be I think I have finally found what I consider to be the very best KDE Linux distribution. Obviously your results may vary but I look forward to hearing what you think.</p>
</li>
</ul>
<p>This piece was cross-posted over at <a href="http://thelinuxexperiment.com/guinea-pigs/tyler-b/my-search-for-the-best-kde-linux-distribution/">The Linux Experiment.</a></p>
<div class="shr-publisher-265"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.tylerburton.ca/2010/03/my-search-for-the-best-kde-linux-distribution/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Resource Tests: Java vs Mono/.NET</title>
		<link>http://www.tylerburton.ca/2009/12/resource-tests-java-vs-mono-net/</link>
		<comments>http://www.tylerburton.ca/2009/12/resource-tests-java-vs-mono-net/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 04:56:20 +0000</pubDate>
		<dc:creator>Tyler Burton</dc:creator>
				<category><![CDATA[Created by Tyler Burton]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Comparison]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mono]]></category>
		<category><![CDATA[Tests]]></category>

		<guid isPermaLink="false">http://www.tylerburton.ca/?p=140</guid>
		<description><![CDATA[As someone who has recently begun to experiment with the Linux operating system I have also been introduced to .NET&#8217;s Linux&#8217;s cousin Mono. This has made me question what the best cross-platform program language to use is. I am familiar with both Java and various .NET languages (Visual Basic &#38; C#) so I decided to [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>As someone who has recently begun to experiment with the Linux operating system I have also been introduced to <a href="http://en.wikipedia.org/wiki/.NET_Framework">.NET&#8217;s</a> Linux&#8217;s cousin <a href="http://en.wikipedia.org/wiki/Mono_%28software%29">Mono</a>. This has made me question what the best cross-platform program language to use is. I am familiar with both <a href="http://en.wikipedia.org/wiki/Java_%28software_platform%29">Java</a> and various .NET languages (Visual Basic &amp; C#) so I decided to run a few tests to see what the resource usage on my Linux laptop is like between these two competing platforms.</p>
<p><span style="text-decoration: underline;"><strong>Hardware</strong></span></p>
<p><em>CPU Information</em></p>
<ul>
<li><strong>Processor (CPU):</strong> Intel Core2Duo CPU P8600 @ 2.40GHz</li>
</ul>
<p><em>Memory Information</em></p>
<ul>
<li><strong>Total Memory (RAM):</strong> 4GiB</li>
<li><strong>Swap Partition Size:</strong> ~6GiB</li>
</ul>
<p><em>OS Information</em></p>
<ul>
<li><strong>OS:</strong> Linux 2.6.30.9-102.fc11.x86_64</li>
<li><strong>System:</strong> Fedora  11</li>
<li><strong>Desktop Environment:</strong> KDE 4.3.3</li>
</ul>
<p><em>Display Info</em></p>
<ul>
<li><strong>Model:</strong> ATI Mobility Radeon HD 4670</li>
<li><strong>Driver:</strong> 2.1.9026 FireGL</li>
</ul>
<p><em>Hard Drive Info</em></p>
<ul>
<li><strong>Memory:</strong> 320GiB 7,200 RPM SATA</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Software</strong></span></p>
<p>I am using Java version 1.6.0 and Mono version 2.4.2.3 for these tests.</p>
<p><span style="text-decoration: underline;"><strong>Test Setup</strong></span></p>
<p>For the following tests I have provided source code for both the Java and the C# implementations. I then ran the programs and checked their CPU and memory usage.</p>
<p><span style="text-decoration: underline;"><strong>Test I</strong></span></p>
<p>Simple write/read test to the console. CPU usage was recorded before the read.</p>
<p><em>Java code:</em></p>
<p>import java.io.IOException;</p>
<p>public class TestI {</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void main(String[] args) {</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(&#8220;Hello World&#8221;);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.in.read();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} catch (IOException e) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.printStackTrace();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>}</p>
<p><em>C# code:</em></p>
<p>using System;</p>
<p>namespace TestI<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;class MainClass<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void Main(string[] args)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine(&#8220;Hello World!&#8221;);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.Read();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}catch(Exception e){<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.Write(e.StackTrace);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</p>
<p><em>Results:</em></p>
<table border="1">
<tr>
<td></td>
<td>Java</td>
<td>C#</td>
</tr>
<tr>
<td>Memory Usage:</td>
<td>5.6MiB</td>
<td>2.2MiB</td>
</tr>
<tr>
<td>CPU Usage:</td>
<td>0%</td>
<td>0%</td>
</tr>
</table>
<p><span style="text-decoration: underline;"><strong>Test II</strong></span></p>
<p>Simple primitive variable usage. CPU usage was recorded before the read.</p>
<p><em>Java code:</em></p>
<p>import java.io.IOException;</p>
<p>public class TestII {</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void main(String[] args) {</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;byte b = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;short s = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int i = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;long l = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;float f = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;double d = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;boolean bo = true;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;char c = &#8216;a&#8217;;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//set them all to something<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b = 1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s = 1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i = 1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;l = 1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f = 1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;d = 1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bo = false;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c = &#8216;b&#8217;;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.in.read();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} catch (IOException e) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.printStackTrace();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>}</p>
<p><em>C# code:</em></p>
<p>using System;</p>
<p>namespace TestII<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;class MainClass<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void Main(string[] args)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;byte b = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;short s = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int i = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;long l = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;float f = 0;<br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sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bo = false;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c = &#8216;b&#8217;;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.Read();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}catch(Exception e){<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.Write(e.StackTrace);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</p>
<p><em>Results:</em></p>
<table border="1">
<tr>
<td></td>
<td>Java</td>
<td>C#</td>
</tr>
<tr>
<td>Memory Usage:</td>
<td>5.6MiB</td>
<td>2.1MiB</td>
</tr>
<tr>
<td>CPU Usage:</td>
<td>0%</td>
<td>0%</td>
</tr>
</table>
<p><span style="text-decoration: underline;"><strong>Test III</strong></span></p>
<p>Simple primitive variable usage, this time with arrays. Same as above but with arrays of 10,000 for each primitive. The arrays were set using loops similar in structure to the following:</p>
<p>for(int x=0; x<10000; x++)<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b[x] = 1;<br />
}</p>
<p><em>Results:</em></p>
<table border="1">
<tr>
<td></td>
<td>Java</td>
<td>C#</td>
</tr>
<tr>
<td>Memory Usage:</td>
<td>5.9MiB</td>
<td>2.4MiB</td>
</tr>
<tr>
<td>CPU Usage:</td>
<td>0%</td>
<td>0%</td>
</tr>
</table>
<p><span style="text-decoration: underline;"><strong>Test IV</strong></span></p>
<p>Simple object usage. CPU usage was recorded before the read.</p>
<p><em>Java code:</em></p>
<p>import java.io.IOException;</p>
<p>public class TestIV {</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void main(String[] args) {</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SimpleClass sc = new SimpleClass();</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sc.setID(5);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sc.setName(&#8220;Hello World&#8221;);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(sc.getString());</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.in.read();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} catch (IOException e) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.printStackTrace();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>}</p>
<p>public class SimpleClass {</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private int _ID;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private String _name;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public SimpleClass()<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//default constructor<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public SimpleClass(int ID, String name)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_ID = ID;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_name = name;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public int getID()<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _ID;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public void setID(int ID)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_ID = ID;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public String getString()<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _name;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public void setName(String name)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_name = name;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</p>
<p><em>C# code:</em></p>
<p>using System;</p>
<p>namespace TestIV<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;class MainClass<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void Main(string[] args)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SimpleClass sc = new SimpleClass();</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sc.setID(5);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sc.setName(&#8220;Hello World&#8221;);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine(sc.getString());</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.Read();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}catch(Exception e){<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.Write(e.StackTrace);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</p>
<p>using System;</p>
<p>namespace TestIV<br />
{</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public class SimpleClass<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private int _ID;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private String _name;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public SimpleClass()<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//default constructor<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public SimpleClass(int ID, String name)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_ID = ID;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_name = name;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public int getID()<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _ID;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public void setID(int ID)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_ID = ID;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public String getString()<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return _name;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public void setName(String name)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_name = name;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</p>
<p><em>Results:</em></p>
<table border="1">
<tr>
<td></td>
<td>Java</td>
<td>C#</td>
</tr>
<tr>
<td>Memory Usage:</td>
<td>5.6MiB</td>
<td>2.2MiB</td>
</tr>
<tr>
<td>CPU Usage:</td>
<td>0%</td>
<td>0%</td>
</tr>
</table>
<p><span style="text-decoration: underline;"><strong>Test V</strong></span></p>
<p>Simple object usage, this time with arrays. Same as above but with arrays of 10,000 for each object. The arrays were set using loops similar in structure to test III:</p>
<p><em>Java code:</em></p>
<p>import java.io.IOException;</p>
<p>public class TestV {</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void main(String[] args) {</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SimpleClass[] sc = new SimpleClass[10000];</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for(int x=0; x<10000; x++)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sc[x] = new SimpleClass();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sc[x].setID(5);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sc[x].setName("Hello World");</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(sc[x].getString());<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.in.read();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} catch (IOException e) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.printStackTrace();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>}</p>
<p><em>C# code:</em></p>
<p>using System;</p>
<p>namespace TestV<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;class MainClass<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void Main(string[] args)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SimpleClass[] sc = new SimpleClass[10000];</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for(int x=0; x<10000; x++)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.Write(e.StackTrace);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</p>
<p><em>Results:</em></p>
<table border="1">
<tr>
<td></td>
<td>Java</td>
<td>C#</td>
</tr>
<tr>
<td>Memory Usage:</td>
<td>10.1MiB</td>
<td>2.6MiB</td>
</tr>
<tr>
<td>CPU Usage:</td>
<td>8%</td>
<td>2%</td>
</tr>
</table>
<p><span style="text-decoration: underline;"><strong>Test VI</strong></span></p>
<p>Everyone&#8217;s favourite bubble sort with 10,000 integers.</p>
<p><em>Java code:</em></p>
<p>import java.io.IOException;</p>
<p>public class TestVI {</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void main(String[] args) {</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int[] array = new int[10000];</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//fill array<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for(int i=0;i<array.length;i++)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;array[i] = 10000-i;<br />
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nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} catch (IOException e) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.printStackTrace();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>}</p>
<p><em>C# code:</em></p>
<p>using System;</p>
<p>namespace TestVI<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;class MainClass<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void Main(string[] args)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int[] arr = new int[10000];</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//fill array<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for(int i=0;i<arr.Length;i++)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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p;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</p>
<p><em>Results:</em></p>
<table border="1">
<tr>
<td></td>
<td>Java</td>
<td>C#</td>
</tr>
<tr>
<td>Memory Usage:</td>
<td>6.3MiB</td>
<td>2.2MiB</td>
</tr>
<tr>
<td>CPU Usage:</td>
<td>6%</td>
<td>12%</td>
</tr>
</table>
<p><span style="text-decoration: underline;"><strong>All Results</strong></span></p>
<table border="1">
<tr>
<td></td>
<td>Java</td>
<td>C#</td>
</tr>
<tr>
<td>Test I Memory Usage:</td>
<td>5.6MiB</td>
<td>2.2MiB</td>
</tr>
<tr>
<td>Test I CPU Usage:</td>
<td>0%</td>
<td>0%</td>
</tr>
<tr>
<td>Test II Memory Usage:</td>
<td>5.6MiB</td>
<td>2.1MiB</td>
</tr>
<tr>
<td>Test II CPU Usage:</td>
<td>0%</td>
<td>0%</td>
</tr>
<tr>
<td>Test III Memory Usage:</td>
<td>5.9MiB</td>
<td>2.4MiB</td>
</tr>
<tr>
<td>Test III CPU Usage:</td>
<td>0%</td>
<td>0%</td>
</tr>
<tr>
<td>Test IV Memory Usage:</td>
<td>5.6MiB</td>
<td>2.2MiB</td>
</tr>
<tr>
<td>Test IV CPU Usage:</td>
<td>0%</td>
<td>0%</td>
</tr>
<tr>
<td>Test V Memory Usage:</td>
<td>10.1MiB</td>
<td>2.6MiB</td>
</tr>
<tr>
<td>Test V CPU Usage:</td>
<td>8%</td>
<td>2%</td>
</tr>
<tr>
<td>Test VI Memory Usage:</td>
<td>6.3MiB</td>
<td>2.2MiB</td>
</tr>
<tr>
<td>Test VI CPU Usage:</td>
<td>6%</td>
<td>12%</td>
</tr>
</table>
<p><span style="text-decoration: underline;"><strong>Conclusions</strong></span></p>
<p>Well there you have it. It seems that at this point in time Mono is not only mature enough to compete against a seasoned veteran programming language like Java, but in some cases good enough to even supersede it. This is wonderful news for people looking for alternative cross-platform high level languages.</p>
<div class="shr-publisher-140"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.tylerburton.ca/2009/12/resource-tests-java-vs-mono-net/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The return of the Hash Verifier</title>
		<link>http://www.tylerburton.ca/2009/11/the-return-of-the-hash-verifier/</link>
		<comments>http://www.tylerburton.ca/2009/11/the-return-of-the-hash-verifier/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 01:26:24 +0000</pubDate>
		<dc:creator>Tyler Burton</dc:creator>
				<category><![CDATA[Created by Tyler Burton]]></category>
		<category><![CDATA[F/OSS]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[hash verifier]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mono]]></category>
		<category><![CDATA[MonoDevelop]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows.Forms]]></category>

		<guid isPermaLink="false">http://www.tylerburton.ca/?p=105</guid>
		<description><![CDATA[Some of you may remember an old Windows program of mine called Hash Verifier. It was a graphical utility that allowed people to generate hashes of their files, and then compare those to known hashes, ensuring that their files had not been corrupted. Well in recent months my foray into the world of Linux has [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Some of you may remember an old Windows program of mine called <a href="http://www.tylerburton.ca/2009/09/hash-verifier/" target="_blank">Hash Verifier</a>. It was a graphical utility that allowed people to generate <a href="http://en.wikipedia.org/wiki/Cryptographic_hash_function" target="_blank">hashes</a> of their files, and then compare those to known hashes, ensuring that their files had not been corrupted. Well in recent months my foray into <a href="http://www.thelinuxexperiment.com" target="_blank">the world of Linux</a> has finally taken me into the realm of programming on that platform. Being primarily a <a href="http://en.wikipedia.org/wiki/.NET_Framework" target="_blank">.NET</a> developer on Windows I have found the <a href="http://mono-project.com/Main_Page" target="_blank">Mono project</a> on Linux to be an absolute breath of fresh air.</p>
<h2>&#8220;Monkey&#8221; project</h2>
<p>The Mono project is an open source implementation of Microsoft&#8217;s .NET common language runtime and a C# compiler. On Linux the easiest way to program in a Mono language is within the project&#8217;s own integrated development environment called <a href="http://en.wikipedia.org/wiki/MonoDevelop" target="_blank">MonoDevelop</a>.</p>
<h2>C is a sharp language</h2>
<p><a href="http://en.wikipedia.org/wiki/C_Sharp_%28programming_language%29" target="_blank">C#</a> is a very powerful programming language that falls somewhere between <a href="http://en.wikipedia.org/wiki/C_%28programming_language%29" target="_blank">C</a> and <a href="http://en.wikipedia.org/wiki/Java_%28programming_language%29" target="_blank">Java</a> in terms of syntax. While my experience with C# has been limited in the past, I was easily able to pick it up quickly thanks to my background in both C and Java, as well as fellow .NET language <a href="http://en.wikipedia.org/wiki/Visual_Basic_.NET" target="_blank">Visual Basic</a>.</p>
<h2>The challenge</h2>
<p>Digging up an old .NET project of mine, Hash Verifier, I decided to challenge myself to port the application to Mono. In order to do this I needed to accomplish the following:</p>
<ul>
<li>The original application ran on Microsoft&#8217;s .NET on the Windows platform. The new application must run on both .NET on Windows and Mono on supported platforms.</li>
<li>The original application was written in Visual Basic. The new application must be written in C#.</li>
<li>The original application has a GUI powered by the native Windows.Forms. The new application needs to have a GUI that works in a similar way on all platforms.</li>
<li>The new application must be able to fully re-create all of the old application&#8217;s features and functions.</li>
</ul>
<h2>Porting = easy<span style="text-decoration: underline;"><strong><br />
</strong></span></h2>
<p>I must say that porting this old application to C#/Mono was a relatively straightforward task. Although I had plenty of <a href="http://www.mono-project.com/Gui_Toolkits" target="_blank">GUI toolkits to choose from</a> I ended up sticking with the existing Windows.Forms. Once I had decided on using Windows.Forms as the basis for my GUI (<a href="http://www.mono-project.com/WinForms" target="_blank">WinForms</a> is a free and open source implementation for non-Windows users!) I set out to create my new application. I was literally able to open the old Visual Basic GUI designer file, copy the code into my Mono workspace, change the syntax to C# and voila it worked!</p>
<p>In fact the only tricky part was trying to figure out a compatibility issue that .NET/Mono 2.0 seem to have with the new <a href="http://en.wikipedia.org/wiki/Windows_Presentation_Foundation" target="_blank">Windows Presentation Foundation (WPF)</a>. I&#8217;ll save you the gory details but basically drag and drop functionality would not work. I eventually rectified this issue by including a compiler flag telling .NET/Mono to execute the form in <a href="http://www.csharphelp.com/archives3/archive558.html" target="_blank">single thread apartments</a> mode. You can see where I did this in my code by looking right above my static main function:</p>
<blockquote><p>[STAThreadAttribute]<br />
public static void Main()<br />
{<br />
&#8230;<br />
}</p></blockquote>
<h2>Final result</h2>
<p>With the application complete I must say I am impressed. Crafting and running applications for Mono is extraordinarily simple to do, seems very powerful, and the application itself only takes up a couple of MiB to run. In the future I definitely plan on doing more of this type of development now that I am using different operating systems every day.</p>
<h2>Hash Verifier<span style="text-decoration: underline;"><strong><br />
</strong></span></h2>
<p>If you are <a href="http://www.jonathanfritz.ca/software/automating-command-line-applications-in-visualbasic-dot-net" target="_blank">still</a> <a href="http://www.jonathanfritz.ca/software/opengl-in-visualstudionet-with-the-tao-framework" target="_blank">using</a> the <a href="http://www.jonathanfritz.ca/software/areca-the-open-sourced-backup-solution" target="_blank">old</a> version of Hash Verifier, or if you would just like to try it out you can download the new Hash Verifier in two different ways. The package marked <em>binary only</em> contains just the program itself and the relevant documentation. The package marked <em>all</em> contains both the program, documentation as well as the source code.</p>
<p><em>Requirements:</em></p>
<ul>
<li><strong>All platforms:</strong> .NET 2.0+ / Mono, a graphical display</li>
<li><strong>*nix platforms:</strong> WinForms (identified as System.Windows.Forms)</li>
</ul>
<table border="1">
<tbody>
<tr>
<td></td>
<td><strong>Binary Only Package</strong></td>
<td><strong>All Package</strong></td>
</tr>
<tr>
<td><strong>File name:</strong></td>
<td>hash_verifier_0_1_0_0_binary.zip</td>
<td>hash_verifier_0_1_0_0_all.zip</td>
</tr>
<tr>
<td><strong>File hashes:</strong></td>
<td style="text-align: center;" colspan="2"><a href="http://www.tylerburton.ca/files/hashes/hash_verifier_0_1_0_0.hashes.txt">Download Here</a></td>
</tr>
<tr>
<td><strong>GPG signature:</strong></td>
<td><a href="http://www.tylerburton.ca/files/sigs/hash_verifier_0_1_0_0_binary.zip.sig" target="_blank">Download Here</a></td>
<td><a href="http://www.tylerburton.ca/files/sigs/hash_verifier_0_1_0_0_all.zip.sig" target="_blank">Download Here</a></td>
</tr>
<tr>
<td><strong>License:</strong></td>
<td style="text-align: center;" colspan="2">(LGPL) <a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">View Here</a></td>
</tr>
<tr>
<td><strong>Version:</strong></td>
<td style="text-align: center;" colspan="2">0.1.0.0</td>
</tr>
<tr>
<td><strong>File download:</strong></td>
<td><a href="http://www.tylerburton.ca/files/apps/hash_verifier_0_1_0_0_binary.zip" target="_blank">Download Here</a></td>
<td><a href="http://www.tylerburton.ca/files/apps/hash_verifier_0_1_0_0_all.zip" target="_blank">Download Here</a></td>
</tr>
</tbody>
</table>
<div class="shr-publisher-105"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.tylerburton.ca/2009/11/the-return-of-the-hash-verifier/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Of eye candy and desktop environments</title>
		<link>http://www.tylerburton.ca/2009/10/of-eye-candy-and-desktop-environments/</link>
		<comments>http://www.tylerburton.ca/2009/10/of-eye-candy-and-desktop-environments/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 23:46:52 +0000</pubDate>
		<dc:creator>Tyler Burton</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Microsoft Windows]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[The Linux Experiment]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.tylerburton.ca/?p=94</guid>
		<description><![CDATA[As a long time Windows user I have had my fair share of dull, gray toolbars, buttons and controls. Prior to Windows Vista, Microsoft&#8217;s first real attempt to pretty up the system &#8211; sorry XP, making the taskbar blue just doesn&#8217;t cut it &#8211; I even looked to Mac OSX with some jealousy. Flash forward [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>As a long time Windows user I have had my fair share of dull, gray toolbars, buttons and controls. Prior to Windows Vista, Microsoft&#8217;s first real attempt to pretty up the system &#8211; sorry XP, making the taskbar blue just doesn&#8217;t cut it &#8211; I even looked to Mac OSX with some jealousy.</p>
<p>Flash forward to <a href="http://www.thelinuxexperiment.com" target="_blank">The Linux Experiment</a> and I have been introduced to a whole new set of environment graphics. Some of them are quite beautiful and some are just&#8230; plain ugly. On the plus side, the nice thing about Linux is it&#8217;s ability to customize just about every detail, including how my desktop looks. But is there really any excuse for some of the horrible themes, colour choices (*cough* <a href="http://en.wikipedia.org/wiki/Ubuntu_%28operating_system%29" target="_blank">Ubuntu</a> *cough*), and graphics that are <em>still</em> present in Linux today? Surely there are some artists out there in the open source community that could be let loose on these problems? Come on people, I know you can do better!</p>
<div class="shr-publisher-94"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.tylerburton.ca/2009/10/of-eye-candy-and-desktop-environments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

