<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Binarymist</title>
	<atom:link href="http://blog.binarymist.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.binarymist.net</link>
	<description>Musings of a software engineer</description>
	<lastBuildDate>Tue, 24 Jan 2012 13:30:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.binarymist.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/a6ab7c792e0f3bf3ba9219df1e149293?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Binarymist</title>
		<link>http://blog.binarymist.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.binarymist.net/osd.xml" title="Binarymist" />
	<atom:link rel='hub' href='http://blog.binarymist.net/?pushpress=hub'/>
		<item>
		<title>Bare-metal Hypervisor Setup Evaluation</title>
		<link>http://blog.binarymist.net/2012/01/23/bare-metal-hypervisor-setup-evaluation/</link>
		<comments>http://blog.binarymist.net/2012/01/23/bare-metal-hypervisor-setup-evaluation/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 12:16:56 +0000</pubDate>
		<dc:creator>binarymist</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Virtualisation]]></category>

		<guid isPermaLink="false">http://blog.binarymist.net/?p=1249</guid>
		<description><![CDATA[The views expressed in this post are my own and don’t reflect the views of my employer. Recently I had the opportunity for work, to carry out some research on what&#8217;s in the market in regards to bare-metal hypervisors. The following is the result of an in depth research and deployment project of the following [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1249&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;">The views expressed in this post are my own and don’t reflect the views of my employer.</p>
<p style="text-align:left;">Recently I had the opportunity for work, to carry out some research on what&#8217;s in the market in regards to bare-metal hypervisors.</p>
<p style="text-align:left;">The following is the result of an in depth research and deployment project of the following bare-metal hyper-visors.<br />
This will enable us to trial the hypervisors out for performance, ease of setup, ease of administration, and ease of use.</p>
<p style="text-align:left;"><a href="http://binarymist.files.wordpress.com/2012/01/bare-metal_hypervisor.png"><img class="size-full wp-image-1291 alignnone" title="Bare-metal hypervisor" src="http://binarymist.files.wordpress.com/2012/01/bare-metal_hypervisor.png?w=450&#038;h=371" alt="" width="450" height="371" /></a></p>
<p style="text-align:left;">I&#8217;ve also looked at hardware costs, but first it needs to be decided which hypervisor we are going to go with.<br />
As this would be a team decision, I thought the best way to go about this was to record some of my existing experience with further research into some of the product leaders offerings.</p>
<p style="text-align:left;">I haven&#8217;t used KVM before.<br />
I knew it existed, but when I was last in the market comparing hypervisors, KVM was an infant.<br />
Now it appears to have grown up and is comparable with it&#8217;s commercial rivals.<br />
<a href="http://www.thevarguy.com/2009/04/27/kvm-vs-vmware-a-case-study/" rel="nofollow" target="_blank">This</a> pretty much sums up the KVM vs VMware battle<br />
<a href="http://virtually-a-machine.blogspot.com/2009/08/xen-vs-kvm-and-rest-of-world.html" rel="nofollow" target="_blank">This</a> pretty much sums up the Xen vs KVM battle</p>
<hr />
<h2 style="text-align:left;">ESX(i)</h2>
<p style="text-align:left;"><a href="http://binarymist.files.wordpress.com/2012/01/vsphere_client_virtual_esx.png" target="_blank"><img class="size-full wp-image-1293 alignnone" title="vsphere_client_virtual_esx" src="http://binarymist.files.wordpress.com/2012/01/vsphere_client_virtual_esx.png?w=450&#038;h=337" alt="" width="450" height="337" /></a></p>
<p style="text-align:left;">I&#8217;ve used these extensively and am well aware of their pros and cons.<br />
Supports iscsi.<br />
I prefer not to have to pay for a product if there are FOS (Free &amp; Open Source) offerings that get the job done just as well.<br />
In looking at the likes of KVM and Xen, the cons of ESX/ESXi really stand out, not to mention the fact that KVM is completely free, more efficient and has a faster pace of growth.<br />
With the free version, that&#8217;s ESXi, you get (as of version 5) 32GB vRAM, and that&#8217;s only because the community kicked up such a fuss about paying per CPU for a product that was originally free.<br />
VMware keep changing the rules and pricing strategies when users go else where. I&#8217;d prefer not to pay at all.<br />
I&#8217;m not going to spend time recording the pros and cons of VMware at this stage, as I think the other contenders have more to offer, and ask for less or nothing in return.<br />
If we find that there are un-foreseen hurdles in the other products, we should look at ESXi as a backup.</p>
<h3>Management</h3>
<p>vSphere client (only runs on windows).<br />
vSphere CLI (read-only, unless you pay for license)<br />
Have very limited access to the hypervisor</p>
<h3>Migration</h3>
<ul>
<li><a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1000936" target="_blank">General</a></li>
<li>Potential <a href="http://communities.vmware.com/thread/224712" rel="nofollow" target="_blank">migration</a> of KVM to VMware.<br />
Although <a href="http://www.linuxquestions.org/questions/linux-server-73/converting-kvm-virtual-machines-to-vmware-images-853868/" rel="nofollow" target="_blank">this link</a> says  the above won&#8217;t work, but has some other suggestions.</li>
</ul>
<h3>UPS</h3>
<p>See my <a href="http://blog.binarymist.net/category/projects/ups/" rel="nofollow" target="_blank">blog posts</a>.</p>
<hr />
<h2>Citrix XenServer</h2>
<p><a href="http://binarymist.files.wordpress.com/2012/01/xencenter.jpg" target="_blank"><img class="size-full wp-image-1295 alignnone" title="XenCenter" src="http://binarymist.files.wordpress.com/2012/01/xencenter.jpg?w=450&#038;h=221" alt="" width="450" height="221" /></a></p>
<p style="text-align:left;">XenServer <a href="http://support.citrix.com/article/CTX115807" target="_blank">support for iscsi</a></p>
<p style="text-align:left;">Xen is a type 1 bare-metal hypervisor. This means it runs as close to the hardware as possible.<br />
To take full advantage of it&#8217;s speed, you have to run paravirtualised (modified OS&#8217;s).<br />
Since most of our work at this stage would be on Windows, there would be no benefit here for us.<br />
Runs in a small custom Linux system.<br />
Intel VT-x or AMD-V is <a href="http://forums.citrix.com/thread.jspa?messageID=1606814" target="_blank">required</a> to run full hardware virtualisation (HVM) rather than paravirtualised.</p>
<h3>Licensing for XenServer Express</h3>
<p style="text-align:left;">Be aware, Citrix can change their <a href="http://searchservervirtualization.techtarget.com/tip/Citrix-XenServer-and-Essentials-licensing-pricing-explained" rel="nofollow" target="_blank">licensing</a> structure at any time.<br />
<a href="http://www.citrix.com/English/ps2/products/subfeature.asp?contentID=2300456" rel="nofollow" target="_blank">Features and current licensing model</a><br />
XenServer <a href="http://support.citrix.com/article/CTX125301" rel="nofollow" target="_blank">Licensing FAQ</a><br />
XenCenter can only connect to a single instance of XenServer at any one time.<br />
XenServer currently <a href="http://deliver.citrix.com/go/citrix/freeXenServerp?pmid=3099337&amp;em=citrixcerts@intel.com" rel="nofollow" target="_blank">free</a><br />
XenCenter <a href="http://virtualization.info/en/news/2009/02/citrix-xenserver-is-now-free-xencenter.html" rel="nofollow" target="_blank">free</a><br />
<a href="http://www.citrix.com/English/NE/news/news.asp?newsID=1687130" rel="nofollow" target="_blank">http://www.citrix.com/English/NE/news/news.asp?newsID=1687130</a></p>
<h3><a href="http://support.citrix.com/article/CTX123996" rel="nofollow" target="_blank">FAQ</a></h3>
<h3>Management</h3>
<ul>
<li>States <a href="http://www.citrix.com/English/ps2/products/subfeature.asp?contentID=2300456" rel="nofollow" target="_blank">Microsoft System Center VMM</a> can be used, which of course won&#8217;t be free.</li>
<li>XenCenter</li>
<li>Archipel</li>
</ul>
<h3>Migration</h3>
<h4>ESX(i) to XenServer</h4>
<p style="text-align:left;">Seemed to have <a href="http://forums.citrix.com/thread.jspa?threadID=264576" rel="nofollow" target="_blank">struggles</a> (windows guest).<br />
Seemed to be a <a href="http://community.spiceworks.com/topic/74214-how-do-you-convert-vms-from-vmware-to-a-citrix-xen-server-if-possible" rel="nofollow" target="_blank">little more successful</a> (windows guest).</p>
<h3>UPS</h3>
<p style="text-align:left;"><a href="http://support.citrix.com/article/CTX119910" rel="nofollow" target="_blank">Integrating XenServer and APC PowerChute</a>. Also see <a href="http://www.sch0.org/index.php/xenserver-and-apc-ups-management" rel="nofollow" target="_blank">this</a>.<br />
Using <a href="http://kiekeboe100.hoefman.be/blog/2010/01/apc-ups-management-on-xenserver/" target="_blank">apcupsd</a> as KVM can.</p>
<h3 style="text-align:left;">Installation Stage</h3>
<p style="text-align:left;">The <a href="http://www.citrix.com/lang/English/lp/lp_2307783.asp" rel="nofollow" target="_blank">getting started page. </a>You can find the quick installation guide here.</p>
<p style="text-align:left;">The full installation <a href="http://support.citrix.com/article/CTX130421" target="_blank">guide.</a><br style="text-align:left;" /> The Administrators <a href="http://support.citrix.com/article/CTX130420" target="_blank">guide.</a></p>
<p style="text-align:left;">Download and install XenServer on your host.<br />
Download and install XenCenter on your management box.</p>
<p style="text-align:left;">You&#8217;ll need the following details:</p>
<ol>
<li>Hostname</li>
<li>Host IP and mask</li>
<li>Gateway</li>
<li>DNS Server</li>
<li>NTP Address</li>
</ol>
<p>This was a very straight forward install.<br />
I was expecting some trouble, but there wasn&#8217;t any.</p>
<hr />
<h2>KVM</h2>
<p><a href="http://binarymist.files.wordpress.com/2012/01/kvm.png" target="_blank"><img class="size-full wp-image-1298 alignnone" title="KVM" src="http://binarymist.files.wordpress.com/2012/01/kvm.png?w=450" alt=""   /></a></p>
<p style="text-align:left;">KVM has support for iscsi.<br />
Expected to <a href="http://www.linux-kvm.org/page/Guest_Support_Status" target="_blank">run all production OS&#8217;s.</a><br />
Why will KVM be the <a href="http://www.linux-kvm.com/content/why-kvm-will-be-king" rel="nofollow" target="_blank">leader amongst hypervisors</a>?</p>
<p style="text-align:left;">Interesting articles:</p>
<ul style="text-align:left;">
<li><a href="http://www.linux-kvm.com/content/why-kvm-will-be-king" rel="nofollow" target="_blank">http://www.linux-kvm.com/content/why-kvm-will-be-king</a></li>
<li><a href="http://avikivity.blogspot.com/2008/03/true-myths.html" rel="nofollow" target="_blank">http://avikivity.blogspot.com/2008/03/true-myths.html</a></li>
</ul>
<p style="text-align:left;">Is completely free.<br />
Considerably more <a href="http://www.channelregister.co.uk/2008/09/10/run_more_vms_with_red_hat_than_vmware/" rel="nofollow" target="_blank">resource efficient</a> than the alternatives<br />
There are no resource constraints. We pay for nothing and get an enterprise level product with a huge community.</p>
<p style="text-align:left;">KVM <a href="http://wiki.debian.org/KVM" rel="nofollow" target="_blank">on Debian</a></p>
<h3 style="text-align:left;">Management</h3>
<p style="text-align:left;">Web based KVM management offerings of which ProxMox VE seems to be the stand-out.<br />
Many of <a href="http://serverfault.com/questions/132346/web-based-kvm-management-for-ubuntu" rel="nofollow" target="_blank">these</a> can also be used for Xen. Also see <a href="http://ubuntuforums.org/showthread.php?t=1532214" rel="nofollow" target="_blank">this</a>.</p>
<h4 style="text-align:left;">ProxMoxVE</h4>
<p style="text-align:left;"><strong><span style="text-decoration:underline;"><a href="http://binarymist.files.wordpress.com/2012/01/proxmoxve.jpg" target="_blank"><img class="size-full wp-image-1300 alignnone" title="ProxMoxVE" src="http://binarymist.files.wordpress.com/2012/01/proxmoxve.jpg?w=450&#038;h=372" alt="" width="450" height="372" /></a></span></strong></p>
<p style="text-align:left;"><strong><span style="text-decoration:underline;">ProxMox</span></strong> is a commercial company.<br />
ProxMox VE Looks Good.<br />
From what I&#8217;ve seen, looks easier to setup than Archipel.<br />
Proxmox VE is licensed under GPLv2 (Open source).<br />
My understanding of the GPLv2 license, is that the suplier of the GPL&#8217;d software can decide to charge a fee for download at any time.<br />
As far as I&#8217;m aware, Proxmox are within their rights to do so at any time.<br />
Correct me if I&#8217;m wrong?<br />
The ISO installer is packaged with Debian, although you can install on <a href="http://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Lenny" rel="nofollow" target="_blank">top of Debian</a>.<br />
Looks User friendly, has Web interface (multi platform). No installs required.<br />
Support: incl free community and paid for. See <a href="http://www.proxmox.com/products/proxmox-ve" rel="nofollow" target="_blank">here</a> and <a href="http://www.zdnet.com/blog/virtualization/proxmox-the-ultimate-hypervisor/3482" rel="nofollow" target="_blank">here</a>.<br />
The <a href="http://pve.proxmox.com/wiki/Main_Page" rel="nofollow" target="_blank">wiki</a><br />
Looks like what ever you can do on a Debian system, you can do on a ProxMox system.<br />
See <a href="http://www.tummy.com/journals/entries/jafo_20100121_003525" rel="nofollow" target="_blank">this</a> link. Also includes ESXi comparisons.<br />
Proxmox VE is <a href="http://pve.proxmox.com/wiki/Focused_on_the_enterprise_needs" rel="nofollow" target="_blank">free to use and open source</a>.<br />
<a href="http://pve.proxmox.com/wiki/Backup_-_Restore_-_Live_Migration" rel="nofollow" target="_blank">Easy backups and restores</a>.<br />
Video tutorials <a href="http://www.youtube.com/user/ProxmoxVE" rel="nofollow" target="_blank">here</a> and <a href="http://pve.proxmox.com/wiki/Category:Video_Tutorials" rel="nofollow" target="_blank">here</a>.</p>
<h4 style="text-align:left;">Archipel</h4>
<p style="text-align:left;"><a href="http://binarymist.files.wordpress.com/2012/01/archipelclient.jpg" target="_blank"><img class="size-full wp-image-1301 alignnone" title="ArchipelClient" src="http://binarymist.files.wordpress.com/2012/01/archipelclient.jpg?w=450&#038;h=308" alt="" width="450" height="308" /></a></p>
<p style="text-align:left;"><a href="http://archipelproject.org/" target="_blank"><strong><span style="text-decoration:underline;">Archipel</span></strong></a> Also looks good.<br />
Free and Open Source, licensed under AGPL (which more specifically targets distributed applications).<br />
Team of 6 voluntary developers. Lots of info <a href="https://github.com/primalmotion/Archipel" rel="nofollow" target="_blank">here</a>.<br />
Supports all libvirt-supported virtualisation engines like KVM, Xen, VMware<br />
The install on first appearance, looks more work than ProxMox.<br />
<a href="https://github.com/primalmotion/archipel/wiki" rel="nofollow" target="_blank">Documentation</a>, IRC channel (members are very helpful), etc.<br />
The Archipel client is JavaScript, which is run locally.</p>
<h3 style="text-align:left;">Industry support</h3>
<p style="text-align:left;">KVM is supported by major industry players such as&#8230;</p>
<ol style="text-align:left;">
<li>IBM</li>
<li>Cisco</li>
<li>Intel</li>
<li>AMD</li>
<li>Redhat</li>
<li>Novell amongst others.</li>
</ol>
<h3 style="text-align:left;">Migration</h3>
<p style="text-align:left;">Looks like migration of guests from most platforms to KVM is covered.<br />
<a href="http://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE#VMware_to_Proxmox_VE_.28KVM.29" target="_blank">VMware to Proxmox</a>, XenServer to Proxmox.</p>
<h3 style="text-align:left;">UPS</h3>
<p style="text-align:left;">Can be shutdown by an APC Smart-UPS<br />
using the <a href="http://www.apcupsd.com/manual/manual.html#id28" rel="nofollow" target="_blank">APCUPSD daemon</a> This will shutdown immediately.<br />
Or better, by using PCNS for Linux.<br />
Using PCNS we can specify when to shutdown and all sorts of other things.</p>
<h3 style="text-align:left;">Installation Stage Archipel</h3>
<h4 style="text-align:left;">Links found useful for the Debian setup</h4>
<p style="text-align:left;"><a href="http://www.debian-tutorials.com/virtualization/kvm-virtualization-on-debian-squeeze-server" target="_blank">http://www.debian-tutorials.com/virtualization/kvm-virtualization-on-debian-squeeze-server</a></p>
<p style="text-align:left;"><a href="http://wiki.debian.org/KVM" rel="nofollow" target="_blank">http://wiki.debian.org/KVM</a></p>
<p style="text-align:left;"><a href="http://wiki.libvirt.org/page/Networking#Bridged_networking_.28aka_.22shared_physical_device.22.29" target="_blank">http://wiki.libvirt.org/page/Networking#Bridged_networking_.28aka_.22shared_physical_device.22.29</a></p>
<p style="text-align:left;"><a href="http://wiki.kartbuilding.net/index.php/KVM_Setup_on_Debian_Squeeze" rel="nofollow" target="_blank">http://wiki.kartbuilding.net/index.php/KVM_Setup_on_Debian_Squeeze</a></p>
<h4 style="text-align:left;">Setting up Debian</h4>
<p style="text-align:left;">Download Debian Wheezy from <a href="http://www.debian.org/devel/debian-installer/" rel="nofollow" target="_blank">here</a><br />
Install it.<br />
Give it a hostname. For example &#8220;vmhost&#8221; without the quotes.<br />
When prompted, select the SSH Server option.<br />
Update your package index and install the necessary packages.</p>
<p style="text-align:left;">As root, run:</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false; wrap-lines: false;">
apt-get update
apt-get install qemu-kvm libvirt-bin virtinst virt-top
</pre></p>
</div>
</div>
</div>
<p style="text-align:left;">virtinst is for virt-install tools etc.<br />
qemu-kvm is the new name for the kvm package in squeeze<br />
libvirt-bin is what will control kvm and start guests on boot etc.<br />
virt-top is a &#8216;top&#8217;-like utility for virtualisation stats</p>
<h5 style="text-align:left;">Add user to groups</h5>
<p style="text-align:left;">Add the currently logged in user that will be using the associated programmes.</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false; wrap-lines: false;">
usermod -a -G libvirt myusername
usermod -a -G kvm myusername
</pre></p>
</div>
</div>
</div>
<p style="text-align:left;">Then check that the user was added to the groups.</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false;">
groups myusername
</pre></p>
</div>
</div>
</div>
<p style="text-align:left;">or</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false;">
id myusername
</pre></p>
</div>
</div>
</div>
<p style="text-align:left;">or view all users in all groups</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false;">
cat /etc/group | less
</pre></p>
</div>
</div>
</div>
<h5 style="text-align:left;">Setup networking</h5>
<p style="text-align:left;">Your /etc/network/interfaces needs to have a similar section:<br />
As root, run the following&#8230;</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false;">
vi /etc/network/interfaces
</pre></p>
</div>
</div>
</div>
<p style="text-align:left;"><em># The primary network interface</em><br />
<em> allow-hotplug eth0</em><br />
<em> iface eth0 inet static</em><br />
<em>    address 192.168.1.20</em><br />
<em>    netmask 255.255.255.0</em><br />
<em>    gateway 192.168.1.254</em><br />
<em>    broadcast 192.168.1.255</em></p>
<p style="text-align:left;">Now restart your interface:</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false;">
ifdown eth0
</pre><br />
<pre class="brush: plain; gutter: false;">
ifup eth0
</pre></p>
</div>
</div>
</div>
<p style="text-align:left;">Check that the changes have taken affect:</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false;">
ip addr show
</pre></p>
</div>
</div>
</div>
<h5 style="text-align:left;">Setup Bridged networking</h5>
<p style="text-align:left;">You also need to set up a network bridge on our server.<br />
Rather than use NAT based connectivity, we need bridge networking.</p>
<p style="text-align:left;">install the package bridge-utils.</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false;">
apt-get install bridge-utils
</pre></p>
<p>I&#8217;ve yet to set the bridge up.<br />
Will add this once done</p>
</div>
</div>
</div>
<h4 style="text-align:left;">Setting up Archipel</h4>
<p>Links I found helpful:</p>
<ul>
<li><a href="https://github.com/primalmotion/Archipel/wiki/Installation-manual" target="_blank">https://github.com/primalmotion/Archipel/wiki/Installation-manual</a></li>
<li><a href="http://blog.professional.geek.nz/post/5951118448/archipel-setup-walkthrough" target="_blank">http://blog.professional.geek.nz/post/5951118448/archipel-setup-walkthrough</a></li>
<li><a href="http://www.youtube.com/watch?v=KkoGBK2uqZQ" rel="nofollow" target="_blank">http://www.youtube.com/watch?v=KkoGBK2uqZQ</a></li>
</ul>
<p><a href="https://github.com/primalmotion/Archipel/wiki/General%3A-FAQ" target="_blank">FAQ and supported browsers</a><br />
<a href="https://github.com/primalmotion/Archipel/wiki/General%3A-FAQ%C2%A0&amp;nbsp" target="_blank">https://github.com/primalmotion/Archipel/wiki/General%3A-FAQ&amp;nbsp;&amp;nbsp</a></p>
<p style="text-align:left;">Install ejabberd</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false;">
apt-get install ejabberd
</pre></p>
</div>
</div>
</div>
<p style="text-align:left;">According to <a href="https://github.com/primalmotion/Archipel/wiki/Ejabberd%3A-Configuration" target="_blank">this</a>, which is linked if you follow the install guide through,<br />
we will need to update the path to the tls certificate.<br />
Not sure where that is, but will have to find out.<br />
the sample file contains the ejabberd configuration needed for Archipel.<br />
It is not ready for production, so will need some modification. Yet to find out what.<br />
Change all occurrences of FQDN to vmhost.mydomain.local and follow the other directions.</p>
<p style="text-align:left;">Once the ejabberd.cfg file is modified as suggested, download pscp.exe from <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">here</a>.<br />
Put both the pscp.exe file and the ejabberd.cfg in the same folder (just to save typing paths and adding environment variables).<br />
The help page is <a href="http://tartarus.org/~simon/putty-snapshots/htmldoc/Chapter5.html#pscp" rel="nofollow" target="_blank">here</a> if you get stuck.<br />
Run a cmd prompt from the directory you have the 2 previous mentioned files within.<br />
Then run:</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false; wrap-lines: false;">
pscp ejabberd.cfg myusername@192.168.1.20:ejabberd.cfg
</pre></p>
</div>
</div>
</div>
<p style="text-align:left;">Enter your password when prompted.<br />
The file will be securely copied via SSH to your ~ dir.<br />
You can&#8217;t copy directly to the /etc/ejabberd/ directory as you would need to be root of the destination machine.<br />
Now go to the Debian box. cd into ~.<br />
and move the config file to where it belongs.</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false;">
su root
</pre></p>
</div>
</div>
</div>
<p style="text-align:left;">Enter your password when prompted.</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false; wrap-lines: false;">
mv ejabberd.cfg /etc/ejabberd/ejabberd.cfg
</pre></p>
</div>
</div>
</div>
<p style="text-align:left;">Then check that the move was successful.</p>
<p style="text-align:left;">Start the jabber server if it&#8217;s not already.<br />
As root:</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false;">
/etc/init.d/ejabberd start
</pre></p>
</div>
</div>
</div>
<p style="text-align:left;">Wait a few seconds and run:</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false;">
/usr/sbin/ejabberdctl status
</pre></p>
</div>
</div>
</div>
<p style="text-align:left;">And you should get a result of running, with the version details.</p>
<p style="text-align:left;">You need to register a XMPP admin account (if you want archipel to work out of the box, just name it admin):</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false; wrap-lines: false;">
ejabberdctl register admin vmhost.mydomain.local MyCrazyPassWordHere
</pre></p>
</div>
</div>
</div>
<p style="text-align:left;">You should get something like:</p>
<p style="text-align:left;"><em>User admin@vmhost.mydomain.local successfully registered.</em></p>
<h5 style="text-align:left;">Continue with the Archipel installation</h5>
<p style="text-align:left;">The client is easy, just fetch and un-compress and your ready to go.</p>
<p style="text-align:left;">The <a href="https://github.com/primalmotion/Archipel/wiki/Installation%3A-Agent" rel="nofollow" target="_blank">agent</a>, you will need to install qemu-utils if it&#8217;s not already.<br />
It was for me.</p>
<p style="text-align:left;">As root, run:</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false; wrap-lines: false;">
apt-get install python-setuptools python-imaging python-numpy python-libvirt
</pre></p>
</div>
</div>
</div>
<p style="text-align:left;">python-libvert is Python bindings for the libvirt library which was already installed.</p>
<p style="text-align:left;">I also installed subversion:</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false;">
apt-get install subversion
</pre></p>
</div>
</div>
</div>
<p style="text-align:left;">Now&#8230; as root, I chose to install the published packages on Pypi.<br />
I ran:</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false;">
easy_install archipel-agent
</pre></p>
</div>
</div>
</div>
<h5 style="text-align:left;">Post installation formalities</h5>
<p style="text-align:left;">Finalise the installation:</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false;">
archipel-initinstall
</pre></p>
</div>
</div>
</div>
<p style="text-align:left;">Follow the additional output instructions on the screen.</p>
<p style="text-align:left;">Now as root, run:</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false; wrap-lines: false;">
archipel-tagnode --jid=admin@vmhost.mydomain.local --password=MyCrazyPassWordHere --create
archipel-rolesnode --jid=admin@vmhost.mydomain.local --password=MyCrazyPassWordHere --create
archipel-adminaccounts --jid=admin@vmhost.mydomain.local --password=MyCrazyPassWordHere --create
archipel-vmparkingnode --jid=admin@vmhost.mydomain.local --password=MyCrazyPassWordHere --create
</pre></p>
</div>
</div>
</div>
<p style="text-align:left;">The last two commands were, introduced after beta 4, so they didn&#8217;t exist on the binary I installed.</p>
<p style="text-align:left;">You can now start the archipel agent.</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false;">
/etc/init.d/archipel start
</pre></p>
</div>
</div>
</div>
<p style="text-align:left;">The logs are printed to /var/log/archipel/archipel.log</p>
<p style="text-align:left;">To be completely sure Archipel is up and your hypervisor is connected you can run:</p>
<div style="text-align:left;">
<div>
<div><pre class="brush: plain; gutter: false;">
ejabberdctl connected_users
</pre></p>
</div>
</div>
</div>
<p style="text-align:left;">If you choose to just dump the archipel client somewhere and browse to the index.html,<br />
you will have to use Safari as the browser.<br />
Alternatively, you can use Chrome,<br />
but you need to pass the argument&#8230; &#8211;disable-web-security<br />
Or the better way is to just uncompress the archive into a HTTP server directory,<br />
and access it with your browser.<br />
I&#8217;ve been told nginx works well with serving Archipel.<br />
At this stage I just set the client up on IIS locally.<br />
In saying that, I&#8217;m getting the index.html,<br />
but I&#8217;m getting 404&#8242;s for Info.plist and main.j<br />
I need to look into this.</p>
<h4 style="text-align:left;">Using Archipel</h4>
<p style="text-align:left;"><a href="https://github.com/primalmotion/Archipel/wiki/User-manual" target="_blank">https://github.com/primalmotion/Archipel/wiki/User-manual</a></p>
<p style="text-align:left;">Once you have the page in your browser, enter the following details into the dialog.</p>
<p style="text-align:left;">Jabber ID: admin@vmhost.mydomain.local<br />
Password: MyCrazyPassWordHere<br />
BOSH service: http://vmhost.mydomain.local:5280/http-bind</p>
<p style="text-align:left;"><a href="http://binarymist.files.wordpress.com/2012/01/login.png" target="_blank"><img class="size-full wp-image-1281 alignnone" title="Login" src="http://binarymist.files.wordpress.com/2012/01/login.png?w=450&#038;h=284" alt="" width="450" height="284" /></a></p>
<p style="text-align:left;">If you can&#8217;t access vmhost, try navigating to <a href="http://vmhosttest1.tsbcnet.local:5280/http-bind" rel="nofollow">http://vmhost.mydomain.local:5280/http-bind</a> in your browser.</p>
<p style="text-align:left;">You should get something like the following:</p>
<p style="text-align:left;"><a href="http://binarymist.files.wordpress.com/2012/01/ejabberd.png" target="_blank"><img class="size-full wp-image-1289 alignnone" title="ejabberd" src="http://binarymist.files.wordpress.com/2012/01/ejabberd.png?w=450&#038;h=89" alt="" width="450" height="89" /></a></p>
<p style="text-align:left;">If you don&#8217;t,<br />
try pinging vmhost.mydomain.local.<br />
If the IP works but the host.FQDN doesn&#8217;t, it&#8217;s a dns issue.<br />
I checked the /etc/hosts file and it had the host name as expected.</p>
<p style="text-align:left;"><em>127.0.1.1   vmhost.mydomain.local   vmhost</em></p>
<p style="text-align:left;">For some reason, the Debian box&#8217;s hostname wasn&#8217;t getting registered on the DNS server.<br />
The way around this is to add the following entry to the hosts file of the machine you have your client running from.</p>
<p style="text-align:left;"><em>192.168.1.20    vmhost.mydomain.local</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/binarymist.wordpress.com/1249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/binarymist.wordpress.com/1249/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/binarymist.wordpress.com/1249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/binarymist.wordpress.com/1249/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/binarymist.wordpress.com/1249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/binarymist.wordpress.com/1249/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/binarymist.wordpress.com/1249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/binarymist.wordpress.com/1249/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/binarymist.wordpress.com/1249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/binarymist.wordpress.com/1249/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/binarymist.wordpress.com/1249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/binarymist.wordpress.com/1249/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/binarymist.wordpress.com/1249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/binarymist.wordpress.com/1249/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1249&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.binarymist.net/2012/01/23/bare-metal-hypervisor-setup-evaluation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a397cb38965ab9f310e7148b8c3d1105?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">binarymist</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2012/01/bare-metal_hypervisor.png" medium="image">
			<media:title type="html">Bare-metal hypervisor</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2012/01/vsphere_client_virtual_esx.png" medium="image">
			<media:title type="html">vsphere_client_virtual_esx</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2012/01/xencenter.jpg" medium="image">
			<media:title type="html">XenCenter</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2012/01/kvm.png" medium="image">
			<media:title type="html">KVM</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2012/01/proxmoxve.jpg" medium="image">
			<media:title type="html">ProxMoxVE</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2012/01/archipelclient.jpg" medium="image">
			<media:title type="html">ArchipelClient</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2012/01/login.png" medium="image">
			<media:title type="html">Login</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2012/01/ejabberd.png" medium="image">
			<media:title type="html">ejabberd</media:title>
		</media:content>
	</item>
		<item>
		<title>OpenSSH from Linux to Windows 7 via tunneled RDP</title>
		<link>http://blog.binarymist.net/2011/12/27/openssh-from-linux-to-windows-7-via-tunneled-rdp/</link>
		<comments>http://blog.binarymist.net/2011/12/27/openssh-from-linux-to-windows-7-via-tunneled-rdp/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 09:40:28 +0000</pubDate>
		<dc:creator>binarymist</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://blog.binarymist.net/?p=1227</guid>
		<description><![CDATA[I recently acquired a new second hand Asus laptop from my work, that will be performing a handful of responsibilities on one of my networks. This is the process I took to set up OpenSSH on Cygwin running on the Windows 7 box. I won&#8217;t be going over the steps to tunnel RDP as I&#8217;ve [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1227&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;">I recently acquired a new second hand Asus laptop from my work,<br />
that will be performing a handful of responsibilities on one of my networks.</p>
<p style="text-align:left;">This is the process I took to set up OpenSSH on Cygwin running on the Windows 7 box.</p>
<p style="text-align:left;">I won&#8217;t be going over the steps to tunnel RDP as I&#8217;ve already done this in <a href="http://blog.binarymist.net/2010/08/26/installation-of-ssh-on-64bit-windows-7-to-tunnel-rdp/" target="_blank">another post</a></p>
<p style="text-align:left;">Make sure your LAN Manager Authentication Level is set as <a href="http://kb.iu.edu/data/atvn.html" target="_blank">high as practical</a>.<br />
Keeping in mind, that some networked printers using SMB <a href="http://www.sevenforums.com/network-sharing/3737-samba-network-share-issue-windows-7-a-3.html" target="_blank">may struggle</a> with these permissions set to high.</p>
<ol style="text-align:left;">
<li>Windows Firewall -&gt; Allowed Programs -&gt; checked Remote Desktop.</li>
<li>System Properties -&gt; Remote tab -&gt; turn radio button on to at least &#8220;Allow connections from computers running any version of Remote Desktop&#8221;<br />
If you like, this can be turned off once SSH is set-up, or you can just turn the firewall rule off that lets RDP in.</li>
</ol>
<p style="text-align:left;">CopSSH which I used on my last set of Linux to Windows RDP via SSH set-ups is no longer free.<br />
So I&#8217;m not paying for something I can get for free, but with a little extra work involved.</p>
<h4 style="text-align:left;">So I looked at some other Windows SSH <a href="http://www.windowsnetworking.com/articles_tutorials/install-ssh-server-windows-server-2008.html" target="_blank">offerings</a></h4>
<ol style="text-align:left;">
<li><a href="http://www.techmalaya.com/2009/08/05/setup-ssh-server-for-windows-freesshd/" target="_blank">freeSSHd</a> which looked like a simple set-up, but it didn&#8217;t appear to be currently maintained.</li>
<li><a href="http://www.openssh.org/" target="_blank">OpenSSH</a> the current latest version of 5.9 released September 6, 2011<br />
A while back OpenSSH wasn&#8217;t being maintained. Looks like that&#8217;s changed.</li>
</ol>
<p style="text-align:left;">OpenSSH is part of Cygwin, so you need to create a<br />
c:\cygwin directory and <a href="http://www.cygwin.com/" target="_blank">download</a> setup.exe into it.</p>
<ol>
<ol>
<li>Right click on c:\cygwin\setup.exe and select &#8220;Run as Administrator&#8221;.<br />
Click Next.</li>
<li>If Install from Internet is not checked, check it. Then click Next.</li>
<li>Accept the default &#8220;Root Directory&#8221; of C:\cygwin. Accept the default for &#8220;Install For&#8221; as All Users.</li>
<li>Accept the default &#8220;Local Package Directory&#8221; of C:\cygwin.</li>
<li>Accept the default &#8220;Select Your Internet Connection&#8221; of &#8220;Direct Connection&#8221;. Click Next.</li>
<li>Select the closest mirror to you. Click Next.</li>
<li>You can expand the list by clicking the View button, or just expand the Net node.</li>
<li>Find openssh and click the Skip text, so that the Bin check box for the item is on.</li>
<li>Find tcp_wrappers and click the Skip text, so that the Bin check box for the item is on.</li>
</ol>
</ol>
<p style="text-align:left;">If you selected tcp_wrappers and get the &#8220;ssh-exchange-identification: Connection closed by remote host&#8221; error,<br />
you&#8217;ll need to edit /etc/hosts.allow and add the following two lines before the PARANOID line.</p>
<p><pre class="brush: plain; gutter: false;">
ALL: 127.0.0.1/32 : allow
 ALL: [::1]/128: allow
</pre></p>
<p style="text-align:left;">These lines were already in the /etc/hosts.allow</p>
<p style="text-align:left;">(optional) find the package &#8220;diffutils&#8221;, click on the word &#8220;skip&#8221; so that an x appears in Column B,<br />
find the package &#8220;zlib&#8221;, click on the word &#8220;skip&#8221; (it should be already selected) so that an x appears in Column B.</p>
<p style="text-align:left;">Click Next to start the install.<br />
Click Next again to&#8230; Resolving Dependencies, keep default &#8220;Select required packages&#8230;&#8221; checked.<br />
At the end of the install, I got the &#8220;Program compatibility Assistant&#8221; stating&#8230; This program might not have installed correctly.<br />
I clicked This program installed correctly.</p>
<p style="text-align:left;">Add an environment variable to your Systems Path variable.<br />
Edit the Path and append ;c:\cygwin\bin</p>
<p style="text-align:left;">Right click the new Cygwin Terminal shortcut and Run as administrator.<br />
Make sure the following files have the correct permissions.</p>
<p style="text-align:left;">/etc/passwd -rw-r&#8211;r&#8211;<br />
/etc/group -rw-r&#8211;r&#8211;<br />
/var drwxr-xr-x</p>
<p style="text-align:left;">Create a sshd.log file in /var/log/</p>
<p><pre class="brush: plain; gutter: false;">
touch /var/log/sshd.log
chmod 664 /var/log/sshd.log
</pre></p>
<p>Run ssh-host-config</p>
<ol>
<li style="text-align:left;">Cygwin will then ask Should privilege separation be used? Answer Yes</li>
<li style="text-align:left;">Cygwin will then ask Should this script create a local user &#8216;sshd&#8217; on this machine? Answer Yes</li>
<li style="text-align:left;">Cygwin will then ask Do you want to install sshd as service? Answer Yes</li>
<li style="text-align:left;">Cygwin will then ask for the value of CYGWIN for the daemon: []? Answer ntsec tty</li>
<li style="text-align:left;">Cygwin will then ask Do you want to use a different name? Answer no</li>
<li style="text-align:left;">Cygwin will then ask Please enter a password for new user cyg_server? Enter a password twice and remember it.</li>
</ol>
<p style="text-align:left;">replicate your Windows user credentials with cygwin</p>
<p><pre class="brush: plain; gutter: false;">
mkpasswd -cl &gt; /etc/passwd
mkgroup --local &gt; /etc/group
</pre></p>
<p style="text-align:left;">I think (although I haven&#8217;t tried it yet) when you change your user password, which you should do regularly,<br />
you should be able to run the above 2 commands again to update your password.<br />
As I haven&#8217;t done this yet, I would take a backup of these files before I ran the commands.</p>
<h4 style="text-align:left;">to start the service, type the following:</h4>
<p><pre class="brush: plain; gutter: false;">net start sshd</pre></p>
<h4>Test SSH</h4>
<p><pre class="brush: plain; gutter: false;">ssh localhost</pre></p>
<p style="text-align:left;">When you make changes to the /etc/sshd_config,<br />
because it&#8217;s owned by cyg_server, you&#8217;ll need to make any changes as the owner.<br />
I added the following line to the end of the file:</p>
<p><pre class="brush: plain; gutter: false;">Ciphers blowfish-cbc,aes128-cbc,3des-cbc</pre></p>
<p style="text-align:left;">As it sounds like Blowfish runs faster than the default AES-128</p>
<h4 style="text-align:left;">There are also a collection of changes to be made to the /etc/sshd_config</h4>
<p>for example:</p>
<ul>
<li>Change the LoginGraceTime to as small as possible number.</li>
<li>PermitRootLogin no</li>
<li>Set PasswordAuthentication to no once you get key pair auth set-up.</li>
<li>PermitEmptyPasswords no</li>
<li>You can also setup AllowUsers and DenyUsers.</li>
</ul>
<p>The options available are here in the <a href="http://unixhelp.ed.ac.uk/CGI/man-cgi?sshd_config+5" target="_blank">man page.</a><br />
<a href="http://theillustratednetwork.mvps.org/Ssh/SecureYourcopSSHServer-Vista.html" target="_blank">This</a> is also helpful, I used this for my CopSSH setup.</p>
<p style="text-align:left;">Open firewalls TCP port 22 and close the RDP port once SSH is working.</p>
<p>As my <a href="http://blog.binarymist.net/2010/08/26/installation-of-ssh-on-64bit-windows-7-to-tunnel-rdp/" target="_blank">blog post</a> says:<br />
ssh-copy-id MyUserName@MyWindows7Box</p>
<p>I already had a key pair with pass phrase, so I used that.<br />
Now we should be able to ssh without being prompted for a password, but instead using key pair auth.</p>
<h4>The links I found helpful:</h4>
<p><a href="http://pigtail.net/LRP/printsrv/cygwin-sshd.html" target="_blank">http://pigtail.net/LRP/printsrv/cygwin-sshd.html</a><br />
<a href="http://www.petri.co.il/setup-ssh-server-vista.htm" target="_blank">http://www.petri.co.il/setup-ssh-server-vista.htm</a><br />
<a href="http://www.scottmurphy.info/open-ssh-server-sshd-cygwin-windows" target="_blank">http://www.scottmurphy.info/open-ssh-server-sshd-cygwin-windows</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/binarymist.wordpress.com/1227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/binarymist.wordpress.com/1227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/binarymist.wordpress.com/1227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/binarymist.wordpress.com/1227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/binarymist.wordpress.com/1227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/binarymist.wordpress.com/1227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/binarymist.wordpress.com/1227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/binarymist.wordpress.com/1227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/binarymist.wordpress.com/1227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/binarymist.wordpress.com/1227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/binarymist.wordpress.com/1227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/binarymist.wordpress.com/1227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/binarymist.wordpress.com/1227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/binarymist.wordpress.com/1227/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1227&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.binarymist.net/2011/12/27/openssh-from-linux-to-windows-7-via-tunneled-rdp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a397cb38965ab9f310e7148b8c3d1105?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">binarymist</media:title>
		</media:content>
	</item>
		<item>
		<title>JavaScript Reserved Words</title>
		<link>http://blog.binarymist.net/2011/12/19/javascript-reserved-words/</link>
		<comments>http://blog.binarymist.net/2011/12/19/javascript-reserved-words/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 11:32:49 +0000</pubDate>
		<dc:creator>binarymist</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.binarymist.net/?p=1192</guid>
		<description><![CDATA[Funnily enough, most of these are not used in the language. They cannot be used to name variables or parameters. When reserved words are used as keys in object literals, they must be quoted. They cannot be used with the dot notation, so it is sometimes necessary to use the bracket notation instead. Or better, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1192&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Funnily enough, most of these are not used in the language.<br />
They cannot be used to name variables or parameters.<br />
When reserved words are used as keys in object literals,<br />
they must be quoted.<br />
They cannot be used with the dot notation,<br />
so it is sometimes necessary to use the bracket notation instead.<br />
Or better, just don&#8217;t use them for your names.</p>
<p>Usage of keywords in red should be avoided.</p>
<table width="455" border="1" cellspacing="0" cellpadding="0" bgcolor="Gainsboro">
<tbody>
<tr>
<td bgcolor="#A8A8A8">Reserved</td>
<td bgcolor="#A8A8A8">Keyword</td>
<td bgcolor="#A8A8A8">Comments</td>
</tr>
<tr>
<td>abstract</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td>boolean</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td>break</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>byte</td>
<td> no</td>
<td> No type of byte in JavaScript</td>
</tr>
<tr>
<td>case</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>catch</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>char</td>
<td> no</td>
<td> JavaScript doesn&#8217;t have char. Use string instead</td>
</tr>
<tr>
<td>class</td>
<td> no</td>
<td> technically JavaScript doesn&#8217;t have class</td>
</tr>
<tr>
<td>const</td>
<td> no</td>
<td> no const, but read-only can be implemented</td>
</tr>
<tr>
<td>continue</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>debugger</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>default</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>delete</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>do</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>double</td>
<td> no</td>
<td> JavaScript only has number (64 bit floating point)</td>
</tr>
<tr>
<td>else</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>enum</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td>export</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td>extends</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td>false</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td>final</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td>finally</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>float</td>
<td> no</td>
<td> JavaScript only has number (64 bit floating point)</td>
</tr>
<tr>
<td>for</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>function</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>goto</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td>if</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>implements</td>
<td> no</td>
<td> JavaScript uses prototypal inheritance</td>
</tr>
<tr>
<td>import</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td>in</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>instanceof</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td>int</td>
<td> yes</td>
<td> JavaScript only has number (64 bit floating point)</td>
</tr>
<tr>
<td>interface</td>
<td> no</td>
<td> technically no interfaces, but they can be implemented</td>
</tr>
<tr>
<td>long</td>
<td> no</td>
<td> JavaScript only has number (64 bit floating point)</td>
</tr>
<tr>
<td>native</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td><span style="color:#ff6600;">new</span></td>
<td> yes</td>
<td> use in moderation</td>
</tr>
<tr>
<td>null</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td>package</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td>private</td>
<td> no</td>
<td> access is inferred</td>
</tr>
<tr>
<td>protected</td>
<td> no</td>
<td> JavaScript has privileged, but it&#8217;s inferred</td>
</tr>
<tr>
<td>public</td>
<td> no</td>
<td> access is inferred</td>
</tr>
<tr>
<td>return</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>short</td>
<td> no</td>
<td> JavaScript only has number (64 bit floating point)</td>
</tr>
<tr>
<td>static</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td>super</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td>switch</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>synchronized</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td>this</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>throw</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>throws</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td>transient</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td>true</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td>try</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>typeof</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>var</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>volatile</td>
<td> no</td>
<td></td>
</tr>
<tr>
<td>void</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td>while</td>
<td> yes</td>
<td></td>
</tr>
<tr>
<td><span style="color:#ff0000;">with</span></td>
<td> yes</td>
<td></td>
</tr>
</tbody>
</table>
<p style="text-align:left;">JavaScript also predefines a number of global variables and functions<br />
that you should also avoid using their names for your own variables and functions.<br />
Here&#8217;s a list:</p>
<ul>
<li>arguments</li>
<li>Array</li>
<li>Boolean</li>
<li>Date</li>
<li>decodeURI</li>
<li>decodeURIComponent</li>
<li>encodeURI</li>
<li>encodeURIComponent</li>
<li>Error</li>
<li>eval</li>
<li>EvalError</li>
<li>Function</li>
<li>Infinity</li>
<li>isFinite</li>
<li>isNaN</li>
<li>JSON</li>
<li>Math</li>
<li>NaN</li>
<li>Number</li>
<li>Object</li>
<li>parseFloat</li>
<li>parseInt</li>
<li>RangeError</li>
<li>ReferenceError</li>
<li>RegExp</li>
<li>String</li>
<li>SyntaxError</li>
<li>TypeError</li>
<li>undefined</li>
<li>URIError</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/binarymist.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/binarymist.wordpress.com/1192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/binarymist.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/binarymist.wordpress.com/1192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/binarymist.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/binarymist.wordpress.com/1192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/binarymist.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/binarymist.wordpress.com/1192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/binarymist.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/binarymist.wordpress.com/1192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/binarymist.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/binarymist.wordpress.com/1192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/binarymist.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/binarymist.wordpress.com/1192/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1192&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.binarymist.net/2011/12/19/javascript-reserved-words/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a397cb38965ab9f310e7148b8c3d1105?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">binarymist</media:title>
		</media:content>
	</item>
		<item>
		<title>DVCS vs CVCS</title>
		<link>http://blog.binarymist.net/2011/12/03/dvcs-vs-cvcs/</link>
		<comments>http://blog.binarymist.net/2011/12/03/dvcs-vs-cvcs/#comments</comments>
		<pubDate>Sat, 03 Dec 2011 08:40:56 +0000</pubDate>
		<dc:creator>binarymist</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Version Control]]></category>

		<guid isPermaLink="false">http://blog.binarymist.net/?p=1182</guid>
		<description><![CDATA[Some differences between Distributed Version Control Systems (DVCS) and Centralised Version Control Systems (CVCS) The central server dilemma I hear a number of people being fearful about what they hear about DVCS not having a central repository. In most cases this is not entirely true. There are a number of DVCS models that work very [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1182&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Some differences between Distributed Version Control Systems (DVCS) and Centralised Version Control Systems (CVCS)</p>
<h3><span style="font-size:large;">The central server dilemma</span></h3>
<p>I hear a number of people being fearful about what they hear about DVCS not having a central repository.<br />
In most cases this is not entirely true.<br />
There are a number of DVCS models that work very well utilising one or more central servers.<br />
In fact all the DVCS I&#8217;ve worked with or set-up have used one or more central repositories.</p>
<p>One of the key differences between Distributed and Centralised.<br />
Is with distributed, the authoritative or central source is the source you want it to be, rather than being constrained by the system into having to have your source in one place.<br />
There has been occasions where we have had to use one of the developers local repositories when the central server has been down.<br />
This is simply making a decision that the entire team is aware of, that you are going to push / pull to / from an alternative repository.<br />
Hg has it&#8217;s own inbuilt web server, so this is very easy to do.</p>
<p>One of the big advantages with a DVCS is the flexibility.<br />
With increased flexibility and power, comes the increased likelihood of someone screwing something up.<br />
Personally I&#8217;d much rather have the extra flexibility.</p>
<h3><span style="font-size:large;">Branching Merging</span></h3>
<p>Is easy and encouraged in DVCS.<br />
DVCS are designed with branching and merging to be a common task.<br />
Therefore they do it well, and some of the paranoia around this concept is no longer justified when you go distributed.</p>
<h3><span style="font-size:large;">Mercurial (Hg) vs Git commits</span></h3>
<p>Both Hg and Git are distributed.<br />
Git has this extra step between your working directory and your repository called the Index (strangely enough)<br />
All changes in git go into a staging area, then into your repository.<br />
The index is used to combine a set of changes that you want to commit as one operation.<br />
When you commit, what is committed is the contents of your index rather than your working directory.</p>
<p>The idea of the index, is that some of the history is erased once a commit is made, as multiple changes and their details are wrapped into a single commit.<br />
There is a philosophical debate as to which way is better.<br />
Is it better to have every change recorded, or is it better to have a bunch of changes wrapped into an atomic change, so that some detail is negated.<br />
I&#8217;m kind of on the fence about this one, as I think there are pros and cons for both arguments.</p>
<h3><span style="font-size:large;">Interfacing with Hg and Git for Windows users</span></h3>
<p>There are currently several options here.</p>
<h4>command line</h4>
<h4>file explorer</h4>
<ol>
<li><a href="http://tortoisehg.bitbucket.org/" target="_blank">TortoiseHg</a></li>
<li><a href="http://code.google.com/p/tortoisegit/" target="_blank">TortoiseGit</a></li>
<li><a href="http://code.google.com/p/gitextensions/">GitExtensions</a> for Explorer and Visual Studio integration</li>
</ol>
<h4>For Visual Studio users</h4>
<ol>
<li><a href="http://visualstudiogallery.msdn.microsoft.com/63a7e40d-4d71-4fbb-a23b-d262124b8f4c/http://gitscc.codeplex.com/" target="_blank">Git Source Control Provider</a> also <a href="http://gitscc.codeplex.com/" target="_blank">http://gitscc.codeplex.com/</a></li>
<li><a href="http://visualhg.codeplex.com/" target="_blank">VisualHg</a></li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/binarymist.wordpress.com/1182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/binarymist.wordpress.com/1182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/binarymist.wordpress.com/1182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/binarymist.wordpress.com/1182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/binarymist.wordpress.com/1182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/binarymist.wordpress.com/1182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/binarymist.wordpress.com/1182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/binarymist.wordpress.com/1182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/binarymist.wordpress.com/1182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/binarymist.wordpress.com/1182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/binarymist.wordpress.com/1182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/binarymist.wordpress.com/1182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/binarymist.wordpress.com/1182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/binarymist.wordpress.com/1182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1182&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.binarymist.net/2011/12/03/dvcs-vs-cvcs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a397cb38965ab9f310e7148b8c3d1105?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">binarymist</media:title>
		</media:content>
	</item>
		<item>
		<title>Centerim, Irssi, Alpine on Screen</title>
		<link>http://blog.binarymist.net/2011/11/27/centerim-irssi-alpine-on-screen/</link>
		<comments>http://blog.binarymist.net/2011/11/27/centerim-irssi-alpine-on-screen/#comments</comments>
		<pubDate>Sat, 26 Nov 2011 12:56:03 +0000</pubDate>
		<dc:creator>binarymist</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://blog.binarymist.net/?p=1125</guid>
		<description><![CDATA[I&#8217;ve recently acquired access to my own shell from anapnea.net This allows me to carry out development, testing, and any on-line activity anonymously. All via SSH. One of the tasks I needed to do, was to set up my date/time to my local time zone. Rather than set the system wide time, because there are [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1125&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;">I&#8217;ve recently acquired access to my own shell from anapnea.net</p>
<p style="text-align:left;">This allows me to carry out development, testing, and any on-line activity anonymously.<br />
All via SSH.</p>
<p style="text-align:left;">One of the tasks I needed to do,<br />
was to set up my date/time to my local time zone.<br />
Rather than set the system wide time,<br />
because there are many users on this machine,<br />
I needed to set the time zone on a per user basis.</p>
<p style="text-align:left;">The behaviour of your interactive shell is defined by your <span style="color:#3465a4;">~/.bashrc</span> and <span style="color:#3465a4;">~/.bash_profile</span> files.<br />
Edit one of these files and append or alter the TZ as follows:</p>
<p><pre class="brush: plain; gutter: false;">
 vim /home/myuser/.bashrc
</pre></p>
<p style="text-align:left;">where myuser is just that, my user name.</p>
<p style="text-align:left;">Append the following:</p>
<p><pre class="brush: plain; gutter: false;">
export TZ=&quot;/usr/share/zoneinfo/yourcountry&quot;
</pre></p>
<p>Where yourcountry is one of the country files in <a><span style="color:#3465a4;">/usr/share/zoneinfo/</span></a></p>
<h3>Screen</h3>
<p style="text-align:left;"><span style="color:#000000;">Screen is a Linux shell session manager.<br />
It&#8217;s great, because you can leave multiple sessions running and switch between them,<br />
all in a single console.<br />
Then you can just detatch from screen, leaving your programmes running on it.<br />
Terminate your SSH session, and re-connect from another machine,<br />
re-attach to screen, and carry on working where you left off,<br />
with your programmes all still running.<br />
</span></p>
<p><a href="http://www.rackaid.com/resources/linux-screen-tutorial-and-how-to/" target="_blank">This</a> is a quick run down on what it is and how to use it.</p>
<p>Create a new screen session:</p>
<p><pre class="brush: plain; gutter: false;">
screen
</pre></p>
<p>List screens:</p>
<p><pre class="brush: plain; gutter: false;">
screen -ls
</pre></p>
<p>Detaching:</p>
<p><pre class="brush: plain; gutter: false;">
Ctrl-a, d
</pre></p>
<p>To re-attach to a screen:</p>
<p><pre class="brush: plain; gutter: false;">
screen -r
</pre></p>
<p>Or</p>
<p><pre class="brush: plain; gutter: false;">
screen -raAd
</pre></p>
<p style="text-align:left;"><span style="color:#000000;">Reattach (-r), do some sizing stuff (a,A), and detach (d) before reattaching if necessary.<br />
If your screen session is attached elsewhere, using -raAd will detach that session, and reattach it here.</span></p>
<p style="text-align:left;"><span style="color:#000000;">Cycle through each screen:</span></p>
<p><pre class="brush: plain; gutter: false;">
Ctrl-a n
Ctrl-a p
</pre></p>
<p style="text-align:left;"><span style="color:#000000;">You can kill a screen by typing exit</span>.</p>
<p style="text-align:left;"><span style="color:#000000;">Terminate a screen</span>:</p>
<p><pre class="brush: plain; gutter: false;">
screen -X -S ID kill
</pre></p>
<p style="text-align:left;"><span style="color:#000000;">Where ID is the id of the screen you want to terminate.</span></p>
<p style="text-align:left;"><span style="color:#000000;">Useful links<br />
<a href="http://quadpoint.org/articles/irssi" target="_blank">http://quadpoint.org/articles/irssi</a><br />
Full list of commands and their usage <a href="http://www.math.utah.edu/docs/info/screen_5.html" target="_blank">http://www.math.utah.edu/docs/info/screen_5.html</a></span></p>
<h3 style="text-align:left;">CenterIM</h3>
<p><span style="color:#000000;">CenterIM is a Linux command line instant messenger client.<a href="http://ubuntumanual.org/posts/303/ultimate-geek-stuff-centerim-command-line-chat-client-yahoo-messenger-and-gtalk" target="_blank"><br />
Getting started</a> with CenterIM</span></p>
<p style="text-align:left;"><span style="color:#000000;">Setting up GTalk in CenterIM:<br />
Assuming you have centerim installed.<br />
cd into your .centerim directory and edit the config file.</span></p>
<p><pre class="brush: plain; gutter: false;">
vim config
</pre></p>
<p>Add the following to the file:</p>
<p><pre class="brush: plain; gutter: false;">
jab_nick MyUser@gmail.com
jab_pass
jab_server talk.google.com:5223
jab_osinfo 1
jab_prio 4
jab_ssl 1
</pre></p>
<p><span style="color:#000000;">Enter the command mode by pressing the Esc key.</span></p>
<p><pre class="brush: plain; gutter: false;">
:wq
</pre></p>
<p><span style="color:#000000;">This will write and quit.<br />
run centerim:</span></p>
<p><pre class="brush: plain; gutter: false;">
centerim
</pre></p>
<p><span style="color:#000000;">or better, run it in screen&#8230;</span></p>
<p><pre class="brush: plain; gutter: false;">
screen centerim
</pre></p>
<p><a href="http://binarymist.files.wordpress.com/2011/11/centerim.jpeg" target="_blank"><img class="size-full wp-image-1137 alignnone" style="border:1px solid black;" title="Centerim" src="http://binarymist.files.wordpress.com/2011/11/centerim.jpeg?w=450&#038;h=586" alt="" width="450" height="586" /></a></p>
<p style="text-align:left;"><span style="color:#000000;">Press F4 for the general menu.<br />
Select Accounts..</span></p>
<p style="text-align:left;"><a href="http://binarymist.files.wordpress.com/2011/11/centerimf4.png" target="_blank"><img class="size-full wp-image-1140 alignnone" style="border:1px solid black;" title="CenterimF4" src="http://binarymist.files.wordpress.com/2011/11/centerimf4.png?w=450" alt=""   /></a></p>
<p style="text-align:left;"><span style="color:#000000;">Under the Jab protocol, you will now see the connection details reflected.</span></p>
<p style="text-align:left;"><a href="http://binarymist.files.wordpress.com/2011/11/centerimconnectiondetails.png" target="_blank"><img class="size-full wp-image-1142 alignnone" style="border:1px solid black;" title="CenterimConnectionDetails" src="http://binarymist.files.wordpress.com/2011/11/centerimconnectiondetails.png?w=450&#038;h=387" alt="" width="450" height="387" /></a></p>
<h3 style="text-align:left;">Irssi</h3>
<p style="text-align:left;">Irssi is a Linux command line IRC client.<br />
When I use Irssi,<br />
these are the links I use most commonly.<br />
<a href="http://pthree.org/2010/02/02/irssis-channel-network-server-and-connect-what-it-means/" target="_blank">http://pthree.org/2010/02/02/irssis-channel-network-server-and-connect-what-it-means/</a><br />
<a href="http://quadpoint.org/articles/irssi" target="_blank">http://quadpoint.org/articles/irssi</a><br />
<a href="http://linuxreviews.org/software/irc/irssi/#toc6" target="_blank">http://linuxreviews.org/software/irc/irssi/#toc6</a><br />
IRC command reference <a href="http://www.ircle.com/reference/commands.shtml" target="_blank">http://www.ircle.com/reference/commands.shtml</a><br />
and full help for commands <a href="http://static.quadpoint.org/irssi-docs/help-full.html" target="_blank">http://static.quadpoint.org/irssi-docs/help-full.html</a><br />
<a href="http://irssi.org/beginner/">For the beginner</a><br />
<a href="http://irssi.org/documentation/manual">The Full manual</a><br />
<a href="http://quadpoint.org/articles/irssisplit" target="_blank">Splitting Windows</a></p>
<p>I&#8217;ll probably end up adding more to this.</p>
<h3 style="text-align:left;">Alpine</h3>
<p style="text-align:left;"><span style="color:#000000;">Alpine is a Linux command line mail client.<a href="https://www.cs.virginia.edu/~csadmin/wiki/index.php/Setting_up_Pine_%28Alpine%29_for_IMAP_Gmail" target="_blank"><br />
Here</a> is an accurate guide on how to setup your GMail accounts using IMAP in alpine.<br />
I used this for my first account setup.</span></p>
<p style="text-align:left;"><span style="color:#000000;">When you need to setup multiple accounts,<br />
you have to do a little bit more configuration.<br />
I followed <a href="http://objectmix.com/pine/747895-configure-alpine-w-multiple-email-accounts.html" target="_blank">this</a>.</span><span style="color:#000000;"><br />
Then create a <a href="http://www.ii.com/internet/messaging/pine/changing_from/#rolesAbout" target="_blank">Role</a>.</span></p>
<p style="text-align:left;"><span style="color:#000000;">I run all my external shell apps on screen.<br />
So I run the following command&#8230;</span></p>
<p><pre class="brush: plain; gutter: false;">
screen alpine
</pre></p>
<p style="text-align:left;"><span style="color:#000000;">You should be presented with the Main Menu.</span></p>
<p style="text-align:left;"><a href="http://binarymist.files.wordpress.com/2011/11/mainmenu.png" target="_blank"><img class="size-full wp-image-1145 alignnone" style="border:1px solid black;" title="MainMenu" src="http://binarymist.files.wordpress.com/2011/11/mainmenu.png?w=450&#038;h=169" alt="" width="450" height="169" /></a></p>
<p style="text-align:left;"><span style="color:#000000;">Press S (Setup), L (collectionLists)</span></p>
<p style="text-align:left;"><span style="color:#000000;">Press A (Add Cltn)<br />
Add a Nickname that makes sense to you to reference your account by,<br />
and the Server, as you did in the initial account setup,<br />
save as you did in the initial setup.<br />
Your Setup Collection List should look similar to the following.</span></p>
<p><a href="http://binarymist.files.wordpress.com/2011/11/setupcollectionlist.png" target="_blank"><img class="size-full wp-image-1146 alignnone" style="border:1px solid black;" title="SetupCollectionList" src="http://binarymist.files.wordpress.com/2011/11/setupcollectionlist.png?w=450&#038;h=188" alt="" width="450" height="188" /></a></p>
<p style="text-align:left;"><span style="color:#000000;">From the Main Menu, press S (Setup), C (Config).<br />
Scroll down until you find &#8220;Enable Incoming Folders Collection&#8221; and turn the radio button on.</span></p>
<p><span style="color:#000000;"><a href="http://binarymist.files.wordpress.com/2011/11/enableincomingfolderscollection.png" target="_blank"><img class="size-full wp-image-1149 alignnone" style="border:1px solid black;" title="EnableIncomingFoldersCollection" src="http://binarymist.files.wordpress.com/2011/11/enableincomingfolderscollection.png?w=450&#038;h=189" alt="" width="450" height="189" /></a></span></p>
<p style="text-align:left;"><span style="color:#000000;">Press E (Exit), and Y (Yes) to the Commit changes prompt.<br />
You should be back on the Main Menu now.<br />
Now you need to add a role for each account you&#8217;ve just setup.<br />
Press S (Setup), R (Rules).</span></p>
<p><a href="http://binarymist.files.wordpress.com/2011/11/rforroles.png" target="_blank"><img class="size-full wp-image-1151 alignnone" style="border:1px solid black;" title="RForRoles" src="http://binarymist.files.wordpress.com/2011/11/rforroles.png?w=450&#038;h=227" alt="" width="450" height="227" /></a></p>
<p style="text-align:left;"><span style="color:#000000;">Then choose R (Roles).<br />
Press A (Add).<br />
Setup each role like the following.</span></p>
<p><a href="http://binarymist.files.wordpress.com/2011/11/role0.png" target="_blank"><img class="size-full wp-image-1152 alignnone" style="border:1px solid black;" title="Role0" src="http://binarymist.files.wordpress.com/2011/11/role0.png?w=450&#038;h=353" alt="" width="450" height="353" /></a></p>
<p><a href="http://binarymist.files.wordpress.com/2011/11/role1.png" target="_blank"><img class="size-full wp-image-1153 alignnone" style="border:1px solid black;" title="Role1" src="http://binarymist.files.wordpress.com/2011/11/role1.png?w=450&#038;h=353" alt="" width="450" height="353" /></a></p>
<p><a href="http://binarymist.files.wordpress.com/2011/11/role2.png" target="_blank"><img class="size-full wp-image-1154 alignnone" style="border:1px solid black;" title="Role2" src="http://binarymist.files.wordpress.com/2011/11/role2.png?w=450&#038;h=353" alt="" width="450" height="353" /></a></p>
<p><a href="http://binarymist.files.wordpress.com/2011/11/role3.png" target="_blank"><img class="size-full wp-image-1155 alignnone" style="border:1px solid black;" title="Role3" src="http://binarymist.files.wordpress.com/2011/11/role3.png?w=450&#038;h=94" alt="" width="450" height="94" /></a></p>
<p style="text-align:left;"><span style="color:#000000;">Press E (Exit Setup), and Y to the save prompt.</span></p>
<p>Again in the S (Setup), C (Config).<br />
Some of the settings that need to be turned on are:</p>
<ul>
<li>alternate-compose-menu is optional</li>
<li>confirm-role-even-for-default</li>
</ul>
<p>I set the following fields, so they show up in new messages you are composing.</p>
<p style="text-align:left;"><a href="http://binarymist.files.wordpress.com/2011/11/defaultcomposerheaders.png" target="_blank"><img class="size-full wp-image-1159 alignnone" style="border:1px solid black;" title="DefaultComposerHeaders" src="http://binarymist.files.wordpress.com/2011/11/defaultcomposerheaders.png?w=450" alt=""   /></a></p>
<h4 style="text-align:left;"><span style="color:#000000;">Create a new message</span></h4>
<p style="text-align:left;"><span style="color:#000000;"> There are a few ways you can compose a new email message.<br />
This depends on where you start the process from.<br />
If you&#8217;re in one of your mail folders,<br />
you can press C (Compose).<br />
You&#8217;ll be asked which role you would like to use to compose the message.<br />
These are the role&#8217;s you set up before,<br />
each one applies to one of your email accounts.<br />
Once you choose one,<br />
you&#8217;ll see a template with the fields you set up before.<br />
Fill out the fields.<br />
When your done composing your message,<br />
press Ctrl-X to send.</span></p>
<h4><span style="color:#000000;">Move a message from folder to another folder.</span></h4>
<ol>
<li><span style="color:#000000;">Select the message you want to move.</span></li>
<li>Press the S (Save) key.</li>
<li>If you have multiple email accounts, press Ctrl+N (Next Collection) or Ctrl+P (Prev Collection) to cycle through your accounts.</li>
<li>Press Ctrl+T (To Folders).<br />
You will be presented with the collection of your email folders for your account.</li>
<li>Select Which folder you want to put your message into.</li>
<li>Press enter, unless you have to move the message down another level.</li>
<li>If this is the case, press &#8216;/&#8217; (the slash key).</li>
<li>Then either the Tab key twice, or Ctrl+X (List matches).<br />
This will show you the next layer of folders to choose from.<br />
Either select the folder you want to move your message to and press Enter,<br />
or to go to another level, repeat steps 5 to 8.</li>
<li>Once you&#8217;ve located the target folder (and selected it) to save (move) your message to,<br />
you&#8217;ll be provided with the path that you are about to save to.</li>
<li>Press Enter. The message [Saving DONE] will be displayed.<br />
You message is now moved.<span style="color:#000000;"><br />
When you return to the source folder,<br />
you will be asked if you want the message that is there deleted,<br />
so that you have moved, not copied the message.<br />
You have the option to either copy or move.</span></li>
</ol>
<h4><span style="color:#000000;">Multi selecting (Selecting multiple emails)</span></h4>
<ol>
<li><span style="color:#000000;">Select the email and press the &#8216;;&#8217; (semicolon) key.</span></li>
<li>You will be prompted chose a selection criteria.<br />
I selected C (just select current message).<br />
When you do this, zoom will come into effect.<br />
So you will only see the currently selected messages.</li>
<li>To un-zoom, so you can see all messages from the folder you were in, just press Z<br />
You will now see an &#8216;X&#8217; next to the messages you have multi selected.</li>
<li>Press the Z key again to zoom to the selected messages.</li>
<li><span style="color:#000000;">Press A (Apply), then select the command you want to apply and that&#8217;s it.</span></li>
</ol>
<h4><span style="color:#000000;">Opening links from Alpine mail.<br />
</span></h4>
<ol>
<li><span style="color:#000000;">Select the link.</span></li>
<li>Press Enter.</li>
<li><span style="color:#000000;">Right click the link and select &#8220;Open link&#8221;.</span></li>
</ol>
<h4>Enable Spell Check in Alpine</h4>
<h5>First check that it&#8217;s not enabled</h5>
<p>When composing a message, press  Ctrl+T<br />
If you don&#8217;t get spell check, you&#8217;ll need to do the following.</p>
<h5>Make sure you have aspell installed</h5>
<p>On a debian based system, you can run</p>
<p><pre class="brush: plain; gutter: false;">
dpkg-query -l '*aspell*'
</pre></p>
<p>This will show you the aspell components installed</p>
<p>Or more precisely, just search for aspell</p>
<p><pre class="brush: plain; gutter: false;">
dpkg -l aspell
</pre></p>
<p>Once you find it, you can run</p>
<p><pre class="brush: plain; gutter: false;">
dpkg-query -W -f='${Status} ${Version}\n' aspell
</pre></p>
<p>This will tell you whether or not it&#8217;s installed.<br />
If it&#8217;s not, you&#8217;ll need to install it:</p>
<p><pre class="brush: plain; gutter: false;">
sudo apt-get install aspell
</pre></p>
<p>From the Main menu in Alpine, S (Setup), C (Config).<br />
Look for &#8220;spell&#8221;.<br />
You can press &#8216;W&#8217; to search and type in &#8220;spell&#8221; without the quotes.<br />
Press Enter.<br />
The first option you will find should be &#8220;Spell Check Before Sending&#8221;.<br />
You can turn this on if you like.<br />
Press &#8216;W&#8217; again, accept the default, press Enter.<br />
You should now see the option &#8220;Speller&#8221;.<br />
Press Enter, and type in</p>
<p><pre class="brush: plain; gutter: false;">
aspell -c
</pre></p>
<p>Press Enter to accept.<br />
Press &#8216;E&#8217; to exit config.<br />
Press &#8216;Y&#8217; to the Commit changes prompt.</p>
<p>If you run the following at the command prompt</p>
<p><pre class="brush: plain; gutter: false;">
aspell
</pre></p>
<p>You should get a little information about what the -c switch does.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/binarymist.wordpress.com/1125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/binarymist.wordpress.com/1125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/binarymist.wordpress.com/1125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/binarymist.wordpress.com/1125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/binarymist.wordpress.com/1125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/binarymist.wordpress.com/1125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/binarymist.wordpress.com/1125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/binarymist.wordpress.com/1125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/binarymist.wordpress.com/1125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/binarymist.wordpress.com/1125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/binarymist.wordpress.com/1125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/binarymist.wordpress.com/1125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/binarymist.wordpress.com/1125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/binarymist.wordpress.com/1125/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1125&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.binarymist.net/2011/11/27/centerim-irssi-alpine-on-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a397cb38965ab9f310e7148b8c3d1105?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">binarymist</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/11/centerim.jpeg" medium="image">
			<media:title type="html">Centerim</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/11/centerimf4.png" medium="image">
			<media:title type="html">CenterimF4</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/11/centerimconnectiondetails.png" medium="image">
			<media:title type="html">CenterimConnectionDetails</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/11/mainmenu.png" medium="image">
			<media:title type="html">MainMenu</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/11/setupcollectionlist.png" medium="image">
			<media:title type="html">SetupCollectionList</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/11/enableincomingfolderscollection.png" medium="image">
			<media:title type="html">EnableIncomingFoldersCollection</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/11/rforroles.png" medium="image">
			<media:title type="html">RForRoles</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/11/role0.png" medium="image">
			<media:title type="html">Role0</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/11/role1.png" medium="image">
			<media:title type="html">Role1</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/11/role2.png" medium="image">
			<media:title type="html">Role2</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/11/role3.png" medium="image">
			<media:title type="html">Role3</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/11/defaultcomposerheaders.png" medium="image">
			<media:title type="html">DefaultComposerHeaders</media:title>
		</media:content>
	</item>
		<item>
		<title>Scoping &amp; Hoisting in JavaScript</title>
		<link>http://blog.binarymist.net/2011/11/14/scoping-hoisting-in-javascript/</link>
		<comments>http://blog.binarymist.net/2011/11/14/scoping-hoisting-in-javascript/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 12:39:21 +0000</pubDate>
		<dc:creator>binarymist</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.binarymist.net/?p=1092</guid>
		<description><![CDATA[Scoping JavaScript scoping is different to classical languages, and can take some getting used to for programmers used to languages such as C, C++, C#, Java. Classical languages like the before mentioned have block scope. JavaScript has function scope. In the following example &#8220;5&#8243; will be alerted. - - In the following example &#8220;1&#8243; will [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1092&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Scoping</h2>
<p style="text-align:left;">JavaScript scoping is different to classical languages, and can take some getting used to for programmers used to languages such as C, C++, C#, Java.<br />
Classical languages like the before mentioned have block scope.<br />
JavaScript has function scope.</p>
<p>In the following example &#8220;5&#8243; will be alerted.<br />
<span style="color:#ffffff;">-</span></p>
<p><pre class="brush: jscript; gutter: false;">
var foo = 1;
function bar() {
    if (!foo) {
        var foo = 5;
    }
    alert(foo);
}
bar();
</pre></p>
<p><span style="color:#ffffff;">-</span><br />
In the following example &#8220;1&#8243; will be alerted.<br />
<span style="color:#ffffff;">-</span></p>
<p><pre class="brush: jscript; gutter: false;">
var a = 1;
function b() {
    a = 10;
    return;
    function a() {}
}
b();
alert(a);
</pre></p>
<p><span style="color:#ffffff;">-</span><br />
In the following example Firebug will show 1, 2, 2.<br />
<span style="color:#ffffff;">-</span></p>
<p><pre class="brush: jscript; gutter: false;">
var x = 1;
console.log(x); // 1
if (true) {
    var x = 2;
    console.log(x); // 2
}
console.log(x); // 2
</pre></p>
<p><span style="color:#ffffff;">-</span><br />
In JavaScript, blocks such as if statements, do not create new scope. Only functions create new scope.</p>
<p>There is a workaround though <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
JavaScript has <span style="text-decoration:underline;"><strong>Closure</strong></span>.<br />
If you need to create a temporary scope within a function, do the following.<br />
<span style="color:#ffffff;">-</span></p>
<p><pre class="brush: jscript; first-line: 0;">

function foo() {
    var x = 1;
    if (x) {
        (function () {
            var x = 2;
            // some other code
        }());
    }
    // x is still 1.
}
</pre></p>
<p><span style="color:#ffffff;">-</span></p>
<p>Line 3: begins a closure<br />
Line 6: the closure invokes itself with ()<br />
<span style="color:#ffffff;">-</span></p>
<h2>Hoisting</h2>
<h3>Terminoligy</h3>
<p style="text-align:left;">As far as I know&#8230;<br />
<span style="text-decoration:underline;"><strong>function declaration</strong></span> or <span style="text-decoration:underline;"><strong>function statement</strong></span><br />
are the same thing.<br />
<span style="text-decoration:underline;"><strong>function expression</strong></span> or <span style="text-decoration:underline;"><strong>variable declaration with function assignment</strong></span><br />
are the same thing.</p>
<p><span style="color:#ffffff;">-</span><br />
A function statement looks like the following:</p>
<p><pre class="brush: jscript; gutter: false;">
function foo( ) {}
</pre></p>
<p><span style="color:#ffffff;">-</span><br />
A function expression looks like the following:</p>
<p><pre class="brush: jscript; gutter: false;">
var foo = function foo( ) {};
</pre></p>
<p><span style="color:#ffffff;">-</span><br />
A function expression must not start with the word &#8220;function&#8221;.</p>
<p><pre class="brush: jscript; gutter: false; wrap-lines: false;">
//anonymous function expression
var a = function () {
return 3;
}

//named function expression
var a = function bar() {
return 3;
}

//self invoking named function expression. This is also a closure
(function sayHello() {
alert(&quot;hello!&quot;);
})();

//self invoking anonymous function expression. This is also a closure
(function ( ) {
var hidden_variable;
// This function can have some impact on
// the environment, but introduces no new
// global variables.
}() );
</pre></p>
<p><span style="color:#ffffff;">-</span><br />
In JavaScript, a name enters a scope in one of four basic ways:</p>
<ol>
<li><strong>Language-defined:</strong> All scopes are, by default, given the names this and arguments.</li>
<li><strong>Formal parameters:</strong> Functions can have named formal parameters, which are scoped to the body of that function.</li>
<li><strong>Function declarations:</strong> These are of the form function foo() {}.</li>
<li><strong>Variable declarations:</strong> These take the form var foo;.</li>
</ol>
<p style="text-align:left;"><strong><span style="text-decoration:underline;">Function declarations and variable declarations are always hoisted</span></strong><br />
invisibly to the top of their containing scope by the JavaScript interpreter.<br />
Function parameters and language-defined names are, obviously, already there. This means that code like this:</p>
<p><pre class="brush: jscript; gutter: false;">
function foo() {
    bar();
    var x = 1;
}
</pre></p>
<p>Is actually interpreted like this:</p>
<p><pre class="brush: jscript; gutter: false;">
function foo() {
 var x;
 bar();
 x = 1;
}
</pre></p>
<p><span style="color:#ffffff;">-</span><br />
It turns out that it doesn&#8217;t matter whether the line that contains the declaration would ever be executed.<br />
The following two functions are equivalent:<br />
<span style="color:#ffffff;">-</span></p>
<p><pre class="brush: jscript; gutter: false;">
function foo() {
    if (false) {
        var x = 1;
    }
    return;
    var y = 1;
}
function foo() {
    var x, y;
    if (false) {
        x = 1;
    }
    return;
    y = 1;
}
</pre></p>
<p>The assignment portion of the declaration is not hoisted.<br />
Only the identifier is hoisted.<br />
This is not the case with function declarations, where the entire function body will be hoisted as well,<br />
but remember that there are two normal ways to declare functions. Consider the following JavaScript:<br />
<span style="color:#ffffff;">-</span></p>
<p><pre class="brush: jscript; gutter: false; wrap-lines: false;">
function test() {
    foo(); // TypeError &quot;foo is not a function&quot;
    bar(); // &quot;this will run!&quot;
    var foo = function () { // function expression assigned to local variable 'foo'
        alert(&quot;this won't run!&quot;);
    }
    function bar() { // function declaration, given the name 'bar'
        alert(&quot;this will run!&quot;);
    }
}
test();
</pre></p>
<p>In this case, only the function declaration has its body hoisted to the top. The name &#8216;foo&#8217; is hoisted, but the body is left behind, to be assigned during execution.</p>
<h3>
Name Resolution Order</h3>
<p style="text-align:left;">The most important special case to keep in mind is name resolution order. Remember that there are four ways for names to enter a given scope. The order I listed them above is the order they are resolved in. In general, if a name has already been defined, it is never overridden by another property of the same name. This means that a function declaration takes priority over a variable declaration. This does not mean that an assignment to that name will not work, just that the declaration portion will be ignored. There are a few exceptions:</p>
<ul>
<li>The built-in name arguments behaves oddly. It seems to be declared following the formal parameters, but before function declarations. This means that a formal parameter with the name arguments will take precedence over the built-in, even if it is undefined. This is a bad feature. Don&#8217;t use the name arguments as a formal parameter.</li>
<li>Trying to use the name this as an identifier anywhere will cause a Syntax Error. This is a good feature.</li>
<li>If multiple formal parameters have the same name, the one occurring latest in the list will take precedence, even if it is undefined.</li>
</ul>
<p style="text-align:left;">Now that you understand scoping and hoisting, what does that mean for coding in JavaScript?<br />
The most important thing is to always declare your variables with var statements.<br />
Declare your variables at the top of the scope (as already mentioned JavaScript only has function scope). See the Variable Declarations section.<br />
If you force yourself to do this, you will never have hoisting-related confusion.<br />
However, doing this can make it hard to keep track of which variables have actually been declared in the current scope.<br />
It&#8217;s a good idea to use <a href="www.jslint.com" target="_blank">JSLint</a> with the onevar option to enforce this. If you&#8217;ve done all of this, your code should look something like this:<br />
<span style="color:#ffffff;">-</span></p>
<p style="text-align:left;">
<p><pre class="brush: jscript; gutter: false;">
/*jslint onevar: true [...] */
function foo(a, b, c) {
    var x = 1,
        bar,
        baz = &quot;something&quot;;
        // other non hoistable code here
}
</pre></p>
<p><span style="color:#ffffff;">-</span></pre>
<p style="text-align:left;">
<p style="text-align:left;">
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/binarymist.wordpress.com/1092/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/binarymist.wordpress.com/1092/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/binarymist.wordpress.com/1092/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/binarymist.wordpress.com/1092/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/binarymist.wordpress.com/1092/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/binarymist.wordpress.com/1092/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/binarymist.wordpress.com/1092/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/binarymist.wordpress.com/1092/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/binarymist.wordpress.com/1092/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/binarymist.wordpress.com/1092/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/binarymist.wordpress.com/1092/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/binarymist.wordpress.com/1092/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/binarymist.wordpress.com/1092/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/binarymist.wordpress.com/1092/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1092&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.binarymist.net/2011/11/14/scoping-hoisting-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a397cb38965ab9f310e7148b8c3d1105?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">binarymist</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting MVC 4 running on Server 2003</title>
		<link>http://blog.binarymist.net/2011/10/24/getting-mvc-4-running-on-server-2003/</link>
		<comments>http://blog.binarymist.net/2011/10/24/getting-mvc-4-running-on-server-2003/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 08:03:40 +0000</pubDate>
		<dc:creator>binarymist</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.binarymist.net/?p=1074</guid>
		<description><![CDATA[For many of us, just updating to the latest Server software isn&#8217;t in all cases an option. - Make sure .NET 4.0 is installed. The most reliable way to check the .NET framework and service pack versions is to consult the registry. This is a good table that will tell you this. If you find [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1074&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;">For many of us, just updating to the latest Server software isn&#8217;t in all cases an option.</p>
<h4><span style="color:#ffffff;">-</span></h4>
<h4>Make sure .NET 4.0 is installed.</h4>
<p style="text-align:left;">The most reliable way to check the .NET framework and service pack versions is to consult the registry.<br />
<a href="http://support.microsoft.com/kb/318785" target="_blank">This</a> is a good table that will tell you this.<br />
If you find .NET 4.0 isn&#8217;t installed, you&#8217;ll have to download and install it.</p>
<h4><span style="color:#ffffff;">-</span></h4>
<h4>Make sure ASP.NET 4.0 is activated for your web site</h4>
<p style="text-align:left;">First you&#8217;ll need your web sites SiteID.<br />
Open IIS Manager.<br />
Click the Web Sites folder in the left pane. In the right pane, you&#8217;ll see all your web sites listed.<br />
There should be a column called &#8220;Identifier&#8221;. The fields beneath are the web sites SiteID&#8217;s.<br />
Take note of your web sites Id.</p>
<p style="text-align:left;"><a href="http://binarymist.files.wordpress.com/2011/10/websitessiteid1.png"><img class="size-full wp-image-1083 alignnone" title="WebSitesSiteId" src="http://binarymist.files.wordpress.com/2011/10/websitessiteid1.png?w=450&#038;h=208" alt="" width="450" height="208" /></a></p>
<p style="text-align:left;">Navigate to ASP.NET&#8217;s default path C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319<br />
You&#8217;ll then need to run the following command:</p>
<p><pre class="brush: plain;">aspnet_regiis -lk | find &quot;Id&quot;</pre></p>
<p style="text-align:left;">Where &#8220;Id&#8221; is your web sites Id as you recorded above.<br />
You need the quotes too.</p>
<p>This should produce the following:</p>
<pre>"W3SVC/Id/ROOT/ [your .NET framework version number]"</pre>
<p style="text-align:left;">That&#8217;s what your website&#8217;s virtual path in IIS6.0 looks like with the .NET framework version tacked on the end, without the quotes.<br />
Id of course will be your web sites Id.</p>
<p>If the .NET framework version isn&#8217;t v4.0.30319, you&#8217;ll need to register it.<br />
Run the following command:</p>
<p><pre class="brush: plain;">aspnet_regiis.exe -norestart -s &quot;W3SVC/Id/ROOT/&quot;</pre></p>
<p style="text-align:left;">Id is once again your web sites Id.<br />
This should register ASP.NET 4.0 with your web site.<br />
IIS won&#8217;t need restarting.</p>
<p style="text-align:left;">Make sure the App pool your web site is going to run in is dedicated to .NET 4.0</p>
<p style="text-align:left;"><a href="http://msdn.microsoft.com/en-us/library/k6h9cz8h%28v=vs.80%29.aspx" target="_blank">Here&#8217;s</a> some doc for aspnet_regiis.exe</p>
<h4>Make sure ASP.NET MVC 4 is installed on the target machine</h4>
<p>or the project is set to <a href="http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx" target="_blank">bin deploy</a><br />
I prefer to bin deploy, so we don&#8217;t clutter up the old server.<br />
Any additional libraries I need,<br />
I include by using NuGet at solution level,<br />
This allows many projects to use the same packages.</p>
<p style="text-align:left;">It looked like after some research,<br />
but before I actually started on this,<br />
that we would run into <a href="http://johan.driessen.se/posts/getting-an-asp.net-4-application-to-work-on-iis6" target="_blank">this problem</a>, but no,<br />
It turned out that our .NET 4 ASP.NET ISAPI extension was already enabled.</p>
<h4>File extension mapping</h4>
<p>The file extension in the URL (.aspx for example) must be mapped to aspnet_isapi.dll.<br />
If it is, and there&#8217;s a .aspx in the URL,<br />
aspnet_isapi.dll invokes ASP.NET.<br />
If ASP.NET is invoked, (because UrlRoutingModule is a .NET IHttpModule) UrlRoutingModule gets invoked.</p>
<p style="text-align:left;">IIS 6 only invokes ASP.NET when it sees a “filename extension” in the URL that’s mapped to aspnet_isapi.dll<br />
This means we have to do some work to get IIS 6 to recognise files that don&#8217;t have this mapping.<br />
As this was a test deployment, I wasn&#8217;t too concerned about speed.<br />
So decided to use wildcard mapping for aspnet_isapi.dll, as it was the easiest to setup.</p>
<p style="text-align:left;">Open IIS Manager</p>
<p style="text-align:left;">1. Right click on your web app and select Properties<br />
2. Select the HomeDirectory tab<br />
3. Click on Configuration</p>
<p><a href="http://binarymist.files.wordpress.com/2011/10/rightclick.png"><img class="size-full wp-image-1085 alignnone" title="RightClick" src="http://binarymist.files.wordpress.com/2011/10/rightclick.png?w=450&#038;h=456" alt="" width="450" height="456" /></a></p>
<p>4. Under the Wildcard application maps edit box,<br />
<span style="color:#ffffff;">&#8212;-</span>click Insert (not Add)<br />
5. Enter C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727<br />
<span style="color:#ffffff;">&#8212;-</span>\aspnet_isapi.dll for the &#8220;Executable:&#8221;<br />
6. Uncheck &#8220;Verify that file exists&#8221;</p>
<p><a href="http://binarymist.files.wordpress.com/2011/10/wildcardapplicationmaps.png"><img class="size-full wp-image-1086 alignnone" title="WildCardApplicationMaps" src="http://binarymist.files.wordpress.com/2011/10/wildcardapplicationmaps.png?w=450" alt=""   /></a></p>
<p>7. Click OK, OK</p>
<p style="text-align:left;">There are a few ways of achieving a similar result.<br />
Here are some ideas:</p>
<p style="text-align:left;"><a href="http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx" target="_blank">http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx</a><br />
<a href="http://blog.stevensanderson.com/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/" target="_blank">http://blog.stevensanderson.com/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/</a><br />
Another resource that&#8217;s well worth a read is the &#8220;Test Drive ASP.NET MVC&#8221; book.<br />
In chapter 12 it talks a little about this also in the section&#8230; IIS 6.0 on Windows Server 2003 or XP Pro x64</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/binarymist.wordpress.com/1074/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/binarymist.wordpress.com/1074/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/binarymist.wordpress.com/1074/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/binarymist.wordpress.com/1074/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/binarymist.wordpress.com/1074/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/binarymist.wordpress.com/1074/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/binarymist.wordpress.com/1074/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/binarymist.wordpress.com/1074/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/binarymist.wordpress.com/1074/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/binarymist.wordpress.com/1074/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/binarymist.wordpress.com/1074/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/binarymist.wordpress.com/1074/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/binarymist.wordpress.com/1074/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/binarymist.wordpress.com/1074/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1074&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.binarymist.net/2011/10/24/getting-mvc-4-running-on-server-2003/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a397cb38965ab9f310e7148b8c3d1105?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">binarymist</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/10/websitessiteid1.png" medium="image">
			<media:title type="html">WebSitesSiteId</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/10/rightclick.png" medium="image">
			<media:title type="html">RightClick</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/10/wildcardapplicationmaps.png" medium="image">
			<media:title type="html">WildCardApplicationMaps</media:title>
		</media:content>
	</item>
		<item>
		<title>Multiple ASP.NET sites on same port</title>
		<link>http://blog.binarymist.net/2011/10/23/multiple-asp-net-sites-on-same-port/</link>
		<comments>http://blog.binarymist.net/2011/10/23/multiple-asp-net-sites-on-same-port/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 07:35:53 +0000</pubDate>
		<dc:creator>binarymist</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.binarymist.net/?p=1064</guid>
		<description><![CDATA[How to get multiple ASP.NET web sites running on a single machine using the same default port. Say I have myfirstsite, mysecondsite Open your hosts file as administrator (UAC will only let you do this as admin). On the machine I&#8217;m using (Windows 7) it&#8217;s C:\windows\system32\drivers\etc\hosts Add the following lines: In IIS for both myfirstsite [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1064&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;">How to get multiple ASP.NET web sites running on a single machine using the same default port.</p>
<p style="text-align:left;">Say I have myfirstsite, mysecondsite</p>
<p style="text-align:left;">Open your hosts file as administrator (UAC will only let you do this as admin).<br />
On the machine I&#8217;m using (Windows 7) it&#8217;s C:\windows\system32\drivers\etc\hosts<br />
Add the following lines:</p>
<p><pre class="brush: plain;">
127.0.0.1 myfirstsite
127.0.0.1 mysecondsite
</pre></pre>
<p style="text-align:left;">In IIS for both myfirstsite and mysecondsite,<br />
you'll need to make sure the bindings bind to all IP addresses on port 80.<br />
The HostName will probably need to be changed to the name of your website</p>
<h4>In IIS 7 / 7.5 To add a host header entry for a Web Site in IIS 7 / 7.5</h4>
<ol>
<li>    Right click the Web Site.</li>
<li>    Click Edit Bindings...</li>
</ol>
<p><a href="http://binarymist.files.wordpress.com/2011/10/editbindings.png"><img class="size-full wp-image-1065 alignnone" title="EditBindings" src="http://binarymist.files.wordpress.com/2011/10/editbindings.png?w=450" alt=""   /></a></p>
<ol>
<li>    Click on http and click Edit...</li>
</ol>
<p><a href="http://binarymist.files.wordpress.com/2011/10/httpandclickedit.png"><img class="size-medium wp-image-1066 alignnone" title="httpandclickedit" src="http://binarymist.files.wordpress.com/2011/10/httpandclickedit.png?w=300&#038;h=140" alt="" width="300" height="140" /></a></p>
<ol>
<li>    Type the host header in the text box "Host name:" and click OK.</li>
</ol>
<p><a href="http://binarymist.files.wordpress.com/2011/10/typethehostheader.png"><img class="size-medium wp-image-1067 alignnone" title="TypeTheHostHeader" src="http://binarymist.files.wordpress.com/2011/10/typethehostheader.png?w=300&#038;h=163" alt="" width="300" height="163" /></a></p>
<p>&nbsp;</p>
<h4>If you still have the great joy of working with IIS 6.0</h4>
<ol>
<li>    Right click Web Site</li>
<li>    Click on Properties.</li>
<li>    Click Advanced… button in the Web Site tab</li>
<li>    Click on Default and click Edit…</li>
<li>    Type the host header in the text box "Host Header value:"</li>
</ol>
<p><a href="http://binarymist.files.wordpress.com/2011/10/iis6.png"><img class="size-medium wp-image-1068 alignnone" title="IIS6" src="http://binarymist.files.wordpress.com/2011/10/iis6.png?w=300&#038;h=220" alt="" width="300" height="220" /></a></p>
<p style="text-align:left;">
<p style="text-align:left;">You should now be able to browse to http://myfirstsite and also http://mysecondsite using the default port 80</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/binarymist.wordpress.com/1064/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/binarymist.wordpress.com/1064/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/binarymist.wordpress.com/1064/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/binarymist.wordpress.com/1064/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/binarymist.wordpress.com/1064/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/binarymist.wordpress.com/1064/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/binarymist.wordpress.com/1064/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/binarymist.wordpress.com/1064/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/binarymist.wordpress.com/1064/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/binarymist.wordpress.com/1064/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/binarymist.wordpress.com/1064/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/binarymist.wordpress.com/1064/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/binarymist.wordpress.com/1064/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/binarymist.wordpress.com/1064/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1064&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.binarymist.net/2011/10/23/multiple-asp-net-sites-on-same-port/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a397cb38965ab9f310e7148b8c3d1105?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">binarymist</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/10/editbindings.png" medium="image">
			<media:title type="html">EditBindings</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/10/httpandclickedit.png?w=300" medium="image">
			<media:title type="html">httpandclickedit</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/10/typethehostheader.png?w=300" medium="image">
			<media:title type="html">TypeTheHostHeader</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/10/iis6.png?w=300" medium="image">
			<media:title type="html">IIS6</media:title>
		</media:content>
	</item>
		<item>
		<title>Employing Scrum</title>
		<link>http://blog.binarymist.net/2011/08/29/employing-scrum/</link>
		<comments>http://blog.binarymist.net/2011/08/29/employing-scrum/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 13:30:34 +0000</pubDate>
		<dc:creator>binarymist</dc:creator>
				<category><![CDATA[Development Methodologies]]></category>
		<category><![CDATA[Scrum]]></category>

		<guid isPermaLink="false">http://blog.binarymist.net/?p=1051</guid>
		<description><![CDATA[In this post, it&#8217;s my intention to bring some clarity to the following question. Why does a business decide to employ Scrum as the chosen framework that their development team/s use for managing the business&#8217;s projects / work items? Philosophy A team that sets out to run by the Scrum framework, should Do so with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1051&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;">In this post, it&#8217;s my intention to bring some clarity to the following question.</p>
<p>Why does a business decide to employ Scrum as the chosen framework that their development team/s use for managing the business&#8217;s projects / work items?</p>
<h2>Philosophy</h2>
<p><a href="http://binarymist.files.wordpress.com/2011/08/philosophy.jpg"><img class="size-full wp-image-1053 alignnone" title="Philosophy" src="http://binarymist.files.wordpress.com/2011/08/philosophy.jpg?w=450" alt=""   /></a></p>
<h4>A team that sets out to run by the Scrum framework, should</h4>
<ul>
<li>Do so with the intention that Scrum is just a path way to building a more efficient team.</li>
<li>Expect that in a years time, the process&#8217;s they are using,<br />
should be different to those that they started using when they first started working with Scrum.</li>
</ul>
<p style="text-align:left;">What I mean by this is, textbook Scrum is a great starting point,<br />
but you shouldn&#8217;t expect to be doing things the same way in say, a years time.</p>
<p style="text-align:left;">Teams enter the scrum playing field with the <a href="http://en.wikipedia.org/wiki/Kaizen%20" target="_blank">Kaizen</a> philosophy of aiming for continual improvement.<br />
Not just in terms of product output, but also on a personal level.<br />
Who wants to buy into a methodology that only provides benefit to the business they work for?</p>
<h4 style="text-align:left;">The team should</h4>
<ul>
<li>Learn it&#8217;s strengths and weaknesses.</li>
<li>Celebrate and acknowledge success.</li>
<li>Continually improve on areas that require improvement.</li>
</ul>
<p style="text-align:left;">Scrum is designed to facilitate these principles.</p>
<p>Many of the Scrum procedures focus on the five foundational <a href="http://www.12manage.com/methods_kaizen.html" target="_blank">elements of Kaizen</a>.</p>
<ol>
<li style="text-align:left;">Teamwork</li>
<li>Personal discipline</li>
<li>Improved morale</li>
<li>Quality circles</li>
<li>Suggestions for improvement</li>
</ol>
<p style="text-align:left;">Out of the above elements<br />
The following three key factors arise.</p>
<ol>
<li>Elimination of waste and inefficiency.</li>
<li>The Kaizen five-S framework for good housekeeping.<br />
1. tidiness<br />
2. orderliness<br />
3. cleanliness<br />
4. standardized clean-up<br />
5. discipline</li>
<li>Standardization.</li>
</ol>
<h2>Artefacts</h2>
<p><a href="http://binarymist.files.wordpress.com/2011/08/artifacts.jpg"><img class="size-full wp-image-1054 alignnone" title="artifacts" src="http://binarymist.files.wordpress.com/2011/08/artifacts.jpg?w=450" alt=""   /></a></p>
<h3><a href="http://en.wikipedia.org/wiki/User_story" target="_blank">User Story</a></h3>
<p style="text-align:left;">An item of work to be completed in a Sprint.<br />
Often a good idea to aim at creating User Stories that can be completed within a week by one or two members.<br />
Some written by the team often with the help of Stakeholders, Product Owner.<br />
Some written by a developer which formulates the User Story based on understanding of the Stakeholders requirements.<br />
Written from the perspective of the end user,<br />
or who will get the benefit of the completed work item.<br />
The three components of the User Story are,<br />
Actor, Action, Achievement, as in the following form.<br />
As an &lt;Actor&gt; I want to &lt;Action&gt; so that &lt;Achievement&gt;</p>
<h4 style="text-align:left;">For example</h4>
<p style="text-align:left;"><em>As the User of the new system, I want to be able to submit a new support ticket,</em><br />
<em>so that I can record the clients concern in sufficient detail.</em></p>
<h3>Task</h3>
<p style="text-align:left;">Tasks are created in the Sprint Planning meeting,<br />
once the User Stories have been pulled onto the Task Board.<br />
Each User Story is broken down into tasks by the team, and then given a time estimate.<br />
Each task shouldn&#8217;t take more than a day for one person, preferably no more than 5 hours.<br />
Both functional and non-functional requirements should be considered.<br />
A typical set of tasks may include the following</p>
<ul>
<li style="text-align:left;">Test Conditions (or just a design session for the story)</li>
<li>Test Suite</li>
<li>Unit Tests</li>
<li>A set of development tasks</li>
<li>Acceptance Tests</li>
<li>Integration Tests</li>
<li>Code Review</li>
<li>Documentation (wiki, barely sufficient)</li>
<li>End user documentation</li>
</ul>
<h3>Release Burn down Chart</h3>
<p style="text-align:left;">On large projects,<br />
where most/all of the User Stories have been defined prior to start of Sprints,<br />
a manager can also maintain a Release Burn down.<br />
This shows the amount of work left before product release.<br />
The Release Burn down usually covers multiple / many iterations (sprints).</p>
<h3 style="text-align:left;">Sprint Burn down Chart</h3>
<p style="text-align:left;">Shows quantitatively, the remaining work left on the Sprint Backlog.<br />
This is updated after each daily Standup.</p>
<h3>Product Backlog</h3>
<p style="text-align:left;">The collection of User Stories waiting to be pulled into a Sprint.<br />
Created before Sprints start, and maintained while Sprints are running.<br />
Each user story is given a Story Point value, based on gut feel of how much work is involved in the User Story.</p>
<h3>Sprint Backlog</h3>
<p style="text-align:left;">The User Stories that have been pulled onto the Task Board by the Scrum Master, at the Product Owners request, at Sprint Planning.<br />
The Sprint Backlog is owned by the team.<br />
Workers pull tasks from Todo column into In Progress through to Complete.<br />
Each worker aiming to have as few tasks In Progress at any one time.</p>
<h3 style="text-align:left;"><a href="http://www.scrumalliance.org/articles/106-definition-of-done-a-reference" target="_blank">Definition of Done</a></h3>
<p style="text-align:left;">This is a team statement that defines what it means for every User Story to be completed.<br />
If a User Story is done,<br />
it forms part of the Potentially Shippable product that each sprint must deliver.<br />
A list of done criteria.<br />
An example could be</p>
<ul>
<li>        Code Complete</li>
<li>        Unit tests written and executed</li>
<li>        Integration tested</li>
<li>        Performance tested</li>
<li>        Documented (just enough)</li>
</ul>
<h2>Roles</h2>
<p><a href="http://binarymist.files.wordpress.com/2011/08/roles1.gif"><img class="size-full wp-image-1056 alignnone" style="border:1px solid black;" title="Roles" src="http://binarymist.files.wordpress.com/2011/08/roles1.gif?w=450" alt=""   /></a></p>
<h3>Stakeholders</h3>
<p style="text-align:left;">Those that have a direct interest in the project (customers, vendors)<br />
Directly affected by the projects outcome.<br />
Only directly involved in the process during the Sprint Review meetings</p>
<h3>Product Owner</h3>
<p style="text-align:left;">Represents the Stakeholders, and what they want.<br />
Is accountable for ensuring that the team delivers value to the business.<br />
Often a member of the development team,<br />
but shouldn&#8217;t be combined with the role of Scrum Master.</p>
<h3 style="text-align:left;">Managers</h3>
<p style="text-align:left;">Responsible for setting up the team,<br />
scheduling and actioning Scrum Master concerns (team blockers).</p>
<h3>Scrum Master</h3>
<p style="text-align:left;">It&#8217;s the Scrum Masters responsibility to make sure the team delivers what it signed up to deliver.<br />
Acts as a buffer between the rest of the team members and any distracting influences.<br />
Remove impediments, and liaises with Manager.<br />
Enforces rules,<br />
and keeps team members working to Scrum guidelines<br />
Keeps team focused on task board and what they have to deliver.<br />
Facilitator, Servant Leader.</p>
<h3 style="text-align:left;">Team</h3>
<p style="text-align:left;">The body of individuals that form a multi functional unit,<br />
responsible for delivering the Potentially shippable body of work defined by the Sprint Backlog each Sprint.<br />
Typically made up of 7 plus or minus 2 cross-functional workers.<br />
Roles included: BA&#8217;s, Testers, Technical Writers, Engineers.<br />
The Scrum Team in Scrum terminology are known as ‘Pigs’,<br />
whilst everyone else are known as ‘Chickens‘.<br />
See <a href="http://en.wikipedia.org/wiki/The_Chicken_and_the_Pig" target="_blank">Pigs and Chickens</a> for the story.</p>
<h2 style="text-align:left;">Meetings</h2>
<p><a href="http://binarymist.files.wordpress.com/2011/08/meetings.jpeg"><img class="size-medium wp-image-1057 alignnone" style="border:1px solid black;" title="meetings" src="http://binarymist.files.wordpress.com/2011/08/meetings.jpeg?w=195&#038;h=300" alt="" width="195" height="300" /></a></p>
<h3>Sprint Planning</h3>
<h4>First section</h4>
<p style="text-align:left;">Product Owner and Team communicate and decide on which User Stories from the Product Backlog will be pulled into the Sprint Backlog.<br />
Often Planning Poker is used to make sure the Team still agrees with the Story Point values attached to each User Story.</p>
<h4>Second section</h4>
<p style="text-align:left;">Attended by the Team, which defines the Tasks and attach time values to them.<br />
Time values are then added up to create the total expected hours for the Sprint.<br />
The Team,<br />
then records all the hours available from all of the Team members minus contingency time.<br />
If the total expected hours are greater than the available hours,<br />
the Team lias and decide whether or not to pull a User Story from the Sprint Backlog back to the Product Backlog.<br />
The Product Owner will then be consulted on which User Story to remove.</p>
<h3 style="text-align:left;">Standup</h3>
<p style="text-align:left;">Usually time boxed to 15 minutes.<br />
Performed every morning, same place, same time.<br />
Everyone is welcome,<br />
but only Team, Scrum Master and Product owner are usually allowed to speak.<br />
Make sure the Task Board is updated prior to meeting commencing.<br />
While talking to the Task Board, each Team member specifies the following</p>
<ul>
<li style="text-align:left;">What they have done since last Standup</li>
<li>What they intend to do today</li>
<li>What they see as blockers, or hindering them in achieving goals</li>
</ul>
<p style="text-align:left;">Scrum Master address&#8217;s any blockers and provides direction to alleviate.<br />
Larger organisations have a Standup of Standups to discuss overlapping concerns.</p>
<h3>Sprint Review</h3>
<p style="text-align:left;">Held on the last day of the Sprint.<br />
Review work that was completed and not completed.<br />
Delegate completed sections of work to Team members to demo to Stakeholders.</p>
<h3 style="text-align:left;">Show And Tell</h3>
<p style="text-align:left;">Each member demo&#8217;s the work they were assigned to demo to the Stakeholders.<br />
This provides insight into how the team is progressing.<br />
Assists with buy-in.<br />
There should be no surprises here,<br />
because the Stakeholders were included in creating User Stories,<br />
and the Product Owner has worked closely with them.</p>
<h3 style="text-align:left;">Sprint Retrospective</h3>
<p style="text-align:left;">Reflect on finished sprint.<br />
What went well, what didn&#8217;t go so well.<br />
How we can improve the process.<br />
Produce action plans for points raised and assign to a Team member to facilitate for the next Sprint.<br />
Between 30 to 60 minutes in duration.</p>
<h2 style="text-align:left;">Procedures</h2>
<p><a href="http://binarymist.files.wordpress.com/2011/08/procedures.jpg"><img class="size-full wp-image-1058 alignnone" style="border:1px solid black;" title="Procedures" src="http://binarymist.files.wordpress.com/2011/08/procedures.jpg?w=450" alt=""   /></a></p>
<h3>Planning Poker</h3>
<p style="text-align:left;">Applies Story Points to the User Stories.<br />
Each team member holds a card up with a number,<br />
representing how much work they think is involved in completing the User Story.<br />
The DoD must be defined,<br />
and often the member knowing the most about the User Story will provide a brief detailed explanation of what they think is involved.<br />
Often performed when initial Product Backlog is created, and also as part of the Sprint Planning meeting.<br />
This aids the Product Owner in prioritisation and planning ahead.</p>
<h3 style="text-align:left;">Sprint</h3>
<p style="text-align:left;">A set length period of time in a series,<br />
in which a collection of User Stories,<br />
that the team has committed themselves to completing are embarked upon.<br />
This period of time usually ranges from one week to four weeks and is performed consecutively.<br />
A successful Sprint is defined by having all of it&#8217;s User Stories complete according to the DoD.</p>
<h2 style="text-align:left;">Summary</h2>
<p style="text-align:left;">Text book Scrum, has for many business&#8217;s, what often seem like wasteful procedures.<br />
Often what you find, once you&#8217;ve started with Scrum,<br />
is that quite a few of these procedures are in fact very helpful,<br />
and provide real benefits to both business and all those involved in the framework.</p>
<p>Teams enter the Scrum playing field with the express intention of improvement.<br />
We have the luxury of learning from other teams mistakes and improvements,<br />
as Scrum is not a new idea.<br />
As Agile methodologies are fairly well defined,<br />
and offer considerable flexibility to allow and promote change,<br />
in the environments they are employed in.</p>
<p style="text-align:left;">
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/binarymist.wordpress.com/1051/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/binarymist.wordpress.com/1051/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/binarymist.wordpress.com/1051/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/binarymist.wordpress.com/1051/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/binarymist.wordpress.com/1051/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/binarymist.wordpress.com/1051/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/binarymist.wordpress.com/1051/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/binarymist.wordpress.com/1051/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/binarymist.wordpress.com/1051/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/binarymist.wordpress.com/1051/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/binarymist.wordpress.com/1051/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/binarymist.wordpress.com/1051/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/binarymist.wordpress.com/1051/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/binarymist.wordpress.com/1051/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1051&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.binarymist.net/2011/08/29/employing-scrum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a397cb38965ab9f310e7148b8c3d1105?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">binarymist</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/08/philosophy.jpg" medium="image">
			<media:title type="html">Philosophy</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/08/artifacts.jpg" medium="image">
			<media:title type="html">artifacts</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/08/roles1.gif" medium="image">
			<media:title type="html">Roles</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/08/meetings.jpeg?w=195" medium="image">
			<media:title type="html">meetings</media:title>
		</media:content>

		<media:content url="http://binarymist.files.wordpress.com/2011/08/procedures.jpg" medium="image">
			<media:title type="html">Procedures</media:title>
		</media:content>
	</item>
		<item>
		<title>Function Declarations vs Function Expressions</title>
		<link>http://blog.binarymist.net/2011/08/17/function-declarations-vs-function-expressions/</link>
		<comments>http://blog.binarymist.net/2011/08/17/function-declarations-vs-function-expressions/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 13:38:04 +0000</pubDate>
		<dc:creator>binarymist</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://blog.binarymist.net/?p=1032</guid>
		<description><![CDATA[This short post is in reaction to this post on JavaScript Function Declarations and Function Expressions. My concern was with the littering of the global object. Subject to hoisting function statements or function declarations variable declarations, but not their assignment expressions Function Statement &#8212;sometimes just a pseudonym for a Function Declaration &#8212;in Mozilla a Function [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1032&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;">This short post is in reaction to <a href="http://javascriptweblog.wordpress.com/2010/07/06/function-declarations-vs-function-expressions/" target="_blank">this post</a><br />
on JavaScript Function Declarations and Function Expressions.<br />
My concern was with the littering of the global object.</p>
<h3>Subject to hoisting</h3>
<ul>
<li>function statements or function declarations</li>
<li>variable declarations, but not their assignment expressions</li>
</ul>
<p style="text-align:left;">Function Statement<br />
<span style="color:#ffffff;"> &#8212;</span>sometimes just a pseudonym for a Function Declaration<br />
<span style="color:#ffffff;"> &#8212;</span>in Mozilla a Function Statement is an extension of Function Declaration<br />
<span style="color:#ffffff;">&#8212;</span>allowing the Function Declaration syntax to be used anywhere a statement<br />
<span style="color:#ffffff;">&#8212;&#8212;</span>is allowed.</p>
<p style="text-align:left;">Don&#8217;t forget; when a function is not the property of an object, it&#8217;s invoked as a function.<br />
The <em>this</em> of the function is bound to the global object.<br />
∴ foo and also bar are bound to the global object.<br />
This is not good.<br />
As Douglas Crockford puts it (and rightfully so), we&#8217;re clobbering the global variables.<br />
I think a better way to do this, would be like the following code examples.</p>
<h4 style="text-align:left;">A few words on access first</h4>
<p style="text-align:left;">All members of an object are public<br />
You can add public members in the constructor, by using the<br />
<em>this</em> keyword (which by the way, provides &#8220;<a href="http://javascript.crockford.com/private.html#Privileged" target="_blank">privileged</a>&#8221; access).<br />
If you want to add private members, you can use a constructor Function.<br />
You are actually adding the member to the function.<br />
Private members are only accessible via the objects privileged members.<br />
Privileged members are able to access private members,<br />
and are themselves accessible to public members and outside.</p>
<p>Have a look at Angus Croll&#8217;s <a href="http://javascriptweblog.wordpress.com/2010/07/06/function-declarations-vs-function-expressions/" target="_blank">post</a> to provide some context.</p>
<p style="text-align:left;">Question 1</p>
<p><pre class="brush: jscript; first-line: 0; wrap-lines: false;">
function Foo(){
   function bar() {      //private
      return 3;
   }
   this.barMeth = bar(); //privileged
   function bar() {      //private
      return 8;
   }
}
var myFoo = new Foo();
alert(myFoo.barMeth);
</pre></p>
<p>Question 2</p>
<p><pre class="brush: jscript; first-line: 0; wrap-lines: false;">
function Foo(){
   var bar = function bar() { //private
      return 3;
   }
   this.barMeth = bar();      //privileged
   var bar = function bar() { //private
      return 8;
   }
}
var myFoo = new Foo();
alert(myFoo.barMeth);
</pre></p>
<p style="text-align:justify;">Question 3</p>
<p><pre class="brush: jscript; first-line: 0; wrap-lines: false;">
var myFoo = new Foo();
alert(myFoo.barMeth);
function Foo(){
   var bar = function bar() { //private
      return 3;
   };
   this.barMeth = bar();      //privileged
   var bar = function bar() { //private
      return 8;
   };
}
</pre></p>
<p>Question 4</p>
<p><pre class="brush: jscript; first-line: 0; wrap-lines: false;">
function Foo(){
   this.barMeth = bar();          //privileged
   var bar = function bar() {     //private
      return 3;
   };
   var barMeth = function bar() { //private
      return 8;
   };
}
var myFoo = new Foo();
alert(myFoo.barMeth);
</pre></p>
<p>Or worse, but still not clobbering the global object&#8230;</p>
<p><pre class="brush: jscript; first-line: 0; wrap-lines: false;">
var myApp = {};

myApp.fooTest = {
   foo: function (){
      function foo(){
         function bar() {
            return 3;
         }
         return bar();
         function bar() {
            return 8;
         }
      }
      alert(foo());
   }
}

myApp.fooTest.foo();
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/binarymist.wordpress.com/1032/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/binarymist.wordpress.com/1032/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/binarymist.wordpress.com/1032/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/binarymist.wordpress.com/1032/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/binarymist.wordpress.com/1032/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/binarymist.wordpress.com/1032/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/binarymist.wordpress.com/1032/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/binarymist.wordpress.com/1032/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/binarymist.wordpress.com/1032/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/binarymist.wordpress.com/1032/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/binarymist.wordpress.com/1032/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/binarymist.wordpress.com/1032/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/binarymist.wordpress.com/1032/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/binarymist.wordpress.com/1032/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.binarymist.net&amp;blog=10711810&amp;post=1032&amp;subd=binarymist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.binarymist.net/2011/08/17/function-declarations-vs-function-expressions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a397cb38965ab9f310e7148b8c3d1105?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">binarymist</media:title>
		</media:content>
	</item>
	</channel>
</rss>
