<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>A New Zealand web developer’s thoughts on technology, mycology, synchronised swimming, music and capybarras</description><title>Bayard Randel's blog</title><generator>Tumblr (3.0; @bayardrandel)</generator><link>http://blog.nocturne.net.nz/</link><item><title>Firebug debugging tip: Strict Warnings</title><description>&lt;p&gt;I recently ran into an issue while setting up &lt;a href="http://www.trirand.com/blog/"&gt;jqGrid&lt;/a&gt; for inline editing that I thought I might share here. For some reason the grid event for editing would fire, however the grid was never put in to an editable state. The Firebug console unfortunately did not return &lt;em&gt;any errors&lt;/em&gt;, which made debugging a bit of a challenge.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_l1gnowLVio1qzey9z.png" alt=""/&gt;&lt;/p&gt;

&lt;p&gt;I then tried enabling Strict Warnings in firebug at which point I found the error:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;reference to undefined property g[j].editable ...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It turns out that I was passing a string to the &lt;em&gt;editable&lt;/em&gt; property instead of the expected boolean:&lt;/p&gt;

&lt;script src="http://gist.github.com/378885.js"&gt;&lt;/script&gt;&lt;p&gt;This of course should have read:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;editable: true,
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Had I not enabled strict warnings I suspect I would have been tearing my hair out for somewhat longer. At any rate, if you find you have a js issue of some sort, perhaps try this Firebug feature - you may have a type issue that is silently failing.&lt;/p&gt;</description><link>http://blog.nocturne.net.nz/post/549563387</link><guid>http://blog.nocturne.net.nz/post/549563387</guid><pubDate>Mon, 26 Apr 2010 13:45:00 +1200</pubDate><category>javascript</category><category>firebug</category></item><item><title>"Your death is not the end of your song, because the song you are playing right now is altering the..."</title><description>“Your death is not the end of your song, because the song you are playing right now is altering the physical structure of the universe, changing the way in which the universe vibrates. The song you play resonates on long after you’ve played your last note. It plays on in the ideas you’ve created, and in the things you’ve built. It plays on in your family and the people who loved you when you were still playing; we hear the songs we play for each other and inspire each other to create beautiful new melodies.  The melodies and phrases that you create are shared and passed on, enriching the song of the universe long after you’ve breathed your last.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://www.markpneyer.com/wp/2010/02/18/on-the-fundamental-nature-of-the-universe/"&gt;Mark Neyer&lt;/a&gt;&lt;/em&gt;</description><link>http://blog.nocturne.net.nz/post/402358649</link><guid>http://blog.nocturne.net.nz/post/402358649</guid><pubDate>Sun, 21 Feb 2010 22:23:59 +1300</pubDate></item><item><title>"Unix beard

Facial hair that all Unix experts are mysteriously compelled to grow. The length,..."</title><description>“&lt;h2&gt;Unix beard&lt;/h2&gt;

&lt;p&gt;Facial hair that all Unix experts are mysteriously compelled to grow. The length, bushiness, and unkemptness of the Unix beard are all directly proportional to the owner’s expertise. Having a Unix beard is a great way to ensure that you never get laid.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Bob’s a true Unix genius, just look at the size of his Unix beard!&lt;/em&gt;&lt;/p&gt;”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://www.urbandictionary.com/define.php?term=Unix%20beard"&gt;http://www.urbandictionary.com/define.php?term=Unix%20beard&lt;/a&gt;&lt;/em&gt;</description><link>http://blog.nocturne.net.nz/post/384063720</link><guid>http://blog.nocturne.net.nz/post/384063720</guid><pubDate>Fri, 12 Feb 2010 07:22:00 +1300</pubDate><category>unix linux</category></item><item><title>Microsoft is a polycephalic cat, or how I learned to stop worrying and love Rails</title><description>&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_kxb6d2Bodp1qzey9z.jpg" alt=""/&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Simplicity does not precede complexity, but follows it.
  -Alan Perlis&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I recently sat down to begin a new ASP.Net MVC project and although I am familiar with these tools, a strange sense of unease grew in me as I downloaded the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fluent nHibernate (persistence/orm)&lt;/li&gt;
&lt;li&gt;Automapper (model mapping)&lt;/li&gt;
&lt;li&gt;Ninject (IOC container)&lt;/li&gt;
&lt;li&gt;nUnit (unit testing)&lt;/li&gt;
&lt;li&gt;Moq (mocking/isolation)&lt;/li&gt;
&lt;li&gt;Spark (view engine)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Six distinct dependencies simply to make a good &lt;em&gt;start&lt;/em&gt; on my project! Why does this feel unnecessarily complex? Is there something inherently wrong with our approach? If my goal is to provide a good user experience and solve business problems, why do I feel that I’m spending so much time with plumbing?&lt;/p&gt;

&lt;p&gt;Part of this is attributable to the fact that C# is a statically typed language, and lacks the flexibility of dynamic languages like Python and Ruby. In order to write maintainable, testable code in a statically typed language there is some overhead complexity. C#’s syntax, like many statically typed languages, is unavoidably verbose. Consider &lt;a href="http://pastie.org/private/koct9nreb5ls603cixht3q"&gt;this comparison&lt;/a&gt; of a roughly equivalent MVC.Net and Rails controller from &lt;a href="https://twitter.com/bphogan"&gt;Brian Hogan&lt;/a&gt;. You’ll notice that in addition to being terser, the Rails code also makes some sensible assumptions that reduce the weight of the controller.&lt;/p&gt;

&lt;p&gt;Interestingly, none of the tools for the MVC project I mentioned above are provided by Microsoft. Although Microsoft provide analogues to some of these such as the Entity Framework, they have been late in coming to the party and the .Net community generally has little interest in their adoption; the open source projects are simply more mature. Many of these projects are artifacts of a community that has grown tired of Microsoft’s ambiguous noncommittal attitude towards best practice, and software design. In fact, an entire community has sprung up over the last several years, self dubbed &lt;em&gt;Alt.Net&lt;/em&gt;, in an attempt to address the problem of Microsoft’s vague approach to their platform.&lt;/p&gt;

&lt;h2&gt;Flirting with Ruby&lt;/h2&gt;

&lt;p&gt;Over the last year, my time spent in the evenings with Ruby has coloured my perception of .Net development.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;It is often better to be in chains than to be free. -Franz Kafka&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If I understand Herr K correctly here, I think he was implying that restrictions can be liberating and help to preserve ones sanity, and this has been my somewhat paradoxical experience with Rails.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$rails niftyapp
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;With that seemingly magical invocation, Rails immediately provides you with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;complete project directory structure&lt;/li&gt;
&lt;li&gt;simple, abstracted persistance&lt;/li&gt;
&lt;li&gt;foundations for functional, unit, integration and performance tests&lt;/li&gt;
&lt;li&gt;an integrated application server&lt;/li&gt;
&lt;li&gt;scripts for generation of models, controllers, tests&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;More importantly however, Rails provides you with &lt;strong&gt;direction&lt;/strong&gt;. There is a clear and defined way of interacting with the framework. There is a Rails Way, and over time one becomes aware that there is also a Ruby Way (both titles of two popular books). Amusingly, a further paradox - while Rails is successful largely because of it’s prescriptive opinionated approach to development, Ruby is anything but restrictive. The creator of Ruby, Yukihiro “Matz” Matsumoto in fact cites Larry Wall as one of his heroes. The flexibility of Perl has transferred to Ruby, albeit in a somewhat more human and digestible form.&lt;/p&gt;

&lt;p&gt;ASP.Net in stark contrast provides you with very little in the way of direction. In fact, Microsoft provide two web development frameworks - ASP.Net Webforms and ASP.Net MVC. Although MVC.Net is newer and clearly represents the model adopted by 90% of the world’s web development frameworks, Microsoft still remain noncommittal about which framework you should choose.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Correctly, Microsoft has not positioned ASP.NET MVC as a replacement for ASP.NET Web Forms. Web Forms is definitely a pattern that works for Web applications.&lt;/p&gt;
  
  &lt;p&gt;Dino Esposito on &lt;a href="http://msdn.microsoft.com/en-us/magazine/dd942833.aspx"&gt;Comparing Web Forms with MVC (MSDN)&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In terms of persistence, the story is further complicated - Microsoft offer ADO.Net Datasets, Linq2SQL and the Entity Framework.&lt;/p&gt;

&lt;p&gt;Out of the box, Rails provides an Active Record implementation that makes concerns of persistence refreshingly easy. Schemas are defined in Ruby migrations instead of SQL. The Rails community is also making swift inroads towards NOSQL implementations. Tools such as &lt;a href="http://github.com/jnunemaker/mongomapper/"&gt;MongoMapper&lt;/a&gt; allow persistence to become an almost non-existant concern with relatively little setup. After spending any time with a baroque .Net ORM this is astoundingly liberating.&lt;/p&gt;

&lt;p&gt;I can only attribute Microsoft’s lack of a unified voice to the fact that their development teams operate in silos. There is certainly progressive work being done at Microsoft; Jimmy Schementi’s DLR team is a testament to this, yet we see another version of Visual Studio ship without IronPython support.&lt;/p&gt;

&lt;p&gt;Microsoft need to provide better guidance to a community that is increasingly finding their needs better met by OSS offerings. The Rails philosophy of &lt;em&gt;convention over configuration&lt;/em&gt; has obviously resonated with developers, many of them in the Microsoft camp. ASP.Net MVC is an excellent foundation for an opinionated .Net web development framework, but in its current state creates more questions for developers than it answers. Rails 3 with its Merb influenced modularity provides the flexibility that proponents of un-opinionated frameworks desire, while maintaining it’s integrity and structure in a default configuration. MVC.Net however provides a treacherous sea of possibility that only the most experienced developers can navigate successfully.&lt;/p&gt;

&lt;p&gt;One can’t help but feel that MS is simply too large or possibly too divided to crystalise and focus their approach to their platform. When some of the most visible proponents of the Alt.Net community &lt;a href="http://herdingcode.com/?p=234"&gt;express that the only reason they continue developing for the .Net platform is a paycheck&lt;/a&gt;, that to my mind is cause for Microsoft to sit up and take notice.&lt;/p&gt;</description><link>http://blog.nocturne.net.nz/post/370378603</link><guid>http://blog.nocturne.net.nz/post/370378603</guid><pubDate>Thu, 04 Feb 2010 23:34:00 +1300</pubDate></item><item><title>Tab Completion and ANSI colours in IRB</title><description>&lt;p&gt;I tend to spend more time using the Rails console than IRB these days, and I’ve grown soft and used to the handy tab completion. Every time I start IRB I wish it behaved similarly. Enter &lt;a href="http://pablotron.org/software/wirble/"&gt;Pablotron’s&lt;/a&gt; awesome &lt;em&gt;Wirble&lt;/em&gt;!&lt;/p&gt;

&lt;p&gt;To get up and running with wirble:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo gem install wirble
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and then add the following to your ~/.irbrc&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;begin
  # load wirble
  require 'wirble'

 # start wirble (with color)
  Wirble.init
  Wirble.colorize
    rescue LoadError =&gt; err
    warn "Couldn't load Wirble: #{err}"
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now typing “foo”.[tab] will give you all the ruby String methods.&lt;/p&gt;

&lt;p&gt;Snazzy!&lt;/p&gt;</description><link>http://blog.nocturne.net.nz/post/307178949</link><guid>http://blog.nocturne.net.nz/post/307178949</guid><pubDate>Wed, 30 Dec 2009 15:40:00 +1300</pubDate><category>ruby</category></item><item><title>Presenting Agile to my workplace</title><description>&lt;p&gt;Today I gave a presentation to the IT managers at my workplace about the benefits of agile software development. We recently completed a large 12 month project, and in retrospect a lot of the things felt unnecessarily difficult.&lt;/p&gt;

&lt;p&gt;I figured we needed to look at a way to get the business regularly involved with projects that we work on, and become an active part of the way the software develops. Something like Scrum seems like a good fit.&lt;/p&gt;

&lt;p&gt;Anyhow, here’s the presentation. Inspired by this weekend’s &lt;a href="http://visitoamaru.co.nz/?events&amp;ln=victorianheritageweek"&gt;Oamaru Victorian Fete&lt;/a&gt; I’ve borrowed some of &lt;a href="http://www.danhillier.com/"&gt;Dan Hillier’s&lt;/a&gt; brilliant illustrations. I hope he doesn’t mind.&lt;/p&gt;

&lt;div style="width:425px;text-align:left" id="__ss_2534158"&gt;
&lt;a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/squidsoup/agile-software-development-overview" title="Agile Software Development, Overview"&gt;Agile Software Development, Overview&lt;/a&gt;&lt;object style="margin:0px" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=agile-091119010921-phpapp02&amp;stripped_title=agile-software-development-overview"&gt;
&lt;param name="allowFullScreen" value="true"&gt;
&lt;param name="allowScriptAccess" value="always"&gt;
&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=agile-091119010921-phpapp02&amp;stripped_title=agile-software-development-overview" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;"&gt;View more &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/"&gt;presentations&lt;/a&gt; from &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/squidsoup"&gt;squidsoup&lt;/a&gt;.&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Have you tried to move past waterfall at your workplace? Are you already working using an agile methodology? I’d be interested to hear your stories.&lt;/p&gt;</description><link>http://blog.nocturne.net.nz/post/249414413</link><guid>http://blog.nocturne.net.nz/post/249414413</guid><pubDate>Thu, 19 Nov 2009 20:32:00 +1300</pubDate><category>agile</category><category>scrum</category><category>software development</category></item><item><title>"“Computer Science is a terrible name for this business. First of all, it’s not a..."</title><description>“&lt;p&gt;“Computer Science is a terrible name for this business. First of all, it’s not a science. It might be engineering, or it might be art… it’s also not really very much about computers.&lt;/p&gt;

&lt;p&gt;It’s not about computers in the same sense that physics is not really about particle accelerators, and biology is not really about microscopes and petri dishes.&lt;/p&gt;

&lt;p&gt;It’s very easy to confuse the essence of what you’re doing with the tools that you use, and indeed on some absolute scale of things we probably know less about the essence of Computer Science than the ancient egyptians really knew about geometry.&lt;/p&gt;

&lt;p&gt;I think in the future, people will look back and say yes those primitives in the 20th century were fiddling around with these gadgets called computers, but really what they were really doing was starting to learn how to formalise intuitions about process.”&lt;/p&gt;”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Harold Abelson
Assoc. Prof EE &amp; CS, MIT&lt;/em&gt;</description><link>http://blog.nocturne.net.nz/post/225725889</link><guid>http://blog.nocturne.net.nz/post/225725889</guid><pubDate>Wed, 28 Oct 2009 21:11:00 +1300</pubDate></item><item><title>Delving into Computer Science with SICP</title><description>&lt;div style="float:left; padding: 0 10px 10px 0;margin:0;"&gt;&lt;img src="http://media.tumblr.com/tumblr_ks0psmtcWL1qzey9z.png"/&gt;&lt;/div&gt;

&lt;p&gt;The &lt;em&gt;Structure and Interpretation of Computer Programs&lt;/em&gt; by Harold Abelson and Gerald Jay Sussman is often cited by experienced developers as one of the books that fundamentally changed the way they think about computer science and software development.&lt;/p&gt;

&lt;p&gt;SICP is also a somewhat intimidating tome that demands a fair bit of perseverance and dedication from its reader. Like most things in life of course, things worth doing typically take time and effort!&lt;/p&gt;

&lt;p&gt;&lt;br style="clear:both;"/&gt;&lt;/p&gt;

&lt;h2&gt;Why study sicp?&lt;/h2&gt;

&lt;p&gt;I suspect many developers today would see learning a language like Scheme as anachronistic, and potentially less than practical. Interestingly, there seems to have been a recent resurgence of interest in functional programming.&lt;/p&gt;

&lt;p&gt;Javascript, which in the past has been a somewhat misunderstood language, is beginning to be recognised as capable of some fairly sophisticated constructs and a lot more than just behavioural glue for the DOM. Languages such as F# and Haskell are slowly beginning to work their way into the mainstream software development world. The latest version of Microsoft’s IDE, Visual Studio, is shipping with F# as a first class citizen, supporting .Net F# projects out of the box.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://stackoverflow.com/questions/13182/sicp-better-programming"&gt;Chris Hanson&lt;/a&gt; posted the following on StackOverflow in response to a user enquiring about the value of working through SICP:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Even if you don’t do the exercises, it’s worth reading through Structure and Interpretation of Computer Programs at least once. Unlike The Art of Computer Programming it’s written not to appease some bizarre notion of machine architecture but to demonstrate the fundamentals of computational processes, and it excels at that.&lt;/p&gt;
  
  &lt;p&gt;Some of what you’ll learn simply by reading through SICP:&lt;/p&gt;
  
  &lt;ul&gt;
&lt;li&gt;Functional decomposition and modeling problems&lt;/li&gt;
  &lt;li&gt;Recursion, its uses, pros and cons&lt;/li&gt;
  &lt;li&gt;Imperative and functional programming&lt;/li&gt;
  &lt;li&gt;Control structures, and why they have the behavior they do&lt;/li&gt;
  &lt;li&gt;Language design&lt;/li&gt;
  &lt;li&gt;Computer architecture&lt;/li&gt;
  &lt;li&gt;Compiler implementation.&lt;/li&gt;
  &lt;/ul&gt;
&lt;p&gt;The compiler implementation bits later on in the book will be especially enlightening to many working software developers, who if they haven’t had a class on the topic often think compilers are strange and mysterious beasts and that creating languages is “hard.”&lt;/p&gt;
  
  &lt;p&gt;My feeling is that a lot of people suggest reading &lt;em&gt;The Art of Computer Programming&lt;/em&gt; because having waded through it makes you feel smart, but that people suggest reading &lt;em&gt;Structure and Interpretation of Computer Programming&lt;/em&gt; because it clearly presents knowledge every software developer needs a thorough command of.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;Expectations&lt;/h2&gt;

&lt;p&gt;I’m hoping to document my experience here on my blog to see if understanding the concepts in SICP will have any appreciable effect on the way I approach web development. Given that javascript is essentially a functional language, I suspect a lot of the concepts &lt;em&gt;will&lt;/em&gt; be relevant. At the very least I hope to have a better understanding of computer science in general.&lt;/p&gt;

&lt;p&gt;I won’t be alone in my journey - a number of others have blogged about their experience as they’ve worked through the book and the course material. Both 
&lt;a href="http://www.billthelizard.com/2009/10/sicp-challenge.html"&gt;Bill the Lizard&lt;/a&gt; and 
&lt;a href="http://eli.thegreenplace.net/2007/06/19/introducing-the-sicp-reading-notes/"&gt;Eli Bendersky&lt;/a&gt; have some excellent posts both on the content of the lectures and working through the exercises.&lt;/p&gt;

&lt;h2&gt;Course resources&lt;/h2&gt;

&lt;p&gt;Complete SICP book &lt;a href="http://mitpress.mit.edu/sicp/full-text/book/book.html"&gt;html&lt;/a&gt; &lt;a href="http://deptinfo.unice.fr/~roy/sicp.pdf"&gt;pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-001Spring-2005/CourseHome/"&gt;Lecture notes, Exams, Projects&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/"&gt;Lecture Videos&lt;/a&gt; Also provided from the OCW site, but this page provides links to torrents.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://icampustutor.csail.mit.edu/6.001-public/"&gt;SICP Tutor&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Selecting a Scheme interpreter&lt;/h2&gt;

&lt;p&gt;There are an astounding number of Scheme implementations available today, and to the beginner this can be somewhat overwhelming. The &lt;a href="http://community.schemewiki.org/"&gt;Community Scheme Wiki&lt;/a&gt; has the following advice regarding choosing an implementation for learning Scheme:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Beginners should select an implementation that is well-documented, adheres closely to the standard, has good error handling and debugging capabilities, is easy to install, is mature, stable and under active development. &lt;em&gt;Chez Scheme&lt;/em&gt;, &lt;em&gt;Gambit&lt;/em&gt;, &lt;em&gt;MIT Scheme&lt;/em&gt; and &lt;em&gt;PLT Scheme&lt;/em&gt; are all used extensively in teaching Computer Science courses and hence meet all the aforementioned requirements. &lt;em&gt;Chicken&lt;/em&gt;, &lt;em&gt;Bigloo&lt;/em&gt;, &lt;em&gt;EdScheme&lt;/em&gt;, &lt;em&gt;OpenScheme&lt;/em&gt;, &lt;em&gt;Scheme48&lt;/em&gt;, and &lt;em&gt;SCM&lt;/em&gt; are quite beginner-friendly too.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I’ve decided to give Chicken a go, primarily because I find the name amusing, but also as it has POSIX support and provides both an interpreter and compiler. A fair bit of real world development appears to be done with Chicken, so there would be no need to switch implementations if I decided to start building apps in Scheme one day.&lt;/p&gt;

&lt;h2&gt;Setting up a Scheme environment in Mac OS X&lt;/h2&gt;

&lt;p&gt;Installing Chicken is a snap if you have &lt;a href="http://www.macports.org/"&gt;Mac Ports&lt;/a&gt; installed - simply run:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo port install chicken
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you don’t have Mac Ports installed, the latest release is available from the &lt;a href="http://www.call-with-current-continuation.org/"&gt;Chicken website&lt;/a&gt;. You’ll need to have installed XCode to build Chicken from source.&lt;/p&gt;

&lt;h2&gt;Choosing a text editor&lt;/h2&gt;

&lt;p&gt;If you use TextMate, you’ll find the Scheme bundle helpful as it provides syntax hi-lighting and bindings for your Scheme interpreter such as ⌘R for Run Script. To install the bundle, run the following commands in Terminal:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;mkdir /Library/Application\ Support/TextMate/Bundles/
svn co &lt;a href="http://svn.textmate.org/trunk/Bundles/Scheme.tmbundle/"&gt;http://svn.textmate.org/trunk/Bundles/Scheme.tmbundle/&lt;/a&gt;
osascript -e 'tell app "TextMate" to reload bundles'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Any text editor that you’re comfortable with will be fine, but you’ll probably find life easier if you select one with some form of syntax hi-lighting and parenthesis matching for LISP/Scheme.&lt;/p&gt;

&lt;p&gt;PLT Scheme provides a Scheme IDE called &lt;a href="http://download.plt-scheme.org/drscheme/"&gt;DrScheme&lt;/a&gt;, which runs on Windows, Linux and OS X.&lt;/p&gt;

&lt;p&gt;Emacs is another popular option in the LISP/Scheme community, and available in many guises. &lt;a href="http://aquamacs.org/"&gt;Aquamacs&lt;/a&gt; is a good aqua interpretation for Mac OS X.&lt;/p&gt;</description><link>http://blog.nocturne.net.nz/post/221771097</link><guid>http://blog.nocturne.net.nz/post/221771097</guid><pubDate>Sun, 25 Oct 2009 01:28:00 +1300</pubDate><category>SICP</category><category>Scheme</category></item><item><title>Managing multiple distinct logins in JMeter</title><description>&lt;p&gt;I’ve recently been building a load model of the site I’m currently working on in JMeter, and struggled a bit to find a way to manage distinct user sessions in a thread group.&lt;/p&gt;



&lt;p&gt;After some mild expletives, and a bit of digging around in the documentation I found the answer which I’ll clarify here as it’s not entirely obvious.&lt;/p&gt;



&lt;p&gt;The best approach appears to be reading username and password pairs from a CSV.&lt;/p&gt;



&lt;p&gt;First you will need to create a new csv with username and password pairs delimited by commas.&lt;/p&gt;



&lt;p&gt;In Jmeter, add a CSV Data Set Config Element to your thread group, and specify the path to the CSV you just created, as well as setting “USERNAME, PASSWORD” in the Variable Names field.&lt;/p&gt;



&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_krdu46s3zP1qzey9z.png"/&gt;&lt;/p&gt;



&lt;p&gt;In your Thread Group configuration, set the number of threads to the number of users you’ve specified in your CSV.&lt;/p&gt;



&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_krduhxKufW1qzey9z.png"/&gt;&lt;/p&gt;



&lt;p&gt;Next you’ll want to create a &lt;i&gt;Once Only Controller&lt;/i&gt;, and set your HTTP Request sampler for your login process as a child. The Once Only logic controller will run only once per thread, so based on the configuration above, the HTTP POST to the sign in page will occur 10 times, whereas the HTTP Request sampler below will hit the app 500 times.&lt;/p&gt;



&lt;p&gt;Finally, in your Sign In HTTP sampler, find the section labeled Send Parameters With the Request. Find the Name/Value pairs for your username, and password text boxes and set the respective values to ${USERNAME} and ${PASSWORD}.&lt;/p&gt;



&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_krduupDc6L1qzey9z.png"/&gt;&lt;/p&gt;

&lt;h3&gt;An even simpler solution&lt;/h3&gt;

&lt;p&gt;Provided you have a group of test users with the same prefix and an appended incrementing int (testuser1, testuser2 etc.), an even simpler approach is to forgo the CSV node entirely and simply pass something like this to the HTTP sampler:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;${username-prefix}$(__threadNum}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Simply define ${username-prefix} in your test plan’s user defined variables, and the $(__threadNum} function’s return value will increment once for every new thread.&lt;/p&gt;

&lt;p&gt;Handy!&lt;/p&gt;</description><link>http://blog.nocturne.net.nz/post/210714117</link><guid>http://blog.nocturne.net.nz/post/210714117</guid><pubDate>Mon, 12 Oct 2009 16:56:00 +1300</pubDate><category>load testing</category><category>JMeter</category></item></channel></rss>
