<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Ernest Micklei&#39;s Blog</title>
    <link>http://ernestmicklei.com/</link>
    <description>Recent content on Ernest Micklei&#39;s Blog</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <copyright>&amp;copy; 2024. All rights reserved.</copyright>
    <lastBuildDate>Mon, 22 Dec 2025 21:23:11 +0300</lastBuildDate>
    <atom:link href="http://ernestmicklei.com/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>MCP Server</title>
      <link>http://ernestmicklei.com/melrose/mcp/</link>
      <pubDate>Fri, 09 May 2025 19:53:58 +0100</pubDate>
      <guid>http://ernestmicklei.com/melrose/mcp/</guid>
      <description>&lt;p&gt;&lt;code&gt;melrose-mcp&lt;/code&gt; is a tool that uses the &lt;a href=&#34;https://modelcontextprotocol.io/&#34;&gt;MCP&lt;/a&gt; protocol to receive &lt;code&gt;melrōse&lt;/code&gt; expressions to play.&#xA;You install this tool locally on your machine and connect it from an MCP client such as Claude Desktop, Goose, VSC etc.&lt;/p&gt;&#xA;&lt;h3 id=&#34;example&#34;&gt;example&lt;/h3&gt;&#xA;&lt;p&gt;Prompt:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;play a tune from Claude Debussy&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;AI:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;I&amp;#39;ll create a small segment inspired by Claude Debussy&amp;#39;s impressionist style using the Melrose language.&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;MCP server:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;{&#xA;    `expression`: `sequence(&#39;(F4 A4 D5) 4(F4 A4 D5) (G4 B4 E5) 4(G4 B4 E5) (A4 C5 F5) 4(A4 C5 F5) (G4 B4 E5) 4(G4 B4 E5) (F4 A4 D5) 8= 8(E4 G4 C5) 4(F4 A4 D5)&#39;)`&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;See &lt;a href=&#34;https://github.com/emicklei/melrose-mcp&#34;&gt;melrose-mcp&lt;/a&gt; for details how to install and use it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing &#39;map&#39;</title>
      <link>http://ernestmicklei.com/melrose/map/</link>
      <pubDate>Tue, 10 Sep 2024 09:58:42 +0200</pubDate>
      <guid>http://ernestmicklei.com/melrose/map/</guid>
      <description>&lt;p&gt;The function &lt;code&gt;map&lt;/code&gt; is used to create a composition by applying a transformation on each sequence in a collection.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;div style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&#xA;&lt;table style=&#34;border-spacing:0;padding:0;margin:0;border:0;&#34;&gt;&lt;tr&gt;&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;1&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;2&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;3&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;4&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;5&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;6&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;7&#xA;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#xA;&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;;width:100%&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;a1&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;sequence&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;G_3 D_ G_ A D_5 G_5&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;a2&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;sequence&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;D_3 A_3 D_ E A_ D_5&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;a3&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;sequence&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;E3 B3 E A_ B E5 &amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;a4&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;sequence&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;B2 G_3 B3 E_ G_ B&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;c&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;map&lt;/span&gt;( &lt;span style=&#34;color:#a6e22e&#34;&gt;join&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;a1&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;a3&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;a4&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;a2&lt;/span&gt;), &lt;span style=&#34;color:#a6e22e&#34;&gt;fraction&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;8&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;resequence&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;1 4 2 4 3 6 5 4&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;_&lt;/span&gt; )) )&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;loop&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;c&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;line-14&#34;&gt;line 1..4&lt;/h3&gt;&#xA;&lt;p&gt;Four sequences are created that play a nice combination of arpeggios.&lt;/p&gt;</description>
    </item>
    <item>
      <title>More Drum Patterns</title>
      <link>http://ernestmicklei.com/melrose/drum-pattern-2/</link>
      <pubDate>Fri, 26 Nov 2021 16:53:58 +0100</pubDate>
      <guid>http://ernestmicklei.com/melrose/drum-pattern-2/</guid>
      <description>&lt;p&gt;Using the &lt;code&gt;notemap&lt;/code&gt; function with dots &lt;code&gt;.&lt;/code&gt; and bangs &lt;code&gt;!&lt;/code&gt; you can write a pattern for an instrument.&#xA;In this example, multiple instruments are choosen from the General MIDI set.&#xA;The note &lt;code&gt;C2&lt;/code&gt; is typically assigned to a Kick drum.&#xA;The loop plays the 16 beats in a bar and for each bang &lt;code&gt;!&lt;/code&gt; it will shortly (16th) play the note.&#xA;You can start and stop each loop individually.&lt;/p&gt;&#xA;&lt;p&gt;Once you have a MIDI capable sound program (such as a DAW) opened then tryout this example with the online &lt;a href=&#34;https://t.co/yxcJ57PIb3?amp=1&#34;&gt;Melrōse Playground&lt;/a&gt; yourself.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Drum Pattern</title>
      <link>http://ernestmicklei.com/melrose/drum-pattern-1/</link>
      <pubDate>Sat, 06 Mar 2021 16:53:58 +0100</pubDate>
      <guid>http://ernestmicklei.com/melrose/drum-pattern-1/</guid>
      <description>&lt;p&gt;This script is an example that uses the Melrōse language to create your own drum beats.&#xA;Line by line, I will explain how it is composed.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;div style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&#xA;&lt;table style=&#34;border-spacing:0;padding:0;margin:0;border:0;&#34;&gt;&lt;tr&gt;&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt; 1&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt; 2&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt; 3&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt; 4&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt; 5&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt; 6&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt; 7&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt; 8&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt; 9&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;10&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;11&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;12&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;13&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;14&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;15&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;16&#xA;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#xA;&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;;width:100%&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;bpm&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;85&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// https://usermanuals.finalemusic.com/SongWriter2012Win/Content/PercussionMaps.htm&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;open&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;midi&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;16&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;46&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;60&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;close&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;midi&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;16&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;42&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;60&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;clap&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;midi&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;16&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;39&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;60&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;kick&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;midi&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;16&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;36&lt;/span&gt;,&lt;span style=&#34;color:#ae81ff&#34;&gt;80&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;d1&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;notemap&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39; 3 10 11&amp;#39;&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;open&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;d2&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;notemap&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;4 12&amp;#39;&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;close&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;d3&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;notemap&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;5 13&amp;#39;&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;clap&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;d4&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;notemap&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;1 2 4 7 9 10 12 15&amp;#39;&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;kick&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;d5&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;notemap&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;16&amp;#39;&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;note&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;16=&amp;#39;&lt;/span&gt;)) &lt;span style=&#34;color:#75715e&#34;&gt;// 1/16 rest at the end to make 16 notes in the set&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;set&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;merge&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;d1&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;d2&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;d3&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;d4&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;d5&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;lp_set&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;loop&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;channel&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;10&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;set&lt;/span&gt;)) &lt;span style=&#34;color:#75715e&#34;&gt;// channel 10 is the general midi for a drumkit&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://storage.googleapis.com/downloads.ernestmicklei.com/melrose/melrose_drum_pattern-1.aif&#34;&gt;🎶 Play&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Iterating over patterns</title>
      <link>http://ernestmicklei.com/melrose/resequence-iterator/</link>
      <pubDate>Fri, 05 Mar 2021 17:28:49 +0100</pubDate>
      <guid>http://ernestmicklei.com/melrose/resequence-iterator/</guid>
      <description>&lt;p&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&#xA;&lt;table style=&#34;border-spacing:0;padding:0;margin:0;border:0;&#34;&gt;&lt;tr&gt;&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;1&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;2&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;3&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;4&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;5&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;6&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;7&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;8&#xA;&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34;&gt;9&#xA;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#xA;&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;;width:100%&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;bpm&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;90&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;s&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;sequence&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;c e g b&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;iterator&lt;/span&gt;(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;(1 2) (3 4)&amp;#39;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;(1 3) (2 4)&amp;#39;&lt;/span&gt;, &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;1 (2 3) 4&amp;#39;&lt;/span&gt;, &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;(1 4) (2 3)&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;m&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;resequence&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;s&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;l&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;loop&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;m&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;next&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt;))&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;a href=&#34;#&#34; onClick=&#34;MIDIjs.play(&#39;/midi/blog-resequence-iterator.mid&#39;)&#34;&gt;🎶 Play&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Using &lt;code&gt;resequence&lt;/code&gt; you can compose a new sequence with index-based entries.&#xA;The first compostion played by the loop is &lt;code&gt;(C E) (G B)&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DAW - Apple Logic Pro X</title>
      <link>http://ernestmicklei.com/melrose/logicpro/</link>
      <pubDate>Wed, 06 May 2020 16:53:58 +0100</pubDate>
      <guid>http://ernestmicklei.com/melrose/logicpro/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://storage.googleapis.com/downloads.ernestmicklei.com/melrose/logicpro.png&#34; alt=&#34;logicpro&#34;&gt;&lt;/p&gt;&#xA;&lt;h6 id=&#34;logic-pro-is-a-product-of-apple-inc&#34;&gt;Logic Pro is a product of Apple Inc.&lt;/h6&gt;&#xA;&lt;h2 id=&#34;goal&#34;&gt;Goal&lt;/h2&gt;&#xA;&lt;p&gt;Logic Pro is a professional Digital Audio Workstation (DAW) available for Apple Mac OSX.&#xA;Melrōse can communicate with Logic Pro by sending MIDI messages.&#xA;Logic Pro has a rich set of sounds and instruments to play MIDI notes.&#xA;In addition, Logic Pro is able to play multiple MIDI channels simultaneously which can be programmed individualy by &lt;code&gt;melrōse&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This article describes the steps to get Melrōse working with Logic Pro such that you can play your melody per-channel.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DAW - Apple Garageband</title>
      <link>http://ernestmicklei.com/melrose/garageband/</link>
      <pubDate>Fri, 06 Mar 2020 16:53:58 +0100</pubDate>
      <guid>http://ernestmicklei.com/melrose/garageband/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://storage.googleapis.com/downloads.ernestmicklei.com/melrose/garageband.png&#34; alt=&#34;garageband&#34;&gt;&lt;/p&gt;&#xA;&lt;h6 id=&#34;garageband-is-a-registered-trademark-of-apple-inc&#34;&gt;GarageBand is a registered trademark of Apple Inc.&lt;/h6&gt;&#xA;&lt;h2 id=&#34;goal&#34;&gt;Goal&lt;/h2&gt;&#xA;&lt;p&gt;Garageband is a simple Digital Audio Workstation (DAW) that comes with the standard installation of Apple Mac OSX on devices such as MacBook or MacPro.&#xA;Melrōse can communicate with GarageaBand by exchanging MIDI messages. GarageBand has a rich set of sounds and instruments to play MIDI notes.&lt;/p&gt;&#xA;&lt;p&gt;This article describes the steps to get Melrōse working with GarageBand such that you can play your melodies.&lt;/p&gt;</description>
    </item>
    <item>
      <title>protocheck: Lightweight Protobuf Validation in Go</title>
      <link>http://ernestmicklei.com/2025/12/protocheck-lightweight-protobuf-validation-in-go/</link>
      <pubDate>Mon, 22 Dec 2025 21:23:11 +0300</pubDate>
      <guid>http://ernestmicklei.com/2025/12/protocheck-lightweight-protobuf-validation-in-go/</guid>
      <description>&lt;p&gt;For Go developers working with Protocol Buffers, ensuring data integrity is crucial. While Protobufs guarantee type safety, they don&amp;rsquo;t enforce semantic rules out of the box. This is where &lt;a href=&#34;https://github.com/emicklei/protocheck&#34;&gt;protocheck&lt;/a&gt; comes in, a lightweight and powerful tool for adding validation logic to your Protobuf messages.&lt;/p&gt;&#xA;&lt;p&gt;This blog post will explore the design choices behind &lt;code&gt;protocheck&lt;/code&gt;, focusing on its simplicity of declaration and code generation. We&amp;rsquo;ll also compare it to &lt;code&gt;bufbuild/protovalidate&lt;/code&gt; to help you choose the right tool for your project.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Growing Developer</title>
      <link>http://ernestmicklei.com/2024/07/the-growing-developer/</link>
      <pubDate>Mon, 29 Jul 2024 17:28:00 +0200</pubDate>
      <guid>http://ernestmicklei.com/2024/07/the-growing-developer/</guid>
      <description>&lt;h2 id=&#34;why-you-want-this-and-how-to-become-one&#34;&gt;Why you want this and how to become one&lt;/h2&gt;&#xA;&lt;p&gt;10-15 minutes read&lt;/p&gt;&#xA;&lt;p&gt;This article is part of a series that began with &lt;a href=&#34;https://ernestmicklei.com/2022/05/the-replaceable-developer/&#34;&gt;The Replaceable Developer&lt;/a&gt;. That article examines how developers can prevent their current work from hindering their professional growth.&lt;/p&gt;&#xA;&lt;h3 id=&#34;tldr&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;p&gt;Growing your skills will open doors to new challenging opportunities, which in turn can lead to making a bigger impact and, with promotions, a higher salary.&#xA;The TEC model is a structured approach for achieving this.&#xA;Increase your theoretical knowledge, gain more diverse experience and communicate about it, both written and verbal.&#xA;Pick a new and exciting technology, apply it to some small (pet) project and share your findings with your fellow developers.&#xA;Repeat this.&lt;/p&gt;</description>
    </item>
    <item>
      <title>AI, please explain this code base</title>
      <link>http://ernestmicklei.com/2024/07/ai-please-explain-this-code-base/</link>
      <pubDate>Sat, 20 Jul 2024 19:28:12 +0200</pubDate>
      <guid>http://ernestmicklei.com/2024/07/ai-please-explain-this-code-base/</guid>
      <description>&lt;h2 id=&#34;can-ai-tell-me-what-design-is-implemented-&#34;&gt;Can AI tell me what design is implemented ?&lt;/h2&gt;&#xA;&lt;p&gt;Recently, I wanted to contribute to some open-source Go packages that I use.&#xA;Some of them have a large codebase with lots of subpackages.&#xA;Despite the carefully chosen names for this these packages, without an overview and design description, it will require quite some time reading sources and debugging tests before a mental model is created.&#xA;Without such an understanding, contributing to that open-source project is likely to fail.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Replaceable Developer</title>
      <link>http://ernestmicklei.com/2022/05/the-replaceable-developer/</link>
      <pubDate>Wed, 18 May 2022 16:28:12 +0700</pubDate>
      <guid>http://ernestmicklei.com/2022/05/the-replaceable-developer/</guid>
      <description>&lt;h2 id=&#34;why-you-want-this-and-how-to-become-one&#34;&gt;Why you want this and how to become one&lt;/h2&gt;&#xA;&lt;h3 id=&#34;tldr&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;p&gt;Once you are replaceable, you are free to start new initiatives, explore new technologies, solve the next complex problem which will make you happy and interested to stay at your job. Your organisation has a lower risk of discontinuity and can benefit more from your expertise. To be a replaceable developer, you need to&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;deal with all the relevant unshared software that you have created in solitude;&lt;/li&gt;&#xA;&lt;li&gt;document knowledge about relevant processes.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;img src=&#34;http://ernestmicklei.com/img/pexels-jan-van-der-wolf-11369918.jpg&#34; width=&#34;600px&#34;/&gt;&#xA;&lt;figcaption&gt;Photo: https://www.pexels.com/@jan-van-der-wolf-11680885/&lt;/figcaption&gt;&#xA;&lt;h2 id=&#34;challenge&#34;&gt;Challenge&lt;/h2&gt;&#xA;&lt;p&gt;Over the years, as a developer as part of an organisation, you will work on many different software projects, learn a lot about the business and processes and will have created many software artefacts (packages, libraries, applications, services, architectures, infrastructure, &amp;hellip;).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Melrōse, a language to program and play music</title>
      <link>http://ernestmicklei.com/melrose/introduction_melrose/</link>
      <pubDate>Sun, 21 Nov 2021 14:43:07 +0100</pubDate>
      <guid>http://ernestmicklei.com/melrose/introduction_melrose/</guid>
      <description>&lt;h3 id=&#34;tldr&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;p&gt;Melrōse is both a language and a tool to create and listen to music interactively, The language uses musical primitives (note, sequence, chord) and many functions (map, group, transpose) that can be used to create more complex patterns, loops and tracks. Melrōse uses MIDI output to produce sound by any (hard or software) device attached. Melrōse can also react on MIDI inputs to start, record and stop playing musical objects. A plugin is available for Microsoft Visual Studio for the best usage experience. For a quickstart, without any installation, you can use the &lt;a href=&#34;https://play.melr%C5%8Dse.org&#34;&gt;Melrōse playground&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Drum patterns</title>
      <link>http://ernestmicklei.com/melrose/drumpatterns/</link>
      <pubDate>Tue, 12 May 2020 19:37:44 +0200</pubDate>
      <guid>http://ernestmicklei.com/melrose/drumpatterns/</guid>
      <description>&lt;p&gt;After watching &lt;a href=&#34;https://www.youtube.com/watch?v=tm2BgO1VaRY&amp;amp;t=38s&#34;&gt;Play With Your Rythm: Drum Patterns&lt;/a&gt;, I was inspired to program some of these patterns in Melrōse.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing gmig, infrastructure as code for GCP</title>
      <link>http://ernestmicklei.com/2018/03/introducing-gmig-infrastructure-as-code-for-gcp/</link>
      <pubDate>Wed, 21 Mar 2018 08:10:49 +0100</pubDate>
      <guid>http://ernestmicklei.com/2018/03/introducing-gmig-infrastructure-as-code-for-gcp/</guid>
      <description>&lt;h3 id=&#34;infrastructure-automation&#34;&gt;Infrastructure automation&lt;/h3&gt;&#xA;&lt;p&gt;The Google Cloud Platform (GCP) can provide the IT infrastructure you need to run your own applications or services.&#xA;In addition, the platform also provides many &lt;a href=&#34;https://cloud.google.com/products/&#34;&gt;products&lt;/a&gt; and services that can be used to build your complete IT landscape.&#xA;Setting up infrastructure no longer includes provisioning hardware, patching operating systems and cable wiring up network components.&lt;/p&gt;&#xA;&lt;p&gt;Instead, you now manage resources such as virtual machines, accounts, datastore, networks, enable APIs and setting permissions.&#xA;Basically, given a GCP project, you can have full control of managing such resources using either the Console, the &lt;code&gt;gcloud&lt;/code&gt; tool or even program against their published API using a Google supported library.&lt;/p&gt;</description>
    </item>
    <item>
      <title>GCP Next 2016 Demo</title>
      <link>http://ernestmicklei.com/ubanita/gcpnext2016/</link>
      <pubDate>Sun, 10 Apr 2016 21:29:49 +0100</pubDate>
      <guid>http://ernestmicklei.com/ubanita/gcpnext2016/</guid>
      <description>&lt;p&gt;On March 23,  Q42 and Google Amsterdam organized an event to watch the keynote from the GCP Next 2016 conference held in San Fransico.&lt;/p&gt;&#xA;&lt;p&gt;As the Ubanita platform is hosted on the Google Cloud Platform, we were given the opportunity by &lt;a href=&#34;http://q42.nl&#34;&gt;Q42&lt;/a&gt; to talk about our platform as part of a lightning talk. Ofourse, we had prepared a demo game and the audience was invited to join a simple multiplayer game.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Schedule a Message</title>
      <link>http://ernestmicklei.com/art-of-code/javascript-function-scheduler/</link>
      <pubDate>Tue, 01 Mar 2016 11:28:10 +0100</pubDate>
      <guid>http://ernestmicklei.com/art-of-code/javascript-function-scheduler/</guid>
      <description>&lt;img class=&#34;responsif&#34; src=&#34;http://ernestmicklei.com/art-of-code/javascript-functionscheduler-v8dispatcher.png&#34; alt=&#34;JS-Function-Scheduler&#34; /&gt;&#xA;&lt;p&gt;Updates a linked list of future calls to send a message.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ring Painter</title>
      <link>http://ernestmicklei.com/art-of-code/ring-paint-opengl/</link>
      <pubDate>Sat, 27 Feb 2016 08:18:47 +0100</pubDate>
      <guid>http://ernestmicklei.com/art-of-code/ring-paint-opengl/</guid>
      <description>&lt;img class=&#34;responsif&#34; src=&#34;http://ernestmicklei.com/art-of-code/opengl-ring-paint.png&#34; alt=&#34;Ring Painter&#34; /&gt;&#xA;&lt;p&gt;Algorithm for drawing a 2D ring shape using &lt;a href=&#34;https://github.com/go-gl&#34;&gt;OpenGL bindings&lt;/a&gt; in Go (from the firespark project).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Android Animated Chain</title>
      <link>http://ernestmicklei.com/art-of-code/android-animated-chain/</link>
      <pubDate>Fri, 26 Feb 2016 08:59:56 +0100</pubDate>
      <guid>http://ernestmicklei.com/art-of-code/android-animated-chain/</guid>
      <description>&lt;img class=&#34;responsif&#34; src=&#34;http://ernestmicklei.com/art-of-code/jcraane_animated.png&#34; alt=&#34;Android Animated Chain&#34; /&gt;&#xA;&lt;p&gt;Hiding complexity of Android animators when chaining dependencies.&lt;/p&gt;&#xA;&lt;h4&gt;Thanks to our guest software artist: [Jamie Craane](http://jcraane.blogspot.nl/)&lt;/h4&gt;</description>
    </item>
    <item>
      <title>JSONPath</title>
      <link>http://ernestmicklei.com/art-of-code/forest-jsonpath/</link>
      <pubDate>Thu, 25 Feb 2016 21:13:05 +0100</pubDate>
      <guid>http://ernestmicklei.com/art-of-code/forest-jsonpath/</guid>
      <description>&lt;img class=&#34;responsif&#34; src=&#34;http://ernestmicklei.com/art-of-code/forest-JSONPath.png&#34; alt=&#34;JSONPath&#34; /&gt;&#xA;&lt;p&gt;Implementation of an &lt;code&gt;XPath&lt;/code&gt;-like function for JSON documents to test REST api&amp;rsquo;s using &lt;a href=&#34;https://github.com/emicklei/forest&#34;&gt;forest&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Blocky</title>
      <link>http://ernestmicklei.com/art-of-code/blocky/</link>
      <pubDate>Wed, 24 Feb 2016 08:31:47 +1200</pubDate>
      <guid>http://ernestmicklei.com/art-of-code/blocky/</guid>
      <description>&lt;img  class=&#34;responsif&#34; src=&#34;http://ernestmicklei.com/art-of-code/blocky-dennis-2014.png&#34; alt=&#34;Blocky&#34; /&gt;&#xA;&lt;p&gt;A solution to a level of &lt;a href=&#34;https://blockly-games.appspot.com/maze?lang=en&#34;&gt;Blocky Games Maze&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ring Benchmark Erlang</title>
      <link>http://ernestmicklei.com/art-of-code/ring-benchmark-erlang/</link>
      <pubDate>Tue, 23 Feb 2016 08:31:47 +1200</pubDate>
      <guid>http://ernestmicklei.com/art-of-code/ring-benchmark-erlang/</guid>
      <description>&lt;img class=&#34;responsif&#34; src=&#34;http://ernestmicklei.com/art-of-code/erlang-ring-benchmark-2008.png&#34; alt=&#34;Blocky&#34; /&gt;&#xA;&lt;p&gt;A solution to an exercise from &lt;a href=&#34;https://www.bol.com/nl/p/programming-erlang/9200000015330440/&#34;&gt;Programming Erlang&lt;/a&gt; which I explained &lt;a href=&#34;http://ernestmicklei.com/2008/05/ring-benchmark---my-first-concurrent-erlang/&#34;&gt;here&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>2016 - together, we celebrate</title>
      <link>http://ernestmicklei.com/ubanita/happy2016/</link>
      <pubDate>Fri, 01 Jan 2016 21:29:49 +0100</pubDate>
      <guid>http://ernestmicklei.com/ubanita/happy2016/</guid>
      <description>&lt;iframe title=&#34;Happy New Year 2016&#34; class=&#34;youtube-player&#34; type=&#34;text/html&#34;&#xA;width=&#34;640&#34; height=&#34;390&#34; src=&#34;https://www.youtube.com/embed/Qj6jkB8OooQ&#34;&#xA;frameborder=&#34;0&#34; allowFullScreen&gt;&lt;/iframe&gt;&#xA;&lt;p&gt;This short (2 min) video was created using a simple interactive Ubanita script that translated touch events into Triangle generation.&#xA;See below the interesting part of that program.&lt;/p&gt;&#xA;&lt;p&gt;For each &lt;code&gt;touchMove&lt;/code&gt; event, a random colored Triangle sprite is added.&#xA;For each &lt;code&gt;touchEnd&lt;/code&gt; event, such Triangles are created with a outwards radial velocity.&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-prettyprint&#34; data-lang=&#34;prettyprint&#34;&gt;// touchMove is called when the game detects a movement in a touch&#xA;function touchMove(event) {&#xA;        var dus = {};&#xA;        dust.x = event.data.x;&#xA;        dust.y = event.data.y;&#xA;        dust.fill = randomColor();&#xA;        dust.radius = 12;&#xA;        dust.vx = _.random(-20, 20);&#xA;        dust.vy = _.random(-20, 20);&#xA;        _addTriangle(0, dust)&#xA;    }&#xA;    // when a player moves a (single) touch then call this function&#xA;_on(&amp;#34;touchMove&amp;#34;, touchMove);&#xA;&#xA;// touchEnd is called when the game no longer detects a touch&#xA;function touchEnd(event) {&#xA;    var dus = {};&#xA;    dust.fill = randomColor();&#xA;    dust.radius = 4;&#xA;    for (var e = 0; e &amp;lt; 360; e += 5) {&#xA;        var rad = Math.PI * e / 180.0&#xA;        var cx = Math.cos(rad)&#xA;        var cy = Math.sin(rad)&#xA;&#xA;        dust.x = event.data.x + (5 * cx);&#xA;        dust.y = event.data.y + (5 * cy);&#xA;&#xA;        dust.vx = 200 * cx&#xA;        dust.vy = 200 * cy&#xA;        _addTriangle(0, dust)&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Kimtato, a simple physics playground</title>
      <link>http://ernestmicklei.com/ubanita/kimtato/</link>
      <pubDate>Wed, 18 Nov 2015 21:30:45 +0100</pubDate>
      <guid>http://ernestmicklei.com/ubanita/kimtato/</guid>
      <description>&lt;p&gt;Kimtato is the name of a simple interactive demo that runs on the Ubanita platform.&#xA;It is a playground of physical objects which are created by players using &lt;code&gt;touch&lt;/code&gt; gestures on the controller.&#xA;Once created, the objects can be pushed around using the two-finger gesture, we call &lt;code&gt;edge&lt;/code&gt; input mode.&lt;/p&gt;&#xA;&lt;iframe title=&#34;Lisa plays Kimtato&#34; class=&#34;youtube-player&#34; type=&#34;text/html&#34; &#xA;width=&#34;320&#34; height=&#34;390&#34; src=&#34;https://www.youtube.com/embed/RtzUHoBAkEU&#34;&#xA;frameborder=&#34;0&#34; allowFullScreen&gt;&lt;/iframe&gt;&#xA;&lt;p&gt;The following will discuss the making of this demo using the Ubanita Script API.&lt;/p&gt;&#xA;&lt;h3 id=&#34;get-dimensions&#34;&gt;get dimensions&lt;/h3&gt;&#xA;&lt;p&gt;To position objects on the 2D scene, it can be useful to known the actual dimensions of that scene.&#xA;The scene has two properties for the width (pixels) and height respectively.&#xA;Using this snippet, we assign those property values to global variables &lt;code&gt;W&lt;/code&gt; and &lt;code&gt;H&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Testing your REST api in Go with forest</title>
      <link>http://ernestmicklei.com/2015/07/testing-your-rest-api-in-go-with-forest/</link>
      <pubDate>Sat, 04 Jul 2015 13:28:12 +0700</pubDate>
      <guid>http://ernestmicklei.com/2015/07/testing-your-rest-api-in-go-with-forest/</guid>
      <description>&lt;p&gt;Go package &lt;a title=&#34;forest&#34; href=&#34;https://github.com/emicklei/forest&#34;&gt;forest&lt;/a&gt; was created to simplify the code needed to write real tests of a REST api. Such tests need to setup Http Requests, send them and inspect Http Responses. The Go standard library has all that is needed to achieve this flow but the required amount of code, especially the error handling, makes tests harder to read and longer to write.&lt;/p&gt;&#xA;&lt;img width=&#39;800px&#39; src=&#34;https://storage.cloud.google.com/public_philemonworks_com/forest/treeandskyBottom275.jpg&#34; alt=&#34;forestview&#34; /&gt;&#xA;&lt;h2&gt;Testing github&lt;/h2&gt;&#xA;Let&#39;s create a few tests that examine the response of the public github API call.&#xA;&lt;pre&gt;&lt;code class=&#34;go&#34;&gt;&#xA;package main&#xA;&#xA;import (&#xA;&#x9;&amp;quot;net/http&amp;quot;&#xA;&#x9;&amp;quot;testing&amp;quot;&#xA;&#xA;&#x9;. &amp;quot;github.com/emicklei/forest&amp;quot;&#xA;)&#xA;&#xA;var github = NewClient(&amp;quot;https://api.github.com&amp;quot;, new(http.Client))&#xA;&#xA;func TestForestProjectExists(t *testing.T) {&#xA;&#x9;cfg := NewConfig(&amp;quot;/repos/emicklei/{repo}&amp;quot;, &amp;quot;forest&amp;quot;).Header(&amp;quot;Accept&amp;quot;, &amp;quot;application/json&amp;quot;)&#xA;&#x9;r := github.GET(t, cfg)&#xA;&#x9;ExpectStatus(t, r, 200)&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The package variable &lt;strong&gt;github&lt;/strong&gt; (line 10) is a forest Http client wrapper and provides the api to send Http requests (such as GET). On line 13, the &lt;strong&gt;cfg&lt;/strong&gt; variable is a RequestConfig value that is used to build a http.Request with method,url,headers,body. The variable &lt;strong&gt;r&lt;/strong&gt; is a *http.Response. The ExpectStatus function checks the status code. If the code does not match, then the following will be reported.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Artreyu, an artifact assembly tool</title>
      <link>http://ernestmicklei.com/2015/06/artreyu-an-artifact-assembly-tool/</link>
      <pubDate>Tue, 23 Jun 2015 14:55:18 +0600</pubDate>
      <guid>http://ernestmicklei.com/2015/06/artreyu-an-artifact-assembly-tool/</guid>
      <description>&lt;p&gt;Artreyu is an open-source command line tool for software build pipelines that need to create artifacts which are composed of multiple versioned build parts. The design of this tool is inspired by the Apache Maven project which provides assembly support for Java projects. I created Artreyu to support a project that delivers compositions of many non-Java artifacts of which some are operating system dependent.&lt;/p&gt;&#xA;&lt;p&gt;Artreyu works with a repository to &lt;strong&gt;archive&lt;/strong&gt;, &lt;strong&gt;fetch&lt;/strong&gt; and &lt;strong&gt;assemble&lt;/strong&gt; artifacts. To support remote repositories such as Artifactory and Nexus, Artreyu has a simple plugin architecture ; each plugin is just a binary that gets invoked by the &lt;strong&gt;artreyu&lt;/strong&gt; tool. Sources for the nexus plugin is on &lt;a href=&#34;http://github.com/emicklei/artreyu-nexus&#34;&gt;github.com/emicklei/artreyu-nexus&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Line scanning in Go</title>
      <link>http://ernestmicklei.com/2015/02/line-scanning-in-go/</link>
      <pubDate>Tue, 10 Feb 2015 15:34:07 +0200</pubDate>
      <guid>http://ernestmicklei.com/2015/02/line-scanning-in-go/</guid>
      <description>&lt;p&gt;Today, I needed to keep track of the linenumber while scanning table driven tests. The standard Go bufio.Scanner does not provide such information. Fortunately, in Go you can create your own by embedding the standard type and overriding the right function. That&amp;rsquo;s it.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;go&#34;&gt;import (&#xA;&#x9;&amp;quot;bufio&amp;quot;&#xA;&#x9;&amp;quot;io&amp;quot;&#xA;)&#xA;&#xA;type linescanner struct {&#xA;&#x9;*bufio.Scanner&#xA;&#x9;line int&#xA;}&#xA;&#xA;func newScanner(reader io.Reader) *linescanner {&#xA;&#x9;return &amp;amp;linescanner{bufio.NewScanner(reader), 0}&#xA;}&#xA;&#xA;func (l *linescanner) Scan() bool {&#xA;&#x9;ok := l.Scanner.Scan()&#xA;&#x9;if ok {&#xA;&#x9;&#x9;l.line++&#xA;&#x9;}&#xA;&#x9;return ok&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Guava-like EventBus for Go</title>
      <link>http://ernestmicklei.com/2014/11/guava-like-eventbus-for-go/</link>
      <pubDate>Thu, 13 Nov 2014 10:06:45 +1100</pubDate>
      <guid>http://ernestmicklei.com/2014/11/guava-like-eventbus-for-go/</guid>
      <description>&lt;p&gt;I needed a simple solution to notify components about changes in some global settings.&#xA;In my Java days, I have been using the &lt;a href=&#34;https://code.google.com/p/guava-libraries/&#34;&gt;Guava&lt;/a&gt; Eventbus to solve similar problems, so I decided to cook something that does the basics.&lt;/p&gt;&#xA;&lt;p&gt;From Guava: &amp;ldquo;The EventBus allows publish-subscribe-style communication between components requiring the components to explicitly register with one another (and thus be aware of each other).&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;The Java implementation uses annotations to register components and subscribe its methods to event types. In my Go version, with lack of such annotations, I decided to keep it simpler; just subscribe a function to an event by name. The singleton EventBus value will be an exposed package variable.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Smalltalk collect on Go slice of int</title>
      <link>http://ernestmicklei.com/2014/06/smalltalk-collect-on-go-slice-of-int/</link>
      <pubDate>Sat, 07 Jun 2014 20:39:35 +0600</pubDate>
      <guid>http://ernestmicklei.com/2014/06/smalltalk-collect-on-go-slice-of-int/</guid>
      <description>&lt;pre&gt;&lt;code class=&#34;go&#34;&gt;package main&#xA;&#xA;import &amp;quot;fmt&amp;quot;&#xA;&#xA;type intSlice []int&#xA;&#xA;func (i intSlice) collect(block func(i int) int) intSlice {&#xA;&#x9;r := make(intSlice, len(i))&#xA;&#x9;for j, v := range i {&#xA;&#x9;&#x9;r[j] = block(v)&#xA;&#x9;}&#xA;&#x9;return r&#xA;}&#xA;&#xA;func main() {&#xA;&#x9;numbers := intSlice{1, 2, 3}&#xA;&#x9;squared := func(i int) int { return i * i }&#xA;&#xA;&#x9;fmt.Printf(&amp;quot;%v&amp;quot;, numbers.collect(squared))&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://play.golang.org/p/cJaDPPoZ8q&#34; title=&#34;Try it on play.golang.org&#34;&gt;Try it&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Implementations of select,inject,detect are left as an excercise for the reader.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Javascript CLI in Go using Otto</title>
      <link>http://ernestmicklei.com/2014/02/javascript-cli-in-go-using-otto/</link>
      <pubDate>Wed, 12 Feb 2014 11:52:21 +0200</pubDate>
      <guid>http://ernestmicklei.com/2014/02/javascript-cli-in-go-using-otto/</guid>
      <description>&lt;p&gt;Today, I was playing with &lt;a href=&#34;https://github.com/robertkrimen/otto&#34; title=&#34;Otto&#34;&gt;Otto&lt;/a&gt; and hacked together a small command-line-interface program in &lt;a href=&#34;http://golang.org&#34; title=&#34;Go&#34;&gt;Go&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;go&#34;&gt;package main&#xA;&#xA;import (&#xA;&#x9;&amp;quot;bufio&amp;quot;&#xA;&#x9;&amp;quot;fmt&amp;quot;&#xA;&#x9;&amp;quot;os&amp;quot;&#xA;&#x9;&amp;quot;strings&amp;quot;&#xA;&#xA;&#x9;&amp;quot;github.com/robertkrimen/otto&amp;quot;&#xA;)&#xA;&#xA;var Otto = otto.New()&#xA;&#xA;func main() {&#xA;&#x9;fmt.Println(&amp;quot;otto\n&amp;quot;)&#xA;&#x9;loop()&#xA;}&#xA;&#xA;func dispatch(entry string) string {&#xA;&#x9;if len(entry) == 0 {&#xA;&#x9;&#x9;return entry&#xA;&#x9;}&#xA;&#x9;value, err := Otto.Run(entry)&#xA;&#x9;if err != nil {&#xA;&#x9;&#x9;return err.Error()&#xA;&#x9;} else {&#xA;&#x9;&#x9;return fmt.Sprintf(&amp;quot;%v&amp;quot;, value)&#xA;&#x9;}&#xA;}&#xA;&#xA;func loop() {&#xA;&#x9;for {&#xA;&#x9;&#x9;fmt.Print(&amp;quot;&amp;gt; &amp;quot;)&#xA;&#x9;&#x9;in := bufio.NewReader(os.Stdin)&#xA;&#x9;&#x9;entered, err := in.ReadString(&#39;\n&#39;)&#xA;&#x9;&#x9;if err != nil {&#xA;&#x9;&#x9;&#x9;fmt.Println(err)&#xA;&#x9;&#x9;&#x9;break&#xA;&#x9;&#x9;}&#xA;&#x9;&#x9;entry := strings.TrimLeft(entered[:len(entered)-1], &amp;quot;\t &amp;quot;) // without tabs,spaces and newline&#xA;&#x9;&#x9;output := dispatch(entry)&#xA;&#x9;&#x9;if len(output) &amp;gt; 0 {&#xA;&#x9;&#x9;&#x9;fmt.Println(output)&#xA;&#x9;&#x9;}&#xA;&#x9;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;One cool feature of Otto is the ability to expose your own Go functions in the Javascript namespace.&#xA;This example below adds the function &lt;strong&gt;log&lt;/strong&gt; to print its arguments using the standard log package.&lt;/p&gt;</description>
    </item>
    <item>
      <title>From multiple to single-value context in Go</title>
      <link>http://ernestmicklei.com/2013/11/from-multiple-to-single-value-context-in-go/</link>
      <pubDate>Mon, 25 Nov 2013 22:42:53 +1100</pubDate>
      <guid>http://ernestmicklei.com/2013/11/from-multiple-to-single-value-context-in-go/</guid>
      <description>&lt;p&gt;These are the results of exploring one aspect of the Go language; functions can return multiple values.&#xA;Consider the following simple function:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;go&#34;&gt;func ab() (a,b int) {&#xA;&#x9;a,b = 1,2&#xA;&#x9;return&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Clearly, this function cannot be used in other function calls that expect a single value.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;go&#34;&gt;fmt.Printf(&amp;quot;%v\n&amp;quot;,ab())&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The compiler will help you: &amp;ldquo;multiple-value ab() in single-value context&amp;rdquo;.&lt;/p&gt;&#xA;&lt;p&gt;Now suppose you want to take only the first value without introducing an intermediate variable.&#xA;One possible solution might be to create this helper function:&lt;/p&gt;</description>
    </item>
    <item>
      <title>A case of sizing and draining buffered Go channels</title>
      <link>http://ernestmicklei.com/2013/10/a-case-of-sizing-and-draining-buffered-go-channels/</link>
      <pubDate>Thu, 10 Oct 2013 09:08:38 +1000</pubDate>
      <guid>http://ernestmicklei.com/2013/10/a-case-of-sizing-and-draining-buffered-go-channels/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Based on several comments posted on the Google+ Go community, I rewrote the solution presented here. See past the Conclusion section.&lt;/p&gt;&#xA;&lt;p&gt;Recently, I was asked to write a small program for collecting product promotion information for a large collection of products. Given an input file of product identifiers, the following tasks had to be done:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;read all identifiers from an input file&lt;/li&gt;&#xA;&lt;li&gt;for each identifier, fetch product offer information in XML&lt;/li&gt;&#xA;&lt;li&gt;parse the offer XML into in a DOM document&lt;/li&gt;&#xA;&lt;li&gt;extract all promotions from the offer document&lt;/li&gt;&#xA;&lt;li&gt;for each promotion, export its data into a CSV record&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;A straightforward implementation is to write a function for each task and call them in a nested loop. For this program, I created functions such that the basic flow is quite simple.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hopwatch - a debugging tool for Go</title>
      <link>http://ernestmicklei.com/2012/12/hopwatch-a-debugging-tool-for-go/</link>
      <pubDate>Fri, 14 Dec 2012 19:54:46 +1200</pubDate>
      <guid>http://ernestmicklei.com/2012/12/hopwatch-a-debugging-tool-for-go/</guid>
      <description>&lt;p&gt;Hopwatch is an experimental tool that can help debugging Go programs. Unlike most debuggers, hopwatch requires you to insert function calls at points of interest in your program. At these program locations, you can tell Hopwatch to display variable values and suspend the program (or goroutine). Hopwatch uses Websockets to exchange commands between your program and the debugger running in a HTML5 page.&lt;/p&gt;&#xA;&lt;h2&gt;Using Hopwatch&lt;/h2&gt;&#xA;Basically, there are two functions &lt;strong&gt;Display&lt;/strong&gt; and &lt;strong&gt;Break&lt;/strong&gt;. Calling &lt;strong&gt;Display&lt;/strong&gt; will print the variable,value pairs in the debugger page. Calling &lt;strong&gt;Break&lt;/strong&gt; will suspend the program until you tell the debugger to &lt;strong&gt;Resume&lt;/strong&gt;. The Display function takes one or more pairs of (variable name,value). The Break function takes one or more boolean values to be conditionally. Below is a test example.&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#f92672&#34;&gt;package&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;main&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;github.com/emicklei/hopwatch&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;func&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;main&lt;/span&gt;() {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;; &lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;lt&lt;/span&gt;; &lt;span style=&#34;color:#ae81ff&#34;&gt;6&lt;/span&gt;; &lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;++&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&#x9;&lt;span style=&#34;color:#a6e22e&#34;&gt;hopwatch&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Display&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;i&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&#x9;&lt;span style=&#34;color:#a6e22e&#34;&gt;j&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&#x9;&lt;span style=&#34;color:#a6e22e&#34;&gt;hopwatch&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Display&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;i&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;j&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;j&lt;/span&gt; ).&lt;span style=&#34;color:#a6e22e&#34;&gt;Break&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;j&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;gt&lt;/span&gt;; &lt;span style=&#34;color:#ae81ff&#34;&gt;10&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&#x9;&lt;span style=&#34;color:#a6e22e&#34;&gt;hopwatch&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Break&lt;/span&gt;()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Starting your Go program that includes a Hopwatch function call waits for a connection to the debugger page.&#xA;You can disable Hopwatch by passing the command line parameters &lt;strong&gt;-hopwatch false&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Methods as objects in Go </title>
      <link>http://ernestmicklei.com/2012/11/methods-as-objects-in-go/</link>
      <pubDate>Mon, 26 Nov 2012 12:18:09 +1100</pubDate>
      <guid>http://ernestmicklei.com/2012/11/methods-as-objects-in-go/</guid>
      <description>&lt;p&gt;In an &lt;a href=&#34;http://ernestmicklei.com/2012/11/13/first-class-functions-in-go/&#34;&gt;earlier post&lt;/a&gt;, I discussed an example of using plain functions as objects. Today, I investigated solutions for using Methods as objects. As I understand it, Go methods are functions that are &amp;ldquo;bound&amp;rdquo; to a named type that is not a pointer or an interface.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#f92672&#34;&gt;package&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;main&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;fmt&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;type&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;T&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;struct&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&lt;span style=&#34;color:#a6e22e&#34;&gt;S&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;string&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;func&lt;/span&gt; (&lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;T&lt;/span&gt;) &lt;span style=&#34;color:#a6e22e&#34;&gt;GetS1&lt;/span&gt;() &lt;span style=&#34;color:#66d9ef&#34;&gt;string&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;S&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;func&lt;/span&gt; (&lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;T&lt;/span&gt;) &lt;span style=&#34;color:#a6e22e&#34;&gt;GetS2&lt;/span&gt;() &lt;span style=&#34;color:#66d9ef&#34;&gt;string&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;S&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;func&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;main&lt;/span&gt;() {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;T&lt;/span&gt;{&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;hello&amp;#34;&lt;/span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&lt;span style=&#34;color:#a6e22e&#34;&gt;f&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;:=&lt;/span&gt; (&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;T&lt;/span&gt;).&lt;span style=&#34;color:#a6e22e&#34;&gt;GetS1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&lt;span style=&#34;color:#a6e22e&#34;&gt;g&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;:=&lt;/span&gt; (&lt;span style=&#34;color:#a6e22e&#34;&gt;T&lt;/span&gt;).&lt;span style=&#34;color:#a6e22e&#34;&gt;GetS1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&lt;span style=&#34;color:#a6e22e&#34;&gt;h&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;:=&lt;/span&gt; (&lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;T&lt;/span&gt;).&lt;span style=&#34;color:#a6e22e&#34;&gt;GetS2&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&lt;span style=&#34;color:#75715e&#34;&gt;// i := (T).GetS2   // invalid method expression T.GetS2 (needs pointer receiver: (*T).GetS2)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&lt;span style=&#34;color:#a6e22e&#34;&gt;fmt&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Printf&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;%v, %v %v, who is there?&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;f&lt;/span&gt;(&lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;) ,&lt;span style=&#34;color:#a6e22e&#34;&gt;g&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;), &lt;span style=&#34;color:#a6e22e&#34;&gt;h&lt;/span&gt;(&lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;http://play.golang.org/p/JTlPvP-z80&#34;&gt;Run it&lt;/a&gt; yourself.&lt;/p&gt;</description>
    </item>
    <item>
      <title>go-restful first working example</title>
      <link>http://ernestmicklei.com/2012/11/go-restful-first-working-example/</link>
      <pubDate>Sat, 24 Nov 2012 20:13:06 +1100</pubDate>
      <guid>http://ernestmicklei.com/2012/11/go-restful-first-working-example/</guid>
      <description>&lt;p&gt;In a &lt;a href=&#34;http://ernestmicklei.com/2012/11/11/go-restful-api-design/&#34;&gt;previous post&lt;/a&gt;, I discussed the design of &lt;a href=&#34;http://go.pkgdoc.org/github.com/emicklei/go-restful&#34;&gt;go-restful&lt;/a&gt; which is a package for building REST-style WebServices using the Google Go programming language.&lt;/p&gt;&#xA;&lt;p&gt;Today, I completed the implementation of that package which provides the basics:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&#x9;&lt;li&gt;Creating a WebService with Routes (mapping between Http Request and a Go function)&lt;/li&gt;&#xA;&#x9;&lt;li&gt;Each Route requires information about the Http method (GET,POST,...), URL Path (/users..), Mime-types and the function it binds to&lt;/li&gt;&#xA;&#x9;&lt;li&gt;Functions get passed in a Request and a Response&lt;/li&gt;&#xA;&#x9;&lt;li&gt;The Request is used to access Path and Query parameters , Headers and request content (XML, JSON,...)&lt;/li&gt;&#xA;&#x9;&lt;li&gt;The Response is used to set Status, Headers, and response content&lt;/li&gt;&#xA;&#x9;&lt;li&gt;Both Request and Response can Unmarshal and Marshal objects to and from XML,JSON using the standard packages&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;All of this can best be illustrated with a small example ; a Webservice for CRUD operations on User objects.&#xA;We start by creating the file &lt;strong&gt;userservice.go&lt;/strong&gt; inside its own folder &lt;strong&gt;userservice&lt;/strong&gt;.&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#f92672&#34;&gt;package&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;userservice&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; (&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;github.com/emicklei/go-restful&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;log&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;type&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;User&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;struct&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&lt;span style=&#34;color:#a6e22e&#34;&gt;Id&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;Name&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;string&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Type &lt;strong&gt;User&lt;/strong&gt; represents our domain object.&lt;/p&gt;</description>
    </item>
    <item>
      <title>First class functions in Go</title>
      <link>http://ernestmicklei.com/2012/11/first-class-functions-in-go/</link>
      <pubDate>Tue, 13 Nov 2012 20:49:18 +1100</pubDate>
      <guid>http://ernestmicklei.com/2012/11/first-class-functions-in-go/</guid>
      <description>&lt;p&gt;Today, I played with functions as objects in the Go programming language. If functions are &lt;a href=&#34;http://en.wikipedia.org/wiki/First-class_citizen&#34;&gt;first class citizens&lt;/a&gt; in Go then it must be possible to store them in fields of a struct, pass them as arguments to other functions and use them as return values of other functions.&lt;/p&gt;&#xA;&lt;p&gt;So I visited &lt;a href=&#34;http://play.golang.org/&#34;&gt;play.golang.org&lt;/a&gt; for putting together a simple program that demonstrates this.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#f92672&#34;&gt;package&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;main&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;fmt&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;func&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;CallWith&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;f&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;func&lt;/span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;string&lt;/span&gt;), &lt;span style=&#34;color:#a6e22e&#34;&gt;who&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;string&lt;/span&gt;) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&lt;span style=&#34;color:#a6e22e&#34;&gt;f&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;who&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;type&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;FunctionHolder&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;struct&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&lt;span style=&#34;color:#a6e22e&#34;&gt;Function&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;func&lt;/span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;string&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;func&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;main&lt;/span&gt;() {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&lt;span style=&#34;color:#a6e22e&#34;&gt;holder&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;FunctionHolder&lt;/span&gt;{ &lt;span style=&#34;color:#66d9ef&#34;&gt;func&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;who&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;string&lt;/span&gt;) { &lt;span style=&#34;color:#a6e22e&#34;&gt;fmt&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Println&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Hello,&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;who&lt;/span&gt;) }}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&lt;span style=&#34;color:#a6e22e&#34;&gt;CallWith&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;holder&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Function&lt;/span&gt;,&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;ernest&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;&#xA;&#x9;&lt;li&gt;The &lt;strong&gt;CallWith&lt;/strong&gt; function takes a one string parameter function &lt;strong&gt;f&lt;/strong&gt; and a string parameter &lt;strong&gt;who&lt;/strong&gt;. The body of the CallWith function evaluates the function parameter with the string parameter.&lt;/li&gt;&#xA;&#x9;&lt;li&gt;The &lt;strong&gt;FunctionHolder&lt;/strong&gt; is a struct type with a field called &lt;strong&gt;Function&lt;/strong&gt; which must be a function with a string parameter.&lt;/li&gt;&#xA;&#x9;&lt;li&gt;In the &lt;strong&gt;main&lt;/strong&gt; function, a FunctionHolder is created initializing the Function field with a function that prints an Hello message.&lt;/li&gt;&#xA;&#x9;&lt;li&gt;Next in the main function, the CallWith function is called with the Function value of the holder and a string value.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;On &lt;a href=&#34;http://play.golang.org/&#34;&gt;play.golang.org&lt;/a&gt; can run &lt;a href=&#34;http://play.golang.org/p/TUxdMnv4Db&#34;&gt;this program&lt;/a&gt; yourself&lt;/p&gt;</description>
    </item>
    <item>
      <title>go-restful api design</title>
      <link>http://ernestmicklei.com/2012/11/go-restful-api-design/</link>
      <pubDate>Sun, 11 Nov 2012 21:18:54 +1100</pubDate>
      <guid>http://ernestmicklei.com/2012/11/go-restful-api-design/</guid>
      <description>&lt;p&gt;I have been using &lt;a title=&#34;JAX-RS&#34; href=&#34;http://jax-rs-spec.java.net/&#34;&gt;JAX-RS&lt;/a&gt; for many REST-based service implementations in Java.&lt;/p&gt;&#xA;&lt;p&gt;As part of my journey into the Google Go programming language, I am exploring designs for such REST support using the standard net/http package in Go.&lt;/p&gt;&#xA;&lt;p&gt;JAX-RS provides a set of Annotation classes which can be used to add meta-data to classes, methods and method arguments. In JAX-RS these annotation are used to specify the mapping between a Http Request to a Java method and its arguments.&lt;/p&gt;</description>
    </item>
    <item>
      <title>renderShark - lean application server for renderSnake</title>
      <link>http://ernestmicklei.com/2012/08/rendershark-lean-application-server-for-rendersnake/</link>
      <pubDate>Sun, 26 Aug 2012 19:43:18 +0800</pubDate>
      <guid>http://ernestmicklei.com/2012/08/rendershark-lean-application-server-for-rendersnake/</guid>
      <description>&lt;p&gt;I started working on this &amp;ldquo;yet-another-web-server&amp;rdquo; project for one of the most important reasons: because its fun. I got inspired for doing this after reading about the Netty framework and all the positive reviews that people write.&lt;/p&gt;&#xA;&lt;p&gt;My requirements for this server are&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&#x9;&lt;li&gt;provide a minimal MVC framework that uses &lt;a href=&#34;http://rendersnake.org&#34;&gt;renderSnake&lt;/a&gt; to render HTML pages&lt;/li&gt;&#xA;&#x9;&lt;li&gt;(distributed) Http session management using &lt;a href=&#34;http://www.jboss.org/infinispan/&#34;&gt;JBOSS Infinispan&lt;/a&gt;, a modern caching solution&lt;/li&gt;&#xA;&#x9;&lt;li&gt;use &lt;a href=&#34;http://netty.io&#34;&gt;Netty&lt;/a&gt; , a well-designed fast server framework which I will use for its HTTP support&lt;/li&gt;&#xA;&#x9;&lt;li&gt;components are wired together using &lt;a href=&#34;http://code.google.com/p/google-guice/&#34;&gt;Guice&lt;/a&gt;, a lean dependency injection library&lt;/li&gt;&#xA;&#x9;&lt;li&gt;support for a minimal feature set to run Web applications&#xA;&lt;ul&gt;&#xA;&#x9;&lt;li&gt;GET, POST&lt;/li&gt;&#xA;&#x9;&lt;li&gt;Redirects,Forwards&lt;/li&gt;&#xA;&#x9;&lt;li&gt;Sessions, Cookies&lt;/li&gt;&#xA;&#x9;&lt;li&gt;Error Handling (404,500,...)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&#x9;&lt;li&gt;Logging using &lt;a href=&#34;http://www.slf4j.org/&#34;&gt;SLF4j&lt;/a&gt;&lt;/li&gt;&#xA;&#x9;&lt;li&gt;Basic static content serving&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;To &#34;eat my own dogfood&#34;, I re-implemented the &lt;a title=&#34;renderSake site&#34; href=&#34;http://rendersnake.org&#34;&gt;renderSnake website&lt;/a&gt; (which is just a Java application) using the renderShark engine.&#xA;&lt;p&gt;The project is &lt;a href=&#34;http://rendershark.googlecode.com&#34;&gt;hosted&lt;/a&gt; on googlecode.  Have a look at the &lt;a title=&#34;example project&#34; href=&#34;https://code.google.com/p/rendershark/source/browse/#svn%2Ftrunk%2Frendershark-example%2Fsrc%2Fmain%2Fjava%2Forg%2Frendershark%2Fexample%253Fstate%253Dclosed&#34;&gt;example project&lt;/a&gt; that demonstrates all the features.&lt;/p&gt;</description>
    </item>
    <item>
      <title>6hoek.com, a showcase for renderSnake</title>
      <link>http://ernestmicklei.com/2011/08/6hoek.com-a-showcase-for-rendersnake/</link>
      <pubDate>Tue, 23 Aug 2011 20:14:48 +0800</pubDate>
      <guid>http://ernestmicklei.com/2011/08/6hoek.com-a-showcase-for-rendersnake/</guid>
      <description>&lt;p&gt;For the past month, I have been working on a new iPad Web application that recently was launched at 6hoek.com.&#xA;This application provides easy access to the complete product catalog of the Dutch online webshop &lt;a title=&#34;bol.com&#34; href=&#34;http://www.bol.com&#34;&gt;bol.com&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Because it is targeted to owners of tablet devices such as the Apple iPad, I decided to embrace the upcoming &lt;a href=&#34;http://jquerymobile.com&#34;&gt;JQuery Mobile&lt;/a&gt; framework (JQM), an open-source Javascript library that provides an unified UI to various mobile devices. For producing the HTML markup, I (obviously) choose &lt;a href=&#34;http://rendersnake.org&#34;&gt;renderSnake&lt;/a&gt;, an open-source HTML component library that promotes writing UI components in Java instead of templates.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Getting from HTML design to renderSnake components</title>
      <link>http://ernestmicklei.com/2011/03/getting-from-html-design-to-rendersnake-components/</link>
      <pubDate>Thu, 03 Mar 2011 21:22:33 +0300</pubDate>
      <guid>http://ernestmicklei.com/2011/03/getting-from-html-design-to-rendersnake-components/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/emicklei/rendersnake&#34;&gt;rendersnake&lt;/a&gt; is a Java library for creating components and pages that produce HTML using only Java. Its purpose is to support the creation of Web applications that are better maintainable, allows for easier reuse, have testable UI components and produces compact HTML in an efficient way.&lt;/p&gt;&#xA;&lt;p&gt;This blog post explains how to start from a carefully designed rich HTML page and create new or use the components available in the library.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using renderSnake to build the presentation layer in Spring-MVC</title>
      <link>http://ernestmicklei.com/2011/02/using-rendersnake-to-build-the-presentation-layer-in-spring-mvc/</link>
      <pubDate>Sun, 13 Feb 2011 18:57:58 +0200</pubDate>
      <guid>http://ernestmicklei.com/2011/02/using-rendersnake-to-build-the-presentation-layer-in-spring-mvc/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://rendersnake.org&#34;&gt;renderSnake&lt;/a&gt; is a open-source library for creating components that produce HTML using only Java. By defining Java classes for HTML components and pages you can exploit all the language features (e.g. inheritance, composition, type-checking) and IDE tooling (e.g. refactoring, unit-testing, references search, debugging,&amp;hellip;). In addition, renderSnake is designed to produce compact HTML in an memory efficient way.&lt;/p&gt;&#xA;&lt;h4&gt;The &#34;V&#34; in MVC&lt;/h4&gt;&#xA;Basically, renderSnake is responsible for the presentation layer of a Web application. It has no dependencies with an application framework but it does provide classes to integrate with other technologies such as &lt;a href=&#34;http://www.oracle.com/technetwork/java/javaee/jsp/index.html&#34;&gt;JavaServer Pages&lt;/a&gt; and &lt;a href=&#34;http://static.springsource.org/spring/docs/2.0.x/reference/mvc.html&#34;&gt;Spring-MVC&lt;/a&gt;. Spring-MVC is a popular implementation of the &lt;a href=&#34;http://en.wikipedia.org/wiki/Model%E2%80%93View%E2%80%93Controller&#34;&gt;MVC architecture&lt;/a&gt;. This pattern isolates &#34;domain logic&#34; (the application logic for the user) from the user interface (input and presentation), permitting independent development, testing and maintenance of each (separation of concerns).&#xA;&lt;h4&gt;Example&lt;/h4&gt;&#xA;Below is an example of a Spring-MVC based setup of components. ProductListController is a component that is responsible to handling incoming requests. That execution starts by retrieving the Product objects (Model) through a Product Data Access Object. Then a ProductListPage object is created and asked to render itself. Each UI component that is part of the ProductListPage is asked to do the same. The response will have the resulting HTML content.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;missing image /2011/02/spring-mvc-rendersnake.png&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h4&gt;Controller&lt;/h4&gt;&#xA;The method below is part of the ProductListController and is called with a prepared HtmlCanvas object that captures the request,response and output writer. Before rendering the page using the HtmlCanvas, all required domain objects are retrieved and made available to the PageContext (Map) of the HtmlCanvas object. Now the HtmlCanvas has all the information needed to perform the rendering phase.&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;@RequestMapping&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/productlist.html&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;@ResponseBody&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;void&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;showProductListPage&lt;/span&gt;(HtmlCanvas html) &lt;span style=&#34;color:#66d9ef&#34;&gt;throws&lt;/span&gt; IOException {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        html.&lt;span style=&#34;color:#a6e22e&#34;&gt;getPageContext&lt;/span&gt;().&lt;span style=&#34;color:#a6e22e&#34;&gt;set&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;products&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#66d9ef&#34;&gt;this&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;productListDao&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;getBestSellersProductList&lt;/span&gt;());&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        html.&lt;span style=&#34;color:#a6e22e&#34;&gt;render&lt;/span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;new&lt;/span&gt; WebshopLayoutWrapper(&lt;span style=&#34;color:#66d9ef&#34;&gt;new&lt;/span&gt; ProductListPage())));&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4&gt;View&lt;/h4&gt;&#xA;Using renderSnake, the View layer is implemented by a collection of small, potentially reusable, UI component classes that are composed into Page objects that represent HTML content.&#xA;&lt;p&gt;Class &lt;strong&gt;Head&lt;/strong&gt; is an example UI component responsible for rendering the &lt;em&gt;head&lt;/em&gt; section of every HTML page. It implements the &lt;strong&gt;Renderable&lt;/strong&gt; interface and uses the HtmlCanvas parameter object for rendering. The HtmlCanvas object has methods of all elements (tags) in order to write HTML content. Using the HtmlAttributesFactory, you can specify the attributes for each HTML tag. By convention, the method source has a format that uses indentation to see the nesting of tags. This is not required but improves its readability.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Soek.goodies.st improved</title>
      <link>http://ernestmicklei.com/2010/09/soek.goodies.st-improved/</link>
      <pubDate>Wed, 29 Sep 2010 08:25:47 +0900</pubDate>
      <guid>http://ernestmicklei.com/2010/09/soek.goodies.st-improved/</guid>
      <description>&lt;p&gt;The site &lt;a href=&#34;http://soek.goodies.st&#34;&gt;soek.goodies.st&lt;/a&gt; gives access to the sources of open-source Smalltalk libraries and frameworks. A big advantage to developers is that they can explore Smalltalk classes without having to successfully load them into one of the Smalltalk dialect platforms.  Recently, I have changed much of the Smalltalk generator and HTML/Javascript generated code.&lt;/p&gt;&#xA;&lt;p&gt;Formerly, all Smalltalk source was highlighted using a client-side Javascript library. This resulted in long page loading times because it had to iterate through all DOM elements and replace the HTML content by a post-processing (using regex) result. Current version of Soek uses a highlighter written in Smalltalk that can pre-process all class source files.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Melissa for VA Smalltalk</title>
      <link>http://ernestmicklei.com/2010/07/melissa-for-va-smalltalk/</link>
      <pubDate>Thu, 29 Jul 2010 19:20:24 +0700</pubDate>
      <guid>http://ernestmicklei.com/2010/07/melissa-for-va-smalltalk/</guid>
      <description>&lt;p&gt;Melissa is a simple tool that can help in building development and runtime images in a continous integration environment. It is being used extensively to create daily builds for Smalltalk images. This post describes the steps to use Melissa for VA Smalltalk 8+.&lt;/p&gt;&#xA;&lt;p&gt;The intended way to use Melissa is to start with a clean VA image, load the Melissa config app and save it as melissa.im. In order to tell Melissa what to build, you need to start that image passing the command line parameter &amp;ldquo;-melissa buildscript.ws&amp;rdquo; like:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Google API access from Smalltalk using JNIPort</title>
      <link>http://ernestmicklei.com/2010/04/google-api-access-from-smalltalk-using-jniport/</link>
      <pubDate>Thu, 29 Apr 2010 05:13:13 +0400</pubDate>
      <guid>http://ernestmicklei.com/2010/04/google-api-access-from-smalltalk-using-jniport/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://jniport.wikispaces.com/&#34;&gt;JNIPort&lt;/a&gt; for VisualWorks provides a way to use Java and its huge number of available libraries directly from Smalltalk.&lt;/p&gt;&#xA;&lt;p&gt;For example, to access the &lt;a href=&#34;http://code.google.com/apis/spreadsheets/data/3.0/developers_guide_java.html#ClientLogin&#34;&gt;Google Spreadsheets APIs and Tools&lt;/a&gt;, you need to download the &lt;a href=&#34;http://code.google.com/p/gdata-java-client/&#34;&gt;Java client libraries&lt;/a&gt; and all its dependencies. The paths to there Jars must be known to the JVM and can be set through JNIPort. For easy deployment, I put together a single jar using an &lt;a href=&#34;http://public.philemonworks.com.s3.amazonaws.com/ant-build-gdata-with-deps.xml&#34;&gt;Ant build script&lt;/a&gt; such that the Runtime settings could be:&lt;/p&gt;</description>
    </item>
    <item>
      <title>JQTouch library support for Seaside</title>
      <link>http://ernestmicklei.com/2010/01/jqtouch-library-support-for-seaside/</link>
      <pubDate>Sat, 23 Jan 2010 14:32:19 +0100</pubDate>
      <guid>http://ernestmicklei.com/2010/01/jqtouch-library-support-for-seaside/</guid>
      <description>&lt;p&gt;One way to build applications for the iPhone is to create a Web application that tries to look and behave like a native one. Currently, many Javascript libraries are being developed that try to accomplish just that. One of the big reasons for choosing this route is that developing such applications is so much easier compared to the Apple-way (learn Objective-C, build and test on the local emulator and try to get it accepted by AppleStore).&lt;/p&gt;</description>
    </item>
    <item>
      <title>soek.goodies.st - exploring open-source Smalltalk libraries</title>
      <link>http://ernestmicklei.com/2009/11/soek.goodies.st-exploring-open-source-smalltalk-libraries/</link>
      <pubDate>Fri, 13 Nov 2009 21:48:13 +1100</pubDate>
      <guid>http://ernestmicklei.com/2009/11/soek.goodies.st-exploring-open-source-smalltalk-libraries/</guid>
      <description>&lt;p&gt;Soek is a Smalltalk application that provides a different way to navigate through documentation and source code of a Smalltalk library. Instead of the classic multi-list browser view in an image, Soek offers a flat view on all methods and classes and is build using the Seaside Web framework.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;missing image  /2009/11/screen-shot-2009-11-13-at-6-33-24-pm.png&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I discovered this way of publishing a framework when I worked with Rails and did most of my searches on &lt;a href=&#34;http://railsbrain.com&#34;&gt;Railsbrain.com&lt;/a&gt;. Not only I could easily find a particular class or method, it also showed me similar methods, other implementations, classes and their sources. The learning effect was great and it became my standard search tool and recommendation to others.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Making a package visible to WebVelocity</title>
      <link>http://ernestmicklei.com/2009/09/making-a-package-visible-to-webvelocity/</link>
      <pubDate>Sat, 12 Sep 2009 19:13:21 +0900</pubDate>
      <guid>http://ernestmicklei.com/2009/09/making-a-package-visible-to-webvelocity/</guid>
      <description>&lt;p&gt;If you want an existing package to register as a WebVelocity one and as a result make it visible to the browser page, you can evaluate this script:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;(Store.Registry packageNamed: &amp;#39;Your-Package-Name&amp;#39;)&#xA;&#x9;propertyAt: #application put: true;&#xA;&#x9;propertyAt: #namespace put: &amp;#39;Your-Namespace&amp;#39;;&#xA;&#x9;propertyAt: #velocityThemeName put: &amp;#39;Default&amp;#39;.&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;which I found when looking for the &lt;strong&gt;newApplication&lt;/strong&gt; functionality in the image.&lt;/p&gt;</description>
    </item>
    <item>
      <title>HypertextLogger for server application logs</title>
      <link>http://ernestmicklei.com/2009/06/hypertextlogger-for-server-application-logs/</link>
      <pubDate>Mon, 22 Jun 2009 19:53:39 +0600</pubDate>
      <guid>http://ernestmicklei.com/2009/06/hypertextlogger-for-server-application-logs/</guid>
      <description>&lt;p&gt;Logging can be very helpful in analyzing the (faulty) behavior of a server application in response to client requests. HypertextLogger is a simple component that produces HTML in response to logging instructions. Its main purpose it to provide a better readable log file. By choosing you favorite CSS, you can highlight what is important and leave other information unfocused (timestamps).&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;missing image /2009/06/hypertextlogger.png&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Upon creation of the logger, it produces a new .html file to which logging events are written. Because most Browsers can deal with open-ended (i.e. not properly closed by tags) HTML files, a single page can be used to collect lots of events. And if you let e.g. Apache serve these log files, you can monitor server applications remotely.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Getting started with Glare-DataServices</title>
      <link>http://ernestmicklei.com/2009/05/getting-started-with-glare-dataservices/</link>
      <pubDate>Tue, 26 May 2009 19:30:41 +0500</pubDate>
      <guid>http://ernestmicklei.com/2009/05/getting-started-with-glare-dataservices/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://glare.googlecode.com&#34;&gt;Glare-DataServices&lt;/a&gt; is a framework for building Flex Remoting services in &lt;a href=&#34;http://www.cincomsmalltalk.com&#34;&gt;VisualWorks Smalltalk&lt;/a&gt;. In this post, I will guide you through the steps for creating a small application that demonstrates the use of the framework.&lt;/p&gt;&#xA;&lt;h2 id=&#34;install-the-bundle&#34;&gt;Install the bundle&lt;/h2&gt;&#xA;&lt;p&gt;First, you have to connect to the &lt;a href=&#34;http://www.cincomsmalltalk.com/CincomSmalltalkWiki/PostgreSQL+Access+Page&#34;&gt;Cincom Public Store Repository&lt;/a&gt;. Then open the list of Published Items and load the bundle GlareDataServices. It includes the Glare bundle and Glare-DataServices packages. The required dependencies AT MetaNumerics and Opentalk are automatically loaded if not present.&lt;/p&gt;</description>
    </item>
    <item>
      <title>VAStGoodies.com services API</title>
      <link>http://ernestmicklei.com/2009/04/vastgoodies.com-services-api/</link>
      <pubDate>Fri, 24 Apr 2009 16:01:37 +0400</pubDate>
      <guid>http://ernestmicklei.com/2009/04/vastgoodies.com-services-api/</guid>
      <description>&lt;p&gt;To make the VAStGoodies client work right from the VA image, I needed a service API in addition to the Seaside application that is running on &lt;a href=&#34;http://vastgoodies.com&#34;&gt;VAStGoodies.com&lt;/a&gt;. Requirements for that service include &amp;ldquo;get all available configuration map names&amp;rdquo; and &amp;ldquo;get a download url for a particular version of a configuration map&amp;rdquo;.&lt;/p&gt;&#xA;&lt;p&gt;Instead of implementing a full-blown end-to-end SOAP based Webservice, I decided to implement a much leaner RPC-style design that simply returns Smalltalk expressions.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Getting Monticello package changes into VisualWorks</title>
      <link>http://ernestmicklei.com/2009/04/getting-monticello-package-changes-into-visualworks/</link>
      <pubDate>Thu, 23 Apr 2009 09:09:45 +0400</pubDate>
      <guid>http://ernestmicklei.com/2009/04/getting-monticello-package-changes-into-visualworks/</guid>
      <description>&lt;p&gt;The &lt;a href=&#34;http://cloudfork.googlecode.com&#34;&gt;Cloudfork&lt;/a&gt; project is available for the three larger Smalltalk implementations: Squeak/Pharo, VA Smalltalk and VisualWorks. For maintaining the ports based on the Squeak implementation, we use the &lt;a href=&#34;http://www.squeaksource.com/Seaside&#34;&gt;Package-Exporters&lt;/a&gt; package.&lt;/p&gt;&#xA;&lt;p&gt;For porting to VA Smalltalk, we are using the VAPackageExporter as &lt;a href=&#34;http://www.a3aan.st/sunrise/porting+from+squeak+to+va+smalltalk+(or+how+to+keep+your+va+smalltalk+seaside+up-to-date)&#34;&gt;explained&lt;/a&gt; by Adriaan van Os. One important feature is the ability to maintain the port based on the changes to a project rather than repeating the all-in-one export.&lt;/p&gt;&#xA;&lt;p&gt;For maintaining the VisualWorks port of Cloudfork, I extended the Package-Exporters project with a VWPatchExporter that can be used to export changes in the VisualWorks XML format. Having this feature, I can write the following expression to export only the additions/removals and changes to our project:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Changing the browser font in VisualWorks</title>
      <link>http://ernestmicklei.com/2009/04/changing-the-browser-font-in-visualworks/</link>
      <pubDate>Fri, 10 Apr 2009 20:07:58 +0400</pubDate>
      <guid>http://ernestmicklei.com/2009/04/changing-the-browser-font-in-visualworks/</guid>
      <description>&lt;p&gt;Today I spent some time figuring out if and how I could change to default text font of the Smalltalk browsers in VisualWorks (76nc). For years I have been using my favorite coding font &lt;a href=&#34;http://www.donationcoder.com/Software/Jibz/Dina/&#34;&gt;Dina&lt;/a&gt; (Win only) in any other tool such as Eclipse. Having this font also in VisualWorks would be very pleasing.&lt;/p&gt;&#xA;&lt;p&gt;So I browsed through the source code of Look policies, Font policies and Font descriptions to find any clues. I was prepared to hack any method for this cause. Then I stumbled upon a little tool to assign Fonts to text styles:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Executable operation specifcations in Glare-DataServices</title>
      <link>http://ernestmicklei.com/2009/04/executable-operation-specifcations-in-glare-dataservices/</link>
      <pubDate>Sun, 05 Apr 2009 21:51:18 +0400</pubDate>
      <guid>http://ernestmicklei.com/2009/04/executable-operation-specifcations-in-glare-dataservices/</guid>
      <description>&lt;p&gt;Glare&amp;lt; is a Flex Remoting and Messaging server written in VisualWorks Smalltalk by Philipp Bunge. I am extending his work with Glare-DataServices which basically provides a HttpServlet that dispatches operation invocations send from a AMF client (Flex,AIR) to Smalltalk objects.&lt;/p&gt;&#xA;&lt;p&gt;To work with Glare-DataServices, you need Smalltalk classes that implement operations and ActionScript classes that have corresponding methods in which these operations are invoked remotely. Because both classes (client and server-side) must have the same signature, it is clear that code generation can be very helpful.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Method Categorization and Browse Unsent for VA Smalltalk</title>
      <link>http://ernestmicklei.com/2009/03/method-categorization-and-browse-unsent-for-va-smalltalk/</link>
      <pubDate>Fri, 27 Mar 2009 12:15:21 +0300</pubDate>
      <guid>http://ernestmicklei.com/2009/03/method-categorization-and-browse-unsent-for-va-smalltalk/</guid>
      <description>&lt;p&gt;Method categorization is an important part of documenting the interface of classes, which is quite unique to Smalltalk to my knowledge. Therefore most developers spent time reorganization their methods in commonly known categories such as &lt;strong&gt;initialize-release&lt;/strong&gt;, &lt;strong&gt;accessing &lt;/strong&gt;and &lt;strong&gt;instance creation&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;PhilemonToolMethodCategories is a goodie that contains some extensions to the standard browsers that deal with categorization. In particular, it offers a different &amp;ldquo;Move to category&amp;hellip;&amp;rdquo; menu item that pops up a menu with existing categories and another submenu with suggested category names. You can change the default list on a per-user basis like this:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Class Search Browser for VA Smalltalk</title>
      <link>http://ernestmicklei.com/2009/03/class-search-browser-for-va-smalltalk/</link>
      <pubDate>Wed, 25 Mar 2009 16:02:44 +0300</pubDate>
      <guid>http://ernestmicklei.com/2009/03/class-search-browser-for-va-smalltalk/</guid>
      <description>&lt;p&gt;The Classes Interface Browser is a small search tool to quickly find a Smalltalk class or one of its methods. The two inputs fields on top provide filters for class names and method names of that class. From a selected class or method, you can open a Class Browser by double-clicking. Using the list popup menus, you can navigate (superclass, subclasses&amp;hellip;) in the class hierarchy, add a breakpoint and navigate (redefined, overridden) in the method implementation hierarchy.&lt;/p&gt;</description>
    </item>
    <item>
      <title>VAStGoodies.com Statistics</title>
      <link>http://ernestmicklei.com/2009/03/vastgoodies.com-statistics/</link>
      <pubDate>Wed, 25 Mar 2009 08:39:28 +0300</pubDate>
      <guid>http://ernestmicklei.com/2009/03/vastgoodies.com-statistics/</guid>
      <description>&lt;p&gt;&lt;a class=&#34;external&#34; title=&#34;http://VAStGoodies.com&#34; href=&#34;http://vastgoodies.com/&#34;&gt;VAStGoodies.com&lt;/a&gt; is the open source software repository for the VA Smalltalk community which was &lt;a title=&#34;announced&#34; href=&#34;http://a3aan.st/sunrise/vastgoodies.com+launched&#34;&gt;launched&lt;/a&gt; early this year by Adriaan van Os. As of today, the vastgoodies site has been extended with a page showing the activity statistics. Main purpose of this page is to let the community see that contributions are indeed downloaded and to give credits to those that maintain them.&lt;/p&gt;&#xA;&lt;p&gt;Similar information has been available on &lt;a href=&#34;http://www.squeaksource.com&#34;&gt;Squeaksource&lt;/a&gt; for some time now and I was surprised to experience the effects on me with this kind of monitoring. When working on the &lt;a href=&#34;http://www.squeaksource.com/Cloudfork.html&#34;&gt;Cloudfork&lt;/a&gt; packages for Squeak, the downloads statistics gives us immediately feedback about whether developers are interested. And a few times it felt like a contest to see whether I or the project could be the top committer for a while :-)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Navigating Inspector for VA Smalltalk</title>
      <link>http://ernestmicklei.com/2009/03/navigating-inspector-for-va-smalltalk/</link>
      <pubDate>Thu, 19 Mar 2009 14:23:11 +0300</pubDate>
      <guid>http://ernestmicklei.com/2009/03/navigating-inspector-for-va-smalltalk/</guid>
      <description>&lt;p&gt;This goodie is also known as the &amp;ldquo;Diving&amp;rdquo; inspector as it allows you to navigate through an object structure by following each variable on a double-click. The inspection depth is shown in the inspector just above the &amp;ldquo;self&amp;rdquo;. You climb up the structure by clicking on that list item.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;missing image of /2009/03/navigating_inspector.png&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Once loaded into your image, it takes over the standard inspector but uses any dedicated inspector as its model (e.g. EtDictionaryInspector).  To see that working, try inspecting &amp;ldquo;Array with: Smalltalk&amp;rdquo;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>FileBrowser for VA Smalltalk</title>
      <link>http://ernestmicklei.com/2009/03/filebrowser-for-va-smalltalk/</link>
      <pubDate>Wed, 18 Mar 2009 13:01:33 +0300</pubDate>
      <guid>http://ernestmicklei.com/2009/03/filebrowser-for-va-smalltalk/</guid>
      <description>&lt;p&gt;FileBrowser is a new addition to the configuration map “Philemon Tools” , available at &lt;a href=&#34;http://vastgoodies.com/&#34;&gt;VAStGoodies.com&lt;/a&gt;, for VA Smalltalk. This little but powerful tool has the following features:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&#x9;&lt;li&gt;navigate through your local filesystem showing the contents of files (including images)&lt;/li&gt;&#xA;&#x9;&lt;li&gt;file selection based on pattern matching&lt;/li&gt;&#xA;&#x9;&lt;li&gt;support for custom templates for editing (see templateGroups:)&lt;/li&gt;&#xA;&#x9;&lt;li&gt;configurable contents font&lt;/li&gt;&#xA;&#x9;&lt;li&gt;navigation history&lt;/li&gt;&#xA;&#x9;&lt;li&gt;spawn external programs associated with the selected file (e.g. starts Notepad on Windows for .INI)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;missing image of /2009/03/filebrowser.png&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This goodie requires you to load the applications from the configuration map &amp;ldquo;Compuware SplitterWidget&amp;rdquo;, also available at &lt;a href=&#34;http://vastgoodies.com/&#34;&gt;VAStGoodies.com&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Flex Remoting ignores class mapping</title>
      <link>http://ernestmicklei.com/2009/03/flex-remoting-ignores-class-mapping/</link>
      <pubDate>Sun, 15 Mar 2009 09:33:28 +0300</pubDate>
      <guid>http://ernestmicklei.com/2009/03/flex-remoting-ignores-class-mapping/</guid>
      <description>&lt;p&gt;if your application does not yet actually &lt;strong&gt;use&lt;/strong&gt; that client Class.  In my application, the result of a remote invocation kept returning a dynamic Object instead of the intended ValueObject class &amp;ldquo;Slot&amp;rdquo; although I specified the mapping and the RemoteClass metadata:&lt;/p&gt;&#xA;&lt;h2 id=&#34;weborb-configxml&#34;&gt;weborb-config.xml&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;classMapping&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;clientClass&amp;gt;&lt;/span&gt;com.cae.planning.models.Slot&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;/clientClass&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;serverClass&amp;gt;&lt;/span&gt;Slot&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;/serverClass&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;source&amp;gt;&lt;/span&gt;Slot&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;/source&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;/classMapping&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;slotas&#34;&gt;Slot.as&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;Bindable&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;RemoteClass(alias&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;com.cae.planning.models.Slot&amp;#34;&lt;/span&gt;)&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;Slot&lt;/span&gt; { ... }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So merely including the &amp;ldquo;import com.cae.planning.models.Slot;&amp;rdquo; in my application does not instruct the compiler to actually include that Class and therefore knows about the class mapping. Obviously, this can only happen if you work on new client classes that you are not yet using anywhere in your application.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Tiny, single-purpose class: ResultToFunctionAdaptor</title>
      <link>http://ernestmicklei.com/2009/03/tiny-single-purpose-class-resulttofunctionadaptor/</link>
      <pubDate>Sat, 14 Mar 2009 20:06:18 +0300</pubDate>
      <guid>http://ernestmicklei.com/2009/03/tiny-single-purpose-class-resulttofunctionadaptor/</guid>
      <description>&lt;p&gt;Every now and then I need a small piece of functionality that perfectly fits into a single, minimal-behavior thus single-purpose class. This time I am developping a Adobe Flex application that uses the RemoteObject facilities. Before invoking a method on a RemoteObject, you have to add two event handlers that will be called with a ResultEvent or a FaultEvent respectively. Typically in the &amp;ldquo;onResult(event:ResultEvent)&amp;rdquo; function, one takes the result of the event and calls another function or update a view.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Coding extensions for VisualAge for Smalltalk</title>
      <link>http://ernestmicklei.com/2009/03/coding-extensions-for-visualage-for-smalltalk/</link>
      <pubDate>Fri, 13 Mar 2009 12:54:02 +0300</pubDate>
      <guid>http://ernestmicklei.com/2009/03/coding-extensions-for-visualage-for-smalltalk/</guid>
      <description>&lt;p&gt;The configuration map &amp;ldquo;Philemon Tools&amp;rdquo; , available at &lt;a href=&#34;http://vastgoodies.com&#34;&gt;VAStGoodies.com&lt;/a&gt;, now contains an application that enhances the source code browser in VisualAge for Smalltalk. In short, it provides the following features:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&#x9;&lt;li&gt;code completion&lt;/li&gt;&#xA;&#x9;&lt;li&gt;paste buffer (hold shift while selecting menu item &#34;paste&#34; to select from previous copied source)&lt;/li&gt;&#xA;&#x9;&lt;li&gt;repeat edit action (like VisualWorks &#34;again&#34;)&lt;/li&gt;&#xA;&#x9;&lt;li&gt;modifier+key combinations  (see below)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;table border=&#34;1&#34; cellspacing=&#34;2&#34; cellpadding=&#34;2&#34;&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Control+t&lt;/td&gt;&#xA;&lt;td&gt;ifTrue:[ {selected source} ]&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Control+g&lt;/td&gt;&#xA;&lt;td&gt;ifFalse:[ {selected source} ]&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Control+Shift+(&lt;/td&gt;&#xA;&lt;td&gt;( {selected source} )&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Control+1&lt;/td&gt;&#xA;&lt;td&gt;Browse hierachy or implementors&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Control+2&lt;/td&gt;&#xA;&lt;td&gt;Browse references or senders&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Control+3&lt;/td&gt;&#xA;&lt;td&gt;Show previous occurrence of selected text&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Control+4&lt;/td&gt;&#xA;&lt;td&gt;Show next occurrence of selected text&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Control+5&lt;/td&gt;&#xA;&lt;td&gt;Show containing Block&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Control+p&lt;/td&gt;&#xA;&lt;td&gt;Cycle forward through suggestions of completing method|variable|class name&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Control+Shift+p&lt;/td&gt;&#xA;&lt;td&gt;Cycle backward through suggestions of completing method|variable|class name&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;F2&lt;/td&gt;&#xA;&lt;td&gt;Format + Save&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;F5&lt;/td&gt;&#xA;&lt;td&gt;Save&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;F6&lt;/td&gt;&#xA;&lt;td&gt;Revert&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;F7&lt;/td&gt;&#xA;&lt;td&gt;Indent selected source&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;F8&lt;/td&gt;&#xA;&lt;td&gt;Un-indent selected source&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&lt;/table&gt;&#xA;&lt;p&gt;The code completion part is written by Erik Stel. Current implementation does not allow for custom bindings ; you just have to change the class EmmKeyboardProcessor in the PhilemonToolsKeyboard application. Alternatively, drop me an email if you have suggestions.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Importing directly from VAStGoodies.com</title>
      <link>http://ernestmicklei.com/2009/03/importing-directly-from-vastgoodies.com/</link>
      <pubDate>Thu, 12 Mar 2009 08:49:24 +0300</pubDate>
      <guid>http://ernestmicklei.com/2009/03/importing-directly-from-vastgoodies.com/</guid>
      <description>&lt;p&gt;A small but handy enhancement of the previous submitted &lt;a href=&#34;http://vastgoodies.com&#34;&gt;VAStGoodies &lt;/a&gt;tooling, is the ability to import configuration maps from &lt;a href=&#34;http://vastgoodies.com&#34;&gt;VAStGoodies&lt;/a&gt; directly into your library. This feature is available in the standard Configuration Maps Browser.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;missing image of /2009/03/import_vastgoodies.png&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;It uses the same Envy dialog to select versions from available maps.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;missing image of /2009/03/import_select_vastgoodies.png&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;As always as soon as one finishes a feature, a new idea pops up. What if the tool can automatically detect the recent changes available for downloaded material ? and does all those  imports for you ? Who wants to contribute?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Tracking Object instances in VisualAge for Smaltalk</title>
      <link>http://ernestmicklei.com/2009/03/tracking-object-instances-in-visualage-for-smaltalk/</link>
      <pubDate>Wed, 11 Mar 2009 16:02:02 +0300</pubDate>
      <guid>http://ernestmicklei.com/2009/03/tracking-object-instances-in-visualage-for-smaltalk/</guid>
      <description>&lt;p&gt;InstanceCounter is a tool that can be used to watch the number of instances present in your image.  It can be started from the Transcript Philemon menu or by evaluating:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;InstanceCountMonitor openOnClasses: #( ByteArray Process)&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;&#xA;&lt;li&gt;missing image of instance_count_monitor.png&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The menu item named &amp;ldquo;Pointers 1st instance&amp;rdquo; opens the PointerFinder tool. This is a tool to find the path on which an object is referenced.  It is based on an implementation in VisualWorks by Hans-Martin Mosner (c) 1995.  The algorithm is based on an idea by Wim Boot.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Interactive compilation for VisualAge for Smalltalk</title>
      <link>http://ernestmicklei.com/2009/03/interactive-compilation-for-visualage-for-smalltalk/</link>
      <pubDate>Wed, 04 Mar 2009 09:09:56 +0300</pubDate>
      <guid>http://ernestmicklei.com/2009/03/interactive-compilation-for-visualage-for-smalltalk/</guid>
      <description>&lt;p&gt;One of my favorite features of the Cincom VisualWorks IDE is the interactive compiler error handler. When trying to save Smalltalk source that result in compilation errors, the IDE prompts the developer with a menu of suggestions to correct that error. Although the VA compiler can detect these errors obviously, the code browsers merely put the error message in the source.&lt;/p&gt;&#xA;&lt;p&gt;The application PhilemonToolCompilations has an interactive error handler that implements this behavior for the VisualAge for Smalltalk IDE. Features include:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Tooling available for VAStGoodies </title>
      <link>http://ernestmicklei.com/2009/02/tooling-available-for-vastgoodies/</link>
      <pubDate>Thu, 26 Feb 2009 10:18:39 +0200</pubDate>
      <guid>http://ernestmicklei.com/2009/02/tooling-available-for-vastgoodies/</guid>
      <description>&lt;p&gt;Early this year,  Adriaan van Os &lt;a href=&#34;http://a3aan.st/sunrise&#34;&gt;&lt;span class=&#34;publication&#34;&gt;announced&lt;/span&gt;&lt;/a&gt;&lt;span class=&#34;external&#34;&gt; &lt;/span&gt;&lt;a class=&#34;external&#34; title=&#34;http://VAStGoodies.com&#34; href=&#34;http://vastgoodies.com/&#34;&gt;VAStGoodies.com&lt;/a&gt; that wants to be the open source software repository for the VA Smalltalk community. To promote this great initiative, I proposed to create some tools that allow you to contribute to VAStGoodies.com directly from your Smalltalk image. Initially, it includes an editor to edit project annotations and an uploader that takes a versioned ConfigurationMap to publish it. Future versions will enable you to download new and updated versions of projects directly into your repository.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ring Benchmark - my first concurrent Erlang</title>
      <link>http://ernestmicklei.com/2008/05/ring-benchmark-my-first-concurrent-erlang/</link>
      <pubDate>Fri, 23 May 2008 22:47:39 +0500</pubDate>
      <guid>http://ernestmicklei.com/2008/05/ring-benchmark-my-first-concurrent-erlang/</guid>
      <description>&lt;p&gt;Following the advice of &lt;a href=&#34;http://pragdave.pragprog.com/&#34;&gt;Dave Thomas&lt;/a&gt; who said: &amp;ldquo;any developer should learn a new language every year&amp;rdquo; on  RailsConf 2007 in Berlin, I decided that &lt;a href=&#34;http://www.erlang.org/&#34;&gt;Erlang&lt;/a&gt; was going to be my challenge for 2008. However, the first months of 2008 passed without any Erlang until I listened to Joe Armstrong himself at &lt;a href=&#34;http://qcon.infoq.com/london-2008/speaker/Joe+Armstrong&#34;&gt;Qcon in London&lt;/a&gt;. His talk was inspiring to me so right afterwards I bought his book and start reading it on my flight home.&lt;/p&gt;</description>
    </item>
    <item>
      <title>SelfDiagnose for Ruby on Rails</title>
      <link>http://ernestmicklei.com/2008/05/selfdiagnose-for-ruby-on-rails/</link>
      <pubDate>Thu, 15 May 2008 11:41:49 +0500</pubDate>
      <guid>http://ernestmicklei.com/2008/05/selfdiagnose-for-ruby-on-rails/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/emicklei/selfdiagnose&#34;&gt;SelfDianogse&lt;/a&gt; is a library of tasks to diagnose a running system with respect to its dependent external resources. Recently, I did some Rails development and was thinking about how to implement it for the Ruby on Rails framework ? Obvious choice is to make a plugin that on installation adds the SelfDiagnoseController.rb to the application. Because of the scripting nature of Rails framework, putting the configuration in XML (as it is done for Java) is not the Ruby-way. So either use YAML or put the configuration directly into the controller. Let&amp;rsquo;s investigate the latter.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sorting XMLListCollection by attribute</title>
      <link>http://ernestmicklei.com/2008/04/sorting-xmllistcollection-by-attribute/</link>
      <pubDate>Wed, 23 Apr 2008 20:14:37 +0400</pubDate>
      <guid>http://ernestmicklei.com/2008/04/sorting-xmllistcollection-by-attribute/</guid>
      <description>&lt;p&gt;Just want to share the result of a small puzzle I had about sorting elements of an XMLListCollection by one of the attributes of such an element. At first, I tried sorting the elements of the XMLList I had, but the API does not provide any methods to do that.  &lt;a title=&#34;Bruce Phillips&#34; href=&#34;http://www.brucephillips.name/blog/index.cfm/2007/7/24/Using-An-XMLListCollection-As-A-Data-Provider-and-Sorting-An-XMLListCollection-in-Flex-2&#34; target=&#34;_blank&#34;&gt;Bruce Phillips&lt;/a&gt; wrote a snippet that pointed me to right direction. So, here it is:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;var&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;doc&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;XML&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;root&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;item&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;C&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;item&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;B&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;item&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;A&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;/root&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;var&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;collection&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;XMLListCollection&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;doc&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;item&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;var&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;sort&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;Sort&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;new&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;Sort&lt;/span&gt;()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;sort&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;fields&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; [ &lt;span style=&#34;color:#66d9ef&#34;&gt;new&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;SortField&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;@name&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#66d9ef&#34;&gt;true&lt;/span&gt;) ]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;collection&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;sort&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;sort&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;collection&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;refresh&lt;/span&gt;()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;As expected, the collection will show:&lt;/p&gt;</description>
    </item>
    <item>
      <title>External configuration for SelfDiagnose</title>
      <link>http://ernestmicklei.com/2008/04/external-configuration-for-selfdiagnose/</link>
      <pubDate>Wed, 23 Apr 2008 17:46:38 +0400</pubDate>
      <guid>http://ernestmicklei.com/2008/04/external-configuration-for-selfdiagnose/</guid>
      <description>&lt;p&gt;Initialization of the SelfDiagnose component is done by reading the resource &lt;strong&gt;selfdiagnose.xml&lt;/strong&gt; which must be located on the classpath of the Web application. This configuration declares the diagnostic tasks that are executed in the context of the Web application. The upcoming release (1.1) will have a new feature that allows you to override the local configuration and dynamically load the configuration from a provided URL:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;http://your-app/selfdiagnose?config=http://some-other-server/selfdiagnose.xml&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;or even a local file can be passed:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Foreign compile-time dependencies in SelfDiagnose</title>
      <link>http://ernestmicklei.com/2008/04/foreign-compile-time-dependencies-in-selfdiagnose/</link>
      <pubDate>Fri, 11 Apr 2008 09:26:25 +0400</pubDate>
      <guid>http://ernestmicklei.com/2008/04/foreign-compile-time-dependencies-in-selfdiagnose/</guid>
      <description>&lt;p&gt;In the upcoming release 1.1 of the &lt;a href=&#34;http://selfdiagnose.sourceforge.net&#34;&gt;SelfDiagnose&lt;/a&gt; task library, a new task has been added called &lt;strong&gt;CheckEndecaService&lt;/strong&gt;. Endeca is commercial software that provides excellent Search services to e.g. e-commerce web applications. This particular task checks the availability of that service and can perform a simple query. To implement this, the following snippet has been used:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;HttpENEConnection connection &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;new&lt;/span&gt; HttpENEConnection();&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;connection.&lt;span style=&#34;color:#a6e22e&#34;&gt;setHostname&lt;/span&gt;(host);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;connection.&lt;span style=&#34;color:#a6e22e&#34;&gt;setPort&lt;/span&gt;(port);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;UrlENEQuery eneQuery &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;new&lt;/span&gt; UrlENEQuery(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;N=0&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;UTF-8&amp;#34;&lt;/span&gt;);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ENEQueryResults eneResults &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; connection.&lt;span style=&#34;color:#a6e22e&#34;&gt;query&lt;/span&gt;(eneQuery);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Navigation navigation &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; eneResults.&lt;span style=&#34;color:#a6e22e&#34;&gt;getNavigation&lt;/span&gt;();&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;long&lt;/span&gt; numERecs &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; navigation.&lt;span style=&#34;color:#a6e22e&#34;&gt;getTotalNumERecs&lt;/span&gt;();&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;double&lt;/span&gt; time &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; eneResults.&lt;span style=&#34;color:#a6e22e&#34;&gt;getTotalNetworkAndComputeTime&lt;/span&gt;();&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Without a full understanding, you can see that this snippet is using classes which belong to the Endeca API package. SelfDiagnose is a open-source library and therefore can and will not have any dependencies on commerical software. So how can we still use this code without the compile time dependencies?. Of course, in order to execute this code, the runtime dependencies must be available. It does not make sense to use the CheckEndecaService if your application is not using it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Amazon Web Services Test Drive Needed</title>
      <link>http://ernestmicklei.com/2007/12/amazon-web-services-test-drive-needed/</link>
      <pubDate>Tue, 18 Dec 2007 14:24:47 +1200</pubDate>
      <guid>http://ernestmicklei.com/2007/12/amazon-web-services-test-drive-needed/</guid>
      <description>&lt;p&gt;Designing and implementing applications that make use of Amazon Web Services such as S3, SQS and SimpleDB, require extensive testing to ensure a robust integration. In addition to scenarios for the &amp;ldquo;happy flows&amp;rdquo;, test scenarios should be created to handle the &lt;b&gt;critical exceptional situations&lt;/b&gt;. How does my application respond to failures in communication, checksum errors, service unavailability, never ending transactions and extremely frequent or heavy traffic?&lt;/p&gt;&#xA;&lt;p&gt;In the spirit of test driven development, I see a need for writing up such scenarios and simulate the unexpected behavior of AWS just to verify the correct handling of each exceptional event. Such a Test Drive service would implement the API of services available at Amazon Web Services. It should provide extra control services to put a Web Service in some &amp;ldquo;testing mode&amp;rdquo; such as &amp;ldquo;simulate disk failure&amp;rdquo;, &amp;ldquo;simulate terminated http connection&amp;rdquo; or &amp;ldquo;simulate invalid access key&amp;quot;or a combination thereof.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Flex Project version and buildnumber</title>
      <link>http://ernestmicklei.com/2007/09/flex-project-version-and-buildnumber/</link>
      <pubDate>Thu, 06 Sep 2007 15:32:24 +0900</pubDate>
      <guid>http://ernestmicklei.com/2007/09/flex-project-version-and-buildnumber/</guid>
      <description>&lt;p&gt;I wanted to associate version and build information with every compilation of a Flex project.  Such information is useful when deploying to different staging environments (e.g. are you sure you uploaded the correct SWF ?) and helps tracking feedback (e.g. bugs) from users using a particular build.&lt;/p&gt;&#xA;&lt;p&gt;First, I added a simple resource &lt;strong&gt;version.xml&lt;/strong&gt; to store version and build info:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&amp;lt;&lt;/span&gt;?xml version=&amp;#39;1.0&amp;#39; encoding=&amp;#39;UTF-8&amp;#39;?/&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;version&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;name=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;0.1&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;build=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;124&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then I defined a component &lt;strong&gt;Version.mxml&lt;/strong&gt; to show that information in plain text:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Deploying Flex using Capistrano</title>
      <link>http://ernestmicklei.com/2007/08/deploying-flex-using-capistrano/</link>
      <pubDate>Thu, 02 Aug 2007 20:21:21 +0800</pubDate>
      <guid>http://ernestmicklei.com/2007/08/deploying-flex-using-capistrano/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.capify.org&#34;&gt;Capistrano&lt;/a&gt; is a deployment tool initially created to support the remote installation of &lt;a href=&#34;http://www.rubyonrails.org&#34;&gt;Rails&lt;/a&gt; applications. One of the assumptions Capistrano makes is that the application (source) can be pulled out of a source code management system such as &lt;a href=&#34;subversion.tigris.org&#34;&gt;Subversion&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;In case of &lt;a href=&#34;http://www.adobe.com/nl/products/flex/&#34;&gt;Adobe Flex&lt;/a&gt; applications, compiled sources (SWF,HTML,&amp;hellip;) need to be deployed to the Web server. So instead of pulling sources from a repository, I needed to push compiled code to the server.&lt;/p&gt;</description>
    </item>
    <item>
      <title>QuickSilver and Current Application</title>
      <link>http://ernestmicklei.com/2007/07/quicksilver-and-current-application/</link>
      <pubDate>Fri, 20 Jul 2007 07:28:18 +0700</pubDate>
      <guid>http://ernestmicklei.com/2007/07/quicksilver-and-current-application/</guid>
      <description>&lt;p&gt;On a Mac, accessing the current application from &lt;a href=&#34;http://quicksilver.blacktree.com/&#34;&gt;QuickSilver &lt;/a&gt;provides interesting new possibilities as can been on an &lt;a href=&#34;http://www.43folders.com/2007/03/12/tme-quicksilver-application-menus/&#34;&gt;episode&lt;/a&gt; of the &lt;a href=&#34;http://www.43folders.com/topics/the-merlin-show/&#34;&gt;Merlin Show&lt;/a&gt;. If you agree that this is something you wanted all along, then follow these instructions to set it up. (Thanks to &lt;a href=&#34;http://lifehacker.com/commenter/kachooney/&#34;&gt;BOONE&lt;/a&gt;).&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;In QS prefs, make sure &amp;ldquo;Enable advanced features&amp;rdquo; is checked&lt;/li&gt;&#xA;&lt;li&gt;In QS Plug-ins, enable the User Interface plugin&lt;/li&gt;&#xA;&lt;li&gt;In MacOSX System Preferences&amp;ndash;&amp;gt;Universal Access, check &amp;ldquo;Enable access for assitive devices&amp;rdquo;&lt;/li&gt;&#xA;&lt;li&gt;In QS prefs&amp;ndash;&amp;gt;Catalog&amp;ndash;&amp;gt;Quicksilver, check and reload &amp;ldquo;Proxy Objects&amp;rdquo;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Flex Bindable Hash</title>
      <link>http://ernestmicklei.com/2007/07/flex-bindable-hash/</link>
      <pubDate>Tue, 17 Jul 2007 09:58:00 +0700</pubDate>
      <guid>http://ernestmicklei.com/2007/07/flex-bindable-hash/</guid>
      <description>&lt;p&gt;For the &lt;a href=&#34;https://github.com/emicklei/dunelox/&#34; target=&#34;_blank&#34;&gt;Dunelox&lt;/a&gt; library, I needed a simplified Flex version of the &lt;a href=&#34;http://www.springframework.org/docs/api/org/springframework/context/ApplicationContext.html&#34;&gt;Spring ApplicationContext &lt;/a&gt;which is a generic Hash object containing model objects accessed by a key (String). Visual components that are wired to these models objects need to be updated automatically using the standard event mechanism in Flex.&lt;/p&gt;&#xA;&lt;p&gt;So, I had a look at the standard &lt;a href=&#34;http://livedocs.adobe.com/flex/2/langref/mx/collections/ArrayCollection.html&#34;&gt;ArrayCollection &lt;/a&gt; to find out how it notifies components that are wired to elements by index. This gave me the idea to implement the &lt;a href=&#34;http://dunelox.googlecode.com/svn/trunk/dunelox/com/philemonworks/flex/util/HashCollection.as&#34; target=&#34;_blank&#34;&gt;HashCollection&lt;/a&gt; as a extension to this class.&lt;/p&gt;</description>
    </item>
    <item>
      <title>s3browse.com</title>
      <link>http://ernestmicklei.com/2007/02/s3browse.com/</link>
      <pubDate>Tue, 20 Feb 2007 21:18:00 +0200</pubDate>
      <guid>http://ernestmicklei.com/2007/02/s3browse.com/</guid>
      <description>&lt;p&gt;For some time now, &lt;a href=&#34;http://aws.amazon.com/s3&#34;&gt;Amazon S3 Web Services&lt;/a&gt; are available to the developer community. Since its inception, several client solutions made their way to the public. S3Browse.com provides both a simple Web Interface and a Java Web Start based client to your S3 accounts. The web client is typically used to create and browse your bucket contents. The Java client is used to upload large files or a large amount of files. S3Browse.com is a free intermediate service to Amazon S3.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Helper classes considered bad OO</title>
      <link>http://ernestmicklei.com/2006/03/helper-classes-considered-bad-oo/</link>
      <pubDate>Sun, 12 Mar 2006 21:30:46 +0300</pubDate>
      <guid>http://ernestmicklei.com/2006/03/helper-classes-considered-bad-oo/</guid>
      <description>&lt;p&gt;Too often developers put  logic in so-called Helper classes.&lt;/p&gt;&#xA;&lt;p&gt;This practice of SPOD (Single Point of Definition) results in a higher level of reusability, so it seems.&#xA;But in fact introducing these procedural structured behavioral methods impose a rigid structure.&#xA;First of all, (other) developers need to be aware that such Helpers exist to work on their objects.&#xA;Secondly, because behavior that should have been defined in the class of the object, is now defined elsewhere. The possibility of re-using such behavoir by inheritance is now unavailable. You cannot just extend an Helper class too!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Application Diagnoses Itself</title>
      <link>http://ernestmicklei.com/2005/09/application-diagnoses-itself/</link>
      <pubDate>Thu, 22 Sep 2005 09:16:29 +0900</pubDate>
      <guid>http://ernestmicklei.com/2005/09/application-diagnoses-itself/</guid>
      <description>&lt;p&gt;How can I provide programs with self diagnostic behavior? How can I implement this in a way that has low impact on the way I write programs (or Java classes to be more specific). If programs could run such a &lt;span style=&#34;font-style:italic;&#34;&gt;self diagnose&lt;/span&gt; then perhaps it takes less time to find the cause of an observed problem.&lt;/p&gt;&#xA;&lt;p&gt;These thoughts are sprung when I found an error in an application that went into production just a few days earlier. The problem itself was easily fixed (just a typo in some properties file) but I was a bit surprised that obviously my tests did not cover this particular execution path. Sure, I should have written more tests to have a higher coverage (&lt;a href=&#34;http://www.jcoverage.org/&#34;&gt;JCoverage&lt;/a&gt; can tell me what percentage), but what if I had programmed this behavior differently(how?) such that a self diagnose run would have detected it?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Don&#39;ts</title>
      <link>http://ernestmicklei.com/2005/07/donts/</link>
      <pubDate>Tue, 19 Jul 2005 21:37:58 +0700</pubDate>
      <guid>http://ernestmicklei.com/2005/07/donts/</guid>
      <description>&lt;p&gt;Another example of how negative publicity can have a big learning effect (if understood). From a new entry @ slashdot about Multi-links, I surfed to &lt;a href=&#34;http://www.webpagesthatsuck.com/&#34;&gt;WebsitesThatSuck&lt;/a&gt;. The authors are committed to show the worst designs that live on the web.&lt;/p&gt;&#xA;&lt;p&gt;With respect to Software Design, my dialy work, a similar initiative has been around for a few years. In response to the popular Design Patterns book written by the Gang of Four, others introduced the &lt;a href=&#34;http://www.antipatterns.com/&#34;&gt;Anti-Patterns&lt;/a&gt; as a means to teach designers about the &lt;font&gt;dont&amp;rsquo;s&lt;/font&gt; in the design of systems using Object Technology. You can contribute to them using the &lt;a href=&#34;http://www.antipatterns.org/&#34;&gt;Anti-Patterns Wiki&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
