<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8692632067019524643</id><updated>2024-09-01T21:49:33.961+09:30</updated><category term=".NET"/><category term="c#"/><category term="ruby"/><category term="rants"/><category term="svn"/><category term="java"/><category term="languages"/><category term="vms"/><category term="windows"/><category term="css"/><category term="ford focus"/><category term="guitar"/><category term="headlights"/><category term="jruby"/><category term="linux"/><category term="lisp"/><category term="metaprogramming"/><category term="tabs"/><category term="tailights"/><category term="teac hdb820 c.100"/><category term="theory"/><category term="vb"/><category term="vim"/><title type='text'>dan in touch with the obvious</title><subtitle type='html'>&lt;b&gt;Marching through the trenches with clown shoes on&lt;/b&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-4168079447171870788</id><published>2009-04-15T15:21:00.004+09:30</published><updated>2009-04-15T15:34:19.826+09:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><title type='text'>Australian Postcode Validation</title><content type='html'>I was recently porting and updating some old Pascal postcode validation to C# and thought i&#39;d stick it up here. &lt;br /&gt;&lt;br /&gt;To tell the truth, the Pascal code is more concise. Pascal, VB, Ruby etc have means to test a range of values in a single case statement. Unfortunately C# doesn&#39;t provide for this contingency, hence the &quot;fall through&#39;s&quot; in the case blocks.&lt;br /&gt;&lt;br /&gt;Anyway, maybe someone might find this useful as there are a few &quot;interesting&quot; situations with the ACT and NSW.&lt;br /&gt;&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;&amp;nbsp;1 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffffb6&quot;&gt;public&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffffb6&quot;&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffffb6&quot;&gt;string&lt;/font&gt;&amp;nbsp;GetState(&lt;font color=&quot;#ffffb6&quot;&gt;string&lt;/font&gt;&amp;nbsp;postCode) {&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;&amp;nbsp;2 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;if&lt;/font&gt;&amp;nbsp;(!IsValidPostCodeFormat(postCode))&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;&amp;nbsp;3 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#a8ff60&quot;&gt;&amp;quot;&amp;quot;&lt;/font&gt;;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;&amp;nbsp;4 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;&amp;nbsp;5 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;switch&lt;/font&gt;&amp;nbsp;(postCode[&lt;font color=&quot;#ff73fd&quot;&gt;0&lt;/font&gt;]) {&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;&amp;nbsp;6 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;case&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#99cc99&quot;&gt;&#39;5&#39;&lt;/font&gt;: &lt;font color=&quot;#6699cc&quot;&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#a8ff60&quot;&gt;&amp;quot;SA&amp;quot;&lt;/font&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=&quot;#7c7c7c&quot;&gt;// SA:&amp;nbsp;&amp;nbsp;5000-5999&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;&amp;nbsp;7 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;case&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#99cc99&quot;&gt;&#39;3&#39;&lt;/font&gt;:&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;&amp;nbsp;8 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;case&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#99cc99&quot;&gt;&#39;8&#39;&lt;/font&gt;: &lt;font color=&quot;#6699cc&quot;&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#a8ff60&quot;&gt;&amp;quot;VIC&amp;quot;&lt;/font&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#7c7c7c&quot;&gt;// VIC: 3000-3999, 8000-8999&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;&amp;nbsp;9 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;case&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#99cc99&quot;&gt;&#39;4&#39;&lt;/font&gt;:&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;10 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;case&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#99cc99&quot;&gt;&#39;9&#39;&lt;/font&gt;: &lt;font color=&quot;#6699cc&quot;&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#a8ff60&quot;&gt;&amp;quot;QLD&amp;quot;&lt;/font&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#7c7c7c&quot;&gt;// QLD: 4000-4999, 9000-9999&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;11 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;case&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#99cc99&quot;&gt;&#39;6&#39;&lt;/font&gt;: &lt;font color=&quot;#6699cc&quot;&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#a8ff60&quot;&gt;&amp;quot;WA&amp;quot;&lt;/font&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=&quot;#7c7c7c&quot;&gt;// WA:&amp;nbsp;&amp;nbsp;6000-6999&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;12 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;case&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#99cc99&quot;&gt;&#39;7&#39;&lt;/font&gt;: &lt;font color=&quot;#6699cc&quot;&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#a8ff60&quot;&gt;&amp;quot;TAS&amp;quot;&lt;/font&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#7c7c7c&quot;&gt;// TAS: 7000-7999&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;13 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;case&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#99cc99&quot;&gt;&#39;1&#39;&lt;/font&gt;: &lt;font color=&quot;#6699cc&quot;&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#a8ff60&quot;&gt;&amp;quot;NSW&amp;quot;&lt;/font&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#7c7c7c&quot;&gt;// NSW: 1000-1999&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;14 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;15 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;case&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#99cc99&quot;&gt;&#39;0&#39;&lt;/font&gt;:&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;16 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;switch&lt;/font&gt;&amp;nbsp;(postCode[&lt;font color=&quot;#ff73fd&quot;&gt;1&lt;/font&gt;]) {&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;17 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;case&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#99cc99&quot;&gt;&#39;8&#39;&lt;/font&gt;:&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;18 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;case&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#99cc99&quot;&gt;&#39;9&#39;&lt;/font&gt;: &lt;font color=&quot;#6699cc&quot;&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#a8ff60&quot;&gt;&amp;quot;NT&amp;quot;&lt;/font&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=&quot;#7c7c7c&quot;&gt;// NT:&amp;nbsp;&amp;nbsp;0800-0999&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;19 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;case&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#99cc99&quot;&gt;&#39;2&#39;&lt;/font&gt;: &lt;font color=&quot;#6699cc&quot;&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#a8ff60&quot;&gt;&amp;quot;ACT&amp;quot;&lt;/font&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#7c7c7c&quot;&gt;// ACT: 0200-0299&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;20 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#6699cc&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;default:&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#a8ff60&quot;&gt;&amp;quot;&amp;quot;&lt;/font&gt;;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;21 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;22 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;23 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;case&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#99cc99&quot;&gt;&#39;2&#39;&lt;/font&gt;:&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;24 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffffb6&quot;&gt;int&lt;/font&gt;&amp;nbsp;tmp = Int32.Parse(postCode);&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;25 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;if&lt;/font&gt;&amp;nbsp;((tmp &amp;gt;= &lt;font color=&quot;#ff73fd&quot;&gt;2600&lt;/font&gt;&amp;nbsp;&amp;amp;&amp;amp; tmp &amp;lt;= &lt;font color=&quot;#ff73fd&quot;&gt;2618&lt;/font&gt;) || (tmp &amp;gt;= &lt;font color=&quot;#ff73fd&quot;&gt;2900&lt;/font&gt;&amp;nbsp;&amp;amp;&amp;amp; tmp &amp;lt;= &lt;font color=&quot;#ff73fd&quot;&gt;2920&lt;/font&gt;))&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;26 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#a8ff60&quot;&gt;&amp;quot;ACT&amp;quot;&lt;/font&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#7c7c7c&quot;&gt;// ACT: 2600-2618, 2900-2920&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;27 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;else&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;if&lt;/font&gt;&amp;nbsp;((tmp &amp;gt;= &lt;font color=&quot;#ff73fd&quot;&gt;2000&lt;/font&gt;&amp;nbsp;&amp;amp;&amp;amp; tmp &amp;lt;= &lt;font color=&quot;#ff73fd&quot;&gt;2599&lt;/font&gt;) || (tmp &amp;gt;= &lt;font color=&quot;#ff73fd&quot;&gt;2619&lt;/font&gt;&amp;nbsp;&amp;amp;&amp;amp; tmp &amp;lt;= &lt;font color=&quot;#ff73fd&quot;&gt;2898&lt;/font&gt;) &lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;28 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;|| (tmp &amp;gt;= &lt;font color=&quot;#ff73fd&quot;&gt;2921&lt;/font&gt;&amp;nbsp;&amp;amp;&amp;amp; tmp &amp;lt;= &lt;font color=&quot;#ff73fd&quot;&gt;2999&lt;/font&gt;))&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;29 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#a8ff60&quot;&gt;&amp;quot;NSW&amp;quot;&lt;/font&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#7c7c7c&quot;&gt;// NSW: 2000-2599, 2619-2898, 2921-2999&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;30 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;else&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#a8ff60&quot;&gt;&amp;quot;&amp;quot;&lt;/font&gt;;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;31 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;32 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#6699cc&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;default:&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#a8ff60&quot;&gt;&amp;quot;&amp;quot;&lt;/font&gt;;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;33 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;34 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;35 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;36 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffffb6&quot;&gt;private&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffffb6&quot;&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffffb6&quot;&gt;bool&lt;/font&gt;&amp;nbsp;IsValidPostCodeFormat(&lt;font color=&quot;#ffffb6&quot;&gt;string&lt;/font&gt;&amp;nbsp;postCode) {&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;37 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffffb6&quot;&gt;int&lt;/font&gt;&amp;nbsp;tmp;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;38 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;if&lt;/font&gt;&amp;nbsp;(String.IsNullOrEmpty(postCode) || postCode.Length != &lt;font color=&quot;#ff73fd&quot;&gt;4&lt;/font&gt;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;39 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; || !Int32.TryParse(postCode, &lt;font color=&quot;#6699cc&quot;&gt;out&lt;/font&gt;&amp;nbsp;tmp))&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;40 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#99cc99&quot;&gt;false&lt;/font&gt;;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;41 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;42 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#6699cc&quot;&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#99cc99&quot;&gt;true&lt;/font&gt;;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;43 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;44 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/font&gt;</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/4168079447171870788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/4168079447171870788' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/4168079447171870788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/4168079447171870788'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2009/04/australian-postcode-validation.html' title='Australian Postcode Validation'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-3231748152560871343</id><published>2008-12-29T10:38:00.002+10:30</published><updated>2008-12-29T11:31:29.212+10:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><title type='text'>System.RunTime.Serialization.SerializationException: The input stream is not a valid binary format. The starting contents (in bytes) are: 3C-68-74-6D-</title><content type='html'>&lt;font face=&quot;monospace&quot;&gt;System.RunTime.Serialization.SerializationException: The input stream is not a valid binary format. The starting contents (in bytes) are: 3C-68-74-6D-6C-3E-0D-0A-20-20-20-20-3C-68-65-61-64 ...&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;This is the Remoting exception IIS was consistently giving me after a deep search. The search was returning some mammoth &lt;a href=&quot;http://en.wikipedia.org/wiki/Binary_large_object&quot;&gt;blob&#39;s&lt;/a&gt; and failing after a few minutes.&lt;br /&gt;&lt;br /&gt;I thought it might be an IIS error, sure enough after firing up &lt;a href=&quot;http://www.pocketsoap.com/tcptrace/&quot;&gt;TCPTrace&lt;/a&gt; and sniffing around, I found &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;HTTP/1.1 100 Continue&lt;br /&gt;Server: ASP.NET Development Server/9.0.0.0&lt;br /&gt;Date: Sun, 28 Dec 2008 23:52:31 GMT&lt;br /&gt;Content-Length: 0&lt;br /&gt;&lt;br /&gt;HTTP/1.1 500 Internal Server Error&lt;br /&gt;Server: ASP.NET Development Server/9.0.0.0&lt;br /&gt;Date: Sun, 28 Dec 2008 23:54:35 GMT&lt;br /&gt;X-AspNet-Version: 2.0.50727&lt;br /&gt;Cache-Control: private&lt;br /&gt;Content-Type: text/html; charset=utf-8&lt;br /&gt;Content-Length: 2549&lt;br /&gt;Connection: Close&lt;br /&gt;&lt;br /&gt;--snip html&lt;br /&gt;Request timed out.&lt;br /&gt;--snip html&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;So rather than throwing a relevant HTTP response code, we get a html error page that can&#39;t be serialized. Hopefully this saves fellow insane technologists a little time.</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/3231748152560871343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/3231748152560871343' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/3231748152560871343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/3231748152560871343'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2008/12/systemruntimeserializationserialization.html' title='System.RunTime.Serialization.SerializationException: The input stream is not a valid binary format. The starting contents (in bytes) are: 3C-68-74-6D-'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-7524445917648187004</id><published>2008-09-24T14:10:00.005+09:30</published><updated>2008-09-24T15:23:05.769+09:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><title type='text'>Returning lambda&#39;s from a ternary in C#</title><content type='html'>In the midst of some mad refactoring I came across something similar to the following snippet:&lt;br /&gt;&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;&amp;nbsp;1 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#6699cc&quot;&gt;if&lt;/font&gt;&amp;nbsp;(count == &lt;font color=&quot;#ff73fd&quot;&gt;0&lt;/font&gt;)&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;&amp;nbsp;2 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;choice.Finish = result =&amp;gt; { &lt;font color=&quot;#6699cc&quot;&gt;return&lt;/font&gt;; };&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;&amp;nbsp;3 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#6699cc&quot;&gt;else&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;&amp;nbsp;4 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;choice.Finish = result =&amp;gt; { letter.MailMerge(result); };&lt;/div&gt;&lt;/font&gt;&lt;br /&gt;Looked like a decent candidate for refactoring with a ternary / conditional operator:&lt;br /&gt;&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;&amp;nbsp;7 &lt;/font&gt;&lt;/span&gt;choice.Finish = (count == &lt;font color=&quot;#ff73fd&quot;&gt;0&lt;/font&gt;) ? result =&amp;gt; { &lt;font color=&quot;#6699cc&quot;&gt;return&lt;/font&gt;; }&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;&amp;nbsp;8 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;: result =&amp;gt; { letter.MailMerge(result); };&lt;br /&gt;&lt;/div&gt;&lt;/font&gt;&lt;br /&gt;&lt;b&gt;Type of conditional expression cannot be determined because there is no implicit conversion between &#39;lambda expression&#39; and &#39;lambda expression&#39;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Hold your horses, say what?&lt;br /&gt;&lt;br /&gt;For some reason the only way to fool it through the compiler is to cast one of the expressions (it doesn&#39;t seem to matter which one) to the expected return type.&lt;br /&gt;&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;11 &lt;/font&gt;&lt;/span&gt;choice.Finish = (count == &lt;font color=&quot;#ff73fd&quot;&gt;0&lt;/font&gt;) ? (TypeDelegate&amp;lt;&lt;font color=&quot;#ffffb6&quot;&gt;int&lt;/font&gt;&amp;gt;) (result =&amp;gt; { &lt;font color=&quot;#6699cc&quot;&gt;return&lt;/font&gt;; })&lt;br /&gt;&lt;span style=&quot;background-color: #000000&quot;&gt;&lt;font color=&quot;#3d3d3d&quot;&gt;12 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : result =&amp;gt; { letter.MailMerge(result); };&lt;br /&gt;&lt;/div&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Go figure!</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/7524445917648187004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/7524445917648187004' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/7524445917648187004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/7524445917648187004'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2008/09/returning-lambdas-from-ternary-in-c.html' title='Returning lambda&#39;s from a ternary in C#'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-3347160206352754259</id><published>2008-09-02T15:50:00.002+09:30</published><updated>2008-09-02T16:11:19.823+09:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="vim"/><category scheme="http://www.blogger.com/atom/ns#" term="vms"/><title type='text'>VIM on OpenVMS</title><content type='html'>This is a note to future Dan and anyone else that may have file permission problems when running &lt;a href=&quot;http://www.vim.org&quot;&gt;VIM&lt;/a&gt; on &lt;a href=&quot;http://h71000.www7.hp.com/&quot;&gt;OpenVMS&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Define this logical:&lt;br /&gt;&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;Dan$ define DECC$ACL_ACCESS_CHECK ENABLE&lt;/div&gt;&lt;/font&gt;&lt;br /&gt;Apparently when disabled the access function only checks the UIC protection and &lt;b&gt;not&lt;/b&gt; the OpenVMS ACL&#39;s.&lt;br /&gt;&lt;br /&gt;There are all other kinds of goodies &lt;a href=&quot;http://h71000.www7.hp.com/doc/732FINAL/5763/5763pro_004.html&quot;&gt;here&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/3347160206352754259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/3347160206352754259' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/3347160206352754259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/3347160206352754259'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2008/09/vim-on-openvms.html' title='VIM on OpenVMS'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-1788767455568422780</id><published>2008-08-11T19:56:00.003+09:30</published><updated>2008-08-11T20:04:47.978+09:30</updated><title type='text'>SVN 1.5.1 / Ruby bindings on Windows</title><content type='html'>Rather than messing around with compiling &lt;a href=&quot;http://www.swig.org/&quot;&gt;swig&lt;/a&gt; bindings etc:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Download the ruby bindings from the svn site: (&lt;a href=&quot;http://subversion.tigris.org/files/documents/15/43245/svn-win32-1.5.1_rb.zip&quot;&gt;http://subversion.tigris.org/files/documents/15/43245/svn-win32-1.5.1_rb.zip&lt;/a&gt;)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;From the zip - copy &lt;i&gt;ruby\lib\svn&lt;/i&gt; into &lt;i&gt;c:\ruby\lib\ruby\site_ruby\1.8\svn&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;From the zip – copy &lt;i&gt;ruby\ext\svn\ext&lt;/i&gt; into &lt;i&gt;c:\ruby\lib\ruby\site_ruby\1.8\svn\ext&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;copy libeay32.dll and ssleay32.dll from your subversion 1.5 directory into &lt;i&gt;c:\ruby\bin&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;run irb and test with: require ‘svn/core’&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/1788767455568422780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/1788767455568422780' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/1788767455568422780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/1788767455568422780'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2008/08/svn-151-ruby-bindings-on-windows.html' title='SVN 1.5.1 / Ruby bindings on Windows'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-2384216573133165780</id><published>2008-06-14T14:58:00.004+09:30</published><updated>2008-06-14T15:19:31.830+09:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="css"/><title type='text'>Why?</title><content type='html'>&lt;a href=&quot;http://en.wikipedia.org/wiki/Cascading_Style_Sheets&quot;&gt;css&lt;/a&gt;:&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;br /&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;font color=&quot;#ffcc00&quot;&gt;.mainMenuHeader&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffcc00&quot;&gt;{&lt;/font&gt;&lt;font color=&quot;#aaaa77&quot;&gt;color&lt;/font&gt;:&lt;font color=&quot;#339999&quot;&gt;#FFFFFF&lt;/font&gt;;&lt;font color=&quot;#ffcc00&quot;&gt;}&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffcc00&quot;&gt;.mainMenuHeader&lt;/font&gt;:&lt;font color=&quot;#aaffff&quot;&gt;hover&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffcc00&quot;&gt;{&lt;/font&gt;&lt;font color=&quot;#aaaa77&quot;&gt;color&lt;/font&gt;:&lt;font color=&quot;#339999&quot;&gt;#F26540&lt;/font&gt;;&lt;font color=&quot;#ffcc00&quot;&gt;}&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;/font&gt;&lt;br /&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Extensible_Application_Markup_Language&quot;&gt;xaml&lt;/a&gt;:&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;br /&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;Style&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#aaaa77&quot;&gt;x&lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;&lt;i&gt;:&lt;/i&gt;&lt;/font&gt;&lt;font color=&quot;#aaaa77&quot;&gt;Key&lt;/font&gt;=&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;mainMenuHeader&amp;quot;&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;Setter&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#aaaa77&quot;&gt;Property&lt;/font&gt;=&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;Control.Foreground&amp;quot;&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#aaaa77&quot;&gt;Value&lt;/font&gt;=&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;#FFFFFF&amp;quot;&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;nbsp;/&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;Style&lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;&lt;i&gt;.&lt;/i&gt;&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;Triggers&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;Trigger&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#aaaa77&quot;&gt;Property&lt;/font&gt;=&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;Control.IsMouseOver&amp;quot;&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#aaaa77&quot;&gt;Value&lt;/font&gt;=&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;True&amp;quot;&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;Setter&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#aaaa77&quot;&gt;Property&lt;/font&gt;=&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;Control.Foreground&amp;quot;&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#aaaa77&quot;&gt;Value&lt;/font&gt;=&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;#F26540&amp;quot;&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;nbsp;/&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;lt;/Trigger&amp;gt;&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;lt;/Style&lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;&lt;i&gt;.&lt;/i&gt;&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;Triggers&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;lt;/Style&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;/font&gt;</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/2384216573133165780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/2384216573133165780' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/2384216573133165780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/2384216573133165780'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2008/06/why.html' title='Why?'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-3391629413643806392</id><published>2008-05-31T11:46:00.005+09:30</published><updated>2008-05-31T12:28:00.150+09:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="guitar"/><category scheme="http://www.blogger.com/atom/ns#" term="tabs"/><title type='text'>Home Town Hero - That&#39;s How I Know</title><content type='html'>Hopping back in the time machine to 2002 a slightly rockin&#39; album came out - &lt;a href=&quot;http://www.amazon.com/Home-Town-Hero/dp/B000065DVE/ref=pd_bbs_1?ie=UTF8&amp;s=music&amp;qid=1212200906&amp;sr=8-1&quot;&gt;Home Town Hero - Self Titled&lt;/a&gt;. It sounds a little grungy like &lt;a href=&quot;http://en.wikipedia.org/wiki/The_Exies&quot;&gt;The Exies&lt;/a&gt; and a little power-poppy like &lt;a href=&quot;http://en.wikipedia.org/wiki/Rooney_%28band%29&quot;&gt;Rooney&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;They had some minor successes opening for &lt;a href=&quot;http://en.wikipedia.org/wiki/Stone_temple_pilots&quot;&gt;STP&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Incubus_%28band%29&quot;&gt;Incubus&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Weezer&quot;&gt;Weezer&lt;/a&gt;. Since then, they have completely fallen off the radar. Apparently there was some unpleasantness with their record label and they are now back under the moniker: &lt;a href=&quot;http://en.wikipedia.org/wiki/Under_the_Influence_of_Giants&quot;&gt;Under the Influence of Giants&lt;/a&gt;. I gave their new LP a listen, i just couldn&#39;t get into it. I think it has validly been classified as disco-rock :)&lt;br /&gt;&lt;br /&gt;Nick and I were giving it a thrash this week, so as an ode to the good old days I tabbed out the secret/bonus/acoustico track, as it appears no-one else has.&lt;br /&gt;&lt;br /&gt;It ain&#39;t the most complicated tune on the planet but stay tuned for Niccolò Paganini&#39;s 24th Caprice next week :)&lt;br /&gt;&lt;br /&gt;bon appétit! &lt;br /&gt; &lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;Begin Tab&lt;br /&gt;Standard tuning (EADGBE)&lt;br /&gt;Intro (let ring)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; G\B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Am&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; G\B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&lt;br /&gt;---------------------------------------------------------------------&lt;br /&gt;---------------------------------------------------------------------&lt;br /&gt;-----0-------0--------2--------------------0-------0---------0---0---&lt;br /&gt;---2---2---0---0----2---2------3---------2---2---0---0---2---2---2---&lt;br /&gt;-3-------2--------0----------3---3-----3-------2-------3---3-3-3-3---&lt;br /&gt;---------------------------1-----------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Verse &lt;br /&gt;&lt;br /&gt;&amp;nbsp;C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; G\B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Am&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; G\B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; E&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;-----0-------0--------2------------------0-------0----------------------&lt;br /&gt;---2---2---0---0----2---2------3-------2---2---0---0-----2-------3------&lt;br /&gt;-3-------2--------0----------3---3---3-------2---------2---2---3---3----&lt;br /&gt;---------------------------1-------------------------0-------1----------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; G\B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Am&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;F&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;-----------------------------------------&lt;br /&gt;-----------------------------------------&lt;br /&gt;-----0-------0-------2-------------------&lt;br /&gt;---2---2---0---0---2---2-------3---------&lt;br /&gt;-3-------2-------0-----------3---3-------&lt;br /&gt;---------------------------1-------------&lt;br /&gt;&lt;br /&gt;&amp;nbsp;C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; G\B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;E&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;F&lt;br /&gt;-----------------------------------------&lt;br /&gt;-----------------------------------------&lt;br /&gt;-----0-------0----1-1-1-x-x--2-2--x-x-x---&lt;br /&gt;---2---2---0---0--2-2-2-x-x--3-3--x-x-x---&lt;br /&gt;-3-------2--------2-2-2-x-x--3-3--x-x-x---&lt;br /&gt;------------------0-0-0-x-x--1-1--x-x-x---&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Chorus (just bang out the chords instead of picking them)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;C&amp;nbsp;&amp;nbsp; G\B&amp;nbsp;&amp;nbsp;Am&amp;nbsp;&amp;nbsp;F&amp;nbsp;&amp;nbsp;C&amp;nbsp;&amp;nbsp;G\B&amp;nbsp;&amp;nbsp;C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(into to bridge)&amp;nbsp;&amp;nbsp; &lt;br /&gt;-0---3--------1--0--3----0--|--0------------&lt;br /&gt;-1---3----1---1--1--3----1--|--1------------&lt;br /&gt;-0---0----2---2--0--0----0--|--0------------&lt;br /&gt;-2---0----2---3--2--0----2--|--0------------&lt;br /&gt;-3---2----0---3--3--2----3--|--2------------&lt;br /&gt;--------------1-------------|---------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Bridge&lt;br /&gt;&lt;br /&gt;&amp;nbsp;Am&amp;nbsp;&amp;nbsp;F&amp;nbsp;&amp;nbsp; G\B&amp;nbsp;&amp;nbsp;Am&amp;nbsp;&amp;nbsp;C&amp;nbsp;&amp;nbsp;E&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Am&amp;nbsp;&amp;nbsp; F&amp;nbsp;&amp;nbsp; G\B&amp;nbsp;&amp;nbsp; Am&amp;nbsp;&amp;nbsp;C&amp;nbsp;&amp;nbsp; B\G&lt;br /&gt;-0---1---3----0---0--0----0----1---3-----0---0---3---&lt;br /&gt;-1---1---3----1---1--0----1----1---3-----1---1---3---&lt;br /&gt;-2---2---0----2---0--1----2----2---0-----2---0---0---&lt;br /&gt;-2---3---0----2---2--2----2----3---0-----2---2---0---&lt;br /&gt;-0---3---2----0---3--2----0----3---2-----0---3---2---&lt;br /&gt;-----1---------------0---------1---------------------&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/3391629413643806392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/3391629413643806392' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/3391629413643806392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/3391629413643806392'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2008/05/home-town-hero-thats-how-i-know.html' title='Home Town Hero - That&#39;s How I Know'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-5511537357209252653</id><published>2008-03-20T20:40:00.004+10:30</published><updated>2008-04-23T07:35:02.115+09:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="teac hdb820 c.100"/><title type='text'>Fixing the Teac HDB820 C.100 Error</title><content type='html'>The other day I mentioned I was feeling slightly &lt;a href=http://danintouch.blogspot.com/2008/03/sun-microsoft-developer-marketing.html&gt;hot&lt;/a&gt; and bothered. Well, so was my Teac &lt;a href=http://www.infolink.com.au/articles/The-TEAC-HDB820-Digital-Set-Top-Receiver_z161650.htm&gt;HDB820&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I woke up this morning and I was greeted by the dreaded C.100 error. I tried turning it on and off, no go. I´ve had it for about 2 years so warranty was no option. On cracking it open one of the 1000uF 16V capacitors had a slight eruption. There are 3 in total and with the weather we´ve been having; i´m not suprised it gave up.&lt;br /&gt;&lt;br /&gt;After I got home from work I ducked into &lt;a href=http://www.dse.com.au&gt;DSE&lt;/a&gt; and grabbed 3 of these &lt;a href=http://dseau.resultspage.com/search.php?p=R&amp;srid=S2%2d4&amp;lbc=dseau&amp;w=1000%20uF%2035%20WV&amp;url=http%3a%2f%2fwww%2edse%2ecom%2eau%2fcgi%2dbin%2fdse%2estorefront%2f%5fsessionid%5f%2fProduct%2fView%2fR4185&amp;rk=1&amp;uid=1741555&amp;sid=2&amp;ts=p2&amp;rsc=s8f2V071oU2GI3cJ&amp;sessionid=480e600d0270de52273fc0a87f9c06ad&amp;method=and&amp;isort=score&gt;chunky bastards&lt;/a&gt; - 1000 uF 35 WV caps. I then whipped out the soldering iron (i knew doing year 11 electronics would pay off one day) and 10 minutes later I was back in sweet sweet HD heaven.</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/5511537357209252653/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/5511537357209252653' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/5511537357209252653'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/5511537357209252653'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2008/03/fixing-teac-hdb820-c100-error.html' title='Fixing the Teac HDB820 C.100 Error'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-3662547541072366622</id><published>2008-03-15T21:36:00.002+10:30</published><updated>2008-03-15T22:02:12.275+10:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="svn"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>SVN hooks on Windows with Ruby</title><content type='html'>I&#39;d been meaning to write a pre-commit hook to catch empty log messages for a while but hadn&#39;t got around to it for one reason or another. I had a spare 5 minutes so I got stuck in.&lt;br /&gt;&lt;br /&gt;The SVN book mentions that on Windows the hook files extension basically has to be .exe, .com or .bat. Even though .rb is executable on my SVN server it was not being called. So, instead I just called the ruby script from the bat file as such:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;pre-commit.bat&lt;/b&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;1 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffcc00&quot;&gt;SET&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;nbsp;DIR&lt;/font&gt;&lt;font color=&quot;#ff6600&quot;&gt;=&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;%1&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;/hooks&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;2 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffcc00&quot;&gt;set&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;nbsp;REPOS&lt;/font&gt;&lt;font color=&quot;#ff6600&quot;&gt;=&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;%1&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;3 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffcc00&quot;&gt;set&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;&amp;nbsp;TXN&lt;/font&gt;&lt;font color=&quot;#ff6600&quot;&gt;=&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;%2&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;4 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;5 &lt;/font&gt;&lt;/span&gt;c:\ruby\bin\ruby.exe d:\svn\hooks\pre-commit.rb &lt;font color=&quot;#ffcc00&quot;&gt;%REPOS%&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffcc00&quot;&gt;%TXN%&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffcc00&quot;&gt;%DIR%&lt;/font&gt;&lt;/div&gt;&lt;/font&gt;&lt;br /&gt;It also mentions that for security reasons, the repository executes hook scripts with an empty environment—that is, no environment variables are set at all, not even $PATH or %PATH%. Because of this, it is necessary to specify absolute paths.&lt;br /&gt;&lt;br /&gt;Setting DIR above is a bit of a trick for debugging purposes so you can write a log file into the hooks directory to check things out. The ruby script is as follows:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;pre-commit.rb&lt;/b&gt;&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;1 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#aaaa77&quot;&gt;REPOS&lt;/font&gt;, &lt;font color=&quot;#aaaa77&quot;&gt;TXN&lt;/font&gt;, &lt;font color=&quot;#aaaa77&quot;&gt;DIR&lt;/font&gt;&amp;nbsp;= &lt;font color=&quot;#ffcc00&quot;&gt;ARGV&lt;/font&gt;[&lt;font color=&quot;#339999&quot;&gt;0&lt;/font&gt;], &lt;font color=&quot;#ffcc00&quot;&gt;ARGV&lt;/font&gt;[&lt;font color=&quot;#339999&quot;&gt;1&lt;/font&gt;], &lt;font color=&quot;#ffcc00&quot;&gt;ARGV&lt;/font&gt;[&lt;font color=&quot;#339999&quot;&gt;2&lt;/font&gt;]&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;2 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#aaaa77&quot;&gt;SVN_LOOK&lt;/font&gt;&amp;nbsp;= &lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;C:/Program Files/Subversion/bin/svnlook.exe&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;3 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;4 &lt;/font&gt;&lt;/span&gt;log_msg = &lt;font color=&quot;#66ff00&quot;&gt;%x[&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;#{&lt;/font&gt;&lt;font color=&quot;#aaaa77&quot;&gt;SVN_LOOK&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot; log -t &lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;#{&lt;/font&gt;&lt;font color=&quot;#aaaa77&quot;&gt;TXN&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;#{&lt;/font&gt;&lt;font color=&quot;#aaaa77&quot;&gt;REPOS&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;]&lt;/font&gt;.chomp.strip&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;5 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;6 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ff6600&quot;&gt;if&lt;/font&gt;&amp;nbsp;(log_msg.nil? || log_msg.size &amp;lt; &lt;font color=&quot;#339999&quot;&gt;5&lt;/font&gt;)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;7 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;err = &amp;lt;&amp;lt;-&lt;font color=&quot;#66ff00&quot;&gt;EOE&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;8 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;This commit has failed due to the absence of a meaningful log message. &lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;9 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Please provide a message describing why you changed what you did and&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;10 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;then try committing again. Ta -- Dan&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;11 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;EOE&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;12 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;13 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffcc00&quot;&gt;STDERR&lt;/font&gt;.puts err&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;14 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;exit&lt;/font&gt;(&lt;font color=&quot;#339999&quot;&gt;1&lt;/font&gt;) &lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;15 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ff6600&quot;&gt;end&lt;/font&gt;&lt;/div&gt;&lt;/font&gt;&lt;br /&gt;Yeah, I&#39;m a bit of a bastard setting the minimum length of the log message to 5 chars. The only tricky bit of the entire process was realizing that I needed to chomp a new line off the log message. That&#39;s where using DIR and writing to a log file helped out.&lt;br /&gt;&lt;br /&gt;Tally, ho!</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/3662547541072366622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/3662547541072366622' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/3662547541072366622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/3662547541072366622'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2008/03/svn-hooks-on-windows-with-ruby.html' title='SVN hooks on Windows with Ruby'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-2852660062042576076</id><published>2008-03-13T19:14:00.007+10:30</published><updated>2008-03-13T20:13:32.098+10:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="rants"/><title type='text'>Sun / Microsoft developer marketing</title><content type='html'>I just got back from the Microsoft &#39;Visual Studio 2008&#39; launch event at the &lt;a href=&quot;http://www1.hilton.com/en_US/hi/hotel/ADLHITW-Hilton-Adelaide-hotel/index.do&quot;&gt;Hilton&lt;/a&gt;. I can&#39;t put my finger on it but a few things just really pissed me off about the whole thing. Maybe it&#39;s the &lt;a href=&quot;http://www.abc.net.au/news/stories/2008/03/13/2188414.htm&quot;&gt;hot&lt;/a&gt; weather we&#39;ve been experiencing but I&#39;m fired up.&lt;br /&gt;&lt;br /&gt;The ASP .NET session wasn&#39;t too bad. Kudos for the Javascript debugging / code completion, but then again &lt;a href=&quot;http://www.getfirebug.com/&quot;&gt;firebug&lt;/a&gt; has been around for how long? To the people in the audience that debug their Javascript in IE using alerts; you deserve the agony :)&lt;br /&gt;&lt;br /&gt;The next session was on &lt;a href=&quot;http://msdn2.microsoft.com/en-us/teamsystem/aa718934.aspx&quot;&gt;Team Foundation Server&lt;/a&gt; , in particular the &lt;a href=&quot;http://en.wikipedia.org/wiki/Revision_control&quot;&gt;source control&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Continuous_integration&quot;&gt;continuous integration&lt;/a&gt; features. The presenter was carrying on like Microsoft invented these things. Personally, I found it rather condescending but on looking around everyone was lapping it up. I suppose if all you know is &lt;a href=&quot;http://msdn2.microsoft.com/en-us/vs2005/aa718670.aspx&quot;&gt;VSS&lt;/a&gt; then these things might impress you. These are not bells and whistles! These are essential development practices that you already should have been using. There are already so many existing tools available, I get along just fine with &lt;a href=&quot;http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET&quot;&gt;cruise control&lt;/a&gt; and &lt;a href=&quot;http://subversion.tigris.org/&quot;&gt;svn&lt;/a&gt;. I didn&#39;t see anything innovative in TFFS at all.&lt;br /&gt;&lt;br /&gt;I cast my mind back to the Sun Java developer day I attended last year; oh so many contrasts. Firstly, the Sun event was free, the Microsoft one wasn&#39;t (but thanks for sending me work) :). The Microsoft one was full of buzzwords, marketing and testimonials, where the sun one was more developer-centric, presenting some really cool shit, like launching &lt;a href=&quot;http://www.netbeans.org/kb/articles/matisse.html&quot;&gt;project matisse&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It&#39;s a real shame the Sun event was cancelled in Adelaide this year. I dearly hope this isn&#39;t indicative of a shift &lt;br /&gt;&lt;br /&gt;Unfortunately the biggest highlight of my day wasn&#39;t attending the event; it was my taxi almost running over &lt;a href=&quot;http://www.entertainmentdepot.com.au/artist_profile.php/335&quot;&gt;Ahn Do&lt;/a&gt; on the corner of Wakefield and Pulteney street.</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/2852660062042576076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/2852660062042576076' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/2852660062042576076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/2852660062042576076'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2008/03/sun-microsoft-developer-marketing.html' title='Sun / Microsoft developer marketing'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-9121191664627559091</id><published>2008-01-26T11:27:00.000+10:30</published><updated>2008-01-26T11:38:51.272+10:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="jruby"/><title type='text'>Contributing to JRuby</title><content type='html'>Things have been pretty hectic at the moment but recently I found a little bit of time to contribute to &lt;a href=&quot;http://jruby.codehaus.org/&quot;&gt;JRuby&lt;/a&gt;. I highly recommend it.&lt;br /&gt;&lt;br /&gt;The lads are doing a whole lot of good and could do with the help. Charlie wrote a post a while back on how to &lt;a href=&quot;http://headius.blogspot.com/2007/09/how-easy-is-it-to-contribute-to-jruby.html&quot;&gt;contribute&lt;/a&gt;.  Go read it.. now ... seriously, and do something for the betterment of mankind.&lt;br /&gt;&lt;br /&gt;Oh, and next time you pass an array to Dir.glob, I really hope it works :)</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/9121191664627559091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/9121191664627559091' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/9121191664627559091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/9121191664627559091'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2008/01/contributing-to-jruby.html' title='Contributing to JRuby'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-1317859213801908529</id><published>2007-12-24T19:04:00.000+10:30</published><updated>2007-12-24T19:08:28.201+10:30</updated><title type='text'>Stacked glasses stuck together?</title><content type='html'>Spray &lt;a href=&quot;http://en.wikipedia.org/wiki/WD-40&quot;&gt;WD-40&lt;/a&gt; using the nozzle around the lip of the stuck glass.&lt;br /&gt;&lt;br /&gt;Run hot water around the bottom glass, fill the top glass up with cold water.&lt;br /&gt;&lt;br /&gt;Smash on the lip with a skewer or more appropriate implement.&lt;br /&gt;&lt;br /&gt;Bob&#39;s your uncle.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Merry Christmas</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/1317859213801908529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/1317859213801908529' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/1317859213801908529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/1317859213801908529'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2007/12/stacked-glasses-stuck-together.html' title='Stacked glasses stuck together?'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-6021655111721188167</id><published>2007-12-09T00:01:00.000+10:30</published><updated>2007-12-09T00:19:56.186+10:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="svn"/><title type='text'>Sventon for my homies</title><content type='html'>I&#39;m a big fan of &lt;a href=&quot;http://www.sventon.org/&quot;&gt;sventon&lt;/a&gt;, the guys have created one of the kickingest &lt;a href=&quot;http://subversion.tigris.org/&quot;&gt;svn&lt;/a&gt; repository viewers around.&lt;br /&gt;&lt;br /&gt;Much to my dismay after an upgrade to 1.3.0, stuff stopped working. I didn&#39;t have time to look at it until recently but I dived into the &lt;a href=&quot;http://tomcat.apache.org/&quot;&gt;tomcat&lt;/a&gt; logs and pulled up this.&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;br /&gt;org.springframework.beans.MethodInvocationException: Property &#39;archiveFileCharset&#39; threw exception; nested exception is java.nio.charset.UnsupportedCharsetException: cp437&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Not so cool.&lt;br /&gt;&lt;br /&gt;cp437 is the old dos-us character set which sure isn&#39;t installed on our svn box, hence the error.&lt;br /&gt;&lt;br /&gt;So if this saves anyone else some time, go into the WEB-INF directory of sventon and edit sventon-servlet.xml. There is a property called archiveFileCharset. Change the value to whatever is appropriate for you. In my case it was &lt;a href=&quot;http://en.wikipedia.org/wiki/Windows-1252&quot;&gt;cp1252&lt;/a&gt; which is en-au amongst others, but should be good enough for most engrish speakers.&lt;br /&gt;&lt;br /&gt;I thought &lt;a href=&quot;http://unicode.org/&quot;&gt;Unicode&lt;/a&gt; had pretty much made Windows Code Pages obsolete, oh well.</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/6021655111721188167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/6021655111721188167' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/6021655111721188167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/6021655111721188167'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2007/12/sventon-for-my-homies.html' title='Sventon for my homies'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-7595128604178155850</id><published>2007-11-16T13:31:00.000+10:30</published><updated>2007-11-16T13:56:13.421+10:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>Get full name for Windows user from Ruby</title><content type='html'>Lately I&#39;ve been writing a few automation programs and it was suggested by a colleague that I write one for logging a job with &lt;a href=&quot;http://www.eds.com/&quot;&gt;EDS&lt;/a&gt;, our &quot;service&quot; provider.&lt;br /&gt;&lt;br /&gt;The web page is nasty to navigate, I think they make it hard so people decide to give up and go get a beer instead of logging a job :)&lt;br /&gt;&lt;br /&gt;Anyway, one of the fields on the page requires the full name of the person logging the job. It&#39;s trivial to grab the username of the logged on user:&lt;br /&gt;&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;1 &lt;/font&gt;&lt;/span&gt;puts &lt;font color=&quot;#ffcc00&quot;&gt;ENV&lt;/font&gt;[&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;USERNAME&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;]&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;However, I wasn&#39;t sure of the easiest way to grab the user&#39;s full name. There are a few packages out there, for example the &lt;a href=&quot;http://rubyforge.org/projects/sysutils/&quot;&gt;sys-admin&lt;/a&gt; gem. It didn&#39;t work though, I dug around in the source and it hardcodes a cimv2 path, no good.&lt;br /&gt;&lt;br /&gt;Seeing this is a quick hack running on windows for windows, rah rah rah, might as well boogey with it.  &lt;br /&gt;&lt;br /&gt;Enter &lt;a href=&quot;http://msdn2.microsoft.com/en-gb/library/aa772170.aspx&quot;&gt;ADSI&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The following interrogates our AD and grabs what I want. Too easy.&lt;br /&gt;&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;1 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#dde93d&quot;&gt;require&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;win32ole&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;2 &lt;/font&gt;&lt;/span&gt;puts &lt;font color=&quot;#aaaa77&quot;&gt;WIN32OLE&lt;/font&gt;.connect(&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;WinNT://your.ad.box.sa.gov.au/&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;#{&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;ENV&lt;/font&gt;[&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;USERNAME&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;]&lt;font color=&quot;#33aa00&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;).FullName &lt;br /&gt;&lt;/font&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/7595128604178155850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/7595128604178155850' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/7595128604178155850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/7595128604178155850'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2007/11/get-full-name-for-windows-user-from.html' title='Get full name for Windows user from Ruby'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-7405445197349222317</id><published>2007-11-14T15:31:00.000+10:30</published><updated>2007-11-14T15:51:37.243+10:30</updated><title type='text'>Blowing away IE</title><content type='html'>ASP.NET development is great fun, especially when you are targeting Internet Explorer 7 (as if there are any other browsers anyway) :).&lt;br /&gt;&lt;br /&gt;It doesn&#39;t take much to confuse IE so I find myself in the continuous loop of trying a code change, clearing the cache in IE, rebuilding the app and running it again. Numerous times a day, too many. Dancing the Microsoft Visual Studio developer jig if you will.&lt;br /&gt;&lt;br /&gt;Well, enough is enough. Time to automate it.&lt;br /&gt;&lt;br /&gt;Consider the following ruby script that uses &lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/1cw548cz.aspx&quot;&gt;WSH&lt;/a&gt;. I&#39;m aware of &lt;a href=&quot;http://wtr.rubyforge.org/&quot;&gt;watir&lt;/a&gt; and other winole jiggery, but why not just send the keystrokes, I say. This script blows out the IE cache, quits it, goes into visual studio and restarts the project, hurrah. Obviously you&#39;ll want to replace the AppActivate parameters to match your window titles.&lt;br /&gt;&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;1 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#dde93d&quot;&gt;require&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;win32ole&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;2 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;3 &lt;/font&gt;&lt;/span&gt;wsh = &lt;font color=&quot;#aaaa77&quot;&gt;WIN32OLE&lt;/font&gt;.new(&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;Wscript.Shell&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;4 &lt;/font&gt;&lt;/span&gt;wsh.AppActivate(&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;Generic Auditing Tool&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;5 &lt;/font&gt;&lt;/span&gt;sleep(&lt;font color=&quot;#339999&quot;&gt;2&lt;/font&gt;)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;6 &lt;/font&gt;&lt;/span&gt;wsh.SendKeys(&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;%{T}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;) &lt;font color=&quot;#9933cc&quot;&gt;&lt;i&gt;#ALT-T: select &#39;Tools&#39;&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;7 &lt;/font&gt;&lt;/span&gt;sleep(&lt;font color=&quot;#339999&quot;&gt;1&lt;/font&gt;)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;8 &lt;/font&gt;&lt;/span&gt;wsh.SendKeys(&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;o&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;) &lt;font color=&quot;#9933cc&quot;&gt;&lt;i&gt;#select &#39;Internet Options&#39;&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;9 &lt;/font&gt;&lt;/span&gt;sleep(&lt;font color=&quot;#339999&quot;&gt;1&lt;/font&gt;)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;10 &lt;/font&gt;&lt;/span&gt;wsh.SendKeys(&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;%{D}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;) &lt;font color=&quot;#9933cc&quot;&gt;&lt;i&gt;#select &#39;Delete&#39;&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;11 &lt;/font&gt;&lt;/span&gt;sleep(&lt;font color=&quot;#339999&quot;&gt;1&lt;/font&gt;)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;12 &lt;/font&gt;&lt;/span&gt;wsh.SendKeys(&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;a&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;) &lt;font color=&quot;#9933cc&quot;&gt;&lt;i&gt;#select &#39;Delete all&#39;&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;13 &lt;/font&gt;&lt;/span&gt;sleep(&lt;font color=&quot;#339999&quot;&gt;1&lt;/font&gt;)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;14 &lt;/font&gt;&lt;/span&gt;wsh.SendKeys(&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;d&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;) &lt;font color=&quot;#9933cc&quot;&gt;&lt;i&gt;#select &#39;also delete files and settings stored by add-ons&#39;&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;15 &lt;/font&gt;&lt;/span&gt;sleep(&lt;font color=&quot;#339999&quot;&gt;1&lt;/font&gt;)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;16 &lt;/font&gt;&lt;/span&gt;wsh.SendKeys(&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;y&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;) &lt;font color=&quot;#9933cc&quot;&gt;&lt;i&gt;#select &#39;Yes&#39;&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;17 &lt;/font&gt;&lt;/span&gt;sleep(&lt;font color=&quot;#339999&quot;&gt;8&lt;/font&gt;)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;18 &lt;/font&gt;&lt;/span&gt;wsh.SendKeys(&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;%{F4}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;) &lt;font color=&quot;#9933cc&quot;&gt;&lt;i&gt;#quit &#39;Internet Options&#39; &lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;19 &lt;/font&gt;&lt;/span&gt;sleep(&lt;font color=&quot;#339999&quot;&gt;1&lt;/font&gt;)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;20 &lt;/font&gt;&lt;/span&gt;wsh.SendKeys(&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;%{F4}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;) &lt;font color=&quot;#9933cc&quot;&gt;&lt;i&gt;#quit IE&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;21 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;22 &lt;/font&gt;&lt;/span&gt;wsh.AppActivate(&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;NAT - Microsoft Visual Studio&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;) &lt;font color=&quot;#9933cc&quot;&gt;&lt;i&gt;#grab the visual studio window&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;23 &lt;/font&gt;&lt;/span&gt;sleep(&lt;font color=&quot;#339999&quot;&gt;2&lt;/font&gt;)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;24 &lt;/font&gt;&lt;/span&gt;wsh.SendKeys(&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;^{F5}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;) &lt;font color=&quot;#9933cc&quot;&gt;&lt;i&gt;#start the project without debugging&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;/font&gt;</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/7405445197349222317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/7405445197349222317' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/7405445197349222317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/7405445197349222317'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2007/11/blowing-away-ie.html' title='Blowing away IE'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-4708870540273290680</id><published>2007-10-17T14:06:00.000+09:30</published><updated>2007-10-17T15:01:22.292+09:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><title type='text'>C# .NET Regular Expressions gotcha</title><content type='html'>I sure do love me some regular expressions but haven&#39;t really had the need in any of my C# code until now.&lt;br /&gt;&lt;br /&gt;A few things did catch me out though, in particular the constructor for the &lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/system.text.regularexpressions.regex(VS.71).aspx&quot;&gt;Regex&lt;/a&gt; class.&lt;br /&gt;&lt;br /&gt;The constructor signature I&#39;m interested in is this one: (string pattern, RegexOptions options). All well and good until you want to set &lt;b&gt;multiple&lt;/b&gt; options!&lt;br /&gt;&lt;br /&gt;Now I might be slightly naive but why doesn&#39;t the constructor use the &lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/w5zay9db(vs.71).aspx&quot;&gt;params&lt;/a&gt; keyword allowing it to accept a variable number of RegexOptions? The constructor would then look something like (string pattern, params RegexOptions[] options). I think this follows the &lt;a href=&quot;http://www.canonical.org/~kragen/tao-of-programming.html#book4&quot;&gt;LOLA&lt;/a&gt;, unlike the current method of passing multiple regex options to the constructor.&lt;br /&gt;&lt;br /&gt;Oh, guess how you are supposed to do it? Via a bitwise OR of the enum values ofcourse! Like my NUnit fun, at least I can now just get on with it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;1 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#aaaa77&quot;&gt;Regex&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;matchFieldValue&lt;/font&gt;&amp;nbsp;= &lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;2 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;new Regex(@&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;3 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(?&amp;lt;Field&amp;gt;\w+) #capture 1 or more word characters to the named group &#39;Field&#39;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;4 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\s&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;*=&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\s&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #followed by 0 or more spaces, an = sign and 0 or more spaces&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;5 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(?&amp;lt;Value&amp;gt; &#39;&amp;nbsp;&amp;nbsp; #match an apostrophe &lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;6 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;([^&#39;] |&amp;nbsp;&amp;nbsp; #match 0 or more of any character that is not an &#39; OR&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;7 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;&#39;.)*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#double apostrophe&#39;s followed by any character&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;8 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#match the closing &#39; and capture to named group &#39;Value&#39;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;9 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;,&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;10 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=&quot;#aaaa77&quot;&gt;RegexOptions&lt;/font&gt;.Compiled |&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;11 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=&quot;#aaaa77&quot;&gt;RegexOptions&lt;/font&gt;.IgnoreCase |&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;12 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=&quot;#aaaa77&quot;&gt;RegexOptions&lt;/font&gt;.IgnorePatternWhitespace);&lt;/div&gt;&lt;br /&gt;&lt;/font&gt;</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/4708870540273290680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/4708870540273290680' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/4708870540273290680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/4708870540273290680'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2007/10/c-net-regular-expressions-gotcha.html' title='C# .NET Regular Expressions gotcha'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-6264041009660164473</id><published>2007-10-12T11:19:00.000+09:30</published><updated>2007-10-12T11:48:31.678+09:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><title type='text'>NUnit configuration woes</title><content type='html'>I&#39;ve been going through writing &lt;a href=&quot;http://www.nunit.org&quot;&gt;NUnit&lt;/a&gt; tests for a .NET web app I&#39;m writing at work and all was going well until I hit some code that was using the ConfigurationManager.&lt;br /&gt;&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;1 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#aaaa77&quot;&gt;private&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;readonly&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;string&lt;/font&gt;&amp;nbsp;CONNECTION_STRING = &lt;br&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;2&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;ConfigurationManager.ConnectionStrings[&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;DBConn&amp;quot;&lt;/font&gt;].ConnectionString;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;/font&gt;&lt;br /&gt;For backgrounds sake I&#39;ve created a test dll that sits outside the web app that calls a dll used by the web app. The connection string information is stored in Web.config.&lt;br /&gt;&lt;br /&gt;Whenever NUnit loaded up the tests requiring that connection it barfed this at me:&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;br /&gt;Test.TestDataAccessUtility.GetNameValueTOList : System.TypeInitializationException : The type initializer for &#39;DataAccessUtility&#39; threw an exception.&lt;br /&gt;  ----&gt; System.NullReferenceException : Object reference not set to an instance of an object.&lt;br /&gt;&lt;/font&gt;&lt;br /&gt; &lt;br /&gt;Nice, this essentially means that ConfigurationManager had crapped itself.&lt;br /&gt;&lt;br /&gt;ConfigurationManager.ConnectionStrings.Count was returning 1.&lt;br /&gt;&lt;br /&gt;ConfigurationManager.ConnectionStrings[0].ConnectionString sent back a conn string for a SQLExpress db with some configuration string I sure didn&#39;t set.&lt;br /&gt;&lt;br /&gt;It would appear that the NUnit loads it&#39;s config file over your application&#39;s config file.&lt;br /&gt;&lt;br /&gt;To fix, I just replaced the contents of the NUnit config file: Project1.config with the contents of my Web.config. There could be a better solution, but it&#39;s working now and I can move on with my life.</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/6264041009660164473/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/6264041009660164473' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/6264041009660164473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/6264041009660164473'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2007/10/nunit-configuration-woes.html' title='NUnit configuration woes'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-3008789715693812658</id><published>2007-10-04T21:02:00.000+09:30</published><updated>2007-10-04T22:00:33.339+09:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="lisp"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><title type='text'>Sequence Mapping Functions</title><content type='html'>I&#39;ve slowly been making my way through Peter Seibel&#39;s &lt;a href=&quot;http://www.gigamonkeys.com/book/&quot;&gt;Practical Common Lisp&lt;/a&gt;. Even though I&#39;m also in between a few other books at the moment I&#39;ve managed to let some of it soak in.&lt;br /&gt;&lt;br /&gt;I came across the following example that shows off the quintessential map function.&lt;br /&gt;&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;1 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#33aa00&quot;&gt;(&lt;/font&gt;&lt;font color=&quot;#ff6600&quot;&gt;map&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#33aa00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;vector&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;#&#39;*&lt;/font&gt;&amp;nbsp;#&lt;font color=&quot;#33aa00&quot;&gt;(&lt;/font&gt;&lt;font color=&quot;#339999&quot;&gt;1&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#339999&quot;&gt;2&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#339999&quot;&gt;3&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#339999&quot;&gt;4&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#339999&quot;&gt;5&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;)&lt;/font&gt;&amp;nbsp;#&lt;font color=&quot;#33aa00&quot;&gt;(&lt;/font&gt;&lt;font color=&quot;#339999&quot;&gt;10&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#339999&quot;&gt;9&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#339999&quot;&gt;8&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#339999&quot;&gt;7&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#339999&quot;&gt;6&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;))&lt;/font&gt;&lt;/div&gt;&lt;/font&gt;&lt;br /&gt;It simply produces a new sequence by multiplying the subsequent elements of the supplied sequences, resulting in: &lt;b&gt;=&gt;  #(10 18 24 28 30)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To put it in perspective I decided to have a crack and see what an equivalent function would look like in Ruby. After a bit of mucking around I came up with this:&lt;br /&gt;&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;1 &lt;/font&gt;&lt;/span&gt;[&lt;font color=&quot;#339999&quot;&gt;1&lt;/font&gt;,&lt;font color=&quot;#339999&quot;&gt;2&lt;/font&gt;,&lt;font color=&quot;#339999&quot;&gt;3&lt;/font&gt;,&lt;font color=&quot;#339999&quot;&gt;4&lt;/font&gt;,&lt;font color=&quot;#339999&quot;&gt;5&lt;/font&gt;].zip([&lt;font color=&quot;#339999&quot;&gt;10&lt;/font&gt;,&lt;font color=&quot;#339999&quot;&gt;9&lt;/font&gt;,&lt;font color=&quot;#339999&quot;&gt;8&lt;/font&gt;,&lt;font color=&quot;#339999&quot;&gt;7&lt;/font&gt;,&lt;font color=&quot;#339999&quot;&gt;6&lt;/font&gt;]).map{|&lt;font color=&quot;#ffcc00&quot;&gt;x&lt;/font&gt;,&lt;font color=&quot;#ffcc00&quot;&gt;y&lt;/font&gt;|&amp;nbsp;x * y}&lt;br /&gt;&lt;/div&gt;&lt;/font&gt;&lt;br /&gt;I&#39;m sure someone could probably come up with something nicer as there is more than one way to skin a cat in ruby (I haven&#39;t tried, honest - ..to skin a cat that is). Regardless I think we should all sit back and appreciate the aesthetics of the lisp map.</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/3008789715693812658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/3008789715693812658' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/3008789715693812658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/3008789715693812658'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2007/10/sequence-mapping-functions.html' title='Sequence Mapping Functions'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-784555601605086396</id><published>2007-10-01T10:30:00.000+09:30</published><updated>2007-10-01T10:55:34.276+09:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ford focus"/><category scheme="http://www.blogger.com/atom/ns#" term="headlights"/><category scheme="http://www.blogger.com/atom/ns#" term="tailights"/><title type='text'>A slipshod guide to replacing 2003 Ford Focus tail and headlights</title><content type='html'>This was not fun and a bad way to kill a few hours. L&#39;s drivers side rear tail-light and front passenger side head-light decided to cark it at the same time. Now, I&#39;ve changed a few globes in my time but this was ridiculous. What were those freaking Germans thinking when they put this car together? &lt;br /&gt;&lt;br /&gt;I&#39;m documenting this due to the shitty Focus car manual and lack of good info on ye olde&#39; internet. Remember I am a nerd, not a grease monkey so if you break something, sucked in for taking my advice :)&lt;br /&gt;&lt;br /&gt;For the easier of the two, I present the rear tail-light:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Open the hatch, you&#39;ll see a screw next to the light mounting. Of course it&#39;s not a phillips or flat-head screw, it&#39;s a bastard hexalobular type thingamajig screw, look here for more information than you could ever care to want to know about the stupid screw: &lt;a href=&quot;http://en.wikipedia.org/wiki/Torx&quot;&gt;http://en.wikipedia.org/wiki/Torx&lt;/a&gt;. Luckily i had an attachment in my drill-bit set and managed to whip it off. &lt;br /&gt;&lt;br /&gt;&lt;li&gt;This is where the manual is crap, it has a picture of a screw in the light? What the hell? No, the screw is actually behind the light, not that they tell you that. So climb into the boot if you are nimble or reach your hand into the boot kind of behind where the light fitting is. You can undo this screw with your hand as it&#39;s quiet large.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Now you can just pull the light fitting off, and unscrew the little cylindrical plastic thingy that is housing the globe. &lt;br /&gt;&lt;br /&gt;&lt;li&gt;Change it, put it all back together&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Sup on some Coopers Sparkling Ale (you&#39;re going to need it for the passenger side head-light).&lt;/ol&gt;&lt;br /&gt;Ok, the rear tail-light wasn&#39;t that bad but this is where those conniving German engineers decided to play nasty shenanigans.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The battery is on the passenger side right near where we need to shove our hands. Remove the battery cover as it will make life a little bit easier.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;You won&#39;t be able to see a thing because the light cover recess is underneath the front of the bonnet. I read on a few forums that people have done crazy things to get to it, like jack the car up and remove the front wheel, or completely dismantle the front-end of the car, we don&#39;t want to be doing that.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Grab a mirror and put it in the engine-bay so you can get a better look at what you&#39;re fiddling with.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;You&#39;ll see the black light housing, there is a metal hinge that runs horizontally across it, you need to flick it down with a bit of force.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;The housing also has two clips attaching at the top. These are bastards. I just bunted it with the handle of the screwdriver and managed to pop it off. Remove it, and put it to the side.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;It&#39;s best to do this bit by feel, because it is insanely hard to hold a mirror and do this at the same time. Reach in to where abouts you think the globe is and to the right of it there is another metal hook. Push it in and kind of pull up on it, it should spring release, move it to the left, out of the way.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Now you can reach in and pull the globe out and change it.&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;Probably the hardest bit for me was getting the housing back in, even though I aligned the two clips no matter how hard i pushed or angled it, it would not go back in and seal the light fitting. Probably didn&#39;t help that that I had bugger all lighting when I was doing it.&lt;br /&gt;&lt;br /&gt;Hopefully this has saved someone else a headache or a $60 visit to your mechanic / ford dealer, let&#39;s see if I can talk L into trading the Focus in for an ESP XD, atleast i can change the globes in them :)</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/784555601605086396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/784555601605086396' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/784555601605086396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/784555601605086396'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2007/10/slipshod-guide-to-replacing-2003-ford.html' title='A slipshod guide to replacing 2003 Ford Focus tail and headlights'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-471227162723444779</id><published>2007-09-21T20:10:00.000+09:30</published><updated>2007-09-21T21:59:47.649+09:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="rants"/><category scheme="http://www.blogger.com/atom/ns#" term="vb"/><title type='text'>Code Voyeur</title><content type='html'>I like perusing public code repositories, be they CVS/SVN/Mercurial/Git whatever. I&#39;m not sure if this is some kind of sick code voyeurism fetish but I think it&#39;s kind of healthy in degrees. It&#39;s a good place to pick up tricks. Kind of like doing the weekly &lt;a href=&quot;http://www.rubyquiz.com/&quot;&gt;ruby quiz&lt;/a&gt; but looking at the code before you know what the task is and seeing how closely you think they correlate to the spec.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.hanselman.com/blog/ReadingToBeABetterDeveloperTheCoding4FunDevKit.aspx&quot;&gt;Scott Hanselman&lt;/a&gt; is also on the kick of reading other peoples code to become a better developer, could it be the path to enlightment?&lt;br /&gt;&lt;br /&gt;It dawned upon me that at work I have rarely had the need to tread outside my projects. All this time i&#39;ve been searching far and wide for great code when I had a veritable treasure trove of unread code right under my nose.&lt;br /&gt;&lt;br /&gt;We have a VB contractor doing some work for us and I caught wind that someone asked him to do it in C# ASP.NET. Wow. Might not be so bad I thought. So I had a look in SVN and came across this:&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;br /&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;1 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;public&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;string&lt;/font&gt;&amp;nbsp;Proper(&lt;font color=&quot;#aaaa77&quot;&gt;string&lt;/font&gt;&amp;nbsp;StringIn) {&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;2 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;string&lt;/font&gt;&amp;nbsp;Temp = StringIn;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;3 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;if&lt;/font&gt;&amp;nbsp;(Temp.CompareTo(String.Empty) != &lt;font color=&quot;#339999&quot;&gt;0&lt;/font&gt;) {&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;4 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;5 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;char&lt;/font&gt;[] Delimiter = { &lt;font color=&quot;#339999&quot;&gt;&#39; &#39;&lt;/font&gt;&amp;nbsp;};&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;6 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;string&lt;/font&gt;[] Words = Temp.Split(Delimiter);&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;7 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Temp = String.Empty;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;8 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;9 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;for&lt;/font&gt;&amp;nbsp;(&lt;font color=&quot;#aaaa77&quot;&gt;int&lt;/font&gt;&amp;nbsp;i = Words.GetLowerBound(&lt;font color=&quot;#339999&quot;&gt;0&lt;/font&gt;); i &amp;lt;= Words.GetUpperBound(&lt;font color=&quot;#339999&quot;&gt;0&lt;/font&gt;); i++)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;10 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;if&lt;/font&gt;&amp;nbsp;(Words[i].Trim().CompareTo(String.Empty) != &lt;font color=&quot;#339999&quot;&gt;0&lt;/font&gt;)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;11 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Temp += Words[i].Substring(&lt;font color=&quot;#339999&quot;&gt;0&lt;/font&gt;, &lt;font color=&quot;#339999&quot;&gt;1&lt;/font&gt;).ToUpper() +&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;12 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Words[i].Substring(&lt;font color=&quot;#339999&quot;&gt;1&lt;/font&gt;).ToLower() + &lt;font color=&quot;#66ff00&quot;&gt;&amp;quot; &amp;quot;&lt;/font&gt;;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;13 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;return&lt;/font&gt;&amp;nbsp;Temp;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;14 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;15 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;else&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;16 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;return&lt;/font&gt;&amp;nbsp;String.Empty;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;17 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;18 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;Apart from the upper case local variable names, in-efficient string concatenation and re-inventing the wheel, the dude did alright. Absolute respect to him, he&#39;s smart, he got it working, but it is obvious that C# is not his native tongue. That is textbook VB in C#.&lt;br /&gt;&lt;br /&gt;Here is something roughly equivalent I came up with that produces the same output (don&#39;t lambast me for not getting the current culture, &quot;en-AU&quot; does weird shit that &quot;en&quot; doesn&#39;t) :)&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;br /&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;1 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;using&lt;/font&gt;&amp;nbsp;System.Globalization;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;2 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;public&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;static&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;string&lt;/font&gt;&amp;nbsp;TitleCase(&lt;font color=&quot;#aaaa77&quot;&gt;string&lt;/font&gt;&amp;nbsp;str) {&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;3 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;return&lt;/font&gt;&amp;nbsp;String.IsNullOrEmpty(str) ? String.Empty&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;4 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : &lt;font color=&quot;#ff6600&quot;&gt;new&lt;/font&gt;&amp;nbsp;CultureInfo(&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;en&amp;quot;&lt;/font&gt;).TextInfo.ToTitleCase(str.ToLower());&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;5 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;It&#39;s not his fault really. He was asked to code in a language he wasn&#39;t familiar with and he got by. But what he did was speak English in down-town Nairobi.&lt;br /&gt;&lt;br /&gt;Now I don&#39;t know what my point is but just look at the API&#39;s if you are using an unfamiliar language. I&#39;m not shit-hot with C#, give me C, Java or Ruby and I&#39;ve got a fighting chance. The thing is I&#39;d assume that .NET would provide a way to title case a string. Instead of re-inventing the wheel I did a google search and came across the TextInfo class. You think he would have twigged that if VB has StrConv there might be something vaguely similar in C#.&lt;br /&gt;&lt;br /&gt;Moral of the story, if you&#39;re asked to code in a language you are not familiar with, knock it back or make it clear it might not look pretty. But i guess who doesn&#39;t like getting paid?</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/471227162723444779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/471227162723444779' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/471227162723444779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/471227162723444779'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2007/09/code-voyeur.html' title='Code Voyeur'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-672268771284201483</id><published>2007-09-18T12:01:00.000+09:30</published><updated>2007-09-18T12:00:25.696+09:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="metaprogramming"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><title type='text'>Meta-Meta-Meta Programming</title><content type='html'>Now this isn&#39;t particularly clever or something you should even really consider doing but i&#39;ve wasted my time so now you don&#39;t have to :). L and I got a lovely new bookshelf a few weeks ago and I noticed my beloved copy of &lt;a href=&quot;http://www.pragmaticprogrammer.com/ppbook/index.shtml&quot;&gt;The Pragmatic Programmer&lt;/a&gt; eyeing me off in the corner, so I started to thumb through it.&lt;br /&gt;&lt;br /&gt;The astute amongst you that have read it would remember their example on meta-programming that uses Perl to take an ordinary text file and generate Pascal and C source code from it. I thought i&#39;d update it a bit and use Ruby to generate Java, and, well Ruby. &lt;br /&gt;&lt;br /&gt;I did it in a similar way to the prag guys i.e. the &quot;proper&quot; way but then I got a little bit curious about the notion of source that generates source that generates source. Plus, I hadn&#39;t really dug into Ruby meta-programming and this seemed like something harmless to play with.  &lt;br /&gt;&lt;br /&gt;Seeing we all love &lt;a href=&quot;http://code.whytheluckystiff.net/shoes/&quot;&gt;Shoes&lt;/a&gt;, let&#39;s have a look at a file called &lt;b&gt;Shoe.txt&lt;/b&gt; that in pretty much plain English, models a shoe.&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;br /&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;1 &lt;/font&gt;&lt;/span&gt;C Shoe&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;2 &lt;/font&gt;&lt;/span&gt;M&amp;nbsp;&amp;nbsp; brand&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;3 &lt;/font&gt;&lt;/span&gt;M&amp;nbsp;&amp;nbsp; colour&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;4 &lt;/font&gt;&lt;/span&gt;M&amp;nbsp;&amp;nbsp; size&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;5 &lt;/font&gt;&lt;/span&gt;M&amp;nbsp;&amp;nbsp; isTrendy&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; boolean&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;true&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;6 &lt;/font&gt;&lt;/span&gt;M&amp;nbsp;&amp;nbsp; scent&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Scent&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;7 &lt;/font&gt;&lt;/span&gt;E&lt;br /&gt;&lt;/div&gt;&lt;/font&gt;&lt;br /&gt;For clarification, the beginning of each line identifies what it is modelling:&lt;br /&gt;&lt;br /&gt;C is the name of the class&lt;br /&gt;M is a member of the class, specifying it&#39;s name, type and default value&lt;br /&gt;E signals the end of the class.&lt;br /&gt;&lt;br /&gt;Pretty straight forward, eh. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So how do we turn that into:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Shoe.Java&lt;/b&gt;&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;br /&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;1 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#aaaa77&quot;&gt;class&lt;/font&gt;&amp;nbsp;Shoe {&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;2 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;private&lt;/font&gt;&amp;nbsp;String brand = &lt;font color=&quot;#339999&quot;&gt;null&lt;/font&gt;;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;3 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;public&lt;/font&gt;&amp;nbsp;String getBrand {&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;4 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;return&lt;/font&gt;&amp;nbsp;brand;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;5 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;6 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;public&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;void&lt;/font&gt;&amp;nbsp;setBrand(String brand)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;7 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;this&lt;/font&gt;.brand = brand;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;8 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;9 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;10 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;private&lt;/font&gt;&amp;nbsp;String colour = &lt;font color=&quot;#339999&quot;&gt;null&lt;/font&gt;;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;11 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;public&lt;/font&gt;&amp;nbsp;String getColour {&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;12 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;return&lt;/font&gt;&amp;nbsp;colour;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;13 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;14 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;public&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;void&lt;/font&gt;&amp;nbsp;setColour(String colour)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;15 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;this&lt;/font&gt;.colour = colour;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;16 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;17 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;18 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;private&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;int&lt;/font&gt;&amp;nbsp;size = &lt;font color=&quot;#339999&quot;&gt;7&lt;/font&gt;;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;19 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;public&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;int&lt;/font&gt;&amp;nbsp;getSize {&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;20 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;return&lt;/font&gt;&amp;nbsp;size;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;21 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;22 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;public&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;void&lt;/font&gt;&amp;nbsp;setSize(&lt;font color=&quot;#aaaa77&quot;&gt;int&lt;/font&gt;&amp;nbsp;size)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;23 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;this&lt;/font&gt;.size = size;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;24 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;25 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;26 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;private&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;boolean&lt;/font&gt;&amp;nbsp;isTrendy = &lt;font color=&quot;#339999&quot;&gt;true&lt;/font&gt;;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;27 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;public&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;boolean&lt;/font&gt;&amp;nbsp;getIstrendy {&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;28 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;return&lt;/font&gt;&amp;nbsp;isTrendy;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;29 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;30 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;public&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;void&lt;/font&gt;&amp;nbsp;setIstrendy(&lt;font color=&quot;#aaaa77&quot;&gt;boolean&lt;/font&gt;&amp;nbsp;isTrendy)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;31 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;this&lt;/font&gt;.isTrendy = isTrendy;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;32 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;33 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;34 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;private&lt;/font&gt;&amp;nbsp;Scent scent = &lt;font color=&quot;#339999&quot;&gt;null&lt;/font&gt;;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;35 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;public&lt;/font&gt;&amp;nbsp;Scent getScent {&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;36 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;return&lt;/font&gt;&amp;nbsp;scent;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;37 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;38 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;public&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;void&lt;/font&gt;&amp;nbsp;setScent(Scent scent)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;39 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;this&lt;/font&gt;.scent = scent;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;40 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;41 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;42 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;43 &lt;/font&gt;&lt;/span&gt;}&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;and &lt;b&gt;Shoe.rb&lt;/b&gt;?&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;br /&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;1 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ff6600&quot;&gt;class&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;Shoe&lt;/font&gt;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;2 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#dde93d&quot;&gt;attr_accessor&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#339999&quot;&gt;:brand&lt;/font&gt;, &lt;font color=&quot;#339999&quot;&gt;:colour&lt;/font&gt;, &lt;font color=&quot;#339999&quot;&gt;:size&lt;/font&gt;, &lt;font color=&quot;#339999&quot;&gt;:isTrendy&lt;/font&gt;, &lt;font color=&quot;#339999&quot;&gt;:scent&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;3 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;def&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffcc00&quot;&gt;initialize&lt;/font&gt;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;4 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffcc00&quot;&gt;@colour&lt;/font&gt;&amp;nbsp;= &lt;font color=&quot;#339999&quot;&gt;nil&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;5 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffcc00&quot;&gt;@size&lt;/font&gt;&amp;nbsp;= &lt;font color=&quot;#339999&quot;&gt;7&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;6 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffcc00&quot;&gt;@isTrendy&lt;/font&gt;&amp;nbsp;= &lt;font color=&quot;#339999&quot;&gt;true&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;7 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffcc00&quot;&gt;@scent&lt;/font&gt;&amp;nbsp;= &lt;font color=&quot;#339999&quot;&gt;nil&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;8 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;end&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;9 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ff6600&quot;&gt;end&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;/font&gt;&lt;br /&gt;Well, there is the smart way i.e. the pragmatic way, or there is the meta-meta-meta programming way. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;language_generator.rb&lt;/b&gt;&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;br /&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;1 &lt;/font&gt;&lt;/span&gt;langs = &lt;font color=&quot;#66ff00&quot;&gt;%w(&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;ruby java&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;)&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;2 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ff6600&quot;&gt;class&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;LangGen&lt;/font&gt;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;3 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ff6600&quot;&gt;end&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;4 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;5 &lt;/font&gt;&lt;/span&gt;langs.each &lt;font color=&quot;#ff6600&quot;&gt;do&lt;/font&gt;&amp;nbsp;|&lt;font color=&quot;#ffcc00&quot;&gt;lang&lt;/font&gt;|&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;6 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;LangGen&lt;/font&gt;.class_eval &amp;lt;&amp;lt;-&lt;font color=&quot;#66ff00&quot;&gt;LETS_DANCE&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;7 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$first = true&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;8 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$init = &amp;quot;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;&amp;nbsp;9 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;10 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;def &lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;#{&lt;/font&gt;lang&lt;font color=&quot;#33aa00&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;_class_start(name)&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;11 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out = &amp;quot;class &amp;quot; + eval(\&amp;quot;name.chomp\&amp;quot;) + &#39; &#39;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;12 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out &amp;lt;&amp;lt; &amp;quot;{&amp;quot; if &#39;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;#{&lt;/font&gt;lang&lt;font color=&quot;#33aa00&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39; == &#39;java&#39;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;13 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out &amp;lt;&amp;lt; &amp;quot;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\n&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;14 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;15 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;16 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;17 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;def &lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;#{&lt;/font&gt;lang&lt;font color=&quot;#33aa00&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;_class_end&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;18 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out = &amp;quot;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;19 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out &amp;lt;&amp;lt; &amp;quot;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\n&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;}&amp;quot; if &#39;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;#{&lt;/font&gt;lang&lt;font color=&quot;#33aa00&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39; == &#39;java&#39;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;20 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if &#39;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;#{&lt;/font&gt;lang&lt;font color=&quot;#33aa00&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39; == &#39;ruby&#39;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;21 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out &amp;lt;&amp;lt; $init&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;22 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out &amp;lt;&amp;lt; &amp;quot;&amp;nbsp;&amp;nbsp;end&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;23 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out &amp;lt;&amp;lt; &amp;quot;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\n&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;end&amp;quot; &lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;24 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;25 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;26 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;27 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;28 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;def &lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;#{&lt;/font&gt;lang&lt;font color=&quot;#33aa00&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;_members(name, type, value)&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;29 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out = &amp;quot;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;30 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if &#39;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;#{&lt;/font&gt;lang&lt;font color=&quot;#33aa00&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39; == &#39;java&#39;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;31 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;value ||= &#39;null&#39;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;32 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out &amp;lt;&amp;lt; &amp;quot;&amp;nbsp;&amp;nbsp;private &amp;quot; + eval(\&amp;quot;type\&amp;quot;)+&#39; &#39;+eval(\&amp;quot;name\&amp;quot;)+&#39; = &#39;+&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;33 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;eval(\&amp;quot;value\&amp;quot;)+&amp;quot;;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\n&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;34 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;35 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;36 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out &amp;lt;&amp;lt; &amp;quot;&amp;quot; if &#39;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;#{&lt;/font&gt;lang&lt;font color=&quot;#33aa00&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39; == &#39;ruby&#39;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;37 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;38 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;39 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;40 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;def &lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;#{&lt;/font&gt;lang&lt;font color=&quot;#33aa00&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;_accessors(name, type, value)&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;41 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;accessors = &amp;quot;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;42 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if &#39;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;#{&lt;/font&gt;lang&lt;font color=&quot;#33aa00&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39; == &#39;java&#39;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;43 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;accessors &amp;lt;&amp;lt; &amp;quot;&amp;nbsp;&amp;nbsp;public &amp;quot; + eval(\&amp;quot;type\&amp;quot;)+&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;44 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot; get&amp;quot;+eval(\&amp;quot;name.capitalize\&amp;quot;)+&amp;quot; {&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\n&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;45 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;accessors &amp;lt;&amp;lt; &amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return &amp;quot;+eval(\&amp;quot;name\&amp;quot;)+&amp;quot;;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\n&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;46 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;accessors &amp;lt;&amp;lt; &amp;quot;&amp;nbsp;&amp;nbsp;}&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\n&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;47 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;accessors &amp;lt;&amp;lt; &amp;quot;&amp;nbsp;&amp;nbsp;public void set&amp;quot;+eval(\&amp;quot;name.capitalize\&amp;quot;)+ &#39;(&#39;+&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;48 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;eval(\&amp;quot;type\&amp;quot;)+ &#39; &#39;+ eval(\&amp;quot;name\&amp;quot;)+&amp;quot;)&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\n&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;49 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;accessors &amp;lt;&amp;lt; &amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.&amp;quot;+eval(\&amp;quot;name\&amp;quot;)+&amp;quot; = &amp;quot;+eval(\&amp;quot;name\&amp;quot;)+&amp;quot;;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\n&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;50 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;accessors &amp;lt;&amp;lt; &amp;quot;&amp;nbsp;&amp;nbsp;}&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\n\n&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;51 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;52 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if &#39;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;#{&lt;/font&gt;lang&lt;font color=&quot;#33aa00&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39; == &#39;ruby&#39;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;53 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;value ||= &#39;nil&#39;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;54 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if $first&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;55 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$init &amp;lt;&amp;lt; &amp;quot;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\n&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;def initialize &lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\n&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;56 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;accessors &amp;lt;&amp;lt; &amp;quot;&amp;nbsp;&amp;nbsp;attr_accessor :&amp;quot; + eval(\&amp;quot;name\&amp;quot;)&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;57 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;58 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;accessors &amp;lt;&amp;lt; &amp;quot;, :&amp;quot; + eval(\&amp;quot;name\&amp;quot;) unless $first&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;59 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$init &amp;lt;&amp;lt; &#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@&#39;+ eval(\&amp;quot;name\&amp;quot;)+&#39; = &#39;+eval(\&amp;quot;value\&amp;quot;)+&amp;quot;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\n&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot; unless $first&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;60 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$first = false&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;61 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;62 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;accessors&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;63 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;64 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;65 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;LETS_DANCE&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;66 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ff6600&quot;&gt;end&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;67 &lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;68 &lt;/font&gt;&lt;/span&gt;gen = &lt;font color=&quot;#aaaa77&quot;&gt;LangGen&lt;/font&gt;.new&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;69 &lt;/font&gt;&lt;/span&gt;langs.each &lt;font color=&quot;#ff6600&quot;&gt;do&lt;/font&gt;&amp;nbsp;|&lt;font color=&quot;#ffcc00&quot;&gt;lang&lt;/font&gt;|&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;70 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#aaaa77&quot;&gt;File&lt;/font&gt;.open(&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;Shoe.txt&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;).each &lt;font color=&quot;#ff6600&quot;&gt;do&lt;/font&gt;&amp;nbsp;|&lt;font color=&quot;#ffcc00&quot;&gt;line&lt;/font&gt;|&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;71 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;if&lt;/font&gt;&amp;nbsp;line =~ &lt;font color=&quot;#44b4cc&quot;&gt;/&lt;/font&gt;&lt;font color=&quot;#44b4cc&quot;&gt;^C&lt;/font&gt;&lt;font color=&quot;#44b4cc&quot;&gt;/&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;72 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print gen.send(&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;#{&lt;/font&gt;lang&lt;font color=&quot;#33aa00&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;_class_start&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;.to_sym, line.gsub(&lt;font color=&quot;#44b4cc&quot;&gt;/&lt;/font&gt;&lt;font color=&quot;#44b4cc&quot;&gt;^C&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\s&lt;/font&gt;&lt;font color=&quot;#44b4cc&quot;&gt;+&lt;/font&gt;&lt;font color=&quot;#44b4cc&quot;&gt;/&lt;/font&gt;,&lt;font color=&quot;#66ff00&quot;&gt;&#39;&#39;&lt;/font&gt;))&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;73 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;end&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;74 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print gen.send(&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;#{&lt;/font&gt;lang&lt;font color=&quot;#33aa00&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;_class_end&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;.to_sym) &lt;font color=&quot;#ff6600&quot;&gt;if&lt;/font&gt;&amp;nbsp;line =~ &lt;font color=&quot;#44b4cc&quot;&gt;/&lt;/font&gt;&lt;font color=&quot;#44b4cc&quot;&gt;^E&lt;/font&gt;&lt;font color=&quot;#44b4cc&quot;&gt;/&lt;/font&gt;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;75 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;if&lt;/font&gt;&amp;nbsp;line =~ &lt;font color=&quot;#44b4cc&quot;&gt;/&lt;/font&gt;&lt;font color=&quot;#44b4cc&quot;&gt;^M&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\s&lt;/font&gt;&lt;font color=&quot;#44b4cc&quot;&gt;+(\w+)&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\s&lt;/font&gt;&lt;font color=&quot;#44b4cc&quot;&gt;+(\w+)&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\s&lt;/font&gt;&lt;font color=&quot;#44b4cc&quot;&gt;+(\w+)?&lt;/font&gt;&lt;font color=&quot;#44b4cc&quot;&gt;/&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;76 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name, type, value = &lt;font color=&quot;#ffcc00&quot;&gt;$1&lt;/font&gt;, &lt;font color=&quot;#ffcc00&quot;&gt;$2&lt;/font&gt;, &lt;font color=&quot;#ffcc00&quot;&gt;$3&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;77 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print gen.send(&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;#{&lt;/font&gt;lang&lt;font color=&quot;#33aa00&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;_members&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;.to_sym, name, type, value)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;78 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print gen.send(&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;#{&lt;/font&gt;lang&lt;font color=&quot;#33aa00&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;_accessors&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;.to_sym, name, type, value)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;79 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;end&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;80 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;end&lt;/font&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;81 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;printf(&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\n&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;+&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;*&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;*&lt;font color=&quot;#339999&quot;&gt;50&lt;/font&gt;&amp;nbsp;+ &lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#33aa00&quot;&gt;\n&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;)&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;82 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ff6600&quot;&gt;end&lt;/font&gt; &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/font&gt;</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/672268771284201483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/672268771284201483' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/672268771284201483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/672268771284201483'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2007/08/meta-meta-meta-programming.html' title='Meta-Meta-Meta Programming'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-474900616720063937</id><published>2007-08-28T14:02:00.001+09:30</published><updated>2007-08-29T10:15:36.987+09:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="languages"/><category scheme="http://www.blogger.com/atom/ns#" term="rants"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><title type='text'>&quot;Ruby off the Rails?&quot; quid pro quo</title><content type='html'>I came across &lt;a href=&quot;http://paulturner.is-a-geek.com/Lists/Posts/Post.aspx?ID=34&quot;&gt;Ruby off the Rails?&lt;/a&gt; by Paul Turner and he issued a challenge at the end of his post, and I bit :)&lt;br /&gt;&lt;br /&gt;Read it &lt;a href=&quot;http://paulturner.is-a-geek.com/Lists/Posts/Post.aspx?ID=34&quot;&gt;here&lt;/a&gt; (including the comments) then come back for my some-what larger response.&lt;br /&gt;&lt;br /&gt;Begin communique:&lt;br /&gt;&lt;br /&gt;I agree with you that Microsoft adding more and more languages to the framework is a bad idea. J# anyone? . Their ploy is to lower barrier to entry, so what you end up with is some developers using anything but C#, because, well why bother learning it if you don&#39;t have to. Have you tried proposing C#.NET to a VB developer when they can use VB.NET? I have, it&#39;s not fun. It might just be me but I question the maintainability of an application written in 7 different languages.&lt;br /&gt;&lt;br /&gt;To answer your question:&lt;br /&gt;&lt;br /&gt;Read the following with the caveat of using the &quot;right tool for the right job&quot;. Obviously if you are targetting a windows desktop app, it is hard to trump WinForms. However i think .NET is licked in every other category. &lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt; &lt;b&gt;Portability (Mono still doesn&#39;t implement the full .NET 2.0 API)&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt; &lt;b&gt;Expressiveness of language:&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;1 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;font color=&quot;#ff6600&quot;&gt;for&lt;/font&gt;&amp;nbsp;(&lt;font color=&quot;#aaaa77&quot;&gt;int&lt;/font&gt;&amp;nbsp;i = &lt;font color=&quot;#339999&quot;&gt;0&lt;/font&gt;; i &amp;lt; &lt;font color=&quot;#339999&quot;&gt;5&lt;/font&gt;; i++) {&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;2 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.Out.Write(&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;c# loop &amp;quot;&lt;/font&gt;);&lt;br /&gt;&lt;span style=&quot;background-color: #222222&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;3 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;/font&gt;&lt;br /&gt;   vs.&lt;br /&gt;&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;font color=&quot;#ddeeff&quot;&gt;1 &lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#339999&quot;&gt;5&lt;/font&gt;.times { print &lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;ruby loop &lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&amp;nbsp;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/font&gt;&lt;li&gt; &lt;b&gt;Cost $$$$$$$$$$$$$$$&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt; &lt;b&gt;MSDN documentation is, well crap, contrast:&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;     &lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/system.io.file(vs.85).aspx&quot;&gt;http://msdn2.microsoft.com/en-us/library/system.io.file(vs.85).aspx&lt;/a&gt;&lt;br /&gt;   and &lt;br /&gt;     &lt;a href=&quot;http://java.sun.com/javase/6/docs/api/java/io/File.html&quot;&gt;http://java.sun.com/javase/6/docs/api/java/io/File.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt; &lt;b&gt;Closed source / Open standard&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt; &lt;br /&gt;I can safely say that you are the first Microsoft proponent that I have come across that knows the difference between open-source and open-standard :). Some people claim that .NET is open-source. No; it&#39;s a huge difference. Java is open-source: &lt;a href=&quot;http://www.sun.com/2006-1113/feature/&quot;&gt;http://www.sun.com/2006-1113/feature/&lt;/a&gt;. Ruby is open-source: &lt;a href=&quot;http://www.ruby-lang.org/en/LICENSE.txt&quot;&gt;http://www.ruby-lang.org/en/LICENSE.txt&lt;/a&gt;. But you hit the nail on the head C# is an open standard: &lt;a href=&quot;http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf&quot;&gt;http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This might not be a kicker for a lot of people, but it is to me. I like being able to delve into source and see what&#39;s going on and change it to suit me. This is how i found a bug in the Sun implementation of the CachedRowSet, i thought i was going insane  but i was able to get in there and figure why it wasn&#39;t working and then report it. Kudos for the open-standard, but one up it and go the whole hog.&lt;br /&gt;&lt;br /&gt;I was also working as a government employee when I discovered that bug. If the source hadn&#39;t been open I would not have been able to temporarily patch it and get on with what I was doing.&lt;br /&gt;&lt;br /&gt;I also have to disagree about the &#39;purity&#39; of keeping SQL code in SQL Server. It&#39;s fine if you have resigned yourself to paying for SQL Server subscriptions the rest of your life. But i&#39;d like to bet on a bit of flexibility and write ANSI compliant SQL that i could quite easily drop into Postgres or any other db for that matter. Ofcourse there are extenuating circumstances (performance reasons and the like) to dabble in sql server extensions, but it is a rarity. I wish i also had the energy to go the age old &#39;dynamic sql vs stored procedures&#39; argument with you too :)&lt;br /&gt;&lt;br /&gt;Rather than bemoan the fact that is IronRuby, maybe have a look at it, who knows you might give up your C# day job :)</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/474900616720063937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/474900616720063937' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/474900616720063937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/474900616720063937'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2007/08/ruby-off-rails-quid-pro-quo.html' title='&quot;Ruby off the Rails?&quot; quid pro quo'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-7932796248658175984</id><published>2007-08-17T22:32:00.000+09:30</published><updated>2007-08-28T21:23:37.766+09:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="svn"/><title type='text'>Automating SVN stuff with Ruby</title><content type='html'>Ahoy hoy.&lt;br /&gt;&lt;br /&gt;The other day at work I was looking at upgrading an SVN installation at an off-site and came across a good 70 odd repositories dumped to backup. Rather than take the typical windows muppet route and unzip each one, create an svn directory and import them manually, I scripted the whole thing. &lt;br /&gt;&lt;br /&gt;Ruby lends itself to this sort of work. I&#39;ve used it in the past to automate daily and weekly backups of another repository so I knew it would be pretty easy to sort this out. The best part is it didn&#39;t take more than 15 minutes from go to whoah. Here it is in it&#39;s entirety, it&#39;s not a shining example of best practice, nor does it profess to be, but it does what it&#39;s supposed to do.&lt;br /&gt;&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;br /&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;&amp;nbsp;1 &lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;################################################################################&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;&amp;nbsp;2 &lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;#&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;&amp;nbsp;3 &lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;# SVN importer &lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;&amp;nbsp;4 &lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;#&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;&amp;nbsp;5 &lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;# rubyzip must be installed: gem install rubyzip&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;&amp;nbsp;6 &lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;#&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;&amp;nbsp;7 &lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;################################################################################&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;&amp;nbsp;8 &lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;&amp;nbsp;9 &lt;/font&gt;&lt;font color=&quot;#ffcc00&quot;&gt;require&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;zip/zipfilesystem&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;10 &lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;11 &lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;SVN_REPOS_URL&lt;/font&gt;&amp;nbsp;= &lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;http://paleale:8090/svn-repos/&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;12 &lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;SVN_REPOS_PATH&lt;/font&gt;&amp;nbsp;= &lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;C:/svn-repos&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;13 &lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;BACKUP_DIR&lt;/font&gt;&amp;nbsp;= &lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;//sparkling/SVNbackups/&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;14 &lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;UNZIP_DIR&lt;/font&gt;&amp;nbsp;= &lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;C:/Documents and Settings/dan/My Documents/&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;15 &lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;16 &lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;# unzip all the dump files into the UNZIP_DIR&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;17 &lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;# we make the assumption that the dump file inside the zip shares the same name &lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;18 &lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;# i.e. web_indicator.dump.zip has web.indicator.dump inside it&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;19 &lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;Dir&lt;/font&gt;[&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;#{&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;BACKUP_DIR&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;*/*.zip&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;].each &lt;font color=&quot;#ff6600&quot;&gt;do&lt;/font&gt;&amp;nbsp;|&lt;font color=&quot;#ffffff&quot;&gt;zipFile&lt;/font&gt;|&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;20 &lt;/font&gt;&amp;nbsp;&amp;nbsp;dumpFile = zipFile.gsub(&lt;font color=&quot;#66ff00&quot;&gt;/&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;^.*\/&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;/&lt;/font&gt;,&lt;font color=&quot;#66ff00&quot;&gt;&#39;&#39;&lt;/font&gt;).gsub(&lt;font color=&quot;#66ff00&quot;&gt;/&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;\.zip&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;/&lt;/font&gt;,&lt;font color=&quot;#66ff00&quot;&gt;&#39;&#39;&lt;/font&gt;)&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;21 &lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;Zip&lt;/font&gt;::&lt;font color=&quot;#ffffff&quot;&gt;ZipFile&lt;/font&gt;.open(zipFile) &lt;font color=&quot;#ff6600&quot;&gt;do&lt;/font&gt;&amp;nbsp;|&lt;font color=&quot;#ffffff&quot;&gt;unZip&lt;/font&gt;|&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;22 &lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;unZip.extract(dumpFile, &lt;font color=&quot;#ffffff&quot;&gt;UNZIP_DIR&lt;/font&gt;&amp;nbsp;+ dumpFile)&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;23 &lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;end&lt;/font&gt;&amp;nbsp;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;24 &lt;/font&gt;&lt;font color=&quot;#ff6600&quot;&gt;end&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;25 &lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;26 &lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;# create svn directories for each dumpFile, load into SVN then delete the file &lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;27 &lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;Dir&lt;/font&gt;.glob(&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;#{&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;UNZIP_DIR&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;*.dump&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;).each &lt;font color=&quot;#ff6600&quot;&gt;do&lt;/font&gt;&amp;nbsp;|&lt;font color=&quot;#ffffff&quot;&gt;dumpFile&lt;/font&gt;|&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;28 &lt;/font&gt;&amp;nbsp;&amp;nbsp;projName = dumpFile.gsub(&lt;font color=&quot;#66ff00&quot;&gt;/&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;^.*\/&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;/&lt;/font&gt;,&lt;font color=&quot;#66ff00&quot;&gt;&#39;&#39;&lt;/font&gt;).gsub(&lt;font color=&quot;#66ff00&quot;&gt;/&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;\.dump&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;/&lt;/font&gt;,&lt;font color=&quot;#66ff00&quot;&gt;&#39;&#39;&lt;/font&gt;)&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;29 &lt;/font&gt;&amp;nbsp;&amp;nbsp;cmd = &lt;font color=&quot;#66ff00&quot;&gt;%{&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;svn mkdir -m &amp;quot;automated: creating project structure from import&amp;quot; &lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;}&lt;/font&gt;&amp;nbsp;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;30 &lt;/font&gt;&amp;nbsp;&amp;nbsp;cmd &amp;lt;&amp;lt; &lt;font color=&quot;#ffffff&quot;&gt;SVN_REPOS_URL&lt;/font&gt;&amp;nbsp;&amp;lt;&amp;lt; projName&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;31 &lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#66ff00&quot;&gt;%x&amp;quot;&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;#{&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;cmd&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;32 &lt;/font&gt;&amp;nbsp;&amp;nbsp;cmd = &lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;svnadmin load --parent-dir &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;#{&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;projName&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;#{&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;SVN_REPOS_PATH&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;33 &lt;/font&gt;&amp;nbsp;&amp;nbsp;cmd &amp;lt;&amp;lt; &lt;font color=&quot;#66ff00&quot;&gt;%{&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;nbsp;&amp;lt; &amp;quot;&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;#{&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;dumpFile&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;}&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;34 &lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#66ff00&quot;&gt;%x&amp;quot;&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;#{&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;cmd&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;}&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;35 &lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;File&lt;/font&gt;.delete(dumpFile)&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;36 &lt;/font&gt;&lt;font color=&quot;#ff6600&quot;&gt;end&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/font&gt;</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/7932796248658175984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/7932796248658175984' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/7932796248658175984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/7932796248658175984'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2007/08/automating-svn-stuff-with-ruby.html' title='Automating SVN stuff with Ruby'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-8027616293130199352</id><published>2007-08-13T17:16:00.000+09:30</published><updated>2007-08-14T17:15:56.693+09:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="vms"/><title type='text'>Linux eye for the VMS guy</title><content type='html'>Recently I traded my comfy life with Fedora and Solaris for Windows and VMS. Yes, I&#39;m crazy, but I wanted to see how the other half live, plus it&#39;s what they use at my new job.&lt;br /&gt;&lt;br /&gt;What I propose to do is make my VMS life as cruisy as possible. Therefore I&#39;m trying to map as many *nix commands as i can to &lt;a href= &quot;http://en.wikipedia.org/wiki/DIGITAL_Command_Language&quot;&gt;DCL&lt;/a&gt;. If you don&#39;t know what a LOGIN.COM file is, it&#39;s analogous to your .bashrc if you use the BASH shell. It also funnily enough gets executed when you login. My first triumph was getting VIM installed, thanks to this &lt;a href=&quot;http://www.polarhome.com/vim/&quot;&gt;guy&lt;/a&gt; for building the binary, absolute champion.&lt;br /&gt;&lt;br /&gt;Here is my login.com, no doubt it will grow and i&#39;ll try and update it as i add stuff.&lt;br /&gt;&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;br /&gt;&lt;div style=&quot;background-color:black;font-size:12px;color:white&quot;&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;&amp;nbsp;1 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LOGIN.COM&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;&amp;nbsp;2 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;!&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;&amp;nbsp;3 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;!&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;&amp;nbsp;4 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;set&lt;/font&gt;&amp;nbsp;noon&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;&amp;nbsp;5 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;IF&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffcc00&quot;&gt;F$MODE&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;()&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;.&lt;/font&gt;&lt;font color=&quot;#ff6600&quot;&gt;NES&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;.&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;INTERACTIVE&amp;quot;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;THEN&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;GOTO&lt;/font&gt;&amp;nbsp;BATCH_LOGIN&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;&amp;nbsp;6 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;vt200&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;&amp;nbsp;7 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;set&lt;/font&gt;&amp;nbsp;term&lt;font color=&quot;#ff6600&quot;&gt;/&lt;/font&gt;&lt;font color=&quot;#ff6600&quot;&gt;inq&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;&amp;nbsp;8 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;set&lt;/font&gt;&amp;nbsp;term&lt;font color=&quot;#ff6600&quot;&gt;/&lt;/font&gt;color&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;&amp;nbsp;9 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;set&lt;/font&gt;&amp;nbsp;control&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;Y&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;10 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;set&lt;/font&gt;&amp;nbsp;prompt&lt;font color=&quot;#ff6600&quot;&gt;=&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;Dan$ &amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;11 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;! VIM &lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;12 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;define&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;/&lt;/font&gt;nolog&amp;nbsp;VIM&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;dev_users:&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;[&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;dan&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;.&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;VIM&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;]&lt;/font&gt;VIM&lt;font color=&quot;#ffa500&quot;&gt;.&lt;/font&gt;EXE&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;13 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;define&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;/&lt;/font&gt;nolog&amp;nbsp;VIMRUNTIME&amp;nbsp;&lt;font color=&quot;#ffffff&quot;&gt;dev_users:&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;[&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;dan&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;.&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;VIM&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;.&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;VIM71&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;]&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;14 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;define&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;/&lt;/font&gt;nolog&amp;nbsp;TMP&amp;nbsp;SYS$SCRATCH&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;15 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;vim&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;:==&lt;/font&gt;&amp;nbsp;$&lt;font color=&quot;#ffffff&quot;&gt;dev_users:&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;[&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;dan&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;.&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;VIM&lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;]&lt;/font&gt;VIM&lt;font color=&quot;#ffa500&quot;&gt;.&lt;/font&gt;EXE&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;16 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;! Other UNIX stuff&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;17 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;who&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;==&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;show&lt;/font&gt;&amp;nbsp;users&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;18 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;date&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;==&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;show&lt;/font&gt;&amp;nbsp;time&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;19 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;ls&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;==&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;dir/size/prot/date=create/width=(filename=28,size=5)&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;20 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;pwd&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;==&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;show default&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;21 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;clear&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;==&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;type/page nl:&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;22 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;more&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;==&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;type/page&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;23 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;cat&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;==&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;type/nopage&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;24 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;cd&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;==&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;set default&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;25 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;top&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;==&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;monitor process/topcpu/interval=10&amp;quot;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;26 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&lt;font color=&quot;#9933cc&quot;&gt;!&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;27 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;set&lt;/font&gt;&amp;nbsp;protection&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa500&quot;&gt;(&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;s:&lt;/font&gt;rwed&lt;font color=&quot;#ffa500&quot;&gt;,&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;o:&lt;/font&gt;rwed&lt;font color=&quot;#ffa500&quot;&gt;,&lt;/font&gt;&lt;font color=&quot;#ffffff&quot;&gt;g:&lt;/font&gt;e&lt;font color=&quot;#ffa500&quot;&gt;,&lt;/font&gt;w&lt;font color=&quot;#ffa500&quot;&gt;)&lt;/font&gt;&lt;font color=&quot;#ff6600&quot;&gt;/&lt;/font&gt;default&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;28 &lt;/font&gt;&lt;font color=&quot;#ffa500&quot;&gt;$&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ff6600&quot;&gt;EXIT&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/font&gt;</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/8027616293130199352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/8027616293130199352' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/8027616293130199352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/8027616293130199352'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2007/08/linux-eye-for-vms-guy.html' title='Linux eye for the VMS guy'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8692632067019524643.post-7082967406729448884</id><published>2007-08-01T08:51:00.000+09:30</published><updated>2008-02-13T11:50:05.966+10:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="languages"/><category scheme="http://www.blogger.com/atom/ns#" term="rants"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><title type='text'>Pander to familiarity</title><content type='html'>The first step of getting out of the familiarity trap is to feel confident in sizing up what else is on offer.&lt;br /&gt;&lt;br /&gt;A simple set of criteria as defined by &lt;a href=&quot;http://cs.uccs.edu/%7Erws/&quot;&gt;Sebesta&lt;/a&gt; in &#39;Concepts of Programming Languages&#39; includes:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;Readability&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Writability&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Reliability&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;The invisible 4th criteria I belive is &lt;b&gt;Familiarity&lt;/b&gt;. Unfortunately, in reality I believe that familiarity takes precedence for the majority. You might argue that familiarity is a construct of readability and writability but I disagree. It may be a fuzzy line; but to me something isn&#39;t purely readable and writable just because you&#39;ve twisted your mind to think that way.&lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;br /&gt;&lt;div style=&quot;background-color:black;font-size:16px;color:white&quot;&gt;&lt;font color=&quot;#ffff00&quot;&gt;1 &lt;/font&gt;&lt;font color=&quot;#ff6600&quot;&gt;for&lt;/font&gt;&amp;nbsp;(&lt;font color=&quot;#ffffff&quot;&gt;int&lt;/font&gt;&amp;nbsp;i = &lt;font color=&quot;#ffee98&quot;&gt;0&lt;/font&gt;; i &amp;lt; &lt;font color=&quot;#ffee98&quot;&gt;5&lt;/font&gt;; i++)&amp;nbsp;{&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;2 &lt;/font&gt;&amp;nbsp;&amp;nbsp;Console.Out.Write(&lt;font color=&quot;#66ff00&quot;&gt;&amp;quot;hi &amp;quot;&lt;/font&gt;);&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;3 &lt;/font&gt;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;That looping construct makes sense to a veritable legion of programmers (pick your printf or println statement). Is it readable and writable because you&#39;ve done it a gazillion times or is it inherently simple?&lt;br /&gt;&lt;br /&gt;Contrast that with:&lt;br /&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;br /&gt;&lt;div style=&quot;background-color:black;font-size:16px;color:white&quot;&gt;&lt;font color=&quot;#ffff00&quot;&gt;1 &lt;/font&gt;&lt;font color=&quot;#ffee98&quot;&gt;5&lt;/font&gt;.times &lt;font color=&quot;#ff6600&quot;&gt;do&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;2 &lt;/font&gt;&amp;nbsp;&amp;nbsp;print &lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;hi &lt;/font&gt;&lt;font color=&quot;#66ff00&quot;&gt;&#39;&lt;/font&gt;&lt;br /&gt;&lt;font color=&quot;#ffff00&quot;&gt;3 &lt;/font&gt;&lt;font color=&quot;#ff6600&quot;&gt;end&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;If you pulled a layman off the street and showed them both I could take a guess at which one would be considered more readable.&lt;br /&gt;&lt;br /&gt;In Steve Yegge&#39;s (in)famous &lt;a href=&quot;http://steve-yegge.blogspot.com/2007/02/next-big-language.html&quot;&gt;next big language&lt;/a&gt; post his number #1 rule for the next triumphant language is &#39;C like syntax&#39;. I can tell he feels oh so dirty saying that, but &#39;you gotta give the programmers what they want&#39;.&lt;br /&gt;&lt;br /&gt;Things like orthogonality, control structures and data types don&#39;t seem to rank as highly. Whatever happened to the best tool for the job? If I know there is something out there that works I don&#39;t care whether it&#39;s functional, applicative, imperative, logical, whatever. It&#39;s just a side-effect. If you have a brain in your head, you can work it out.</content><link rel='replies' type='application/atom+xml' href='http://danintouch.blogspot.com/feeds/7082967406729448884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8692632067019524643/7082967406729448884' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/7082967406729448884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8692632067019524643/posts/default/7082967406729448884'/><link rel='alternate' type='text/html' href='http://danintouch.blogspot.com/2007/08/pander-to-familiarity.html' title='Pander to familiarity'/><author><name>dan</name><uri>http://www.blogger.com/profile/14215019546355522841</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU_ylwQSTCK34BG8bxjlUjUHId2Wyax8hCZ17HoNZT7kmgVgAGvwAJkK9wKz-i-dqs-GL_LbKd1mIBBn7Kr29HaG4qD1kEnhvp_zdwCyQDcOpphluRvTQvZS2-7Nacew/s220/unt2.JPG'/></author><thr:total>2</thr:total></entry></feed>