<?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>haslo.ch - Guido's Blog &#187; open source</title>
	<atom:link href="http://www.haslo.ch/blog/tag/open-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.haslo.ch/blog</link>
	<description>We believe that people with passion can change the world for the better.</description>
	<lastBuildDate>Wed, 16 Nov 2011 11:23:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Quake Live Beta</title>
		<link>http://www.haslo.ch/blog/quake-live-beta/</link>
		<comments>http://www.haslo.ch/blog/quake-live-beta/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 14:34:39 +0000</pubDate>
		<dc:creator>haslo</dc:creator>
				<category><![CDATA[Video Games]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[quake]]></category>
		<category><![CDATA[video games]]></category>

		<guid isPermaLink="false">http://www.haslo.ch/blog/?p=2005</guid>
		<description><![CDATA[I&#8217;m in the Quake Live Beta, yay! If you haven&#8217;t heard of it &#8230; Quake Live is, basically, Quake III Arena with (very) slightly improved graphics as a browser plugin, plus online stats, plus automatic matchmaking (so lower skill levels find servers where they&#8217;re not annihilated, too &#8211; yay). And the best part, it&#8217;s absolutely, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in the <a href="http://quakelive.com/">Quake Live</a> Beta, yay!</p>
<div id="attachment_2006" class="wp-caption aligncenter" style="width: 263px"><a href="http://www.haslo.ch/blog/wp-content/uploads/2009/01/quakelive.jpg"><img class="size-full wp-image-2006" title="Quake Live" src="http://www.haslo.ch/blog/wp-content/uploads/2009/01/quakelive.jpg" alt="Quake Live!" width="253" height="71" /></a><p class="wp-caption-text">Quake Live</p></div>
<p>If you haven&#8217;t heard of it &#8230; Quake Live is, basically, <a href="http://en.wikipedia.org/wiki/Quake_III_Arena">Quake III Arena</a> with (very) slightly improved graphics as a browser plugin, plus online stats, plus automatic matchmaking (so lower skill levels find servers where they&#8217;re not annihilated, too &#8211; yay). And the best part, it&#8217;s absolutely, totally, entirely <strong>free of charge</strong>!</p>
<div id="attachment_2007" class="wp-caption alignright" style="width: 160px"><a href="http://www.haslo.ch/blog/wp-content/uploads/2009/01/quakeliveshots.jpg"><img class="size-thumbnail wp-image-2007" title="Quake Live Screenie" src="http://www.haslo.ch/blog/wp-content/uploads/2009/01/quakeliveshots-150x150.jpg" alt="Quake Live Screenie" width="150" height="150" /></a><p class="wp-caption-text">Quake Live Screenie</p></div>
<p>The game is as great as it used to be, funny how id totally nailed the multiplayer shooter over 10 years ago already.</p>
<p>Considering the <a href="http://en.wikipedia.org/wiki/Quake_engine">Quake Engine</a> is open source already (and spawned great projects like <a href="http://www.worldofpadman.com/">World of Padman</a>), it&#8217;s a somewhat natural step, but still a great display of appraciation from <a href="http://www.idsoftware.com/">id Software</a>.</p>
<p>Now, here&#8217;s the best bit: <strong>I have 5 beta invitations to give out</strong>. Comment here to get one of them (obviously your email address, which won&#8217;t be displayed, has to be correct). First come first get, the race is on <img src='http://www.haslo.ch/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' title="Quake Live Beta" /> </p>
<p>Oh, my nick is &#8220;haslo&#8221;, in case you wondered.</p>
<p><strong>Update 2009-01-10 11:11:</strong> Yay, 4 new invites! Comment if you want one!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.haslo.ch/blog/quake-live-beta/feed/</wfw:commentRss>
		<slash:comments>66</slash:comments>
		</item>
		<item>
		<title>Installing LyX (LaTeX) on Windows Vista</title>
		<link>http://www.haslo.ch/blog/installing-lyx-latex-on-windows-vista/</link>
		<comments>http://www.haslo.ch/blog/installing-lyx-latex-on-windows-vista/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 19:12:14 +0000</pubDate>
		<dc:creator>haslo</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Philosophy]]></category>
		<category><![CDATA[studies]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.haslo.ch/blog/?p=1350</guid>
		<description><![CDATA[So inspired by this blog post (German) and the therein linked, not uninsightful comment about how stupid Office text processing (and how awesome LaTeX) is, and generally being a friend of OSS, I decided to jump the gun and install something to that end. Now, looking for reasonable GUIs (because I&#8217;m just too old to [...]]]></description>
			<content:encoded><![CDATA[<p>So inspired by <a href="http://www.theofel.de/archives/2008/09/textverarbeitung-vs-textsatz.html">this blog post</a> (German) and the therein linked, not uninsightful comment about <a href="http://www.ecn.wfu.edu/~cottrell/wp.html">how stupid Office text processing</a> (and how awesome <a href="http://en.wikipedia.org/wiki/LaTeX">LaTeX</a>) is, and generally being a friend of <a href="http://en.wikipedia.org/wiki/Open_source_software">OSS</a>, I decided to jump the gun and install something to that end.</p>
<p>Now, looking for reasonable <abbr title="Graphical User Interfaces">GUIs</abbr> (because I&#8217;m just too old to hack anything without a comfortable environment) I stumbled upon <a href="http://www.lyx.org/">LyX</a>, which seems to be reasonably comfy. It runs now, after an afternoon of shouting and crying, so I decided I&#8217;d make a little tutorial as to how exactly you&#8217;ll have to install it.</p>
<p>My Windows Vista Business (32-Bit) is German, so bear with me regarding the screenshot texts.</p>
<p><strong>Update 2009-03-25 13:41:</strong> There is <a href="http://wiki.lyx.org/Windows/LyXWinInstaller">a Windows Installer</a> now, which still takes some time to install and requires various steps, but has some message boxes guiding you through the process. It&#8217;s still in beta, but worked a treat on my Windows XP machine.</p>
<p><span id="more-1350"></span></p>
<h2>Which LyX? And What Else?</h2>
<p>Now, first off, there are two installation packages for LyX (which you find <a href="http://wiki.lyx.org/Windows/Windows">on the Wiki</a>). At the time of this writing, <strong>do not</strong> download the one linked <a href="http://www.lyx.org/Download">on the download page</a>. The installer you want is (currently) this one:</p>
<p style="text-align: center;"><a class="urllink" rel="nofollow" href="ftp://ftp.lyx.org/pub/lyx/bin/1.5.6/LyX-1.5.6-1-Installer-Bundle.exe">LyX-1.5.6-1-Installer-Bundle.exe</a> (95 MB)</p>
<p>(There might be a newer version <a href="http://wiki.lyx.org/Windows/Windows">on the Wiki</a>, so check back there if you access this post later than September 2008.)</p>
<p>The non-bundle installer tries to download <a href="http://miktex.org/">MiKTeX</a> during the installation, which is nice, but it obviously does so with an <strong>outdated URL</strong>, yielding a 404 (not found) error:</p>
<div id="attachment_1351" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.haslo.ch/blog/wp-content/uploads/2008/09/lyx-404.jpg"><img class="size-thumbnail wp-image-1351" title="404 error when attempting to download MiKTeX" src="http://www.haslo.ch/blog/wp-content/uploads/2008/09/lyx-404-150x150.jpg" alt="404 Error" width="150" height="150" /></a><p class="wp-caption-text">404 Error</p></div>
<p>The installation will complete despite this error, but you won&#8217;t have a LaTeX frontend, but just &#8230; a standalone editor without any exporting functionality, basically worth nil.</p>
<p>Keep in mind that despite the LyX setup telling you it can use an existing MiKTeX installation, that&#8217;s simply not true, as it looks for a <em>tex.exe</em> file, which the current distribution of MiKTeX just doesn&#8217;t include. So <strong>don&#8217;t download MiKTeX individually</strong> either, unless you don&#8217;t plan to use the LyX frontend.</p>
<p>So just install the bundle from the start.</p>
<h2>Installation</h2>
<p>OK, now that you have the proper file, it&#8217;s time to install it. <strong>You will need to install it as administrator</strong>, as the installation process will otherwise abort after 30 minutes (more in this later). So right-click the file, &#8220;Run as Administrator&#8221;.</p>
<div id="attachment_1355" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.haslo.ch/blog/wp-content/uploads/2008/09/lyx_runasadmin.jpg"><img class="size-thumbnail wp-image-1355" title="Run the bundle installer as Administrator" src="http://www.haslo.ch/blog/wp-content/uploads/2008/09/lyx_runasadmin-150x150.jpg" alt="Run as Admin" width="150" height="150" /></a><p class="wp-caption-text">Run as Admin</p></div>
<p>OK, enter your credentials if you use <a href="http://en.wikipedia.org/wiki/User_Account_Control">UAC</a>, and off you go. <strong>Select &#8220;Install MiKTeX&#8221;</strong>, UI language and dictionaries, select a directory and start. You&#8217;ll probably want to install it for all users. The LyX installation itself will be over rather quick, although you&#8217;ll have to agree to each dictionary&#8217;s terms of use individually.</p>
<p>After a minute or so, the MiKTeX license agreement will pop up, tick &#8220;I accept&#8221; and off goes the long part. First, select whether you want to install MiKTeX for all users or just yourself &#8211; choosing the same here as for LyX is wise &#8211; and a directory.</p>
<p>Now, the next question for settings seems rather innocent, but I strongly suggest <strong>switching &#8220;install missing packages&#8221; to &#8220;yes&#8221;</strong> (I&#8217;ll write about why yes and not &#8220;ask every time&#8221; a bit below, selecting &#8220;no&#8221; doesn&#8217;t make much sense since you want a working program):</p>
<div id="attachment_1356" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.haslo.ch/blog/wp-content/uploads/2008/09/lyx_askmefirst.jpg"><img class="size-thumbnail wp-image-1356" title="Install missing packages should be &quot;Yes&quot;" src="http://www.haslo.ch/blog/wp-content/uploads/2008/09/lyx_askmefirst-150x150.jpg" alt="Install Missing Packages" width="150" height="150" /></a><p class="wp-caption-text">Install Missing Packages</p></div>
<p>Good, start. You will see the following screen for quite some time now:</p>
<div id="attachment_1357" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.haslo.ch/blog/wp-content/uploads/2008/09/lyx_installing_miktex.jpg"><img class="size-thumbnail wp-image-1357" title="LyX installing MiKTeX" src="http://www.haslo.ch/blog/wp-content/uploads/2008/09/lyx_installing_miktex-150x150.jpg" alt="LyX installing MiKTeX" width="150" height="150" /></a><p class="wp-caption-text">LyX installing MiKTeX</p></div>
<p>After about 15 minutes on my mobile Core2 with 2GHz, you will need to <strong>push &#8220;Next &gt;&#8221;</strong> after the completion of the MiKTeX setup, to continue the LyX setup. Now, if you didn&#8217;t select &#8220;Yes&#8221; above, a plethora of package installation dialogs will pop up &#8211; <strong>and grab focus</strong>, so if you happen to install happily, and do something else while the computer is milling, you might screw up your installation with a careless key press.</p>
<p>Just imagine, you happily type a blog post, and then you cancel the running installation because that blog post would&#8217;ve contained a &#8220;C&#8221; next when the popup grabs focus. Yes, experience speaking (although, OK, it must&#8217;ve been me panicking and pushing &#8220;Escape&#8221; instead).</p>
<div id="attachment_1361" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.haslo.ch/blog/wp-content/uploads/2008/09/lyx_packages.jpg"><img class="size-thumbnail wp-image-1361" title="Package installation for missing MiKTeX packages" src="http://www.haslo.ch/blog/wp-content/uploads/2008/09/lyx_packages-150x150.jpg" alt="Package Installation" width="150" height="150" /></a><p class="wp-caption-text">Package Installation</p></div>
<p>OK, so you haven&#8217;t screwed up. Another 20 minutes, and you will be greeted with an <strong>inviting image</strong>. If you started as administrator, that is, otherwise the installation routine will abort right here with an error and leave you with half a program installed.</p>
<div id="attachment_1370" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.haslo.ch/blog/wp-content/uploads/2008/09/lyx_driver_error.jpg"><img class="size-thumbnail wp-image-1370" title="LyX driver installation error" src="http://www.haslo.ch/blog/wp-content/uploads/2008/09/lyx_driver_error-150x150.jpg" alt="LyX Driver Error" width="150" height="150" /></a><p class="wp-caption-text">LyX Driver Error</p></div>
<p>Don&#8217;t worry, it&#8217;s just Vista being paranoid about the <a href="http://wiki.lyx.org/Windows/MetafileToEPSConverter">Metafile to EPS Converter</a>, a printer driver that&#8217;s installed in the course of this setup. <strong>&#8220;Install anyway&#8221;</strong> is the way to go.</p>
<p>Now, you&#8217;re nearly done. Close the setup (without checking the &#8220;run LyX immediately&#8221; box, unless you want to run it as administrator, too), and <strong>start LyX from the start menu</strong>. You will need to <strong>provide your UAC credentials</strong> yet again upon running LyX for the first time, since it does some further installation stuff for your standard user.</p>
<div id="attachment_1371" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.haslo.ch/blog/wp-content/uploads/2008/09/lyx_installed.jpg"><img class="size-thumbnail wp-image-1371" title="LyX Installed!" src="http://www.haslo.ch/blog/wp-content/uploads/2008/09/lyx_installed-150x150.jpg" alt="LyX Installed!" width="150" height="150" /></a><p class="wp-caption-text">LyX Installed!</p></div>
<h2>Conclusion</h2>
<p>In all honesty, I didn&#8217;t expect to spend an entire afternoon (well into the evening) installing a working LaTeX environment. It works now it seems, and I&#8217;m looking forward to writing things in a <abbr title="What You See Is What You Mean">WYSIWYM</abbr> typesetting system instead of a <abbr title="What You See Is What You Get">WYSIWYG</abbr> word processor (where you don&#8217;t quite get what you see after all, and it&#8217;s easy to focus on presentation over content or structure). But the way there could have been less annoying.</p>
<p><em><strong>Disclaimer:</strong> This isn&#8217;t the first time I&#8217;m writing something with LaTeX, the last time I wrote in a text editor with just basic highlighting. But that&#8217;s over five years ago &#8211; I do hear though that templating hasn&#8217;t gotten a lot easier since. I&#8217;ll now write a &#8220;test&#8221; 15 page paper with this first, before I fully delve into my diploma thesis. If this test doesn&#8217;t prove successful by my yet to be determined standards, which may include those dreaded custom styles (anybody has good documentation on .sty files?), off I am to <a href="http://www.openoffice.org/">OpenOffice</a> with <a href="http://www.tinypdf.com/">TinyPDF</a> again.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.haslo.ch/blog/installing-lyx-latex-on-windows-vista/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Google Chrome Roundup</title>
		<link>http://www.haslo.ch/blog/google-chrome-roundup/</link>
		<comments>http://www.haslo.ch/blog/google-chrome-roundup/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 15:31:25 +0000</pubDate>
		<dc:creator>haslo</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[conspiracy theories]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[reviews]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.haslo.ch/blog/?p=700</guid>
		<description><![CDATA[Here goes the second round of my Google Chrome review, mainly consisting of links to news and discussions. Chrome Phone Home Maybe you heard (I hear it was even on TV?) that Chrome loves E.T. and likes to phone home. Yes, it does, but not that much more so than other browsers: Google&#8217;s Matt Cutts [...]]]></description>
			<content:encoded><![CDATA[<p>Here goes the second round of my Google Chrome review, mainly consisting of links to news and discussions.</p>
<h2>Chrome Phone Home</h2>
<p>Maybe you heard (I hear it was even on TV?) that Chrome loves E.T. and likes to phone home. Yes, it does, but not that much more so than other browsers: <a href="http://www.mattcutts.com/blog/google-chrome-communication/">Google&#8217;s Matt Cutts has the details</a>. (Yes, I added that link to the other post later on as well).</p>
<p>Selection mine, he has a few more points:</p>
<blockquote><p>If you’re just surfing around the web and clicking on links, that information does not go to google.com.</p>
<p>If you are typing a search or url in the address bar, Google Chrome will talk to the current search service to try to offer useful query/url suggestions.</p>
<p>Google Chrome checks for automatic updates every 25 hours.</p>
<p>Every 30 minutes, Google Chrome downloads a list of 32-bit url hashes of urls thought to be dangerous (malware or phishing).</p></blockquote>
<p>Essentially, the same as every other browser. And less than IE, who sends URLs to Microsoft for Malware checks if you opt in (and doesn&#8217;t have a malware filter if you don&#8217;t). Their <a href="http://www.microsoft.com/windows/ie/ie7/privacy/ieprivacy_7.mspx">Internet Explorer Privacy Statement</a> reads:</p>
<blockquote><p>If you opt in, addresses not on the legitimate list will be sent to Microsoft and checked against a frequently updated list of websites that have been reported to Microsoft as phishing, suspicious, or legitimate websites.</p></blockquote>
<h2>Terms of Use</h2>
<p>Another outcry in the community (<a href="http://tapthehive.com/discuss/This_Post_Not_Made_In_Chrome_Google_s_EULA_Sucks">details here at TapTheHive</a>) was about Google&#8217;s terms of use, in particular the lengthy part 11 which allowed Google to use all data anybody ever entered in Chrome, basically. They&#8217;re <a href="http://valleywag.com/5044902/the-5-most-laughable-terms-of-service-on-the-net">not the first ones with evil TOS</a>, but the ones that were watched best I guess, with the paranoia that I partially share and all. They changed it, <a href="http://www.google.com/chrome/eula.html?hl=en&amp;brand=CHMB&amp;utm_campaign=en&amp;utm_source=en-ha-na-us-sk&amp;utm_medium=ha&amp;utm_term=chrome">it now reads</a>:</p>
<blockquote><p>11. Content license from you</p>
<p>11.1 You retain copyright and any other rights you already hold in Content which you submit, post or display on or through, the Services.</p></blockquote>
<p>The <a href="http://www.google.com/chrome/eula.html?hl=de&amp;brand=CHMB&amp;utm_campaign=en&amp;utm_source=en-ha-na-us-sk&amp;utm_medium=ha&amp;utm_term=chrome">German version</a> didn&#8217;t change yet, but the English version works retroactively for people who accepted the old one as well.</p>
<h2>More, Way More</h2>
<p>I guess everybody wants to see more objective data as to whether Chrome&#8217;s speed really is better than that of Firefox (let&#8217;s not talk about IE). It is, slightly: <a href="http://lifehacker.com/5044668/beta-browser-speed-tests-which-is-fastest">Speed tests</a>! But the Firefox team is working on a <a href="http://weblogs.mozillazine.org/roadmap/archives/2008/09/tracemonkey_update.html">faster JS engine</a>.</p>
<p>Then, a funny little exploit to <a href="http://evilfingers.com/advisory/google_chrome_poc.php">crash all of Chrome&#8217;s tabs</a> (via <a href="http://blog.der-link.de/archives/1658-Google-Chrome-die-2..html">der-link.de</a>).</p>
<p>And finally, interoperability: Get the <a href="http://lifehacker.com/5044518/enable-chromes-best-features-in-firefox">best of Chrome&#8217;s features in Firefox</a> via, who&#8217;d have thought, plugins (I didn&#8217;t know a few of those). And, <a href="http://www.interneteconomics.de/blog/?p=434">associative art with the Chrome logo</a> &#8211; is there a <a href="http://digi-soft.blogspot.com/2008/01/secret-of-two-hidden-messages-in-google.html">hidden message</a> somewhere (via <a href="http://www.basicthinking.de/blog/2008/09/04/google-chrome-how-it-could-be-evil/">Basic Thinking</a>)?</p>
<p><strong>Update 08-09-12 10:59:</strong> Yesterday&#8217;s news (well, actually, from the 8th), <a href="http://googleblog.blogspot.com/2008/09/update-to-google-suggest.html">Google now anonymizes the 2% of traffic they log from Google Suggest after only 24 hours</a>. And since this addition will send another trackback to the Google Blog, hello in advance <img src='http://www.haslo.ch/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' title="Google Chrome Roundup" /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.haslo.ch/blog/google-chrome-roundup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Chrome</title>
		<link>http://www.haslo.ch/blog/google-chrome/</link>
		<comments>http://www.haslo.ch/blog/google-chrome/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 10:44:54 +0000</pubDate>
		<dc:creator>haslo</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[addons]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[reviews]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.haslo.ch/blog/?p=527</guid>
		<description><![CDATA[Google Chrome is what must be the most written-about browser, ever &#8211; it&#8217;s hard not to write about it in your blog, peer pressure and all. Announced just Monday, and in blogs and big media alike from the moment it started. It is special though, admittedly, has several unique approaches that make checking it out [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_613" class="wp-caption alignright" style="width: 160px"><a href="http://www.haslo.ch/blog/wp-content/uploads/2008/09/chrome-hasloch.jpg"><img class="size-thumbnail wp-image-613" title="haslo.ch in Chrome" src="http://www.haslo.ch/blog/wp-content/uploads/2008/09/chrome-hasloch-150x150.jpg" alt="haslo.ch in Chrome" width="150" height="150" /></a><p class="wp-caption-text">haslo.ch in Chrome</p></div>
<p><a href="http://www.google.com/chrome/">Google Chrome</a> is what must be the most written-about browser, ever &#8211; it&#8217;s hard not to write about it in your blog, peer pressure and all. <a href="http://googleblog.blogspot.com/2008/09/fresh-take-on-browser.html">Announced just Monday</a>, and in blogs and big media alike from the moment it started.</p>
<p>It <em>is</em> special though, admittedly, has several unique approaches that make checking it out definitely worthwhile:</p>
<ul>
<li><strong>Each tab is a process</strong>, instead of each tab or even the whole browser being a thread &#8211; meaning, if one tab crashes, the browser doesn&#8217;t, and garbage collection when closing tabs is more thorough as well</li>
<li><strong>Popups are not intrusive</strong>, &#8220;contained&#8221; within the tab until the user actually drags them out</li>
<li>The <strong>JavaScript VM</strong> is actually meant for web applications and not tiny scripts, with proper garbage collection and JIT compilation (getting JS closer to Java by the way, while still being distinctly a unique language)</li>
<li>It&#8217;s developed with <strong>security</strong> in mind from the ground up, including sandboxes for browser tasks and built-in malware scans</li>
<li>It&#8217;s <strong>open source</strong>! Meaning, anybody can extend it, anybody can use the research Google put into it, and anybody can look at what the browser does under the hood (except Microsoft that is, as they certainly won&#8217;t go OS with their IE any time soon)</li>
<li>With <a href="http://en.wikipedia.org/wiki/WebKit">WebKit</a>, it&#8217;s powered by a proven, standards compliant and fast <strong>rendering engine</strong></li>
<li>It was introduced with a <a href="http://www.agglom.com/webslideshow/1876/Google_Chrome_The_Comic_Book">comic book</a>!</li>
</ul>
<p>But there are also a few things speaking against Chrome:</p>
<ul>
<li>It&#8217;s a great <strong>competitor</strong> not only to the IE, but to <a href="http://www.mozilla.com/en-US/firefox/">Firefox</a> (although <a href="http://john.jubjubs.net/2008/09/01/thoughts-on-chrome-more/">their CEO&#8217;s reaction</a> was pretty positive, via <a href="http://www.basicthinking.de/blog/2008/09/02/google-chrome-browserkurztest/">Basic Thinking</a> in German), <a href="http://www.apple.com/safari/">Safari</a> and <a href="http://www.opera.com/">Opera</a>: Tech-savvy people care what browser they use, non-tech-savvy people just use &#8220;the internet&#8221;, and consequently many tech-savvy people don&#8217;t use IE and will try Chrome</li>
<li>It&#8217;s yet another tool for <strong>Google to collect more data</strong> to <a href="http://www.meinungsfreiheit.li/archives/Google-ab-heute-mit-eigenen-Browser-940.html">turn into profit</a> (link German); the anti-phishing feature <a href="http://www.basicthinking.de/blog/2008/09/03/google-chrome-zeig-google-wo-du-surfst/">sends all your URLs to Google</a> (link German &#8211; just like the IE phishing filter by the way), and is opt-out instead of opt-in. Edit: This was actually wrong, not every URL is sent to Google, instead the browser regularly downloads hash lists and then locally compares URLs to those lists. However, for the smart search, everything you type is sent to your search engine, which is by default Google.</li>
<li>Being new, the browser still lacks the <strong>plugin support</strong> Firefox has (more on this below)</li>
</ul>
<p>So, does the positive outweigh the negative? And even more important: Is the browser easy to use, fast and as standards compliant as it was promised to be?<br />
<span id="more-527"></span></p>
<h2>User Experience</h2>
<p>The browser really is fast! JavaScript is fast. Page loading is fast. Loading the browser in the first place is fast. Switching tabs (even with processing-intensive tasks) is fast. Kicking tabs is fast.</p>
<p>The speed advantage really is objectively measurable too &#8211; in this <a href="http://celtickane.com/webdesign/jsspeed.php">JavaScript speed test</a> here, my computer lets Chrome rattle through in 200 ms. My Firefox 3 takes around 350 ms (still very fast), while the IE is sitting at over 2500 ms.</p>
<p><a href="http://www.haslo.ch/blog/wp-content/uploads/2008/09/chrome-detached.jpg"><img class="alignright size-thumbnail wp-image-614" title="chrome-detached" src="http://www.haslo.ch/blog/wp-content/uploads/2008/09/chrome-detached-150x150.jpg" alt="chrome detached 150x150 Google Chrome" width="150" height="150" /></a>The whole browser is very simple and easy to use, with little to no configuration required (or possible) &#8211; which has downsides for both <a href="http://tobolds.blogspot.com/2008/09/google-chrome-price-of-simplicity.html">users who aren&#8217;t happy with the defaults</a>, and for people like me who like fiddling with settings to personalize stuff.</p>
<p>I&#8217;m less happy with the browser trying to fill stuff everywhere, whether he knows the site or not. It leads to all kinds of odd behaviour, like the first time I&#8217;m trying to log into <a href="https://www.doodle.ch/mydoodle/login.html">MyDoodle</a>, the user name shows as &#8220;1979&#8243;.</p>
<p>All this leads to an odd situation: The browser is a black box, more so than any other, despite being open source. I really have no clue what the browser is doing there when it tries to think for me. I don&#8217;t like that.</p>
<p>Anyway, the simplicity and ease of use do work towards making the browser also a competitor to the Internet Explorer, not only geek browsers: It&#8217;s easy to install, possible to install (and uninstall) per user without admin rights, doesn&#8217;t ask many questions and just works right out of the box. So many non-geek users will find this a viable alternative to the behemoth IE.</p>
<h2>Plugins</h2>
<p>The plugin thing is a big one for me: I&#8217;m using about 20 Firefox plugins right now. Most prominent and essential among them are <a href="http://noscript.net/">NoScript</a> and <a href="http://adblockplus.org/">AdBlock Plus</a>, surfing without them is horrible. Of course <a href="http://www.customizegoogle.com/">CustomizeGoogle</a> is a favourite as well.</p>
<p>There&#8217;s way more: <a href="http://www.stumbleupon.com/">StumbleUpon</a> and <a href="http://www.chrisfinke.com/addons/twitterbar/">TwitterBar</a> are used very often, too (although I try to cut down on StumbleUpon, it&#8217;s horrible &#8211; don&#8217;t install it if you value your sleep and free time). Developing web applications or even mere websites without the <a href="http://chrispederick.com/work/web-developer/">Web Developer Toolbar</a> is unthinkable.</p>
<p>While I&#8217;m at it, I&#8217;ll also plug the great <a href="http://downloadstatusbar.mozdev.org/">Download Statusbar</a>, <a href="http://pagerankstatus.mozdev.org/">DradDropUpload</a> for Gmail, and <a href="http://pagerankstatus.mozdev.org/">Pagerank Status</a>. And of course there&#8217;s <a href="http://gears.google.com/">Gears</a>, which is built into Chrome from the start.</p>
<p>While I&#8217;m sure that eventually, plugin support for Chrome will be great (the framework is in place and thought-through after all), right now due to being new the browser simply lacks features that I like and I&#8217;m used to.</p>
<h2>Conclusion</h2>
<p>Well &#8230; it&#8217;s another new browser. Not bad, very fast, and with several innovative approaches that will revolutionize browsers no matter if Chrome will be successful or not.</p>
<p>As for myself, I&#8217;ll keep using <a href="http://www.mozilla.com/en-US/firefox/">Firefox</a> for now. The combination of little added value, no added geek value (Firefox is open source too), and actual missing features make it less than tempting to switch main browser.</p>
<p>(And I may be starting to get a tiny bit paranoid when it comes to Google&#8217;s data collection frenzy.)</p>
<p>Edit and post aftermath: The first <a href="http://blogs.zdnet.com/security/?p=1843">public Chrome security hole</a>, and I didn&#8217;t even realize Google <a href="http://www.rss-blogger.de/blog/2008/09/google-chrome-ohne-rss-unterstutzung/">doesn&#8217;t support RSS discovery</a> (link German, a feature of Firefox that I love). Finally, <a href="http://www.mattcutts.com/blog/google-chrome-communication/">Google&#8217;s answer to the conspiracy theorists</a> (via <a href="http://www.tou.ch/blog/2008/09/03/google-chrome-robert-basic-vs-matt-cutts/">tou.ch</a>).</p>
<p>And gee that trackback to the Google blog brought traffic &#8211; hi folks <img src='http://www.haslo.ch/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' title="Google Chrome" /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.haslo.ch/blog/google-chrome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VBA Vector Classes</title>
		<link>http://www.haslo.ch/blog/vba-vector-classes/</link>
		<comments>http://www.haslo.ch/blog/vba-vector-classes/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 15:36:25 +0000</pubDate>
		<dc:creator>haslo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[downloads]]></category>
		<category><![CDATA[haslo]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[snippets]]></category>
		<category><![CDATA[vb]]></category>

		<guid isPermaLink="false">http://www.haslo.ch/blog/?p=416</guid>
		<description><![CDATA[If you&#8217;re anything like me and ever had to code anything in Visual Basic for Applications, you must have felt the need for a proper API with some very basic common ADTs. The most basic of them being, in my opinion, the dynamic array (Vector, ArrayList, List and Collection are often used more or rather [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re anything like me and ever had to code anything in <a href="http://en.wikipedia.org/wiki/Visual_Basic_for_Applications">Visual Basic for Applications</a>, you must have felt the need for a proper API with some very basic common <a href="http://en.wikipedia.org/wiki/Abstract_data_type">ADTs</a>. The most basic of them being, in my opinion, the <a href="http://en.wikipedia.org/wiki/Dynamic_array">dynamic array</a> (Vector, ArrayList, List and Collection are often used more or rather less synonymous). So what would it feel like to be able to write this and have it work?</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Dim</span> primitiveVector <span style="color: #000080;">As</span> clsVector
<span style="color: #000080;">Set</span> primitiveVector = <span style="color: #000080;">New</span> clsVector
<span style="color: #000080;">Dim</span> myInt <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>
myInt = 3
&nbsp;
primitiveVector.AddItem myInt</pre></div></div>

<p>There are of course other people who have made such a thing, and there&#8217;s the VBA <a href="http://msdn.microsoft.com/en-us/library/a1y8b3b3(VS.80).aspx">Collection</a>, but none of them quite fit what I wanted. I wanted a Vector that had random access, was able to handle <a href="http://en.wikipedia.org/wiki/LIFO">LIFO</a> and <a href="http://en.wikipedia.org/wiki/FIFO">FIFO</a> (and thus act as stack and queue), addition and insertion and deletion, could check for item existence, and had dynamic resizing. So I went and coded my own. I did this while working at <a href="http://promino.ch/">Promino AG</a> and thus the code is technically theirs, so thanks to <a href="https://www.xing.com/profile/PaulB_Moser/">Paul Moser</a> for the nod for publishing this under the GNU <a href="http://www.gnu.org/licenses/lgpl.html">Lesser General Public License</a>.</p>
<p><a href="http://www.haslo.ch/media/Vectors.zip"><img src="/media/floppy.png" style="border: none; float: left" title="VBA Vector Classes" alt="floppy VBA Vector Classes" /></a>You can download both classes (two? more below), together with a tiny trivial testing framework, <a href="http://www.haslo.ch/media/Vectors.zip">as Access 2002-2003 .mdb</a>.<br />
<span id="more-416"></span><br />
This here is the vector class for Variants. It goes into a new class module, I called mine &#8220;clsVector&#8221;:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Option</span> Compare Database
<span style="color: #000080;">Option</span> <span style="color: #000080;">Explicit</span>
&nbsp;
<span style="color: #008000;">' Copyright 2007, 2008 by Promino AG
</span><span style="color: #008000;">' Author: Guido Gloor
</span><span style="color: #008000;">'
</span><span style="color: #008000;">' This program is free software: you can redistribute it and/or modify
</span><span style="color: #008000;">' it under the terms of the GNU Lesser General Public License as published by
</span><span style="color: #008000;">' the Free Software Foundation, either version 3 of the License, or
</span><span style="color: #008000;">' (at your option) any later version.
</span><span style="color: #008000;">'
</span><span style="color: #008000;">' This program is distributed in the hope that it will be useful,
</span><span style="color: #008000;">' but WITHOUT ANY WARRANTY; without even the implied warranty of
</span><span style="color: #008000;">' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
</span><span style="color: #008000;">' GNU Lesser General Public License for more details.
</span><span style="color: #008000;">'
</span><span style="color: #008000;">' You should have received a copy of the GNU Lesser General Public License
</span><span style="color: #008000;">' along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.
</span>
<span style="color: #000080;">Private</span> itemCount <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>
<span style="color: #000080;">Private</span> itemBufferSize <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>
<span style="color: #000080;">Private</span> itemBuffer() <span style="color: #000080;">As</span> <span style="color: #000080;">Variant</span>
&nbsp;
<span style="color: #000080;">Private</span> <span style="color: #000080;">Sub</span> Class_Initialize()
    itemCount = 0
    itemBufferSize = 100
    NewDimensions
<span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span>
&nbsp;
<span style="color: #000080;">Private</span> <span style="color: #000080;">Sub</span> NewDimensions()
    <span style="color: #000080;">ReDim</span> <span style="color: #000080;">Preserve</span> itemBuffer(itemBufferSize) <span style="color: #000080;">As</span> <span style="color: #000080;">Variant</span>
<span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span>
&nbsp;
<span style="color: #000080;">Private</span> <span style="color: #000080;">Sub</span> CheckDimensions()
    <span style="color: #000080;">If</span> itemCount &gt; itemBufferSize - 2 <span style="color: #000080;">Then</span>
        itemBufferSize = itemBufferSize * 2
        NewDimensions
    <span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
<span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Sub</span> ShrinkDimensions()
    itemCount = itemBufferSize + 10
    NewDimensions
<span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Function</span> GetSize() <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>
    GetSize = itemCount
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Sub</span> AddItem(item <span style="color: #000080;">As</span> <span style="color: #000080;">Variant</span>)
    CheckDimensions
    itemBuffer(itemCount) = item
    itemCount = itemCount + 1
<span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Function</span> GetItem(index <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>) <span style="color: #000080;">As</span> <span style="color: #000080;">Variant</span>
    GetItem = itemBuffer(index)
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Function</span> PopItem() <span style="color: #000080;">As</span> <span style="color: #000080;">Variant</span>
    PopItem = itemBuffer(itemCount - 1)
    DeleteItem itemCount - 1
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Function</span> GetNextQueueItem() <span style="color: #000080;">As</span> <span style="color: #000080;">Variant</span>
    GetNextQueueItem = itemBuffer(0)
    DeleteItem 0
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Function</span> ContainsItem(item <span style="color: #000080;">As</span> <span style="color: #000080;">Variant</span>) <span style="color: #000080;">As</span> <span style="color: #000080;">Boolean</span>
    <span style="color: #000080;">Dim</span> i <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>
    ContainsItem = <span style="color: #000080;">False</span>
&nbsp;
    <span style="color: #000080;">For</span> i = 0 <span style="color: #000080;">To</span> itemCount - 1
        <span style="color: #000080;">If</span> itemBuffer(i) = item <span style="color: #000080;">Then</span> ContainsItem = <span style="color: #000080;">True</span>
    <span style="color: #000080;">Next</span> i
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Sub</span> InsertItem(index <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>, item <span style="color: #000080;">As</span> <span style="color: #000080;">Variant</span>)
    <span style="color: #000080;">Dim</span> i <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>
&nbsp;
    CheckDimensions
    <span style="color: #000080;">For</span> i = itemCount - 1 <span style="color: #000080;">To</span> index <span style="color: #000080;">Step</span> -1
        itemBuffer(i + 1) = itemBuffer(i)
    <span style="color: #000080;">Next</span> i
    itemBuffer(index) = item
    itemCount = itemCount + 1
<span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Sub</span> DeleteItem(index <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>)
    <span style="color: #000080;">Dim</span> i <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>
&nbsp;
    <span style="color: #000080;">For</span> i = index + 1 <span style="color: #000080;">To</span> itemCount - 1
        itemBuffer(i - 1) = itemBuffer(i)
    <span style="color: #000080;">Next</span> i
    itemCount = itemCount - 1
<span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Function</span> IsEmpty() <span style="color: #000080;">As</span> <span style="color: #000080;">Boolean</span>
    IsEmpty = itemCount &lt;= 0
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span></pre></td></tr></table></div>

<p>Now, it would be nice if we would be done. But, we&#8217;re not done yet, obviously, after all there&#8217;s plenty more code below this break. The reason for that is simple: In VBA, a Variant is not an Object, and an Object is not a Variant, consequently functions that take Objects don&#8217;t take Variants and vice versa (although you can technically store an Object in a Variant, this <em>will</em> lead to problems). Objects also happen to have &#8220;Set&#8221; mandatory in places where it isn&#8217;t allowed for Variants.</p>
<p>What this means is that there is no way to have the same Vector class for both your custom ADTs and the primitive data types. So basically, we have another class that has exactly the same functions and exactly the same algorithms, but takes Objects instead of Variants. I called mine &#8220;clsObjectVector&#8221;. Here is the source for the class module:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Option</span> Compare Database
<span style="color: #000080;">Option</span> <span style="color: #000080;">Explicit</span>
&nbsp;
<span style="color: #008000;">' Copyright 2007, 2008 by Promino AG
</span><span style="color: #008000;">' Author: Guido Gloor
</span><span style="color: #008000;">'
</span><span style="color: #008000;">' This program is free software: you can redistribute it and/or modify
</span><span style="color: #008000;">' it under the terms of the GNU Lesser General Public License as published by
</span><span style="color: #008000;">' the Free Software Foundation, either version 3 of the License, or
</span><span style="color: #008000;">' (at your option) any later version.
</span><span style="color: #008000;">'
</span><span style="color: #008000;">' This program is distributed in the hope that it will be useful,
</span><span style="color: #008000;">' but WITHOUT ANY WARRANTY; without even the implied warranty of
</span><span style="color: #008000;">' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
</span><span style="color: #008000;">' GNU Lesser General Public License for more details.
</span><span style="color: #008000;">'
</span><span style="color: #008000;">' You should have received a copy of the GNU Lesser General Public License
</span><span style="color: #008000;">' along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.
</span>
<span style="color: #000080;">Private</span> itemCount <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>
<span style="color: #000080;">Private</span> itemBufferSize <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>
<span style="color: #000080;">Private</span> itemBuffer() <span style="color: #000080;">As</span> <span style="color: #000080;">Object</span>
&nbsp;
<span style="color: #000080;">Private</span> <span style="color: #000080;">Sub</span> Class_Initialize()
    itemCount = 0
    itemBufferSize = 100
    NewDimensions
<span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span>
&nbsp;
<span style="color: #000080;">Private</span> <span style="color: #000080;">Sub</span> NewDimensions()
    <span style="color: #000080;">ReDim</span> <span style="color: #000080;">Preserve</span> itemBuffer(itemBufferSize) <span style="color: #000080;">As</span> <span style="color: #000080;">Object</span>
<span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span>
&nbsp;
<span style="color: #000080;">Private</span> <span style="color: #000080;">Sub</span> CheckDimensions()
    <span style="color: #000080;">If</span> itemCount &gt; itemBufferSize - 2 <span style="color: #000080;">Then</span>
        itemBufferSize = itemBufferSize * 2
        NewDimensions
    <span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
<span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Sub</span> ShrinkDimensions()
    itemCount = itemBufferSize + 10
    NewDimensions
<span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Function</span> GetSize() <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>
    GetSize = itemCount
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Sub</span> AddItem(item <span style="color: #000080;">As</span> <span style="color: #000080;">Object</span>)
    CheckDimensions
    <span style="color: #000080;">Set</span> itemBuffer(itemCount) = item
    itemCount = itemCount + 1
<span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Function</span> GetItem(index <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>) <span style="color: #000080;">As</span> <span style="color: #000080;">Object</span>
    <span style="color: #000080;">Set</span> GetItem = itemBuffer(index)
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Function</span> PopItem() <span style="color: #000080;">As</span> <span style="color: #000080;">Object</span>
    <span style="color: #000080;">Set</span> PopItem = itemBuffer(itemCount - 1)
    DeleteItem itemCount - 1
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Function</span> GetNextQueueItem() <span style="color: #000080;">As</span> <span style="color: #000080;">Object</span>
    <span style="color: #000080;">Set</span> GetNextQueueItem = itemBuffer(0)
    DeleteItem 0
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Function</span> ContainsItem(item <span style="color: #000080;">As</span> <span style="color: #000080;">Object</span>) <span style="color: #000080;">As</span> <span style="color: #000080;">Boolean</span>
    <span style="color: #008000;">' The used ADTs need to have an Equals function for this to work
</span>    <span style="color: #000080;">Dim</span> i <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>
    ContainsItem = <span style="color: #000080;">False</span>
&nbsp;
    <span style="color: #000080;">For</span> i = 0 <span style="color: #000080;">To</span> itemCount - 1
        <span style="color: #000080;">If</span> itemBuffer(i).Equals(item) <span style="color: #000080;">Then</span> ContainsItem = <span style="color: #000080;">True</span>
    <span style="color: #000080;">Next</span> i
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Sub</span> InsertItem(index <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>, item <span style="color: #000080;">As</span> <span style="color: #000080;">Object</span>)
    <span style="color: #000080;">Dim</span> i <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>
&nbsp;
    CheckDimensions
    <span style="color: #000080;">For</span> i = itemCount - 1 <span style="color: #000080;">To</span> index <span style="color: #000080;">Step</span> -1
        <span style="color: #000080;">Set</span> itemBuffer(i + 1) = itemBuffer(i)
    <span style="color: #000080;">Next</span> i
    <span style="color: #000080;">Set</span> itemBuffer(index) = item
    itemCount = itemCount + 1
<span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Sub</span> DeleteItem(index <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>)
    <span style="color: #000080;">Dim</span> i <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>
&nbsp;
    <span style="color: #000080;">For</span> i = index + 1 <span style="color: #000080;">To</span> itemCount - 1
        <span style="color: #000080;">Set</span> itemBuffer(i - 1) = itemBuffer(i)
    <span style="color: #000080;">Next</span> i
    itemCount = itemCount - 1
<span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span>
&nbsp;
<span style="color: #000080;">Public</span> <span style="color: #000080;">Function</span> IsEmpty() <span style="color: #000080;">As</span> <span style="color: #000080;">Boolean</span>
    IsEmpty = itemCount &lt;= 0
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span></pre></td></tr></table></div>

<p>This is it, have fun <img src='http://www.haslo.ch/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' title="VBA Vector Classes" />  As much as you can have if you&#8217;re forced to work with VBA, that is.</p>
<p>Oh, and if you can use it &#8211; comments are appreciated <img src='http://www.haslo.ch/blog/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' title="VBA Vector Classes" /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.haslo.ch/blog/vba-vector-classes/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

