<?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>aleatory &#187; Tech Labours</title>
	<atom:link href="http://aleatory.clientsideweb.net/category/tech-labours/feed/" rel="self" type="application/rss+xml" />
	<link>http://aleatory.clientsideweb.net</link>
	<description></description>
	<lastBuildDate>Thu, 19 Jan 2012 18:53: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>Deploying Updates from Windows Dev Box to Linux Server</title>
		<link>http://aleatory.clientsideweb.net/2012/01/18/deploying-windows-dev-to-linux-server/</link>
		<comments>http://aleatory.clientsideweb.net/2012/01/18/deploying-windows-dev-to-linux-server/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 02:19:43 +0000</pubDate>
		<dc:creator>rutherford</dc:creator>
				<category><![CDATA[Tech Labours]]></category>

		<guid isPermaLink="false">http://aleatory.clientsideweb.net/?p=530</guid>
		<description><![CDATA[I develop on my local Windows 7 (or XP netbook when out of town) and to test/deploy projects I need to send them to my Gentoo Linux server. While manual copying of files quickly becomes a pain in the arse a fully fledged continuous integration environment is needlessly complex for a single programmer project so [...]]]></description>
			<content:encoded><![CDATA[<p>I develop on my local Windows 7 (or XP netbook when out of town) and to test/deploy projects I need to send them to my Gentoo Linux server. While manual copying of files quickly becomes a pain in the arse a fully fledged continuous integration environment is needlessly complex for a single programmer project so I created the following batch script that once run checks my windows folders for new &#038; updated files since the last time the script was run then sends them across the ether using scp<a name="1inline"/><a href="#1ref"><sup>1</sup></a>.</p>
<p>The script has been tested on XP &#038; 7 successfully.</p>
<p>For the linux side of things I run a python paster instance with the &#8212;reload flag that means paster will pickup changes and restart automatically, making deployment from my windows box a single click action.</p>
<p>Initially I started out a little rusty in my command line knowledge <span id="more-530"></span>and had set about getting timestamps from first principles &#8211; lots of find, substring comparisons and messy embedded if control statements. Then I found command extensions which gave convenient access to file properties. Forfile and robocopy were potentially very useful shortcuts but neither are found in the base WinXP system so I eventually arrived at the following solution. The key part where datetime comparisons are made is in the main loop:</p>

<div class="wp_syntax"><div class="code"><pre class="qbasic" style="font-family:monospace;">dir <span style="color: #66cc66;">/</span>b <span style="color: #66cc66;">/</span>tw <span style="color: #66cc66;">/</span>od !folder!%timestampfile% !file! | more <span style="color: #66cc66;">+</span><span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&gt;</span> %tmpfile%
set <span style="color: #66cc66;">/</span>p latest<span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&lt;</span> %tmpfile%
del %tmpfile%</pre></div></div>

<p>Here the [tmp] timestamp file is compared with the current file in the recursive loop and ranked in ascending order of modification datetime (/b cuts out unwanted output from dir, /tw tells it to use file modification time for sorting and /od tells it to order by oldest first). This is piped to more which takes the bottom line (the newest file) and throws it into %tmpfile%. The variable !latest! then gets set to the value (/p switch tells set to expect a single line of input) and the temporary file is deleted. Afterwards we test to ensure !latest! is actually a file we want to transfer and not the timestamp file (or the batch file for that matter) and if so we copy it across to our transfer folder. Anyways:</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
</pre></td><td class="code"><pre class="qbasic" style="font-family:monospace;">@echo <span style="color: #000066;">OFF</span>
&nbsp;
REM IMPORTANT: 
REM <span style="color: #cc66cc;">1</span>. after you checkout your project into the working directory<span style="color: #66cc66;">,</span> create this batch file <span style="color: #000066;">AND</span> a blank txt file named %timestampfile% in your top level project directory. 
REM <span style="color: #cc66cc;">1</span>. make sure timestampfile <span style="color: #000066;">IS</span> unique <span style="color: #66cc66;">&#40;</span>no other <span style="color: #000066;">FILES</span> with this <span style="color: #000066;">NAME</span><span style="color: #66cc66;">&#41;</span> within all subfolders of your working directory
REM <span style="color: #cc66cc;">2</span>. make sure tmpfile <span style="color: #000066;">IS</span> unique within pwd
REM <span style="color: #cc66cc;">3</span>. make sure tmp <span style="color: #000066;">IS</span> unique directory
REM <span style="color: #cc66cc;">4</span>. set your pscp<span style="color: #66cc66;">,</span> conn &amp; pw strings <span style="color: #a1a100;">TO</span> appropriate values
REM
REM original post: http:<span style="color: #66cc66;">//</span>aleatory.clientsideweb.net<span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2012</span><span style="color: #66cc66;">/</span>01<span style="color: #66cc66;">/</span><span style="color: #cc66cc;">18</span><span style="color: #66cc66;">/</span>deploying<span style="color: #66cc66;">-</span>windows<span style="color: #66cc66;">-</span>dev<span style="color: #66cc66;">-</span>to<span style="color: #66cc66;">-</span>linux<span style="color: #66cc66;">-</span>server
&nbsp;
set tmp<span style="color: #66cc66;">=</span>C:\tmp\
set tmpfile<span style="color: #66cc66;">=</span>tmp.txt
set timestampfile<span style="color: #66cc66;">=</span>timestamp.txt
set pscp<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;C:\path\to\pscp.exe&quot;</span>
set conn<span style="color: #66cc66;">=</span>user@server:<span style="color: #66cc66;">/</span>path<span style="color: #66cc66;">/</span><span style="color: #a1a100;">TO</span><span style="color: #66cc66;">/</span>directory
set pw<span style="color: #66cc66;">=</span>yourpasswdhere
&nbsp;
REM ensure w2k command extensions are enabled <span style="color: #000066;">AND</span> delayed expansion <span style="color: #a1a100;">FOR</span> the control <span style="color: #a1a100;">LOOP</span>
setlocal enableextensions enabledelayedexpansion
&nbsp;
REM tmp directory <span style="color: #a1a100;">FOR</span> copying modified <span style="color: #000066;">FILES</span> across
<span style="color: #000066;">MKDIR</span> %tmp%
<span style="color: #a1a100;">CALL</span> :strlen prelen %~dp0
set <span style="color: #66cc66;">/</span>a <span style="color: #000066;">LEN</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">+</span>prelen
&nbsp;
REM need <span style="color: #a1a100;">TO</span> copy timestampfile temporarily <span style="color: #a1a100;">TO</span> each subfolder <span style="color: #a1a100;">FOR</span> datetime comparison in main <span style="color: #a1a100;">LOOP</span>.
<span style="color: #a1a100;">FOR</span> <span style="color: #66cc66;">/</span>d <span style="color: #66cc66;">/</span>r %%j in <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span> <span style="color: #a1a100;">DO</span> <span style="color: #66cc66;">&#40;</span>
	copy %timestampfile% %%j
<span style="color: #66cc66;">&#41;</span>
&nbsp;
REM substring %var:~start<span style="color: #66cc66;">,</span>length% <span style="color: #66cc66;">-</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">-</span>based
REM <span style="color: #a1a100;">LOOP</span> through all <span style="color: #000066;">FILES</span> in directory &amp; <span style="color: #a1a100;">SUB</span> directories
REM <span style="color: #a1a100;">IF</span> last modified time greater than %timestampfile% <span style="color: #66cc66;">-</span> copy <span style="color: #a1a100;">TO</span> set <span style="color: #a1a100;">TO</span> ssh across
<span style="color: #a1a100;">FOR</span> <span style="color: #66cc66;">/</span>r %%i in <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span> <span style="color: #a1a100;">DO</span> <span style="color: #66cc66;">&#40;</span>
	set file<span style="color: #66cc66;">=</span>%%~dpnxi
	set file<span style="color: #66cc66;">=</span>!file:~%len%!
	set folder<span style="color: #66cc66;">=</span>%%~dpi
	set folder<span style="color: #66cc66;">=</span>!folder:~%len%!
&nbsp;
	REM below will find last modified time <span style="color: #a1a100;">FOR</span> each <span style="color: #000066;">AND</span> <span style="color: #a1a100;">RETURN</span> latest file
	REM always returns 2nd file <span style="color: #a1a100;">IF</span> both were modified in the same minute<span style="color: #66cc66;">,</span> so we should <span style="color: #000066;">PUT</span> source file 2nd.
	REM t the moment <span style="color: #66cc66;">/</span>tw doesn<span style="color: #808080;">'t work as expected when comparing timestampfile with files inside different folders; </span>
	REM so the only immediate solution <span style="color: #000066;">IS</span> <span style="color: #a1a100;">TO</span> have a temp copy of timestampfile in the same directory <span style="color: #000066;">ON</span> each <span style="color: #a1a100;">LOOP</span>...
	dir <span style="color: #66cc66;">/</span>b <span style="color: #66cc66;">/</span>tw <span style="color: #66cc66;">/</span>od !folder!%timestampfile% !file! | more <span style="color: #66cc66;">+</span><span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&gt;</span> %tmpfile%
	set <span style="color: #66cc66;">/</span>p latest<span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&lt;</span> %tmpfile%
	del %tmpfile%
&nbsp;
	REM <span style="color: #a1a100;">IF</span> latest isn<span style="color: #808080;">'t this batch file or the timestamp file then copy across, maintaining relative folder structure</span>
	<span style="color: #a1a100;">IF</span> <span style="color: #000066;">NOT</span> !latest!<span style="color: #66cc66;">==</span>%~nx0 <span style="color: #a1a100;">IF</span> <span style="color: #000066;">NOT</span> !latest!<span style="color: #66cc66;">==</span>%timestampfile% <span style="color: #66cc66;">&#40;</span> 
		echo %tmp%!folder!!file!
		<span style="color: #000066;">MKDIR</span> %tmp%!folder! &amp; copy !file! %tmp%!folder!
	<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span>
&nbsp;
REM timestampfile cleanup
<span style="color: #a1a100;">FOR</span> <span style="color: #66cc66;">/</span>d <span style="color: #66cc66;">/</span>r %%j in <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span> <span style="color: #a1a100;">DO</span> <span style="color: #66cc66;">&#40;</span>
	del %%j\%timestampfile%
<span style="color: #66cc66;">&#41;</span>
&nbsp;
%pscp% <span style="color: #66cc66;">-</span>batch <span style="color: #66cc66;">-</span>pw %pw% <span style="color: #66cc66;">-</span>r %tmp%<span style="color: #66cc66;">*</span> %conn%
<span style="color: #000066;">RMDIR</span> <span style="color: #66cc66;">/</span>s <span style="color: #66cc66;">/</span>q %tmp%
&nbsp;
REM update timestamp file
echo %date%<span style="color: #66cc66;">-</span>%time%<span style="color: #66cc66;">&gt;</span>%timestampfile%
&nbsp;
<span style="color: #a1a100;">GOTO</span> :<span style="color: #000066;">EOF</span>
&nbsp;
REM <span style="color: #a1a100;">FUNCTION</span> <span style="color: #a1a100;">TO</span> count <span style="color: #808080;">'string' length</span>
:strlen <span style="color: #66cc66;">&lt;</span>resultVar<span style="color: #66cc66;">&gt;</span> <span style="color: #66cc66;">&lt;</span>stringVar<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&#40;</span>   
	setlocal EnableDelayedExpansion
    set <span style="color: #ff0000;">&quot;s=!%~2!#&quot;</span>
    set <span style="color: #ff0000;">&quot;len=0&quot;</span>
    <span style="color: #a1a100;">FOR</span> %%P in <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">4096</span> <span style="color: #cc66cc;">2048</span> <span style="color: #cc66cc;">1024</span> <span style="color: #cc66cc;">512</span> <span style="color: #cc66cc;">256</span> <span style="color: #cc66cc;">128</span> <span style="color: #cc66cc;">64</span> <span style="color: #cc66cc;">32</span> <span style="color: #cc66cc;">16</span> <span style="color: #cc66cc;">8</span> <span style="color: #cc66cc;">4</span> <span style="color: #cc66cc;">2</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #a1a100;">DO</span> <span style="color: #66cc66;">&#40;</span>
        <span style="color: #a1a100;">IF</span> <span style="color: #ff0000;">&quot;!s:~%%P,1!&quot;</span> NEQ <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">&#40;</span> 
            set <span style="color: #66cc66;">/</span>a <span style="color: #ff0000;">&quot;len+=%%P&quot;</span>
            set <span style="color: #ff0000;">&quot;s=!s:~%%P!&quot;</span>
        <span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span> 
	endlocal
    set <span style="color: #ff0000;">&quot;%~1=%len%&quot;</span>
    <span style="color: #000066;">EXIT</span> <span style="color: #66cc66;">/</span>b
<span style="color: #66cc66;">&#41;</span></pre></td></tr></table></div>

<p>(apologies for the non-batch file syntax highlighting &#8211; there&#8217;s a bug in GeSHi syntax highlighting engine that inserts HTML cruft into the code.)</p>
<p>You&#8217;ll note the intermediate step it takes of creating a temporary folder to place the files to be copied. This means I can copy the whole thing across as a oner rather than a long-winded new ssh connection for each one. The ideal windows solution would be to create a network folder using SAMBA on the Linux server where I could simply copy the files across in one go. If the file sizes were massive I might do this but I already use SSH for sysadmin so to cut down on one less potential security hole I&#8217;ll keep it simple.</p>
<p>Notably I had to use pukka REM statements and not the faster double colon to avoid the comments within the FOR loop being interpreted as commands and returning the following error:</p>
<p><code>The filename, directory name, or volume label syntax is incorrect</code></p>
<p>Also the one caveat with the above batch code is it won&#8217;t copy anything that has the same name as the script or the timestampfile value &#8211; so name them accordingly. If there is a better way of doing any of the steps I took then you are welcome to comment below.</p>
<p>Overall, yeah batch file processing is hard.</p>
<p><a name="1ref"/><a href="#1inline"><sup>1</sup></a>. pscp &#8211; a command line scp utility.</p>
]]></content:encoded>
			<wfw:commentRss>http://aleatory.clientsideweb.net/2012/01/18/deploying-windows-dev-to-linux-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In Defence of Ideas</title>
		<link>http://aleatory.clientsideweb.net/2011/11/17/in-defence-of-ideas/</link>
		<comments>http://aleatory.clientsideweb.net/2011/11/17/in-defence-of-ideas/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 14:57:50 +0000</pubDate>
		<dc:creator>rutherford</dc:creator>
				<category><![CDATA[startup]]></category>
		<category><![CDATA[Tech Labours]]></category>

		<guid isPermaLink="false">http://aleatory.clientsideweb.net/?p=515</guid>
		<description><![CDATA[An insightful blog post1 the other day railed against having lots of ideas and emphasised the need to stay on track, to concentrate on execution of The Big Idea. Here’s the other side of that argument. There are many economic activities in which the rapid generation of ideas is a must have &#8211; take trading [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm6.static.flickr.com/5142/5580144577_aee7392839.jpg" alt="concentrate on the ideas" /></p>
<p>An insightful blog post<a href="#ref-1"><sup>1</sup></a> the other day railed against having lots of ideas and emphasised the need to stay on track, to concentrate on execution of The Big Idea. Here’s the other side of that argument.</p>
<p>There are many economic activities in which the rapid generation of ideas is a must have &#8211; take trading as one example. This is purely the game of projecting your ideas for where the market is going onto what is happening in reality. And just as you must see both sides of the trade as they say, so too do you need to foresee multiple scenarios ahead in order to understand all potential market movement. Because how it gets to the projected end result is just as important as when/if it gets there. Multiple &#038; even contradictory ideas are the lifeblood then on which trading activity is based. </p>
<p><span id="more-515"></span>Sure, unlike startups it may be argued watching a single number make various shapes on computer screens is an inherently transitive activity. Execution is simply clicking a button. Perhaps, but the two are not binary opposites &#8211; far from it. What links the two, and thus supports the premise that lots of ideas can have a greater value than just one, is leverage. Traders piggy back on the economic activity of others just as startups can utilise the web services &#038; APIs of others in order to create immense value with relatively little effort. </p>
<p>Take the likes of Zynga. Yes Zynga makes something. They churn out what has become mass media entertainment. But there’s plenty of developers doing that in Flash and still only getting a commission per title (if at all). Zynga on the other hand leveraged. They didn’t even create their first social game, YoVille, they just bought the thing inheriting it’s facebook userbase &#038; social hooks and combined it with an offers service for monetization. This simple use of leverage provided the holy grail of a monetization channel for the social graph. It didn’t require enormously original or hi-tech games it just required leveraging services that were already available on the web. The idea &#8211; the route to market &#8211; was the important bit while the actual end-product was not i.e. the games are crap!</p>
<p>So just like the trader playing the trend, so too it’s worthwhile for startups to consider the prevalent mood and dare I say it go with the path of least resistance. Instead of seeking to single-mindedly disrupt it armed with The One Big Idea and seeking to create a platform from the outset, maybe being swift, nimble and able to jump on at the right time can also be the key to success. And for that you’re going to need a lot of ideas.</p>
<p>Refs:<br />
<a name="ref-1"/>1.&#9;<a href="http://tabletica.wordpress.com/2011/11/12/the-problem-with-ideas-thoughts-for-news-startups/">&#8220;The Problem With Ideas&#8221;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://aleatory.clientsideweb.net/2011/11/17/in-defence-of-ideas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Netbook Upgrading &amp; Housekeeping</title>
		<link>http://aleatory.clientsideweb.net/2011/02/26/netbook-upgrading-housekeeping/</link>
		<comments>http://aleatory.clientsideweb.net/2011/02/26/netbook-upgrading-housekeeping/#comments</comments>
		<pubDate>Sat, 26 Feb 2011 21:50:21 +0000</pubDate>
		<dc:creator>rutherford</dc:creator>
				<category><![CDATA[Tech Labours]]></category>

		<guid isPermaLink="false">http://aleatory.clientsideweb.net/?p=486</guid>
		<description><![CDATA[I&#8217;m a longtime fan of netbooks over other mobile tech gadgets, finding their versatility an important stepchange in the prior arms race for increasingly powerful &#8216;portables&#8217; that weigh a metric ton and need their own special carrying case, or mobiles with a preposterous array of unusable functions. May have missed the hackathon at QUB but [...]]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="http://farm6.static.flickr.com/5060/5478884810_e9cdf1a3cf.jpg" title="Advent 4211" class="aligncenter" width="500" height="333" /></p>
<p>I&#8217;m a <a href="http://aleatory.clientsideweb.net/2009/11/18/product-over-platform/">longtime fan of netbooks</a> over other mobile tech gadgets, finding their versatility an important stepchange in the prior arms race for increasingly powerful &#8216;portables&#8217; that weigh a metric ton and need their own special carrying case, or mobiles with a preposterous array of unusable functions.</p>
<p>May have missed the <a href="http://www.facebook.com/event.php?eid=129632980439129">hackathon at QUB</a> but I&#8217;ve still managed to do a bit of hardware related fiddling with this guide on boosting my 4211&#8242;s performance &#038; removing a niggle. </p>
<p><span id="more-486"></span>As refreshingly contrarian as a netbook can be, depending on one is a double edged sword &#8211; the more tasks you want to run on it, the greater the load on it&#8217;s relatively tiny engine. One of the few areas you can upgrade a netbook is it&#8217;s RAM. When messing around with portable versions of memory-intensive graphics apps, adding in an extra stick of DDR can boost performance significantly.</p>
<p>Similarly the more you depend on a gadget no matter where you go it will soon become encased in a fine layer of dust that destroys fan performance while general wear and tear of budget bits of plastic like the Acer 4211 will start to loosen moving parts and in the case of the fan it&#8217;ll be noticed by a pretty irritating clicking noise.</p>
<p><strong>Tools I Used:</strong><br />
Small-head star screwdriver<br />
mini knife<br />
<a href="http://middleman.clientsideweb.net/ad/5b7a523588eb76edadfd160726e834d9">Leatherman Squirt P4</a><br />
WD40</p>
<p><strong>Removing dust &#038; that fucking clicking noise from the fan</strong></p>
<p>First take out the battery supply via the two slides on the underside of the laptop. Then unfasten the 7 screws dotted around the side edges of the bottom which allows you to unclip the black and silver halves, exposing the guts of the Advent. There were no seals broken in doing this so it&#8217;s doubtful as to whether this invalidates any warranty as is normally the case with fiddling with computer innards.</p>
<p><img alt="" src="http://farm6.static.flickr.com/5140/5478884820_f83f03be8b.jpg" title="Fan dust buildup" class="aligncenter" width="500" height="333" /></p>
<p>You can now see how big a mess has built up round the netbook fan and clean out accordingly. A toothbrush is recommended around the nooks and crannies while a cloth is fine for the rest of the surface area. </p>
<p>Now for that annoying noise the fan makes when it whirrs up after a few months of near continuous use. Simply spray some WD40 in around the fan mechanism itself, not to much is needed. Hopefully when the fan starts up again the oil will be spread around the fan parts and help prevent whatever friction may have been taking place.</p>
<p><img alt="" src="http://farm6.static.flickr.com/5137/5478884826_586d6749c1_z.jpg" title="Fan tightening with Leatherman Squirt P4 " class="aligncenter" width="505" height="640" /></p>
<p>Secondly the 4 fan screws binding the fan to the motherboard should be tightened to ensure this isn&#8217;t responsible for the noise as well. It turns out a couple of mine were pretty loose.</p>
<p><strong>Adding more RAM</strong></p>
<p>Upgrading RAM is likely the single biggest performance win on machines that have a free slot. Make sure when you purchase it&#8217;s of a similar tech as the existing bus and RAM &#8211; for example my Advent 4211 uses DDR2 which is incompatible with DDR and DDR3. Don&#8217;t rely on shop assistants to proactively check for you either, because in my experience they don&#8217;t. I got a PNY 1GB 533MHz module for about £20 but I seen a better deal on Amazon for a <a href="http://middleman.clientsideweb.net/ad/a9eff41683463a1fc1f42c101c6855b8">Crucial RAM stick at £15</a>.</p>
<p><img alt="" src="http://farm6.static.flickr.com/5136/5478884834_e739aa977e.jpg" title="Adding Netbook RAM" class="aligncenter" width="500" height="347" /></p>
<p>On the Advent it&#8217;s a simple task to fit it &#8211; locate the long black bus in the centre of the motherboard and the original OEM memory will be on one side with an empty space on the other. There&#8217;s even a cover sheet to protect the circuitry beneath your memory once you install it.  Angle the stick so it lines up with the pins of the bus and fit it in &#8216;teeth&#8217; first then snap the rest of the stick flat against the board, secured in place with the harness on either side.</p>
<p><img alt="" src="http://farm6.static.flickr.com/5057/5478884838_4c36c069b4.jpg" title="Upgraded Netbook RAM" class="aligncenter" width="500" height="399" /></p>
<p>Re-clip the base, replace the screws and battery then power back up to confirm the OS is running with the newly available capacity.</p>
<p><img alt="" src="http://farm6.static.flickr.com/5179/5479548715_5af7653bfb.jpg" title="Windows RAM status" class="aligncenter" width="419" height="486" /></p>
<p>Sorted.</p>
<p><img alt="" src="http://farm6.static.flickr.com/5173/5478884814_c11df0904c.jpg" title="Miniature tools used" class="aligncenter" width="500" height="390" /></p>
]]></content:encoded>
			<wfw:commentRss>http://aleatory.clientsideweb.net/2011/02/26/netbook-upgrading-housekeeping/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fullscreen Web Browsing in Iphone</title>
		<link>http://aleatory.clientsideweb.net/2010/12/02/fullscreen-web-browsing-in-iphone/</link>
		<comments>http://aleatory.clientsideweb.net/2010/12/02/fullscreen-web-browsing-in-iphone/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 18:54:11 +0000</pubDate>
		<dc:creator>rutherford</dc:creator>
				<category><![CDATA[Tech Labours]]></category>

		<guid isPermaLink="false">http://aleatory.clientsideweb.net/?p=447</guid>
		<description><![CDATA[Often wondered how the iphone safari browser renders pages and found out sometimes the zoom settings means visitors can miss important pieces of information around page edges.]]></description>
			<content:encoded><![CDATA[<p>Often wondered how the iphone safari browser renders pages and found out sometimes the zoom settings means visitors can miss important pieces of information around page edges.</p>
]]></content:encoded>
			<wfw:commentRss>http://aleatory.clientsideweb.net/2010/12/02/fullscreen-web-browsing-in-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Opt Out of Targeted Behavioural Advertising</title>
		<link>http://aleatory.clientsideweb.net/2010/10/26/how-to-opt-out-of-targeted-behavioural-advertising/</link>
		<comments>http://aleatory.clientsideweb.net/2010/10/26/how-to-opt-out-of-targeted-behavioural-advertising/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 21:25:29 +0000</pubDate>
		<dc:creator>rutherford</dc:creator>
				<category><![CDATA[data]]></category>
		<category><![CDATA[Tech Labours]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://aleatory.clientsideweb.net/?p=428</guid>
		<description><![CDATA[Behavioural advertising involves the tracking of a web user&#8217;s surfing and displaying advertising that matches this data. I find the tracking of my surf history unnecessarily obtrusive personally and today found the online tool that will prevent marketing companies from collecting this data and profiting from it: http://www.networkadvertising.org/managing/opt_out.asp Incidentally I came by this information by [...]]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="http://farm5.static.flickr.com/4107/5118352871_09c16ca398.jpg" title="Agressive Computer Advertisers" class="aligncenter" width="500" height="158" /><br />
Behavioural advertising involves the tracking of a web user&#8217;s surfing and displaying advertising that matches this data. I find the tracking of my surf history unnecessarily obtrusive personally and today found the online tool that will prevent marketing companies from collecting this data and profiting from it:</p>
<p><a href="http://www.networkadvertising.org/managing/opt_out.asp">http://www.networkadvertising.org/managing/opt_out.asp</a></p>
<p>Incidentally I came by this information by way of Rapleaf, <span id="more-428"></span>who are one of these &#8216;database marketing&#8217; companies who engage in datamining browsing habits in a big way. Interestingly I remember them from a <a href="http://techcrunch.com/2006/04/23/rapleaf-to-challenge-ebay-feedback/">TechCrunch article</a> a few years back where they started out innocently enough as an online social networking reputation tool &#8211; until eBay didn&#8217;t like it encroaching on their space and banned Rapleaf content from sellers auction pages.</p>
<p>If you&#8217;re still registered with them and like myself didn&#8217;t realise they had morphed into an marketing data company you can delete your account with them <a href="https://www.rapleaf.com/opt_out">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://aleatory.clientsideweb.net/2010/10/26/how-to-opt-out-of-targeted-behavioural-advertising/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Reader 9: &#8220;Windows cannot find &#8230;Eula.exe&#8221;</title>
		<link>http://aleatory.clientsideweb.net/2010/10/18/adobe-reader-9-windows-cannot-find-eula-exe/</link>
		<comments>http://aleatory.clientsideweb.net/2010/10/18/adobe-reader-9-windows-cannot-find-eula-exe/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 16:55:50 +0000</pubDate>
		<dc:creator>rutherford</dc:creator>
				<category><![CDATA[Tech Labours]]></category>

		<guid isPermaLink="false">http://aleatory.clientsideweb.net/?p=413</guid>
		<description><![CDATA[PDF won&#8217;t open in browser (Firefox/IE/Chrome) after updating to latest Adobe Reader 9? You just need to accept the End User Licence Agreement in the standalone version of Reader first. Open up Adobe Reader 9 and click Accept. That&#8217;s it &#8211; you can close it and get back to using it in your browser from [...]]]></description>
			<content:encoded><![CDATA[<p>PDF won&#8217;t open in browser (Firefox/IE/Chrome) after updating to latest Adobe Reader 9? You just need to accept the End User Licence Agreement in the standalone version of Reader first.</p>
<p>Open up Adobe Reader 9 and click Accept.  That&#8217;s it &#8211; you can close it and get back to using it in your browser from now on&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://aleatory.clientsideweb.net/2010/10/18/adobe-reader-9-windows-cannot-find-eula-exe/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Browse with Confidence?</title>
		<link>http://aleatory.clientsideweb.net/2010/06/21/browse-with-confidence/</link>
		<comments>http://aleatory.clientsideweb.net/2010/06/21/browse-with-confidence/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 01:00:51 +0000</pubDate>
		<dc:creator>rutherford</dc:creator>
				<category><![CDATA[Tech Labours]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://aleatory.clientsideweb.net/?p=251</guid>
		<description><![CDATA[Perhaps, when attempting to convince users your browser is rock solid haxor-proof, it&#8217;d be advisable to demonstrate to them that your sites can detect which browser they&#8217;re currently running?]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/rutherfordinbelfast/4718752361/sizes/o/"><img alt="IE6 not detected on microsoft.com" src="http://farm5.static.flickr.com/4020/4718752361_ba55d809c5.jpg" title="IE8?" class="aligncenter" width="500" height="400" /></a></p>
<p>
Perhaps, when attempting to convince users your browser is rock solid haxor-proof, it&#8217;d be advisable to demonstrate to them that your sites can detect which browser they&#8217;re currently running?</p>
]]></content:encoded>
			<wfw:commentRss>http://aleatory.clientsideweb.net/2010/06/21/browse-with-confidence/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging &#8216;Responseless&#8217; HTTP Requests</title>
		<link>http://aleatory.clientsideweb.net/2010/06/14/debugging-responseless-http-requests/</link>
		<comments>http://aleatory.clientsideweb.net/2010/06/14/debugging-responseless-http-requests/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 22:19:02 +0000</pubDate>
		<dc:creator>rutherford</dc:creator>
				<category><![CDATA[Tech Labours]]></category>

		<guid isPermaLink="false">http://aleatory.clientsideweb.net/?p=239</guid>
		<description><![CDATA[When developing AJAX or Facebook web apps a lot of the time requests are fire and forget i.e. they are awaiting no specific response information from the application. Therefore we have no simple dump to screen solution for debugging our apps. One workaround would be to save details to a db where they could be [...]]]></description>
			<content:encoded><![CDATA[<p>When developing AJAX or Facebook web apps a lot of the time requests are fire and forget i.e. they are awaiting no specific response information from the application.  Therefore we have no simple dump to screen solution for debugging our apps.</p>
<p>
One workaround would be to save details to a db where they could be retrieved for analysis at a later time.  This makes the data persistent but normally for debugging this is overkill.  Log frameworks exist but sometimes incorporating third party software in is just bloat, especially in single developer projects.<br />
<span id="more-239"></span><br />
The simplest alternative solution I can think of is to grab the request info needed and send it out to a mail address using PHP&#8217;s built in mail object:</p>
<p>
<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$to</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'me@example.com'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$subj</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Request variables'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$msg</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Requested:\n'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_REQUEST</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$k</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$v</span> <span style="color: #009900;">&#41;</span>
 <span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #006699; font-weight: bold;">$k</span> = <span style="color: #006699; font-weight: bold;">$v</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">mail</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$to</span><span style="color: #339933;">,</span> <span style="color: #000088;">$subj</span><span style="color: #339933;">,</span> <span style="color: #000088;">$msg</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>
Mailing debug output to a free mail provider such as gmail means you have a persistent copy of the data (in chronological order) in a few lines of code without needing to start building up sql or think about clogging up your host with yet more logs.   Is there a better way?</p>
]]></content:encoded>
			<wfw:commentRss>http://aleatory.clientsideweb.net/2010/06/14/debugging-responseless-http-requests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trojans.  Not Stupid.</title>
		<link>http://aleatory.clientsideweb.net/2009/12/21/trojans-not-stupid/</link>
		<comments>http://aleatory.clientsideweb.net/2009/12/21/trojans-not-stupid/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 01:57:30 +0000</pubDate>
		<dc:creator>rutherford</dc:creator>
				<category><![CDATA[Tech Labours]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://aleatory.clientsideweb.net/2009/12/21/trojans-not-stupid/</guid>
		<description><![CDATA[I got held up recently by a particularly nasty Trojan infection that seemed to come from a flash vulnerability &#8211; or at least it installed itself in a Macromedia directory at a time when embedded flash would have been running on one of the web pages I had open. No ordinary decent virus this one [...]]]></description>
			<content:encoded><![CDATA[<p>I got held up recently by a particularly nasty Trojan infection that seemed to come from a flash vulnerability &#8211; or at least it installed itself in a Macromedia directory at a time when embedded flash would have been running on one of the web pages I had open.</p>
<p><img src='http://aleatory.clientsideweb.net/wp-content/uploads/2009/12/trojan.jpg' alt='Trojan' style="float:left"/>No ordinary decent virus this one though.  It cleverly disabled my default browser &#8211; Chrome &#8211; coercing me into a specific set of steps that would ultimately place a rootkit on my OS.  As my browser seemingly inexplicably was rendered useless, even after multiple uninstall/reinstalls, something else was up.  Internet Explorer was attempting to connect to a &#8220;tolule.net&#8221; which on lookup resolved to a Chinese IP.  So a quick entry into my Sygate advanced rules and I had a large swathe of Chinese IPs blocked.  So I was safe for the time being giving me a chance to think about what was going on.  (The Trojan was quite busy &#8211; attempting to connect every 10 mins or so and to multiple domains &#8211; initially always tolule.net but also gusmon.net and somemon.net &#8211; each time resolving to an address in China).<br />
<span id="more-168"></span><br />
I ran a full AVG scan and two files were suspect &#8211; both resident in System Volume Information &#8211; the area where System Restore settings reside.  Delete wouldn&#8217;t work (looking into it further if system restore is turned on these files cannot be manipulated) so I went for seemingly the next best option &#8211; system restore to a point before Chrome stopped working.  Looking back this was a stupid thing to do but at the time seemed logical enough.  A thought process that no doubt the hackers had already wargamed out in their heads prior to deployment.  User sees app not working, reinstall doesn&#8217;t work, anti-virus identifies but can&#8217;t clear the Trojan, proceeds to system restore hence running the virus the hackers managed to plant somehow in Sys Vol Info.</p>
<p>Needless to say, the system restore failed, but now a plethora of hacked files had now successfully and relatively silently installed themselves on my OS.  The rig included their own embedded db instance of Sql Anywhere, the a.exe worm that amongst other things engages in Process Hijacking described above, a bunch of reg keys that pointed device drivers and startup configs to the original hacked Macromedia directory, a hidden rootkit type process that ensured these keys and the directory were not tampered with and the actual downloader Trojan itself, W32/Agent.GBS!tr.dldr.</p>
<p>The process hijacking was something else.  It would wait until I&#8217;d start an application and use the app&#8217;s virtual memory for it&#8217;s own devices.  Hence why I was getting the Sygate reports of IE getting a life of it&#8217;s own.  Wasn&#8217;t just browsers that were vulnerable, even MalwareBytes Anti-Malware software&#8217;s memory was hijacked.  Each time the stolen app tried unsuccessfully to phone home to China.</p>
<p>By now it was obvious to me I had been infected with a particularly nasty virus and ran AVG a 2nd time.  But now the Trojan was so well embedded AVG didn&#8217;t pick up anything more than a few measly HTTP cookies.  I did wonder about Sygate at this stage but it still seemed to be successfully blocking all malicious packets so I was still just interested in removal.  Spybot Search and Destroy was my next bet but it returned nothing.  What&#8217;s more that TeaTimer process monitor it installs is a real resource hog &#8211; 128meg of virtual memory.  That&#8217;s a bit more than a mere heartbeat in my book.  Especially on my netbook!  Got rid of that then was pointed to the MalwareBytes app by Matt @ BleepingComputer.com.  The hackers obviously see it as a threat &#8211; after I installed it I tried to update it&#8217;s malware db but was prevented from doing so, presumably by the a.exe worm.  It instead forced MBAM to attempt another connection to tolule.net.  Proceeded with the scan anyway.  Result?  Every malicious file was identified.</p>
<p>Although still not out of the woods &#8211; MBAM would freeze when attempting to quarantine the audio driver reg keys whose values had been changed from wdmaud.drv to a dll file in the fake Macromedia directory.  After I deleted a.exe and ran MBAM again, this time it succeeded in changing the reg keys after a restart.  I had tried manual deletion of the reg keys and fake Macromedia directory prior to this but as soon as I closed regedit the keys and files would reappear.  MBAM must have required the restart to remove whatever in-memory process had been running to protect the hacked data.</p>
<p>So that&#8217;s pretty much it.  Quite an organised payload that, and a very well thought out attack vector relying on unwitting end user participation as much as the original web vulnerability.</p>
]]></content:encoded>
			<wfw:commentRss>http://aleatory.clientsideweb.net/2009/12/21/trojans-not-stupid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The StackOverflow Rant</title>
		<link>http://aleatory.clientsideweb.net/2009/12/01/the-stackoverflow-rant/</link>
		<comments>http://aleatory.clientsideweb.net/2009/12/01/the-stackoverflow-rant/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 02:55:26 +0000</pubDate>
		<dc:creator>rutherford</dc:creator>
				<category><![CDATA[cool]]></category>
		<category><![CDATA[information media]]></category>
		<category><![CDATA[Tech Labours]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://aleatory.clientsideweb.net/2009/12/01/the-stackoverflow-rant/</guid>
		<description><![CDATA[I should probably open my commentary on the SO community with a more wide-ranging piece on the effectiveness of self-moderation and social badge collecting in rapidly scaling a web community but hopefully by dumping this the second opinion will be more insightful whenever that may be. Ok so really I&#8217;m just a petty net troll [...]]]></description>
			<content:encoded><![CDATA[<p>I should probably open my commentary on the <a href="http://stackoverflow.com/" target="_blank">SO community</a> with a more wide-ranging piece on the effectiveness of self-moderation and social badge collecting in rapidly scaling a web community but hopefully by dumping this the second opinion will be more insightful whenever that may be.</p>
<p><img src="http://aleatory.clientsideweb.net/wp-content/uploads/2009/12/internetforumtoughguy.jpg" alt="forum junkie" style="float: left" />Ok so really I&#8217;m just a petty net troll who completely overreacts to criticism online.  That aside, I still cannot understand how the answering army at stackoverflow come to the collective conclusion that every question on a close-to-the-bone programming issue requires some inane form of rephrasing or just outright blanking.</p>
<p><span id="more-161"></span>I get over the former as SO is a lightning quick method of accessing really knowledgeable people on demand &#8211; but I had to endure a case of the later a while back when someone obviously thought the answer to the question I asked was too blase and proceded to provide a solution for a completely separate issue.  And this despite me explaining exactly why I didn&#8217;t want his solution in the preamble.  So I went and got a workable answer myself, posted it and accepted it as the solution.  Job done.</p>
<p>Except this caused numbnuts to vote down my answer without explanation.  So I voted his down, and told him why.  Despite this, he questioned why I&#8217;d want to know what I wanted to know in the first place and voted down the question.  It was at that moment that I realised SO, while largely self-moderating, is still missing the last 20%<sup>TM</sup> required to remove the clinically insane from the process.  It gives me no pleasure to disclose the most efficient solution currently is to multiply your web leverage in traditional fashion; create multiple accounts and hit back with a bewildering array of counter-comments and down votes&#8230;</p>
<p>It is embarrassing though when apparently throwaway questions asked on your secondary accounts are rated higher than your allegedly thought-provoking and succinct real persona *whistles*</p>
<p>In true Bileblog style, programmers appear to be sarky contemptible bastards who like nothing more than jumping on the inaccuracies of accepted thought; hence phrasing a question along the lines of &#8216;My colleague says x is no longer a good way to do things&#8230;&#8217; will likely stir the hornet&#8217;s nest of pedantry as each contributor seeks to provide a more arcane answer as to why x sucks than the previous response.  Recurse until someone mentions lambda.</p>
]]></content:encoded>
			<wfw:commentRss>http://aleatory.clientsideweb.net/2009/12/01/the-stackoverflow-rant/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

