<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
 
 <title>Is that supposed to go there? A blog by olizilla</title>
 
 <link href="http://oli.zilla.org.uk/" />
 <updated>2011-02-20T14:03:43+00:00</updated>
 <id>http://oli.zilla.org.uk/</id>
 <author>
   <name>Oli Evans</name>
   <email>oli@zilla.org.uk</email>
 </author>

 
 <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/olizilla" /><feedburner:info uri="olizilla" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
   <title>Scala's polite compiler fictions &amp; the surprising difficulties of asking an AnyVal it's MaxValue</title>
   <link href="http://feedproxy.google.com/~r/olizilla/~3/Mlu-AA8zgdQ/scala-compiler-fictions-and-the-suprising-difficulties-asking-anyval-its-maxvalue.html" />
   <updated>2011-02-19T00:00:00+00:00</updated>
   <id>http://oli.zilla.org.uk/2011/02/19/scala-compiler-fictions-and-the-suprising-difficulties-asking-anyval-its-maxvalue</id>
   <content type="html">&lt;h1 id='scalas_polite_compiler_fictions__the_surprising_difficulties_of_asking_an_anyval_its_maxvalue'&gt;Scala&amp;#8217;s polite compiler fictions &amp;#38; the surprising difficulties of asking an AnyVal it&amp;#8217;s MaxValue&lt;/h1&gt;

&lt;p&gt;In day to day programming I have found Scala allows me to make my code clearer and significantly more fun to write.&lt;/p&gt;

&lt;p&gt;Yet somehow a simple code demo to get the numeric types to print their max and min values turned into a multi-man-hour-brain-teaser. That&amp;#8217;s not something I want from my tools, so what follows is the highlights of the ensuing research, presented here so that Scaloids of the future may one day unearth these findings and laugh at the trifling matter that once troubled us. Some class names may have been changed, to protect the innocent, and make me laugh.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;Hey, how do I write a method to print out the max and min value of Byte, Short, Int, Long&amp;#8230;&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;hmm, that should be pretty simple, let&amp;#8217;s take a look at what you got.&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;pre&gt;&lt;code&gt;object NumberWang {
  def main(args: Array[String]) {
    println(&amp;quot;Max Byte:  &amp;quot; + Byte.MaxValue )
    println(&amp;quot;Max Short: &amp;quot; + Short.MaxValue)
    println(&amp;quot;Max Int:   &amp;quot; + Int.MaxValue  ) 
    println(&amp;quot;Max Long:  &amp;quot; + Long.MaxValue )
  }
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Output&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;scala&amp;gt; NumberWang.main(null)                               
Max Byte:  127
Max Short: 32767
Max Int:   2147483647
Max Long:  9223372036854775807&lt;/code&gt;&lt;/pre&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;All good so far, but how would we write a method to get rid of all the repeated code?&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;hmm. Let&amp;#8217;s have a go&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;pre&gt;&lt;code&gt;scala&amp;gt; def maxor(numericType: AnyVal) {
     |   println(numericType.MaxValue)
     | }
 &amp;lt;console&amp;gt;:6: error: value MaxValue is not a member of AnyVal
          println(numericType.MaxValue)
                              ^&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Rats. I&amp;#8217;d assumed something like MaxValue would be common to all the AnyVals. Compiler says no. Let&amp;#8217;s actually find out where MaxValue is defined. And here lies the first surprising difficulty:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Int.MaxValue does not currently appear anywhere in the ScalaDoc API.&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That&amp;#8217;s weird, since it&amp;#8217;s now &lt;a href='http://www.scala-lang.org/node/6650'&gt;the recommended way of getting that information&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hmm, so where is MaxValue defined?&lt;/p&gt;

&lt;p&gt;Well, from first principles, when we say Int.MaxValue in Scala we are talking about a member of the Int companion object rather than a static member of the Int class as would be the case in Java. So let&amp;#8217;s take a look at the docs for that:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Int
object Int extends AnyValCompanion
A object representing &amp;#39;object scala.Int&amp;#39;. It should never be used directly

Value Members
	def toString () : String
		Returns a string representation of the object.&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href='http://www.scala-lang.org/api/current/scala/runtime/Int$.html'&gt;http://www.scala-lang.org/api/current/scala/runtime/Int$.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Great. toString and a bizzarre note that this object &lt;em&gt;&amp;#8220;Should never be used directly&amp;#8221;&lt;/em&gt;. I&amp;#8217;m gonna put that into the pile marked &lt;em&gt;&amp;#8220;misleading documentations I have known&amp;#8221;&lt;/em&gt;, and carry on. Not that this alley gets us very far, as apparently Int.MaxValue is not a notable enough public member to warrant documenting. Putting the frustration back in the box, this sort of documentation mishap often boils down to refactorings and communication issues, let&amp;#8217;s see if we can&amp;#8217;t get some background on this troublesome value&amp;#8230;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;object Math
object Math extends MathCommon
deprecated: use scala.math package instead

val MAX_INT : Int
deprecated: Use scala.Int.MaxValue instead&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href='http://www.scala-lang.org/api/current/scala/Math$.html'&gt;http://www.scala-lang.org/api/current/scala/Math$.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ok, so we can see that there has been some noodling around where best to put the max value information, this would explain some of the weirdness. More interestingly, Scala is your flexible friend, so what can we do about it? Let&amp;#8217;s have another go at that maxor function, this time with feeling, and maybe some thinking too.&lt;/p&gt;

&lt;p&gt;What do we want?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A function to takes one of Byte, Short, Int, Long and maybe even Float and Double too, as a parameter.&lt;/li&gt;

&lt;li&gt;Returns unit and has the side effect of printing the largest number that numerical type can represent.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Obviously if this were part of a larger system, we would make a proper function that returned a String rather than causing side-effects, but right now that&amp;#8217;s the least of our troubles.&lt;/p&gt;

&lt;p&gt;So why is this even remotely difficult?&lt;/p&gt;

&lt;p&gt;Well, we&amp;#8217;d like to pass in a variety of AnyValCompanion objects (Int, Byte, etc) and then call a MaxValue function on that object. We know each one implements MaxValue but it isn&amp;#8217;t defined as part of the AnyValCompanion object contract.&lt;/p&gt;

&lt;p&gt;hmm&amp;#8230;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Stand back, I am going to try duck-typing&lt;/em&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;scala&amp;gt; def maxDuck( numericType: { def MaxValue: AnyVal } ) {                       
      |  println( numericType.MaxValue )
      |}
maxDuck: (numericType: AnyRef{def MaxValue: AnyVal})Unit

scala&amp;gt; maxDuck( Int )
	java.lang.NoSuchMethodException: scala.runtime.Int$.MaxValue()
	at java.lang.Class.getMethod(Class.java:1605)
	at .reflMethod$Method1(&amp;lt;console&amp;gt;:6)
	at .maxDuck(&amp;lt;console&amp;gt;:6)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Kabooom. Hmm&amp;#8230; that should have worked! Is this a sign from the capacitors that duck typing is evil and should be avoided? No, and before you all shout at me, yes, I know this isn&amp;#8217;t really duck typing but if you find a simple way to explain what Scala is up to there, do let me know. I read it as &amp;#8220;the parameter to maxDuck can be any object that has a member called MaxValue that returns an AnyVal&amp;#8221;, and seeing as we only want to call toString on the result of MaxValue, that seems to capture our requirements.&lt;/p&gt;

&lt;p&gt;The MaxValue member that we are interested in has a different signature on each numeric type; Int&amp;#8217;s returns an Int, and Byte&amp;#8217;s returns a Byte. More importantly MaxValue is common to all the numeric types but isn&amp;#8217;t defined on any of their common parents or traits, so we went duck style, and so maxDuck says: if it quacks like something with a MaxValue, then that&amp;#8217;s good enough for us. I found some other &lt;a href='http://stackoverflow.com/questions/4338398/scala-how-to-make-requirements-of-the-type-parametres-of-generic-classes'&gt;dreadnought weight solutions&lt;/a&gt;, involving creating a type for each numeric type, but that kind of boilerplate is exactly what I came to Scala to avoid.&lt;/p&gt;

&lt;p&gt;So let&amp;#8217;s press on. Our error appears to be telling us that there isn&amp;#8217;t a MaxValue() method defined on scala.runtime.Int$. The Int$ tells us it is trying to look it up on the companion object, but I thought we already proved in the first few lines that it does exist, even if undocumented. And so to surprising difficulty #2:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;quot;The AnyVal companion classes are are added synthetically by the compiler&amp;quot;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href='http://www.scala-lang.org/node/6650'&gt;http://www.scala-lang.org/node/6650&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I read this as, N.B. here be beasties, take care, and a sword. But then I do have a tendency to see patterns in noise. Let&amp;#8217;s see if we can prove that it&amp;#8217;s compiler voodoo at the root of all this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;scala&amp;gt; def max(maxable: {def MaxValue: Any}) { println( maxable.MaxValue ) }
max: (maxable: AnyRef{def MaxValue: Any})Unit

scala&amp;gt; object Lung { val MaxValue: Long = 1046 }
defined module Lung

scala&amp;gt; object Boot { val MaxValue: Byte = 8 }   
defined module Boot

scala&amp;gt; max( Boot )
8

scala&amp;gt; max( Lung )
1046&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It works! Ha! In your face compiler. You have been caught out in a lie, or, performing &amp;#8220;polite compiler fictions&amp;#8221; as mentioned in the wonderfully evocative Scala commit msg that ends this reign of voodoo.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;root/scala/trunk/src/library/scala/Byte.scala&lt;/p&gt;

&lt;p&gt;Revision 24068, 5.7 KB (checked in by extempore, 4 weeks ago) The AnyVal? types become source files instead of polite compiler fictions.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;!! You&amp;#8217;ll need a serious &amp;#8220;ant all.clean&amp;#8221; now. !!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;As of this commit the system is fully bootstrapped and the synthetic code eliminated: only the source files remain. The sort-of-AnyVal?-companions in scala.runtime.* have all been eliminated because the actual companions can do everything; deprecated vals in the scala.runtime package object point to the companions. This left AnyValCompanion? as the only AnyVal? related thing in the runtime package: that made little sense, so I deprecated and moved it as well.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;Starr is based on r24066 plus this commit. Closes #4121. Review by rytz, odersky.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href='https://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/src//library/scala/Byte.scala'&gt;https://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/src//library/scala/Byte.scala&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hat&amp;#8217;s off to extempore for providing the fix, and introducing me to the phrase &amp;#8220;polite compiler fictions&amp;#8221;. I for one welcome our new French speaking overlords.&lt;/p&gt;

&lt;h2 id='conclusions'&gt;Conclusions&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Scala is ace, written by poetic wizards.&lt;/li&gt;

&lt;li&gt;Compiler magic leads to nuances, nuances lead to frustration, and blog posts.&lt;/li&gt;

&lt;li&gt;A function that prints the MaxValue of anything with a MaxValue can be simply expressed, but on Scala 2.8.1, it doen&amp;#8217;t work for Int, Byte and co. due to a social faux-pas by an otherwise polite compiler.&lt;/li&gt;

&lt;li&gt;It has been noted and fixed by the aforementioned wizards.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id='credits_and_links'&gt;Credits and links&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Thanks to Martin &amp;#38; Cemal for finding the issue and discussing the solutions.&lt;/li&gt;

&lt;li&gt;Thanks to extempore for services to both computer and human language.&lt;/li&gt;

&lt;li&gt;Thanks to &lt;a href='http://twitter.com/_alanshaw'&gt;@_alanshaw&lt;/a&gt; &amp;#38; &lt;a href='http://twitter.com/davidparry'&gt;@davidparry&lt;/a&gt; for pulling typos and patterns out of this noise.&lt;/li&gt;

&lt;li&gt;&lt;a href='http://www.scala-lang.org/node/6650'&gt;http://www.scala-lang.org/node/6650&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='http://www.scala-lang.org/node/739'&gt;http://www.scala-lang.org/node/739&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='http://www.scala-lang.org/node/136'&gt;http://www.scala-lang.org/node/136&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='https://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/src//library/scala/Byte.scala'&gt;https://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/src//library/scala/Byte.scala&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='http://www.scala-lang.org/api/current/scala/runtime/Int$.html'&gt;http://www.scala-lang.org/api/current/scala/runtime/Int$.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/olizilla/~4/Mlu-AA8zgdQ" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://oli.zilla.org.uk/2011/02/19/scala-compiler-fictions-and-the-suprising-difficulties-asking-anyval-its-maxvalue.html</feedburner:origLink></entry>
 
 <entry>
   <title>Git on Lenny, a love story</title>
   <link href="http://feedproxy.google.com/~r/olizilla/~3/cTIFxnRo1gI/installing-git-on-debian-lenny.html" />
   <updated>2010-12-07T00:00:00+00:00</updated>
   <id>http://oli.zilla.org.uk/2010/12/07/installing-git-on-debian-lenny</id>
   <content type="html">&lt;h1 id='git_on_lenny_a_love_story'&gt;Git on Lenny, a love story&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;You are running Debian stable, because you prefer the Debian stable tree. It runs great, there is just one problem: the software is a little bit outdated compared to other distributions.&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href='http://backports.debian.org/'&gt;http://backports.debian.org/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exactly&amp;#8230;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So I have Debian Lenny running nicely as a production server. Along comes git. A long period of flirtation follows and eventually I find myself calling her everyday. Time to make a real git of her and get her into the &lt;a href='http://joemaller.com/990/a-web-focused-git-workflow/'&gt;workflow&lt;/a&gt;. So I save up 3 months wages, get down on one knee and roll out a:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# DONT DO THIS! Skip to the end if you prefer facts to love and stories.
$ sudo aptitude update
$ sudo aptitude install git
... pregnant pause while internets are downloaded
... Done&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So I&amp;#8217;m all happy as to my eyes that&amp;#8217;s a yes, but then things get weird. She pulls off her face and reveals that she is infact &lt;em&gt;a transitional dummy package to pull in the renamed gnuit package. It can be safely removed.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What!?&lt;/strong&gt; Please expand on that you freak&amp;#8230;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ aptiude show gnuit
Package: gnuit
...
Provides: git
Description: GNU Interactive Tools, a file browser/viewer and process viewer/killer&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;Erm&amp;#8230;&lt;/em&gt; hold it right there. You are not the git I love. Git would never claim to be a file viewer killer like that. It would say something more sexually aggressive like &lt;em&gt;fast, scalable, distributed revision control system&lt;/em&gt; or something. I hate you fakey git imposter. Be gone from this box:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo aptitude purge git&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;OK now think fast dammit&lt;/strong&gt;, where did you see her last.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ aptitude search git
git-core - fast, scalable, distributed revision control system&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;A-HA!, &lt;strong&gt;git-core&lt;/strong&gt;!, well of course I love your new hair-do, I just didn&amp;#8217;t recognise you, what with getting your name changed and all, come here:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo aptitude install git-core
... pregnant pause while internets are downloaded
... Done&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;thank god it&amp;#8217;s you&lt;/em&gt;. Still I hope you don&amp;#8217;t mind but I&amp;#8217;d just like to take a quick look at your birth certificate over here&amp;#8230;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git --version
git version 1.5.6.5&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;NO NO NO.&lt;/strong&gt; If there is one thing worse than installing completely unrelated packges, it&amp;#8217;s finding the package you want is older than your nan.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo aptiude purge git-core	&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Oh wrinkly torment&lt;/strong&gt; I&amp;#8217;ve just purged your grandmother. You were a youthful git 1.7 when we last met, what have I done to deserve this&amp;#8230; Googling commences, hmm debian sources&amp;#8230; yes yes, &lt;em&gt;git-core&lt;/em&gt;, uh huh, &lt;strong&gt;(obsolete)&lt;/strong&gt;, oh what have i done, &lt;a href='http://serverfault.com/questions/157383/why-does-the-debian-lenny-git-package-not-install-git' title='Well serverfault actually, but it'&gt;stackoverflow&lt;/a&gt;&amp;#8230; &lt;em&gt;git-core&lt;/em&gt;&amp;#8230; not you again, &amp;#8230;wait&amp;#8230; what&amp;#8230; backports you say? install lenny-backports-keyring you say? that all sounds a bit extreme, I just want git&amp;#8230; hyperlinking now&amp;#8230;&lt;/p&gt;

&lt;p&gt;&lt;a href='http://backports.debian.org/'&gt;backports.debian.org&lt;/a&gt; is where it&amp;#8217;s at! To complete the quote at the top:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;#8221;&amp;#8230;the software is a little bit outdated compared to other distributions. This is where backports come in.&lt;/p&gt;

&lt;p&gt;Backports are recompiled packages from testing (mostly) and unstable (in a few cases only, e.g. security updates) in a stable environment so that they will run without new libraries (whenever it is possible) on a Debian stable distribution.&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Go there and be sure to check the instructions page which is a couple of steps simpler than the stackoverflow suggestion, or just read on&amp;#8230;&lt;/p&gt;

&lt;h2 id='installing_git_17_rather_than_gnuit_or_git_15_on_debian_lenny'&gt;Installing git 1.7 rather than gnuit or git 1.5 on Debian Lenny&lt;/h2&gt;

&lt;p&gt;In &lt;strong&gt;/etc/apt/sources.list&lt;/strong&gt; add&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;deb http://backports.debian.org/debian-backports lenny-backports main&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Update your apt indexes&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$sudo apt-get update&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Check you can now see the latest git version. The lesson from all that rambling above is to always ask apt what it is you are about to install before doing it.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ aptitude -t lenny-backports show git
Package: git
State: not installed
Version: 1:1.7.1-1.1~bpo50+1
Description: fast, scalable, distributed revision control system&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Go install!&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo aptitude -t lenny-backports install git
... Done
$ git --version
git version 1.7.1&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Love, git init your brains out and have git babies. See below:&lt;/p&gt;
&lt;img title='git babies' src='http://joemaller.com/wordpress/wp-content/uploads/2008/11/hub-prime2.jpg' /&gt;
&lt;p&gt;Now I can get on with that web focused git workflow. If you are wondering how to make git do all your work for you then I highly recommend Mr joemaller&amp;#8217;s &lt;a href='http://joemaller.com/990/a-web-focused-git-workflow/'&gt;article&lt;/a&gt; on the subject.&lt;/p&gt;

&lt;h2 id='credits'&gt;Credits&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;stackoverflow: &lt;a href='http://serverfault.com/questions/157383/why-does-the-debian-lenny-git-package-not-install-git' title='Well serverfault actually, but it'&gt;http://serverfault.com/questions/157383/why-does-the-debian-lenny-git-package-not-install-git&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;backports: &lt;a href='http://backports.debian.org/'&gt;http://backports.debian.org/&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;workflow: &lt;a href='http://joemaller.com/990/a-web-focused-git-workflow/'&gt;http://joemaller.com/990/a-web-focused-git-workflow/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/olizilla/~4/cTIFxnRo1gI" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://oli.zilla.org.uk/2010/12/07/installing-git-on-debian-lenny.html</feedburner:origLink></entry>
 
 <entry>
   <title>Web by Proxy; Secure surfing on someone else's SOCKS</title>
   <link href="http://feedproxy.google.com/~r/olizilla/~3/tt_CgQb8vTE/secure-surfing-on-someone-elses-socks.html" />
   <updated>2010-11-25T00:00:00+00:00</updated>
   <id>http://oli.zilla.org.uk/2010/11/25/secure-surfing-on-someone-elses-socks</id>
   <content type="html">&lt;h1 id='web_by_proxy_secure_surfing_on_someone_elses_socks'&gt;Web by Proxy; Secure surfing on someone else&amp;#8217;s &lt;abbr title='SOCKetS - one of the simpler abbreviations in IT'&gt;SOCKS&lt;/abbr&gt;&lt;/h1&gt;

&lt;p&gt;Today I found myself looking down the barrel of an unknown and unsecured wireless access point. Some kindly soul has gone to the trouble of geting an adsl line into Brixton Village Market and then gone the extra mile of leaving the wireless unsecured (no WAP or WEP password in sight) so anyone may connect, and I assume deliberately as the access point in question comes secured by default. (if not, sorry, I&amp;#8217;ll buy you a &lt;a href='http://federationcoffee.com/' title='A good cup of joe'&gt;federation coffee&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;Such a display of generosity warms the cockles, but alas, as a techno-noodler my thoughts immediately turned to the worrying, if over-simplified idea that connecting to such a device would force my laptop to start publicly smearing the contents of my browser, every request, url and search term, over everything in a several meter radius.&lt;/p&gt;

&lt;p&gt;When you connect to a secured wireless access point, your communications with that device are encrypted, hindering the casual eavesdropper. When it&amp;#8217;s not secured, then you are broadcasting your communications in clear text, a bit like shouting your banking details down the telephone at the call center operator whilst sitting on a bus. Then there is the question of whether to trust the access point itself. What if you keep your voice down but the call center operator goes on to use your details to maliciously check your balance‽&lt;/p&gt;

&lt;p&gt;Still the technoodler can only see this as an opportunity to put those &lt;a href='http://darq.org.uk/' title='Free Unix Command Line Workshops every week in Shoreditch. Using the ancient art of words we show you how to disregard the graphical interface, and do what you need from the command line.'&gt;funix&lt;/a&gt; lessons to the test, so here is what I did to keep my business secure on an unknown and unsecured access point:&lt;/p&gt;

&lt;h2 id='encrypting_browser_traffic_using_only_an_ssh_tunnel_a_trusted_remote_server_firefox_osx_terminalapp_a_goat__some_googling'&gt;Encrypting browser traffic using only an &lt;abbr title='Secure SHell - a protocol and command line tool.'&gt;SSH&lt;/abbr&gt; tunnel, a trusted remote server, Firefox, OSX, Terminal.app, a Goat &amp;amp; some Googling.&lt;/h2&gt;

&lt;p&gt;As a control test, check your current public ip, probably that of the wireless point, point your browser to: &lt;a href='http://ipgoat.com' title='Baaa my IP'&gt;ipgoat.com&lt;/a&gt; the finest goat based ip service in the world. Go on, click the head.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;open -a firefox http://ipgoat.com&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Set up the tunnel from port 8000 on your machine to the trusted remote server:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ssh -CN -D 8000 user@remoteserver&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&amp;#8230;where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;C&lt;/strong&gt; means compress things please, which may help speed up the network traffic where possible.&lt;/li&gt;

&lt;li&gt;&lt;strong&gt;N&lt;/strong&gt; means don&amp;#8217;t do anything yet, just sit and wait.&lt;/li&gt;

&lt;li&gt;&lt;strong&gt;D 8000 user@remoteserver&lt;/strong&gt; is what tells ssh to listen on port 8000 and act as a &lt;abbr title='SOCKetS - one of the simpler abbreviations in IT'&gt;SOCKS&lt;/abbr&gt; server forwarding requests via &lt;strong&gt;user@remoteserver&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&amp;#8230;and coincidentally spelling out &lt;abbr title='Campaign for Nuclear Disarmament'&gt;CND&lt;/abbr&gt;, providing you with a nuclear disarming mnemonic&lt;/p&gt;

&lt;p&gt;Set up the Firefox to use the tunnel, as a &lt;abbr title='SOCKetS - one of the simpler abbreviations in IT'&gt;SOCKS&lt;/abbr&gt; proxy connection:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Firefox 3.6 &amp;gt; Preferences&amp;#8230; &amp;gt; Advanced &amp;gt; Network &amp;gt; Settings&lt;/li&gt;

&lt;li&gt;Manual Proxy configuration:&lt;/li&gt;

&lt;li&gt;&lt;abbr title='SOCKetS - one of the simpler abbreviations in IT'&gt;SOCKS&lt;/abbr&gt; Host: localhost&lt;/li&gt;

&lt;li&gt;Port:8000&lt;/li&gt;

&lt;li&gt;Ok, done.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;kick the tires:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;open -a firefox http://ipgoat.com&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If all is working then you should now find that &lt;a href='http://ipgoat.com' title='Baaa my IP'&gt;ipgoat&lt;/a&gt; still loads and that you&amp;#8217;ve fooled it&amp;#8217;s little goaty face into thinking your public ip is that of your trusted remote server, mainly because to all intents an purposes, it is. You are now sending http requests to the remote, and it is kindly and blindly executing those requests on your behalf, and returning the results to port 8000 on your machine, all encrypted by your trusty &lt;abbr title='Secure SHell - a protocol and command line tool.'&gt;SSH&lt;/abbr&gt; client.&lt;/p&gt;

&lt;p&gt;I guess access to a trusted remote machine is the stumbling block for most people. In that case, you&amp;#8217;ll have to take your chances, or keep googling. At the very least be sure to look out for the little https / &lt;abbr title='Secure Sockets Layer'&gt;SSL&lt;/abbr&gt; padlock in your browser when you have to enter any private information, but I&amp;#8217;m pretty sure that facebook update can wait till you get home.&lt;/p&gt;

&lt;h2 id='credits'&gt;Credits&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href='http://darq.org.uk/' title='Free Unix Command Line Workshops every week in Shoreditch. Using the ancient art of words we show you how to disregard the graphical interface, and do what you need from the command line.'&gt;funix - darq.org.uk&lt;/a&gt; Free Unix Command Line Workshops every week in Shoreditch. &amp;#8220;Using the ancient art of words we show you how to disregard the graphical interface, and do what you need from the command line.&amp;#8221;&lt;/li&gt;

&lt;li&gt;&lt;a href='https://calomel.org/firefox_ssh_proxy.html' title='Proxy Firefox through a SSH tunnel'&gt;calomel.org&lt;/a&gt; The most relevant google search result told me exactly how to do it, and is https, which was nice.&lt;/li&gt;

&lt;li&gt;&lt;a href='http://www.commandlinefu.com/commands/view/1060/create-an-ssh-socks-proxy-server-on-localhost8000-that-will-re-start-itself-if-something-breaks-the-connection-temporarily' title='A repository for the most elegant and useful UNIX commands.'&gt;commandlinefu.com&lt;/a&gt; A similar but more robust solution for bonus credits, but requires autossh, not on osx by default but only a: &lt;strong&gt;sudo port install autossh&lt;/strong&gt; &amp;#8230;away&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/olizilla/~4/tt_CgQb8vTE" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://oli.zilla.org.uk/2010/11/25/secure-surfing-on-someone-elses-socks.html</feedburner:origLink></entry>
 
 <entry>
   <title>Selenium And Castro Testing The Canvas</title>
   <link href="http://feedproxy.google.com/~r/olizilla/~3/EMskNG05qJ4/selenium-and-castro-testing-the-canvas.html" />
   <updated>2010-11-05T00:00:00+00:00</updated>
   <id>http://oli.zilla.org.uk/2010/11/05/selenium-and-castro-testing-the-canvas</id>
   <content type="html">&lt;h1 id='selenium_and_castro_testing_the_canvas'&gt;Selenium and Castro testing the Canvas&lt;/h1&gt;

&lt;p&gt;Notes from &lt;a href='http://www.meetup.com/london-software-craftsmanship/calendar/15118493/'&gt;Painless product demos &amp;amp; how to test &amp;#8216;untestable&amp;#8217; applications&lt;/a&gt;. Original talk by Jason Huggins (&lt;a href='http://twitter.com/#!/hugs' title='Creator, Selenium. Co-founder, Sauce Labs. I make things and think about them.'&gt;@hugs&lt;/a&gt;) of &lt;a href='http://saucelabs.com' title='Cloud-scale Selenium Testing.'&gt;Sauce Labs&lt;/a&gt; presenting at the &lt;a href='http://www.meetup.com/london-software-craftsmanship'&gt;London Software Craftsmanship Community&lt;/a&gt;, 4th Nov 2010.&lt;/p&gt;

&lt;h2 id='the_selenium_toolbox'&gt;The Selenium toolbox&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Selenium IDE for Firefox - record and replay browser sessions. Use the output as a starting point for creating selenium tests.&lt;/li&gt;

&lt;li&gt;Selenium Remote Control - an http proxy and library to drive a browser from test code&lt;/li&gt;

&lt;li&gt;Selenium Grid - drive multiple Selenium RCs from a hub, to test multiple browser/os combinations. Run your tests in parallel rather than serially.&lt;/li&gt;

&lt;li&gt;Sauce on demand - selenium testing as cloud service - &lt;a href='http://saucelabs.com/ondemand'&gt;http://saucelabs.com/ondemand&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id='painless_product_demos'&gt;Painless product demos&lt;/h2&gt;

&lt;p&gt;AKA: Pilfering ideas for software development from filmmaking.&lt;/p&gt;

&lt;p&gt;Dailies - The raw unedited footage, that shows general direction and progress from previous days work. Helps stakeholders seeking assurance that the work meets expectations.&lt;/p&gt;

&lt;p&gt;In software dev, we have stakeholders too, and sometimes the html test reports aren&amp;#8217;t quite enough to keep them happy. Wouldn&amp;#8217;t it be nice if they could see our dailies, some artefact of our days work, so they can see for themselves that all is well, and those new features are on the way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Selenium + Castro = Automated screencasts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Write your Selenium tests as normal, then bookend them with calls to &lt;a href='http://github.com/hugs/castro' title='screen/cast ro/bot,  a tiny fork of pyvnc2swf, with a smidge of awesome on the side'&gt;Castro&lt;/a&gt;. Selenium will drive the browser through some interesting aspect of your web app, and Castro will record the screen as it goes. Run the test suite every day, and publish the generated screencasts along with the rest of your test reports. Anyone who wants to see how things are going now has a shiny video walkthrough of where the project is at.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;c = Castro()
c.start()
// Your tests here
c.stop()
c.publishToStakeholders()  // ! tweet(), youtube(),&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id='how_to_test_untestable_applications'&gt;How to test &amp;#8216;untestable&amp;#8217; applications&lt;/h2&gt;

&lt;p&gt;&amp;#8220;Wouldn&amp;#8217;t it be cool if you could motorise all the pins in a Pin Art box&amp;#8221;&lt;/p&gt;
&lt;div class='right'&gt;
	&lt;img title='Time for tea' src='http://www.mutr.co.uk/images/pinart.jpg' alt='Time for tea' /&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href='http://pinthing.com' title='A @hugs creation, the culmination of a 10 year itch. A browser controlled pin art simulator with the power to move the real thing.'&gt;pinthing.com&lt;/a&gt; provides our example of the untestable web app. The bulk of the UI is created in a new fangled html5 canvas element using three.js to draw 3d pins on to it. The pins are arranged in a grid and can be given commands to raise and lower them independently to form patterns and glyphs.&lt;/p&gt;

&lt;p&gt;All this UI magic is exposed as a single canvas node in the dom, hiding its internal structure. This poses a problem for automated testing; you cannot inspect and make assertions about the state of a canvas like you can with the dom.&lt;/p&gt;

&lt;p&gt;Well, the theory is, the Javascript object model is good place to start (the JOM!? &lt;a href='http://twitter.com/#!/hugs' title='Creator, Selenium. Co-founder, Sauce Labs. I make things and think about them.'&gt;@hugs&lt;/a&gt; coins a new acronym). As you programatically build up your canvas you create a js structure that you can inspect, make assertions and even trigger interactions on.&lt;/p&gt;

&lt;p&gt;pinthing has an in page js powered terminal that allows you to interact with the pins.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;show(3)         // lifts pins 1 and 2, as its a binary display
show(&amp;quot;3&amp;quot;)       // lifts the pins to diplay a 3 glyph
show(3 &amp;lt;&amp;lt; 5)    // bit shifing pin lifting, ye haa.&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So in this case a Selenuim test can write expressions to the terminal, simulating user interactions.&lt;/p&gt;

&lt;p&gt;HTML5 video players present a similar problem for testing. One solution already in use relies on exposing a js api to your player controls and instrumentation to fire events to the console during playback. This allows for Selenuim tests that trigger playback and then assert that the video started playing by listening for the events.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;It&amp;#8217;s kinda like particle accelerators. You have to press the fire button and watch for the backsplatter to know you just smashed atoms&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It&amp;#8217;s one step removed from actually being able to read and inspect the dom, but what else are you going to do? To continue automated UI testing at the frontiers of html5 you are going to have to think about exposing some sort of testable api to your new widgets. With a canvas tag built up with js you get something sensible for free. With a video player you are going to have to give it some more thought.&lt;/p&gt;

&lt;h2 id='the_union'&gt;The union&lt;/h2&gt;

&lt;p&gt;Screencasting the automated testing of the untestable app.&lt;/p&gt;

&lt;p&gt;In the &lt;a href='http://pinthing.com' title='A @hugs creation, the culmination of a 10 year itch. A browser controlled pin art simulator with the power to move the real thing.'&gt;pinthing.com&lt;/a&gt; example, having a visible in page terminal window is the key. It shows the &lt;em&gt;watcher of the screencast&lt;/em&gt; what the Selenium test is up to; they can see the action and the result. The screencast becomes part of the test process, a QA person can scan through the video to check for UI anomalies.&lt;/p&gt;

&lt;p&gt;Personally I love the idea. It&amp;#8217;s not meant as a replacement for all the other reporting metrics, but a user friendly complementary document, that provides a background radiation style way to demonstrate progress to them that care to look. It depends on the project and the stakeholders involved how much value it adds, but automate it and dump it on your continuous integration server (thanks hudson) and it might just be the thing that keeps your investors investing, and the testers testing.&lt;/p&gt;

&lt;p&gt;You also end up with an archive of screencasts for your project which you can turn into your blooper reel, complete with directors commentary after a release. Add dramatic music and playback the hi-speed dubbing version for a photo a day, watch how I change but stay the same, &lt;a href='http://www.youtube.com/watch?v=UItNVuBI9UI'&gt;youtube favourite, style video&amp;#8230;&lt;/a&gt;&lt;/p&gt;

&lt;h2 id='notes_quotes_links__thanks'&gt;Notes, Quotes, Links, &amp;amp; Thanks&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A big thank you to &lt;a href='http://twitter.com/#!/hugs' title='Creator, Selenium. Co-founder, Sauce Labs. I make things and think about them.'&gt;@hugs&lt;/a&gt; for the talk and going above and beyond the call of duty in proof-reading this post. All quotes, ideas, and new acronyms mentioned here are his.&lt;/li&gt;

&lt;li&gt;&amp;#8220;Selnium 2, look out for a good beta by christmas.&amp;#8221;&lt;/li&gt;

&lt;li&gt;&amp;#8220;There are 2 problems in the world&amp;#8230; the off by 1 error&amp;#8230;&amp;#8221;&lt;/li&gt;

&lt;li&gt;&amp;#8220;Think of your user interface test recording like your apple commercial&amp;#8221;&lt;/li&gt;

&lt;li&gt;Flexpilot - integrates with selenium for flex testing.&lt;/li&gt;

&lt;li&gt;&lt;a href='http://saucelabs.com' title='Cloud-scale Selenium Testing.'&gt;http://saucelabs.com&lt;/a&gt; &amp;#8220;Cloud-scale Selenium Testing.&amp;#8221;&lt;/li&gt;

&lt;li&gt;&lt;a href='http://www.meetup.com/london-software-craftsmanship'&gt;http://www.meetup.com/london-software-craftsmanship&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href='http://github.com/hugs/castro' title='screen/cast ro/bot,  a tiny fork of pyvnc2swf, with a smidge of awesome on the side'&gt;http://github.com/hugs/castro&lt;/a&gt; &amp;#8220;screen/cast ro/bot, a tiny fork of pyvnc2swf, with a smidge of awesome on the side&amp;#8221;&lt;/li&gt;

&lt;li&gt;&lt;a href='http://pinthing.com' title='A @hugs creation, the culmination of a 10 year itch. A browser controlled pin art simulator with the power to move the real thing.'&gt;http://pinthing.com&lt;/a&gt; &amp;#8220;A &lt;a href='http://twitter.com/#!/hugs' title='Creator, Selenium. Co-founder, Sauce Labs. I make things and think about them.'&gt;@hugs&lt;/a&gt; creation, the culmination of a 10 year itch. A browser controlled pin art simulator with the power to move the real thing.&amp;#8221;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/olizilla/~4/EMskNG05qJ4" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://oli.zilla.org.uk/2010/11/05/selenium-and-castro-testing-the-canvas.html</feedburner:origLink></entry>
 
 <entry>
   <title>Upgrade With Sbaz The Scala Bazaar System</title>
   <link href="http://feedproxy.google.com/~r/olizilla/~3/Azhhv_KnQ_E/upgrade-with-sbaz-the-scala-bazaar-system.html" />
   <updated>2010-10-08T00:00:00+01:00</updated>
   <id>http://oli.zilla.org.uk/2010/10/08/upgrade-with-sbaz-the-scala-bazaar-system</id>
   <content type="html">&lt;h1 id='upgrade_with_sbaz_the_scala_bazaar_system'&gt;Upgrade with sbaz, the Scala Bazaar System&lt;/h1&gt;

&lt;p&gt;So you installed a Scala a while ago. Some shiny new features make you want more, but your install is just too old. Before reaching for the download button on the latest version, hear this!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Scala installation can update itself&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What&amp;#8217;s that you say? I don&amp;#8217;t have to scour some backwater of a recently re-branded site to find the sdk, with a side order of netbeans and open office bundle?&lt;/p&gt;

&lt;p&gt;Oh me oh my. That&amp;#8217;s nice. So a:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sbaz update&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;will update just the lists of what sbaz knows about, where as:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sbaz available&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;will show you what&amp;#8217;s new since you last upgraded, and a simple:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sbaz upgrade&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;will upgrade you to the latest and greatest version, with all the shiniest features you can have.&lt;/p&gt;

&lt;p&gt;Better still, you can ask sbaz to add all sorts of goodies to your vanilla Scala install. Take a closer look at the output of &lt;strong&gt;sbaz available&lt;/strong&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sbaz available
...
scala-android (2.7.0-final, 2.6.1-final)
scala-cldc (2.7.0-final, 2.6.1-final)
scala-devel (2.8.0.final, 2.7.7.final, 2.7.6.final, ...)
scala-devel-docs (2.8.0.final, 2.7.7.final, 2.7.6.final, ...)
scala-documentation (2.8.0.final, 2.7.7.final, 2.7.6.final, ...)
scala-library (2.8.0.final, 2.7.7.final, 2.7.6.final, ...)
scala-msil (2.8.0.final, 2.7.7.final, 2.7.6.final, ...)
scala-swing (0.5, 0.4, 0.3, ...)
scala-test (2.8.0.final, 2.7.7.final, 2.7.6.final, ...)
scala-tool-support (2.8.0.final, 2.7.7.final, 2.7.6.final, ...)
scalacheck (1.7, 1.6, 1.5, ...)
...
56 package names
371 total packages&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Of note:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;scala-documentation&lt;/strong&gt; providing some light reading and tutorials for the interested reader.&lt;/li&gt;

&lt;li&gt;&lt;strong&gt;scala-android&lt;/strong&gt; for all your mobile development needs.&lt;/li&gt;

&lt;li&gt;&lt;strong&gt;scala-tool-support&lt;/strong&gt; for syntax highlighting and other mods to trick out your text editor of choice.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tell sbaz to go get them for you like so:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sbaz install scala-tool-support&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For the other packages you can get some more info with a: &lt;strong&gt;sbaz show package-name&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Of course no codes would be complete without some small piece of arcanea for you to forget, fortunately sbaz&amp;#8217;s are pretty simple.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you downloaded a Release Candidate you will always be offered the bleeding edge&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So you got all excited about Scala 2.8 and downloaded 2.8.0.RC1, discovered the eclipse plugin still had serrated edges, and forgot about it. Now when you try a &lt;strong&gt;sbaz available&lt;/strong&gt; it will list just the RC&amp;#8217;s for future versions of Scala, very much the bleeding edge. You probably want the stable release for now. So, in the bombastic parlance of software we must &amp;#8220;switch universe&amp;#8221;, which contrary to it&amp;#8217;s name actually boils down to swapping one path for another. No wormholes for you here.&lt;/p&gt;

&lt;h2 id='get_scala_to_update_itself_from_release_candidate_to_stable_release'&gt;Get Scala to update itself from release candidate to stable release&lt;/h2&gt;

&lt;p&gt;To point sbaz at the &lt;em&gt;stable&lt;/em&gt; release list, we need to pass it the path to the poorly named &lt;em&gt;&amp;#8220;scala-dev&amp;#8221;&lt;/em&gt; descriptor file which resides in:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;misc/sbaz/descriptors/scala-dev&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;relative to your Scala install&amp;#8217;s root directory. So navigate to the your Scala install dir, something like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cd /usr/local/scala-2.8.0.RC1&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Point sbaz at the universe for stable releases:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sbaz setuniverse misc/sbaz/descriptors/scala-dev&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The path is relative to your install directory, so the above will fail if you are not in the root of your Scala install.&lt;/p&gt;

&lt;p&gt;As a control test, show me what I have now:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sbaz installed&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Give me the latest stable release:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sbaz upgrade&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and for empirical evidence of success, show me what I have now:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sbaz installed&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Kick back and wait for more shiney features.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;watch sbaz available&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;or in my case, remember to go and rename that scala-2.8.0.RC1 directory to something more appropriate.&lt;/p&gt;

&lt;h2 id='get_scala_to_update_itself_to_the_bleeding_edge'&gt;Get Scala to update itself to the bleeding edge&lt;/h2&gt;

&lt;p&gt;Should you yern for the wild west of release candidates you can flip to the &lt;em&gt;lamp-rc&lt;/em&gt; universe for the bleeding edge releases. Navigate to the your Scala install dir, e.g /usr/local/scala-2.8.0.RC1&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sbaz setuniverse misc/sbaz/descriptors/lamp-rc
sbaz upgrade&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id='sources'&gt;Sources&lt;/h2&gt;

&lt;p&gt;For a more authorative and intellectual discussion on sbaz please retune your dial to: &lt;a href='http://www.Scala-lang.org/node/93'&gt;http://www.Scala-lang.org/node/93&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/olizilla/~4/Azhhv_KnQ_E" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://oli.zilla.org.uk/2010/10/08/upgrade-with-sbaz-the-scala-bazaar-system.html</feedburner:origLink></entry>
 
 <entry>
   <title>Arcade Fire Knows Where You Live</title>
   <link href="http://feedproxy.google.com/~r/olizilla/~3/L5juX5CbWlk/arcade-fire-knows-where-you-live.html" />
   <updated>2010-10-06T00:00:00+01:00</updated>
   <id>http://oli.zilla.org.uk/2010/10/06/arcade-fire-knows-where-you-live</id>
   <content type="html">&lt;h1 id='is_that_where_you_grew_up'&gt;Is that where you grew up?&lt;/h1&gt;

&lt;p&gt;&lt;img src='http://www.chromeexperiments.com/img/arcade-fire/header-home.jpg' alt='Arcade Fire knows where you live' /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href='http://www.thewildernessdowntown.com'&gt;http://www.thewildernessdowntown.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Who knew pop-up windows could be so emotionally engaging.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/olizilla/~4/L5juX5CbWlk" height="1" width="1"/&gt;</content>
 <feedburner:origLink>http://oli.zilla.org.uk/2010/10/06/arcade-fire-knows-where-you-live.html</feedburner:origLink></entry>
 
 
</feed>

