<?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>Lachlan Arthur</title>
	<atom:link href="http://lach.la/n/feed" rel="self" type="application/rss+xml" />
	<link>http://lach.la/n</link>
	<description></description>
	<lastBuildDate>Mon, 19 Dec 2011 15:00:37 +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>Two months with OS X: A Windows user&#8217;s tale</title>
		<link>http://lach.la/n/2011/12/20/59/two-months-with-os-x-a-windows-users-tale?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=two-months-with-os-x-a-windows-users-tale</link>
		<comments>http://lach.la/n/2011/12/20/59/two-months-with-os-x-a-windows-users-tale#comments</comments>
		<pubDate>Mon, 19 Dec 2011 15:00:37 +0000</pubDate>
		<dc:creator>Lachlan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://lach.la/n/?p=59</guid>
		<description><![CDATA[I recently landed a great job at a local web development company, Niche Studio, and I’m loving it. What I’m not loving so much are the PCs. They’re Apple Macs, and other than occasionally using one when visiting someone, I &#8230; <a href="http://lach.la/n/2011/12/20/59/two-months-with-os-x-a-windows-users-tale">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently landed a great job at a local web development company, <a href="http://nichestudio.com.au" target="_blank">Niche Studio</a>, and I’m loving it. What I’m not loving so much are the PCs. They’re Apple Macs, and other than occasionally using one when visiting someone, I haven’t had any serious contact with the Mac OS.</p>
<p>So when starting my new position, it seemed a great opportunity to document my progress with this alien operating system. Being an experienced Windows user (if I do say so myself) may have prepared me a little.<span id="more-59"></span></p>
<p>This post was first filled with many things a long-time Windows user took for granted. It didn&#8217;t get posted in it&#8217;s original form for various reasons, and I&#8217;m glad it was postponed. There were many gripes about how Macs handled certain tasks, but now that I&#8217;ve had two months to become accustomed to this OS, many of those initial problems have been overcome through learning.</p>
<p>But there are still some issues. Some of them I&#8217;ve seen veteran Mac users encounter. And they are certainly annoying.</p>
<div class="post_images"><a href="http://lach.la/n/wp-content/uploads/2011/11/blog_image_2.png" rel="shadowbox[sbpost-59];player=img;"><img src="http://lach.la/n/wp-content/uploads/2011/11/blog_image_2-150x150.png" /></a></div>
<p>First off, <strong>menu item separators.</strong> Why does clicking them make the whole menu close? This is still present in the newest OS X release, Lion. Neither of the other two major operating systems do this (Windows or Linux). In what situation would a user want (or even more importantly, expect) the whole menu tree to close upon clicking a separator between menu items? None.</p>
<p><strong>Resizing windows from any side.</strong> I realise this has been addressed in Lion, but really? Why did it take this long? By the way I&#8217;ve still got to deal with it because my machine is running Snow Leopard.</p>
<div class="post_images"><a href="http://lach.la/n/wp-content/uploads/2011/12/Cursor.png" rel="shadowbox[sbpost-59];player=img;" title="Cursor Hotspot Comparison"><img src="http://lach.la/n/wp-content/uploads/2011/12/Cursor-100x100.png" title="Cursor Hotspot Comparison" /></a></div>
<p><strong>The mouse cursor&#8217;s hotspot.</strong> It&#8217;s almost three pixels from the tip of the cursor itself. Many times I have attempted to scroll horizontally with the scrollbar, only to click on the window under it.</p>
<p><strong>Keyboard navigation.</strong> A confirmation dialog pops up. I&#8217;d like to press the arrow keys to highlight &#8220;Yes&#8221;, then press enter to confirm. I don&#8217;t mind being forced to use tab to select the controls. But then the Enter key still does the default option (&#8220;No&#8221;), not the one I highlighted. The spacebar is used to confirm your selection on Mac. Still catches me out.</p>
<p>Another with keyboard navigation. Command-tab (equivalent of alt-tab on Windows) doesn&#8217;t open minimised application windows.</p>
<p><strong>Viewing file properties.</strong> I want to check how much space these thirty files are taking up. Highlight them, select &#8220;Get Info&#8221;. Thirty windows open up, one for each file. Oops, looks like I forgot to hold the control key. This is not what a user wants. Ever.</p>
<p><strong>Keyboard shortcuts</strong>, or rather, long-cuts. Go to start of line: Command-Left. End of line: Command-Right. Why do I have to press two keys to do the equivalent of the Home and End keys in Windows and Linux? Also print-screen takes a three or four-button combination, compared to one or two on Windows.</p>
<p><strong>Maximising windows.</strong> That little green plus isn&#8217;t very consistent. Sometimes the window will fully expand, sometimes only vertically and yet other times it takes me to a &#8220;mini&#8221; version of the application.</p>
<p><strong>Searching for files.</strong> There&#8217;s no wildcard searching. Very odd.</p>
<p>No ability to type a filesystem path straight into Finder. I gotta click and scroll my way through.</p>
<p>A nice-to-have would be the right-click context menu appearing at the end of a drag operation. On Windows you can drag files with the right mouse button, and at the end of the drag you are presented with options such as &#8220;Move here&#8221;, or &#8220;Copy here&#8221;. I miss that.</p>
<p>Well, that&#8217;s all I came across (worth mentioning) during my first two months.</p>
]]></content:encoded>
			<wfw:commentRss>http://lach.la/n/2011/12/20/59/two-months-with-os-x-a-windows-users-tale/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>I have a different password for everything. And I couldn&#8217;t tell you even one.</title>
		<link>http://lach.la/n/2011/12/19/37/i-have-a-different-password-for-everything-and-i-couldnt-tell-you-even-one?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=i-have-a-different-password-for-everything-and-i-couldnt-tell-you-even-one</link>
		<comments>http://lach.la/n/2011/12/19/37/i-have-a-different-password-for-everything-and-i-couldnt-tell-you-even-one#comments</comments>
		<pubDate>Mon, 19 Dec 2011 11:03:14 +0000</pubDate>
		<dc:creator>Lachlan</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://lach.la/n/?p=37</guid>
		<description><![CDATA[Everybody knows you should have a different password for everything. But hardly anyone does. It&#8217;s not that they don&#8217;t want to, it&#8217;s just because they can&#8217;t remember them. Now I&#8217;m not claiming to have invented the method I use, but &#8230; <a href="http://lach.la/n/2011/12/19/37/i-have-a-different-password-for-everything-and-i-couldnt-tell-you-even-one">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Everybody knows you should have a different password for everything. But hardly anyone does. It&#8217;s not that they don&#8217;t want to, it&#8217;s just because they can&#8217;t remember them.</p>
<p>Now I&#8217;m not claiming to have invented the method I use, but I&#8217;m advocating its use. It&#8217;s a way of remembering a password in such a way that I couldn&#8217;t recite it to you even if I wanted to. It also makes passwords far more secure by looking like random letters and numbers (I say &#8220;looking like&#8221; because it&#8217;s not actually random, as you&#8217;ll see below). I don&#8217;t need to store these passwords in an application, I don&#8217;t have a master password that generates them. I just use the keyboard.<span id="more-37"></span></p>
<p>You see, your keyboard layout is two-dimensional. Say you were to type the word &#8220;<code>envelope</code>&#8220;: (Yes, you can type in that textbox below)</p>
<input type="text" />
<p>Pretty easy, right?</p>
<p>Now type it again, but this time, type the letters that appear <em>above</em> the letters in the word: (for instance, the &#8220;Q&#8221; key is above the &#8220;A&#8221; key on a standard US keyboard)</p>
<input type="text" />
<p>You should see you have typed &#8220;<code>3hf3o903</code>&#8220;. That&#8217;s not only fairly random-looking, but you only needed to remember the combination and the word &#8220;envelope&#8221;.</p>
<p>So if you come up with your own special combination, you only need to remember that combination. That&#8217;s it. You don&#8217;t even need to remember the word, because you can just use the name of the service you&#8217;re signing up for. You need a password for YouTube? Using the above combination, you get the password &#8220;<code>69757g3</code>&#8220;.</p>
<p>There are many combinations you can use:</p>
<ul>
<li>Up and to the right</li>
<li>Two to the right, use the shift key on the second one (also introduces symbols into the mix)</li>
<li>Alternate between up and right on odd and even keys</li>
</ul>
<p>There are a few limitation so this method, however:</p>
<ul>
<li>Pretty much only &#8220;above&#8221; and &#8220;right&#8221; work; left won&#8217;t work for the keys &#8220;Q&#8221;, &#8220;A&#8221; and &#8220;Z&#8221;, unless you want to loop back to the right side of the keyboard.</li>
<li>Banks and other websites often have limits on the amount of characters you can use in a password. I can not think of even one reason as to why this is.</li>
<li>Sometimes websites will refuse certain elements, such as symbols, so it&#8217;s good to have two combinations, your default one that may sometimes create symbols, and a backup one that has no chance of creating them.</li>
<li>When logging into a service using a mobile device, you&#8217;ll probably have trouble. Often mobile keyboards have their keys aligned directly on top of each other, and the number keys aren&#8217;t in the right spot (above the keyboard). There&#8217;s not really any way around this if you use an Apple device, but you can install different keyboards on Android.
</ul>
<p>In my opinion, the benefits far outweigh those points above; having a secure account is paramount, and the only way in doing so is to have separate passwords.</p>
<p>A paper by the United States Air Force Academy on a very similar subject:<br />
<a href="http://www.usafa.edu/df/dfe/dfer/centers/accr/docs/schweitzer2009a.pdf" target="_blank">http://www.usafa.edu/df/dfe/dfer/centers/accr/docs/schweitzer2009a.pdf</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lach.la/n/2011/12/19/37/i-have-a-different-password-for-everything-and-i-couldnt-tell-you-even-one/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSV Parser in JavaScript</title>
		<link>http://lach.la/n/2011/12/15/25/csv-parser-in-javascript?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=csv-parser-in-javascript</link>
		<comments>http://lach.la/n/2011/12/15/25/csv-parser-in-javascript#comments</comments>
		<pubDate>Thu, 15 Dec 2011 09:51:33 +0000</pubDate>
		<dc:creator>Lachlan</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://lach.la/n/?p=25</guid>
		<description><![CDATA[Today I needed to process a CSV file, filtering items into two separate lists while expanding certain comma separated cells. Since this needed to be done often and by several people, I decided to use JavaScript, the FileReader API and &#8230; <a href="http://lach.la/n/2011/12/15/25/csv-parser-in-javascript">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
	Today I needed to process a CSV file, filtering items into two separate lists while expanding certain comma separated cells.<br />
	Since this needed to be done often and by several people, I decided to use JavaScript, the FileReader API and WebWorkers, all hosted on a local server.
</p>
<p>But JavaScript has no CSV parser, so I set out making one.<span id="more-25"></span> After making it, I realised lots of people could benefit from it. So here it is.</p>
<p>This is how it works:</p>
<ol>
<li>Split the file into lines</li>
<li>Split the lines by commas into cells</li>
<li>Re-connect cells that had commas in their values</li>
</ol>
<p>
	And, finally, what you&#8217;ve come here for, the code:<br />(copy-pastable: no line numbers, preserves tabs)</p>
<pre><code class="javascript">function parseCSV(rawData) {
	var rawRows = rawData.split(&quot;\n&quot;);
	var csv = [];
	var row = [];
	for (var rowIndex = 0; rowIndex &lt; rawRows.length; rowIndex++) {
		var currentRow = rawRows[rowIndex].split(&quot;,&quot;);
		var cell = &quot;&quot;;
		var in_quotes = false;
		for (var cellIndex = 0; cellIndex &lt; currentRow.length; cellIndex++) {
			var currentCell = currentRow[cellIndex];
			var quote_start = currentCell.search('&quot;') == 0; // Starts with a quote
			var quote_end = currentCell.substr(1).search('&quot;') == currentCell.length - 2; // Ends with a quote
			if (quote_start &amp;&amp; quote_end) { // The cell starts and ends with quotes. It's a single cell.
				cell = currentCell.substr(1, currentCell.length - 2);
			} else if (quote_start) { // The cell is the beginning of several values.
				in_quotes = true;
				cell = currentCell.substr(1) + &quot;,&quot;;
			} else if (quote_end) { // The cell is the end of several values.
				in_quotes = false;
				cell += currentCell.substr(0, currentCell.length - 1);
			} else if (in_quotes) { // The cell is in between the start and end quoted cells.
				cell += currentCell + &quot;,&quot;;
			} else { // Just a regular, unquoted cell.
				cell = currentCell;
			}
			if (in_quotes == false) { // Only add the cell if we have all the values (ie. not inside quotes)
				row.push(cell);
				cell = &quot;&quot;; // Reset the cell for the next run.
			}
		}
		csv.push(row);
		row = []; // Reset the row for the next run.
	}
	return csv;
}</code></pre>
</p>
<p>I hope you find it useful!</p>
<p>License: Do whatever you want with it, public domain :D</p>
<p>Go on, tell me I could have done it with regex, but what would be the fun in that? (Actually I could neither find a usable regex for splitting a csv, nor make one myself. My regex-fu is weak.)</p>
]]></content:encoded>
			<wfw:commentRss>http://lach.la/n/2011/12/15/25/csv-parser-in-javascript/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Site!</title>
		<link>http://lach.la/n/2011/10/02/1/new-site?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-site</link>
		<comments>http://lach.la/n/2011/10/02/1/new-site#comments</comments>
		<pubDate>Mon, 03 Oct 2011 04:28:46 +0000</pubDate>
		<dc:creator>Lachlan</dc:creator>
				<category><![CDATA[Site]]></category>

		<guid isPermaLink="false">http://lachlanarthur.com/n/?p=1</guid>
		<description><![CDATA[A new domain, a new theme, I can see I&#8217;m going to like it here.]]></description>
			<content:encoded><![CDATA[<p>A new domain, a new theme, I can see I&#8217;m going to like it here.</p>
]]></content:encoded>
			<wfw:commentRss>http://lach.la/n/2011/10/02/1/new-site/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

