<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>SweetFriday</title>
    <link rel="alternate" type="text/html" href="http://www.neverfriday.com/sweetfriday/" />
    <link rel="self" type="application/atom+xml" href="http://www.neverfriday.com/sweetfriday/atom.xml" />
    <id>tag:www.neverfriday.com,2008-06-09:/sweetfriday//1</id>
    <updated>2010-07-06T19:38:23Z</updated>
    <subtitle>Talking about software, programming, computer science, etc.</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Open Source 4.1</generator>

<entry>
    <title>First Ever Toronto Free Software Meetup, 5:30pm, Wednesday 14 July 2010, at LinuxCaffe</title>
    <link rel="alternate" type="text/html" href="http://www.neverfriday.com/sweetfriday/2010/07/first-ever-toronto-free-softwa.html" />
    <id>tag:www.neverfriday.com,2010:/sweetfriday//1.59</id>

    <published>2010-07-06T18:55:12Z</published>
    <updated>2010-07-06T19:38:23Z</updated>

    <summary>I&apos;ve been thinking about starting a Toronto Free Software group for many many months (since around October 2009) and decided that I finally have enough time to do so.So here we go, the first meetup of the Toronto Free Software...</summary>
    <author>
        <name>Rudolf Olah</name>
        <uri>http://neverfriday.com/</uri>
    </author>
    
        <category term="Computing Science" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Emacs" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Java" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="JavaScript" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Lisp" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Perl" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Python" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ruby" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Scheme" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Squeak" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Web" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.neverfriday.com/sweetfriday/">
        <![CDATA[I've been thinking about starting a Toronto Free Software group for many many months (since around October 2009) and decided that I finally have enough time to do so.<div><br /></div><div>So here we go, <b>the first meetup of the Toronto Free Software group will take place on the 14th of July (a Wednesday) at the LinuxCaffe, 326 Harbord St, Toronto.</b> <a href="http://linuxcaffe.com/contact">Click here to get directions.</a></div><div><br /></div><div>It will start at around 5:30pm and I'll have a sign or something that says Free Software on it. Or maybe I'll just hold up a book on C++?</div>]]>
        
    </content>
</entry>

<entry>
    <title>Starting a new project for the summer at least</title>
    <link rel="alternate" type="text/html" href="http://www.neverfriday.com/sweetfriday/2010/06/starting-a-new-project-for-the.html" />
    <id>tag:www.neverfriday.com,2010:/sweetfriday//1.58</id>

    <published>2010-06-10T21:15:35Z</published>
    <updated>2010-06-10T21:34:20Z</updated>

    <summary>In order to build up my skills I&apos;m starting a new project with my cousin. We&apos;re calling it GoAugust and currently we&apos;re focusing on website design and have started designing website templates and will eventually work on blog templates for...</summary>
    <author>
        <name>Rudolf Olah</name>
        <uri>http://neverfriday.com/</uri>
    </author>
    
        <category term="Web" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.neverfriday.com/sweetfriday/">
        <![CDATA[In order to build up my skills I'm starting a new project with my cousin. <a href="http://goaugust.com/">We're calling it GoAugus</a>t and currently we're focusing on website design and have started designing website templates and will eventually work on blog templates for<a href="http://wordpress.org/"> WordPress</a>. The templates will be sold and we're making an effort to stick to free &amp; open source software and we're also trying to use images and other works that use a Creative Commons license.<div><br /></div><div>In this way we can avoid legal hassles (lots of people use weird license terms for their images) and we can support free culture and spread someone's work so that more people can enjoy it! I really like that last part and I've been trying to take more pictures so that I could release them under the Creative Commons licenses.</div><div><br /></div><div>For the GoAugust project we may also be programming desktop applications using the Titanium Application framework. I'm curious to see how flexible JavaScript is and to see how (hopefully) painless building an application using HTML/CSS/Javascript is.</div><div><br /></div><div>I've been taking a class in discrete maths and accounting and I'll do a post covering the topics from class. I have a huge bunch of notes on maths and I can't seem to understand some of the function and set theory stuff :/</div>]]>
        
    </content>
</entry>

<entry>
    <title>A Response to &quot;Trains, Elevators, and Computer Science&quot;</title>
    <link rel="alternate" type="text/html" href="http://www.neverfriday.com/sweetfriday/2010/02/a-response-to-trains-elevators.html" />
    <id>tag:www.neverfriday.com,2010:/sweetfriday//1.56</id>

    <published>2010-02-11T02:41:10Z</published>
    <updated>2010-04-29T16:35:48Z</updated>

    <summary><![CDATA[ The article, &quot;Trains, Elevators, and Computer Science&quot;, begins with a brief history of trains and elevators and specifically their braking systems. The writer, Dick Lipton, a computer science professor at Georgia Tech university, positions his article as practical by...]]></summary>
    <author>
        <name>Rudolf Olah</name>
        <uri>http://neverfriday.com/</uri>
    </author>
    
        <category term="Computing Science" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="computerscience" label="computer science" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="computers" label="computers" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="computingscience" label="computing science" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="programming" label="programming" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.neverfriday.com/sweetfriday/">
        <![CDATA[ <p><a href="http://rjlipton.wordpress.com/2010/02/08/trains-elevators-and-computer-science/">The article, &quot;Trains, Elevators, and Computer Science&quot;</a>, begins with a
brief history of trains and elevators and specifically their braking
systems. The writer, Dick Lipton, a computer science professor at
Georgia Tech university, positions his article as practical by first
stating that George Westinghouse was &quot;not a theoretician, but was one
of the great inventors of the 1800's&quot;, then fully explaining the
braking problems and adding little comments such as &quot;Pretty neat&quot; and
&quot;extremely clever&quot; after some engineering idea.</p>

<p>After 10 paragraphs of history we finally reach the point where Lipton
explains the &quot;general principle&quot; behind both and the relation to
computing science. This principle is</p>

<blockquote>
...do not rely on an action, but on the structure of the system. Make
the default, a passive state, a safe state so that when the system
fails, it gets to the safe state by default.
</blockquote>
]]>
        <![CDATA[
<p>In other, less redundant, words: when a failure occurs, return the
system to some &quot;safe&quot; state. Stated in this way, it is an unremarkable
&quot;principle&quot;. The implementation of this increases in complexity as the
size of the state space increases. Again, not very remarkable.</p>

<p>Lipton ends with three questions:</p>

<ol>
<li>Could we, for example, make a system that is safe from worm
attacks and uses a passive system?</li>
<li>Is there a formal model of passive vs. active systems that we
could use to reason about whether such systems are even possible?</li>
<li>Is there any way to exploit the power of the passive methods used
by Westinghouse and Otis to solve computer questions?</li>
</ol>

<p>Define &quot;safe&quot;, &quot;passive&quot;, and &quot;active&quot;. I must also ask what worm
attacks have to do with software systems.</p>

<h2>Modeling the Idea</h2>

<p class="first">In any case, these &quot;passive&quot; methods and systems are possible to
implement.</p>

<p>Let us define a single function <code>f</code> and assume that the function
modifies the state of the system. Thus, in the above example, there
are two states: <var>s<sub>0</sub></var> and
<var>s<sub>1</sub></var> (<em>s</em> is the set of all
states). Execution of the function looks like this:
<var>s<sub>0</sub></var> <code>-&gt; f -&gt;</code>
<var>s<sub>1</sub></var>.</p>

<p>If the function fails, then some action is taken to modify the current
state to <var>s<sub>0</sub></var>. We will call
that function <code>g</code>.</p>

<p>So if we have <code>f</code> and <code>g</code> in sequence, the state will change in the
following manner: <var>s<sub>0</sub></var> <code>-&gt; f -&gt;</code>
<var>s<sub>1</sub></var> <code>-&gt; g -&gt;</code>
<var>s<sub>0</sub></var></p>

<var>s<sub>0</sub></var> is our &quot;safe&quot; state. If <code>f</code>
succeeds, then we are in state
<var>s<sub>1</sub></var>. If <code>f</code> fails, then we
execute <code>g</code> and return to state
<var>s<sub>0</sub></var>.


<h2>Modeling the Engineering Examples</h2>

<p class="first">We can model the two engineering examples using the above idea.</p>

<p>Let <var>s<sub>0</sub></var> be the train at rest.
Let the function <code>f</code> release the brakes and cause the train to move and
change the state to <var>s<sub>1</sub></var> (the
train in motion).</p>

<p>Thus we have: <var>s<sub>0</sub></var> <code>-&gt; f -&gt;</code> <var>s<sub>1</sub></var></p>

<p>Failures can occur in <code>f</code> and so we must introduce <code>g</code>, the function that
modifies the state to <var>s<sub>0</sub></var>. In
this case, <code>g</code> will stop the brake release.</p>

<p>Thus we have the same thing as before: If <code>f</code> succeeds, then we are in
state <var>s<sub>1</sub></var>; if <code>f</code> fails, then we
execute <code>g</code> and return to state
<var>s<sub>0</sub></var>. We can translate that to
English: if the brakes are released (<code>f</code> is executed), the train is in
motion (state is now <var>s<sub>1</sub></var>); if
the brakes could not be released for whatever reason (<code>f</code> is not
executed or has only partially executed), the train is at rest (state
is set to <var>s<sub>0</sub></var> and becomes
&quot;safe&quot;).</p>


<h2>Conclusion</h2>

<p class="first">In software systems we define the rules and, if you will, the laws of
physics. Therefore we can design and implement systems where &quot;safe&quot;
states exist though the value of this depends on the system. The
complexity of reverting or resetting state in a large system may be
too intellectually difficult for us humble programmers to understand.</p>

<p>Lipton's second question, &quot;Is there a formal model of passive vs.
active systems that we could use to reason about whether such systems
are even possible?&quot;, is answered: yes, &quot;passive&quot; systems are possible
though I still don't know exactly what that mean. The third question
is also answered, as others have pointed out. Some research has
already been done in ideas related to the subject of the article such
as fault-tolerant systems (also known as fail-safe systems) and
self-stabilization. So yes, these &quot;passive&quot; methods are being used to
solve computing problems.</p>

<script type="text/javascript" src="http://neverfriday.com/clickheat/js/clickheat.js"></script><a href="http://www.labsmedia.com/clickheat/index.html" title="ClickHeat: clicks heatmap"><img src="http://neverfriday.com/clickheat/images/logo.png" width="80" height="15" border="0" alt="ClickHeat : track clicks" /></a><script type="text/javascript"><!--
clickHeatSite = 'neverfriday.com';clickHeatGroup = 'trains';clickHeatQuota = 5;clickHeatServer = 'http://neverfriday.com/clickheat/click.php';initClickHeat(); //-->
</script>]]>
    </content>
</entry>

<entry>
    <title>A Response to &quot;Comments == Code Smell&quot;</title>
    <link rel="alternate" type="text/html" href="http://www.neverfriday.com/sweetfriday/2010/02/a-response-to-comments-code-sm.html" />
    <id>tag:www.neverfriday.com,2010:/sweetfriday//1.57</id>

    <published>2010-02-09T09:10:17Z</published>
    <updated>2010-03-23T08:14:54Z</updated>

    <summary><![CDATA[ The writer of this article, Neal Ford, apparently dislikes any comments and calls them &quot;code smells&quot;. He suggests that inline comments are unnecessary when method/function/procedure names are specific and they have one specific purpose. Ford may be onto something...]]></summary>
    <author>
        <name>Rudolf Olah</name>
        <uri>http://neverfriday.com/</uri>
    </author>
    
        <category term="Computing Science" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Java" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ruby" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="java" label="java" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="programming" label="programming" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ruby" label="ruby" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.neverfriday.com/sweetfriday/">
        <![CDATA[ <p><a href="http://memeagora.blogspot.com/2008/11/comments-code-smell.html">The writer of this article, Neal Ford, apparently dislikes any comments and calls them &quot;code smells&quot;.</a></p>

<p>He suggests that inline comments are unnecessary when
method/function/procedure names are specific and they have one
specific purpose.</p>

<p>Ford may be onto something here but he obsesses over the latest and
supposedly greatest software methdologies. Some of the obsessions are
dynamic languages, &quot;agile&quot; methodology, and &quot;test/behaviour-driven&quot;
development. What I found worse was the re-labeling and mis-crediting
of an old software development idea. Ford credits Kent Beck and calls
it the &quot;compose method&quot; pattern but everyone else (at least those who
know their history) will recognize it as a central idea in structured
programming. This apparent pattern, really an old idea given a new
name, describes the writing of smaller functions/methods with a clear,
specific purpose. The beauty of structured programming is that it
gives us a way to convert blocks of code into smaller functions.</p>
]]>
        <![CDATA[<p>The whole article is about the <em>code</em>, rather than the complete program
(documentation and all). We can see this mistake repeated over and
over. Ford tries to support his argument by saying that comments are
redundant in those cases where code is &quot;self-documenting&quot; (I think
this means the method/function names are very descriptive), and he
calls comments a &quot;violation of the DRY (Don't Repeat Yourself)
principle.&quot;</p>

<p>Besides misundestanding the intention of Literate Programming, Ford
continues with this non-sense about violating principles by somehow
setting up &quot;self-documenting&quot; code as ideal,</p>

<blockquote>
<p class="quoted">
As [programming] languages have matured, you can get much closer to the ideal of self-documenting code (which was explicitly attempted in Literate Programming).</p>

</blockquote>

<p>Self-documenting code assumes that we want to write everything inside
of the programming language. This is not always the case and it hurts
us because we now have an interest in keeping that language &quot;alive&quot;.
Documentation that code is based on can be made language-neutral or
have language-specific details added to it and explains <em>why</em> the code
should be written in a particular way, but when we are only examining
code, its <em>intent</em> may become lost through the noise of language or
implementation-specific quirks. As an example, you can look at
programmers who try to translate C/Java/etc. code to some functional
programming language where the iteration statements appear in a
different manner, in a different abstraction.</p>

<p>Ford likes dynamically typed languages because one of their side
effect is that</p>

<blockquote>
<p class="quoted">
The method name is the only vector of information about what the method does (you can't crutch on return or parameter types), so methods tend to be named much better...</p>

</blockquote>

<p>My only comment is that a lack of discipline is a flimsy justification
for something.</p>

<p>In the company of assumptions and statements made without evidence,
the oft-heard complaint about documentation and comments being
out-dated is made,</p>

<blockquote>
<p class="quoted">
JavaDoc style comments ... are generated from code and have a fighting chance of staying in sync with the actual code. However, tests make much better documentation than comments. <em>Comments always lie (maybe not now, but on a long enough timeline, all comments will become outdated).</em></p>

</blockquote>

<p>This is an easy problem to fix: write the code based on the comments
and documentation! If we give into the temptation of instantly
changing code without documenting our better understanding of the
problem we are solving with that code, then the documentation becomes
outdated. The stereotype of programmers despising documentation is
only enforced by Ford's statements. Again, a lack of discipline is
hardly a good justification for abandoning a useful tool.</p>

<p>Throughout the article, there is an unwillingness to examine
assumptions,</p>

<blockquote>
<p class="quoted">
The new wave of Behavior Driven Development tools (like JBehave, RSpec, and easyb make this &quot;executable specification&quot; style of comment + test feasible. I expect to see the usage of these tools skyrocket because they give you documentation that has a fighting chance of staying up to date.</p>

</blockquote>

<p>The assumption is that an &quot;executable specification&quot; is desireable. No
reasons for why we would want this are given, it is just assumed that
we have such a great addiction to automation that we will want our
specification to be run on a computer. The limits of some programming
languages and their syntax makes them undesireable to use for
specifications.</p>

<p>The final assumptions,</p>

<blockquote>
<p class="quoted">
Inline comments are almost always a smell. The only legitimate use of inline comments is when you have some very complex algorithm that you need to have some thoughts about beside code. Otherwise, the presence of inline comments indicates that you've written code that needs explantion, meaning that it cries out for refactoring.</p>

</blockquote>

<p>Aren't most programs complex algorithms? The worst assumption is that,
somehow, explanation of code is bad and should be pushed into
descriptive method names.</p>

<p>The article prompted me to pick up the book <em>The Pragmatic Programmer</em>
which isn't a very good book but I will get into that later...</p>
]]>
    </content>
</entry>

<entry>
    <title>Some Dijkstra Quotes</title>
    <link rel="alternate" type="text/html" href="http://www.neverfriday.com/sweetfriday/2009/11/some-dijkstra-quotes.html" />
    <id>tag:www.neverfriday.com,2009:/sweetfriday//1.55</id>

    <published>2009-11-05T19:36:21Z</published>
    <updated>2009-11-05T19:37:39Z</updated>

    <summary> A few weeks ago I picked up the books A Discipline in Programming and Structured Programming. The first is by E. W. Dijkstra and the second includes a large section written by him. I became interested in these books...</summary>
    <author>
        <name>Rudolf Olah</name>
        <uri>http://neverfriday.com/</uri>
    </author>
    
        <category term="Computing Science" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Writing" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="computerscience" label="computer science" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="computers" label="computers" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="computingscience" label="computing science" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="dijkstra" label="dijkstra" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="programming" label="programming" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.neverfriday.com/sweetfriday/">
        <![CDATA[ <p>A few weeks ago I picked up the books <a href="http://www.amazon.com/Discipline-Programming-Edsger-W-Dijkstra/dp/013215871X">A Discipline in Programming</a> and
<a href="http://www.amazon.com/Structured-Programming-E-W-Dijkstra-Hoare/dp/B000OHQL5C/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1257447527&amp;sr=1-1">Structured Programming</a>. The first is by <a href="http://en.wikipedia.org/wiki/Edsger_W._Dijkstra">E. W. Dijkstra</a> and the second
includes a large section written by him. I became interested in these
books after reading a few of Dijkstra's other papers and about Donald
Knuth's great works. The computer science field could stand to have a
bit more formalism in it and less hand-waving about &quot;real-world&quot; tools
and methodologies.</p>

<p>Here are some quotes that I found especially good.</p>
]]>
        <![CDATA[<h4>Recursive procedures/functions</h4>

<p class="first">The first quote is about recursive procedures. My friend and I had an
argument over their efficiency when using the C programming language.
I took the same view as Dijkstra though I did not put it in such
words.</p>

<blockquote>
<p class="quoted">
The argument against recusrive procedures was always an efficiency argument: non-re-entrant code could be executed so much more efficiently. But with the advent of multiprogramming another need for felxible storage allocation has emerged. And if there are still machines in which the use of recursive routines is punished by too heavy a penalty, then I would venture the opinion that the structure of such a machine should now be called somewhat old-fashioned.</p>

</blockquote>

<p><em>(Found on page 47-48 of Notes on Structured Programming)</em></p>

<p>In other words, we should build the machines we want to use if we are
able to. We should not have to be stuck with old designs and Dijkstra
talks about this in another paper of his, where he says that he hoped
the computing industry would create new and better hardware. However,
the industry insisted on backwards compatability which is why newer
machines still contain the flaws of previous machines.</p>


<h4>On program modification as a manipulation of text and symbols</h4>

<p class="first">In this next quote, Dijkstra highlighted the dangers of regarding
program modification as the manipulation of the symbols and text of a
programming language.</p>

<p><em>(Both quotes found on page 60 of Notes on Structured Programming)</em></p>

<blockquote>
<p class="quoted">
...In designing a program we have to consider many, many alternative programs and once our program is finished, we will have to change it (into one of the aternative ones). <em>As long as programs are regarded as linear strings of basic symbols of a programming language and accordingly, program modification is treated as text manipulation on that level, then each program modification must be understood in the universe of all programs (right or wrong!) that can be written in that programming language.</em> No wonder that program modification is then a most risky operation! The basic symbol is too small and meaningless a unit in terms of which to describe this.</p>

</blockquote>

<p>This final quote again highlights the difference between the ideas
behind a program and the surface of it expressed in some programming
language.</p>

<blockquote>
<p class="quoted">
...It was slightly overlooed, however, that <em>by expressing structure via syntax, this structure is only given very indirectly</em>, i.e. to be derived by means of a parsing algorithm to be applied to a linear sequence of basic symbols. This hurts if we realise that many a program modification leaves large portions of the structure unaffected, so that after painful re-parsing of the modified text the same structure re-emerges!</p>

</blockquote>

<p>I find it slightly difficult to understand this when all we ever see
of programs are the source code which is written in some programming
language. We only ever really see the indirect structure. But when you
look at a language like Lisp, or some Assembly language, there isn't
really a syntax there at all. You're forced to discard the pervasive
language metaphor.</p>


<h4>Final Note</h4>

<p class="first">There are some more interesting ideas buried in the books and while I
am exploring more of the history of the computing field, I have
decided to give Donald's Knuth's idea of <a href="http://en.wikipedia.org/wiki/Literate_programming">Literate Programming</a> a
chance. I am using it to complete a lab and an assignment for a class
I'm taking and I have posted <a href="http://neverfriday.com/temp/unwrap/unwrap.html">a sample conversion of a Haskell program</a>.</p>
]]>
    </content>
</entry>

<entry>
    <title>GNU Moe Tutorial/Review</title>
    <link rel="alternate" type="text/html" href="http://www.neverfriday.com/sweetfriday/2009/09/gnu-moe-tutorialreview.html" />
    <id>tag:www.neverfriday.com,2009:/sweetfriday//1.54</id>

    <published>2009-09-13T01:56:24Z</published>
    <updated>2009-09-13T01:58:09Z</updated>

    <summary> Yesterday I was looking at a listing of updates for free software projects. I commented that the package moe could be used as a replacement for nano or zile, that is, when you need to quickly edit files from...</summary>
    <author>
        <name>Rudolf Olah</name>
        <uri>http://neverfriday.com/</uri>
    </author>
    
        <category term="Writing" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="freesoftware" label="free software" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="gnu" label="gnu" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="software" label="software" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="writing" label="writing" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.neverfriday.com/sweetfriday/">
        <![CDATA[ <p><a href="http://www.neverfriday.com/sweetfriday/2009/09/free-software-supporter-18-ann.html">Yesterday I was looking at a listing of updates for free software projects.</a>
I commented that the package <a href="http://www.gnu.org/software/moe/moe.html">moe</a> could be used as a replacement for
<code>nano</code> or <code>zile</code>, that is, when you need to quickly edit files from the
command-line.</p>



<p>So today I'm giving it a go.
<a href="http://ftp.gnu.org/gnu/moe/">I downloaded moe via the GNU project's FTP server and installed it.</a>
The compilation was insanely fast, I think it took less than 10
seconds to get it all built and installed.</p>
]]>
        <![CDATA[<p>So today I'm giving it a go.
<a href="http://ftp.gnu.org/gnu/moe/">I downloaded moe via the GNU project's FTP server and installed it.</a>
The compilation was insanely fast, I think it took less than 10
seconds to get it all built and installed.</p>

<p>This blog post is a small tutorial (and a bit of a review) for using
<code>moe</code> and is actually being written in it. I'm learning as I'm doing and
this is usually the best way to learn anything. The manual for <code>moe</code> is,
well it doesn't exist. When you first enter <code>moe</code> you are confronted
with a blank screen and a title bar at the top of it.</p>

<p>The title bar lists:</p>

<ul>
<li>the command key being used (if any)</li>
<li>the current mode of the text editor, either &quot;I&quot; for &quot;Insert&quot; or &quot;O&quot; for &quot;Overwrite&quot;</li>
<li>the name of the file being edited</li>
<li>whether it has been modified and needs to be save</li>
<li>which line you are on</li>
<li>which column you are at</li>
<li>the time (in 12-hour clock with no AM/PM indicator)</li>
<li>a helpful reminder telling you to press &quot;F1 for help&quot;</li>
</ul>

<p>In comparison, <code>nano</code> only tells you the version of GNU <code>nano</code> that you
are using and the name of the file. Nano also helpfully lists some
commands at the bottom of its screen.</p>

<p>The first command key I used was of course <code>&quot;F1&quot;</code>, the help key. Moe uses
the function keys for saving files, loading files, undo and redo, the
options menu, the buffers menu and some other things which I will get
into as I come across them.</p>

<p>The second command key that I used was <code>Ctrl+C</code>. If the current file
being edited is Modified, it will ask if you want to &quot;lose your
changes&quot;. If you press &quot;n&quot; meaning &quot;No I don't want to lose my changes&quot;,
it will save the file. I think this is better than asking if you want to
save your changes. The way the question is posed is different and
highlights the fact that you <em>will</em> lose whatever you were working on.</p>

<p>In terms of typing, <code>moe</code> hasn't gotten in the way at all. In fact, it
has provided two useful command keys; <code>Ctrl+Y</code> which kills/deletes a
whole line of text, and <code>Ctrl+B</code> which re-formats a paragraph by
wrapping it at a certain column (I think column 72). The re-formatting
is very useful when you're on a regular terminal. Right now I'm in the
shell that you get before running any desktop system. The screen can
only handle 80-character columns right now. You can set the column to
whatever you like in the Options menu (accessed by pressing <code>F10</code>).</p>

<p>Okay, I just pressed <code>F2</code> to save the file. It asked me for a new name
or location for the file, but luckily it already provides the same
name as before. So saving the changes is a matter of pressing <code>F2</code> and
then the Enter key. You can also save and exit <code>moe</code> by pressing <code>Ctrl+X</code>.
After I'm done typing here, I'll definitely be using <em>that</em>, heh.</p>

<p>To load a file, you press <code>F3</code>. As soon as you open more than one file,
they are loaded into separate <em>buffers</em> and then <code>moe</code> gives you access
to the <em>buffer menu</em>. You can access it by pressing <code>F11</code> and it lets
you switch between the different buffers by choosing from the menu or
pressing a number key. To get rid of the buffer, you press <code>Ctrl+C</code>.</p>

<p>So far <code>moe</code> is very easy to deal with, it all seems self-explanatory.</p>

<p>One thing to watch out for is the behaviour of whatever terminal you're
using. The GNOME Terminal wouldn't let me use the function keys properly
and the same was true of xterm. Another thing is the key bindings.
They're kinda like Emacs's key chords, though not all of them are like
that. There are four different prefixes for the key chords: &quot;<code>[</code>&quot;,
&quot;<code>O</code>&quot;, &quot;<code>Q</code>&quot;, &quot;<code>S</code>&quot;. The first prefix is the most commonly used one,
while the other three are used for special commands.</p>]]>
    </content>
</entry>

<entry>
    <title>Free Software Supporter #18 announces some recent GNU software releases</title>
    <link rel="alternate" type="text/html" href="http://www.neverfriday.com/sweetfriday/2009/09/free-software-supporter-18-ann.html" />
    <id>tag:www.neverfriday.com,2009:/sweetfriday//1.53</id>

    <published>2009-09-12T02:59:25Z</published>
    <updated>2009-09-12T03:08:13Z</updated>

    <summary> Free Software Supporter is a newsletter run by the FSF (Free Software Foundation) and in it they have a section announcing a few software releases from the GNU project. However, they do not seem to provide any description of...</summary>
    <author>
        <name>Rudolf Olah</name>
        <uri>http://neverfriday.com/</uri>
    </author>
    
    <category term="freesoftware" label="free software" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="fsf" label="fsf" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="gnu" label="gnu" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="programming" label="programming" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="software" label="software" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.neverfriday.com/sweetfriday/">
        <![CDATA[ <p><a href="http://www.fsf.org/free-software-supporter/">Free Software Supporter</a> is a newsletter run by
<a href="http://www.fsf.org/">the FSF (Free Software Foundation)</a> and in it they have a section
announcing a few software releases from <a href="http://www.gnu.org/">the GNU project</a>. However, they
do not seem to provide any description of the projects aside from
their name and version.</p>]]>
        <![CDATA[<p>I guess this is okay since Free Software Supporter readers may only be
interested in particular software packages and may already know what
they do. But for me, it's just a list of random names and numbers that
don't mean much at all.</p>

<p>Here's the list and a few brief sentences about them. Some of them
look useful and might help us programmers avoid re-inventing the
wheel!</p>

<p><a href="http://www.gnu.org/software/acct/">acct-6.5.1</a>, The GNU Accounting Utilities are used for recording
information about system usage by users. This would be useful for
system administrators because they can see a history of <em>past</em> usage by
user. <a href="http://www.gnu.org/software/acct/manual/html_node/Preface.html#Preface">The preface</a> to the manual is awesome awesome. It begins with
this line:</p>

<blockquote>
<p class="quoted">
Way back a long time ago, Thompson and Ritchie were sitting opposite one another at the commissary, sipping coffees and discussing their evolving behemoth.</p>

</blockquote>

<p><a href="http://www.gnu.org/software/ccscript/">ccscript-4.1.2, ccscript3-1.1.7</a>, GNU ccScript3 seems to be useful for
creating scripting languages to use with C++ applications. Their website says,</p>

<blockquote>
<p class="quoted">
GNU ccScript is a C++ class framework for creating a virtual machine execution system for use with and as a scripting/assembler language for state-transition driven realtime systems. The most common example of this is as the core of the scripting engine found in GNU Bayonne.</p>

</blockquote>

<p>I haven't ever seen this in action but it sounds a little interesting.</p>

<p><a href="http://www.gnu.org/software/coreutils/">coreutils-7.5</a>, GNU Core Utilities are the standard GNU/Linux
utilities. These are basically <code>cd</code>, <code>ls</code>, and other things like that.
Obviously very useful for everyone.</p>

<p>Here are some utilities that I haven't even heard about before:</p>

<ul>
<li><a href="http://www.gnu.org/software/coreutils/manual/html_node/tac-invocation.html#tac-invocation">tac: Concatenate and write files in reverse</a></li>
<li><a href="http://www.gnu.org/software/coreutils/manual/html_node/stat-invocation.html#stat-invocation">stat: Report file or file system status</a></li>
<li><a href="http://www.gnu.org/software/coreutils/manual/html_node/nl-invocation.html#nl-invocation">nl: Number lines and write files</a></li>
<li><a href="http://www.gnu.org/software/coreutils/manual/html_node/fmt-invocation.html#fmt-invocation">fmt: Reformat paragraph text</a>, more specifically, &quot;<code>fmt</code> fills and
joins lines to produce output lines of (at most) a given number of
characters (75 by default)&quot;. I usually use this type of function
within Emacs (<code>fill-paragraph</code>) but it's nice to know that I can
format whole files like this from the command-line.</li>
<li><a href="http://www.gnu.org/software/coreutils/manual/html_node/pr-invocation.html#pr-invocation">pr: Paginate or columnate files for printing</a></li>
<li><a href="http://www.gnu.org/software/coreutils/manual/html_node/ptx-invocation.html#ptx-invocation">ptx: Produce permuted indexes</a></li>
<li><a href="http://www.gnu.org/software/coreutils/manual/html_node/expand-invocation.html#expand-invocation">expand: Convert tabs to space</a>. This is possibly the most helpful
utility that I haven't heard of before! If someone's using tabs in
their C, Java or Python files, I'll have to run <code>expand
--initial --tabs=4</code> to change all tabs at the beginning of
the lines to 4 spaces.</li>
</ul>

<p><a href="http://www.gnu.org/software/freeipmi/">freeipmi-0.7.12</a>, GNU FreeIPMI is used for managing IPMI stuff. I have
no idea what that means, so here's the excerpt from their homepage
explaining it:</p>

<blockquote>
<p class="quoted">
The IPMI specification defines a set of interfaces for platform management and is implemented by a number vendors for system management. The features of IPMI that most users will be interested in are sensor monitoring, system event monitoring, power control, and serial-over-LAN (SOL).</p>

</blockquote>

<p>So I guess it's meant for managing large amounts of computers. Handy
for system administrators for sure.</p>

<p><a href="http://www.gnu.org/software/gengen/gengen.html">gengen-1.4</a>, GNU Gengen (it stands for GNU GENerator GENerator) is like
a template generator for C/C++. It's not like C++ templates or
meta-programming, I think it's more like Lisp's macros. The variable
names (the symbols of them if you will) can be substituted into a
template. This is somewhat like the C pre-processor macros but I think
it's a bit more powerful. I can't see myself using this though so I
can't explain its usefulness any more than that.
<a href="http://www.gnu.org/software/gengen/gengen.html#The-Problem">Read this section to see how Gengen could help you</a>.</p>

<p><a href="http://www.gnu.org/software/gsl/">gsl-1.13</a>, the GNU Scientific Library contains a collection of
science-related calculation functions such as those for dealing with
polynomials, vectors, matrices, sorting, etc. It is easy to see how
this could of use to a large number of developers.</p>

<p><a href="http://www.gnu.org/software/libsigsegv/">libsigsegv-2.7</a>, GNU libsigsegv is a &quot;library for handling page faults
in user mode. A page fault occurs when a program tries to access to a
region of memory that is currently not available&quot;. This library is
useful for developers, in particular for systems developers.</p>

<p><a href="http://www.gnu.org/software/libunistring/">libunistring-0.9.1.1</a>, GNU libunistring is a C library for handling
Unicode text and is useful for developers dealing with Unicode text.
Note that this library isn't for providing translations, that's what
<a href="http://www.gnu.org/software/gettext/">GNU gettext</a> is for.</p>

<p><a href="http://www.gnu.org/software/moe/moe.html">moe-1.3</a>, GNU Moe is a text editor with a file size of less than 500KB.
It has a lot cool stuff in it even though it's so small. According to
the README, <em>there is no learning curve</em>. Some experience with a text
editor and a look at the README and apparently you're set to use <code>moe</code>.
I'm going to download it and I'll see if it's a good replacement for
<code>nano</code> and <code>zile</code>.</p>

<p><a href="http://www.gnu.org/software/mtools/manual/mtools.html">mtools-4.0.11</a>, Mtools is utility tool collection for dealing with the
MS-DOS filesystem. It has the basic tools needed to make use of the
file system, such as a list directory utility, and another one for
formatting a disk. This is useful for archival purposes or when
dealing with legacy machines. I'm not sure recent versions of Windows
use the MS-DOS filesystem for much ;-)</p>

<p><a href="http://www.gnu.org/software/auctex/reftex.html">reftex-4.34</a>, RefTeX is a package for automating labeling, referencing
and citing other articles. It is used with LaTeX and BibTeX. I might
have to check this out the next time I'm writing a paper for
college/university.</p>

<p><a href="http://www.gnu.org/software/sipwitch/">sipwitch-0.5.7</a>, GNU SIP Witch is a SIP server. Basically, &quot;GNU SIP
Witch can be used to build secure and intercept-free telephone
systems&quot;. Again, this is useful for system administrators to know
about, but isn't very interesting for me.</p>

<p><a href="http://www.gnu.org/software/vc-dwim/">vc-dwim-1.2</a>, <code>vc-dwim</code> is very useful for programmers because it keeps
track of discrepencies between version control and ChangeLogs. The
coolest thing is that it can commit changes to files that have been
mentioned in the ChangeLog, the unmentioned files won't be committed.
This makes it very easy to keep the version control commits and
ChangeLog synchronized. I know I've forgotten to update the ChangeLog
many many times.</p>

<p><a href="http://www.gnu.org/software/xboard/">xboard-4.4.0</a>, GNU XBoard is a GUI for chess. It lets you use various
chess engines to play. It handles a few different variations of the
game too. I may check it out, I've been using eboard for a bit now.</p>

<p><a href="http://www.gnu.org/software/zile/">zile-2.3.10</a>, GNU Zile (which stands for Zile is Lossy Emacs) is a
small text editor modeled on Emacs. It provides the same key-bindings
and some useful commands. I've been using it as a replacement for <code>nano</code>
and <code>vi</code>. The size of it is less than 500KB too.</p>]]>
    </content>
</entry>

<entry>
    <title>PLATO and the TUTOR programming language manual</title>
    <link rel="alternate" type="text/html" href="http://www.neverfriday.com/sweetfriday/2009/09/plato-and-the-tutor-programmin.html" />
    <id>tag:www.neverfriday.com,2009:/sweetfriday//1.52</id>

    <published>2009-09-02T20:18:49Z</published>
    <updated>2009-09-02T20:23:49Z</updated>

    <summary>I was reading a bit about PLATO, a computer system for computer-aided instruction, and it is astonishingly old. It was around in the 70s, the 80s, etc. The language originally used for creating lessons and tutorials was called TUTOR. I&apos;ve...</summary>
    <author>
        <name>Rudolf Olah</name>
        <uri>http://neverfriday.com/</uri>
    </author>
    
    <category term="programming" label="programming" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.neverfriday.com/sweetfriday/">
        <![CDATA[I was reading a bit about <a href="http://en.wikipedia.org/wiki/PLATO_%28computer_system%29">PLATO</a>, a computer system for computer-aided instruction, and it is astonishingly old. It was around in the 70s, the 80s, etc. The language originally used for creating lessons and tutorials was called <a href="http://en.wikipedia.org/wiki/TUTOR_%28programming_language%29">TUTOR</a>. I've been extremely curious about the language since I first read about it on the weekend and I'm glad to say that I've found the manual.<br /><br /><a href="http://www.eric.ed.gov/ERICWebPortal/custom/portlets/recordDetails/detailmini.jsp?_nfpb=true&amp;_&amp;ERICExtSearch_SearchValue_0=ED050583&amp;ERICExtSearch_SearchType_0=no&amp;accno=ED050583">It can be found here</a>.<br /><br /><a href="http://www.eric.ed.gov/ERICWebPortal/custom/portlets/recordDetails/detailmini.jsp?_nfpb=true&amp;_&amp;ERICExtSearch_SearchValue_0=ED050583&amp;ERICExtSearch_SearchType_0=no&amp;accno=ED050583"><font style="font-size: 0.8em;">Here is a mirror hosted on this web server just in case.</font></a><br /><br />I bet there are a few gems in this manual. History is awesome ;-)<br /> ]]>
        
    </content>
</entry>

<entry>
    <title>Java Applets and Wikipedia</title>
    <link rel="alternate" type="text/html" href="http://www.neverfriday.com/sweetfriday/2009/09/java-applets-and-wikipedia.html" />
    <id>tag:www.neverfriday.com,2009:/sweetfriday//1.51</id>

    <published>2009-09-02T19:58:02Z</published>
    <updated>2009-09-02T20:06:32Z</updated>

    <summary>There is a proposal to allow the inclusion of Java applets into Wikipedia to increase interactivity. What this says to me is that the Web is not enough and that it is mainly a document system. Instead, the Wikipedians should...</summary>
    <author>
        <name>Rudolf Olah</name>
        <uri>http://neverfriday.com/</uri>
    </author>
    
        <category term="Java" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Web" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="java" label="java" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.neverfriday.com/sweetfriday/">
        <![CDATA[<a href="http://strategy.wikimedia.org/wiki/Proposal:Java_applet_support">There is a proposal to allow the inclusion of Java applets into Wikipedia to increase interactivity. </a><i>What this says to me is that the Web is not enough and that it is mainly a document system. </i>Instead, the Wikipedians should build a proper desktop application for viewing Wikipedia articles and then separate it from the Web and HTML. This would allow them to display the information in a variety of forms and fix the flaws of the Web.<br /><br />The first thing I would add is a way of linking to specific paragraphs or sentences. The second thing I would add is a proper discussion board system and possibly add an IRC chat component. For the chat component, I would also make it easy to paste snippets of the conversations into the discussion board. This is useful because you may have discussed an article with someone and then made changes to it, but everyone else would be unaware of your discussion unless they checked the discussion board and the discussion may have provided a rationale for why you made the change.<br /><br /><i>Java applets and more interactivity would be a fine addition to Wikipedia, but this is solving the wrong problem.</i><br />]]>
        
    </content>
</entry>

<entry>
    <title>Web Junk</title>
    <link rel="alternate" type="text/html" href="http://www.neverfriday.com/sweetfriday/2009/08/web-junk.html" />
    <id>tag:www.neverfriday.com,2009:/sweetfriday//1.50</id>

    <published>2009-08-24T22:29:15Z</published>
    <updated>2009-08-24T22:31:27Z</updated>

    <summary> INS and DEL elements re-discovered and used for version control. HTML document&apos;s version history kept within itself. HTML pages as containing structure and storing their contents in separate files. Easier for everyone to deal with and splits up your...</summary>
    <author>
        <name>Rudolf Olah</name>
        <uri>http://neverfriday.com/</uri>
    </author>
    
        <category term="Python" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Web" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="programming" label="programming" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="python" label="python" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.neverfriday.com/sweetfriday/">
        <![CDATA[ <p><code>INS</code> and <code>DEL</code> elements re-discovered and used for version control. HTML document's version
history kept within itself.</p>
<p>HTML pages as containing structure and storing their contents in separate files. Easier for everyone to deal with and splits up your page into logical pieces.</p>]]>
        <![CDATA[<h4>HTML Version Control</h4>

<p><em>Summary: <code>INS</code> and <code>DEL</code> elements re-discovered and used for version control. HTML document's version
history kept within itself.</em></p>

<p>I re-discovered the <code>INS</code> and <code>DEL</code> elements in the <a href="http://www.w3.org/TR/html401/">HTML 4.01 specification</a> last week and realized that
it could be used for version control of an HTML document. The document itself could be a history of
all the changes made to it. The key piece that makes this possible is the <code>datetime</code> attribute of the
elements. If it is unspecified, then you don't know when the change was made which means <em>all</em> changes
are blended together which makes this method of version control impossible. The W3C did the elements
a great disservice by supplying examples in the specification that lack the <code>datetime</code> attribute.</p>

<p><strong>So I hacked on some code that uses jQuery and JavaScript to go through a versionned HTML document
and it applies changes from various days.</strong> You can <a href="http://www.neverfriday.com/html-version-control/web-vc.html">see it in action here</a>. You select a day and then
click &quot;Apply Changes Up Until This Date&quot; to cycle through all of the changes made up until that
date. Any text highlighted in red has not yet been deleted, it will be deleted at a future date. Any
text in green was inserted as part of a change. Click &quot;Apply All Changes&quot; to have it cycle through
all the versions and apply their changes. This will turn the HTML document into the <em>latest</em> version.</p>

<p>This was all a hack and not very well explained on the page itself. I'm starting to code a PHP
script that will generate the HTML document in various dates to make it much easier to see the
differences.</p>

<p>I was excited about this because it allows version control software to become aware of the structure
of HTML. Instead of the software having to define new methods and data structures to save changes
made to an HTML document, they can use the HTML document itself. For example, SVN and GIT store
meta-data about the files in separate folders like <code>.svn</code> and <code>.git</code>. Using the <code>INS</code> and <code>DEL</code> elements,
you can leave all the changes in the document; the meta-data is already in the document. <strong>The
advantage is that you can move around the HTML document and it will always contain its own history
of changes.</strong> You could have this by default and you wouldn't have to worry about saving files like
this &quot;my_document.html.version2&quot; or &quot;my_document.html.version3&quot;.</p>

<p><strong>The trouble with HTML is that you need to wear a fucking biohazard suit to deal with it.</strong> You should
and cannot be touching it directly, there are too many things that can go wrong. It's the same thing
with XML. If you are writing it by hand, something <em>will</em> inevitably go wrong. You'll forget to close
a tag, or one of the attribute values will be incorrect, or you'll just get confused by it all. We
no longer use regular expressions to parse HTML and XML, we instead use proper parsers.
Unfortunately we haven't gotten to that point with regular web design, the visual editors usually
produce awful code.</p>

<p><strong>I'll be creating a biohazard suit to deal with editing HTML that will have integrated version
control</strong>. This is a spare time project, just like everything else I work on so don't expect too much
too soon. Dealing with the versions and grouping the changes won't be difficult, the hard part is
the user-facing portion where the versions will be creating by editing the document. I'm thinking of
using an already existing HTML/rich-text editor like TinyMCE or whatever it's called.</p>


<h4>Assembling An HTML Page Out Of Components</h4>

<p><em>Summary: HTML pages as containing structure and storing their contents in separate files. Easier for
everyone to deal with and splits up your page into logical pieces.</em></p>

<p>I hacked on another web junk project last night that separates content from structure. Current
templating systems all will separate content/structure from the presentation layer but they don't go
the one step further to make it all worthwhile. When I'm working on a website, I have portions of it
where particular content goes in. I want to write out this content as plain-text, maybe with a few
HTML tags like italics and bold inserted, and then have it inserted into a particular part of a
webpage.</p>

<p>This isn't too hard, templating systems already do the find/replace stuff. However, I wanted the
plain-text to be processed and HTML tags to be added to it automatically. Basically markup without
me doing any markup. For example, I have a file whose content is used as a list. Every paragraph in
the file is a list item in an unordered list. In another file, every paragraph should fit into an
HTML paragraph tag.</p>

<p><strong>The advantage for me is that if I have to collaborate with someone, I can send them the plain-text
file and they can edit it without learning some fancy markup language or HTML.</strong> All they need to do
is be able to write out sentences and paragraphs. Then I just drop the file back in and the proper
content is generated. This is much easier than going through the file manually, looking for content
differences and adding HTML tags.</p>

<p>This requires a biohazard suit for generating the HTML and for processing the plain-text content.
The classes for processing the plain-text content are finite state machines: they read a line, check
for some conditions and then do something. I'll post the code soon.</p>

<p>The hard part isn't inserting the content into the structure, it's finding out how much you want to
split up the content. One section could be split into many different sub-sections and each
sub-section could contain several paragraphs. Traditional CMSes (Content Management Systems) work on
a page-based basis. They'll let you edit <em>all</em> of the content for the main part of the page, but they
won't let you edit or split up that content into sub-sections.</p>

<p>Anyway, I'll have to write up some documentation and a tutorial on exactly how this all works. It'll
probably be released under the GNU GPL version 3 license.</p>
]]>
    </content>
</entry>

<entry>
    <title>What The Macintosh Took Away</title>
    <link rel="alternate" type="text/html" href="http://www.neverfriday.com/sweetfriday/2009/08/what-the-macintosh-took-away.html" />
    <id>tag:www.neverfriday.com,2009:/sweetfriday//1.49</id>

    <published>2009-08-13T21:46:08Z</published>
    <updated>2009-08-14T17:57:04Z</updated>

    <summary><![CDATA[ Update: I found a copy of the essay here but it appears to be a reprint with a different title, &ldquo;Time To Liberate The Web&rdquo;. Same content though, so it doesn't matter. I found an essay by Ted Nelson...]]></summary>
    <author>
        <name>Rudolf Olah</name>
        <uri>http://neverfriday.com/</uri>
    </author>
    
    <category term="computers" label="computers" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="programming" label="programming" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="writing" label="writing" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.neverfriday.com/sweetfriday/">
        <![CDATA[<!-- title: What The Macintosh Took Away -->

<p style="font-style: italic;">Update: I found a copy of the essay <a href="http://people.artcenter.edu/~vanallen/web_techniques/tednelson_liberate.htm" title="Inter@ctive Week: Time To Liberate The Web">here</a> but it appears to be a reprint with a different title, &ldquo;Time To Liberate The Web&rdquo;. Same content though, so it doesn't matter.</p>

<p>I found an essay by <a href="http://en.wikipedia.org/wiki/Ted_Nelson" title="About Ted Nelson">Ted Nelson</a> titled &ldquo;Way Out Of The Box&rdquo;, and it's about limitations imposed by technical-minded people on everyone else. It's about the assumptions made when programs and computers are designed.</p>

<p>Here is a particularly good passage that tells us what we sacrifice when we force users to become distinct from programmers,</p>

<blockquote><p>Suppose they gave you MTV, and in return took away your right to vote? Would you care? Some of us would. That's how I think of today's computer world, beginning with the Macintosh. The  Macintosh gave us Fonts,  pretty fonts to play  with, and graphic arts tools  that previously were out  of reach, except in  the most high-budget realms of advertising and coffeetable book production. Those fonts and graphic arts tools were a great gift.</p>

  <p><em>But nobody seems to have noticed what the Macintosh took away.</em></p>

  <p>It took away THE RIGHT TO PROGRAM.</p>

  <p><em>If you bought  an Apple II, you could begin  programming it right out of the  box. I have friends who bought  the Apple II without knowing  what programming was, and became professional programmers almost overnight. The system was clean and simple and allowed you to do graphics.</em></p>

  <p>But the Macintosh (and now the Windows PC) are another story. And the story is simple: PROGRAMMING IS ONLY FOR OFFICIAL REGISTERED &ldquo;DEVELOPERS&rdquo;.</p></blockquote>

<p>(Emphasis mine)</p>
]]>
        
    </content>
</entry>

<entry>
    <title>EventCal style update</title>
    <link rel="alternate" type="text/html" href="http://www.neverfriday.com/sweetfriday/2009/08/eventcal-style-update.html" />
    <id>tag:www.neverfriday.com,2009:/sweetfriday//1.48</id>

    <published>2009-08-07T03:19:55Z</published>
    <updated>2009-08-07T03:30:27Z</updated>

    <summary> So I was studying my marketing textbook and I realized that Free Software has an awful reputation because of bad marketing. The software is, for the most part, technically sound, however the image of it is awful. This then...</summary>
    <author>
        <name>Rudolf Olah</name>
        <uri>http://neverfriday.com/</uri>
    </author>
    
        <category term="Web" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="eventcal" label="eventcal" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.neverfriday.com/sweetfriday/">
        <![CDATA[ <p>So I was studying my marketing textbook and I realized that Free Software has an awful reputation because of bad marketing. The software is, for the most part, technically sound, however the image of it is awful. This then reminded me of <a href="http://neverfriday.com/eventcal/">EventCal</a>, the Python HTML calendar generator that I wrote a few years ago. I still get emails about it once in a while, even though I'm not actively maintaining.</p>

<p>So instead of studying, I created a quick checklist on what a Free Software website should have in order to be considered helpful by users. I won't post that list here just yet, because I want to write up a few other checklists and notes on marketing.</p>]]>
        <![CDATA[<p>Here are the results of the change:</p>

<p><strong>Old</strong></p><p><img src="/images/blog/eventcal_old.png" /></p>

<p><strong>New</strong></p><p><img src="/images/blog/eventcal_new.png" /></p>

<p>About the marketing...it just bugs me that I can only point to programmer tools as examples of great work when talking about Free Software. Sure Firefox is fairly impressive, but what about The GIMP and OpenOffice and Inkscape? Not so impressive. Some of that has to do with the technical stuff, but most of it has to do with the lack of good marketing. Not enough tutorials, documentation, contact/support/contributor information, etc. etc.</p>]]>
    </content>
</entry>

<entry>
    <title>Beginner Infographics with Free Software</title>
    <link rel="alternate" type="text/html" href="http://www.neverfriday.com/sweetfriday/2009/08/beginner-infographics-with-fre.html" />
    <id>tag:www.neverfriday.com,2009:/sweetfriday//1.47</id>

    <published>2009-08-05T17:47:50Z</published>
    <updated>2010-04-29T16:29:59Z</updated>

    <summary> I&apos;ve become interested in infographics, those fancy diagrams and charts and illustrations/visualizations of data that make them stick in your mind more easily. Why settle for an ugly chart when you can just adjust the fonts and colours a...</summary>
    <author>
        <name>Rudolf Olah</name>
        <uri>http://neverfriday.com/</uri>
    </author>
    
    <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="freesoftware" label="free software" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.neverfriday.com/sweetfriday/">
        <![CDATA[ <p>I've become interested in infographics, those fancy diagrams and charts and illustrations/visualizations of data that make them stick in your mind more easily. Why settle for an ugly chart when you can just adjust the fonts and colours a bit and get something sweeter looking.</p>]]>
        <![CDATA[<p>Here's the result of taking <a href="http://trinifar.wordpress.com/2007/02/21/creating-graphs-with-inkscape/" title="creating graphs with Inkscape">a bar graph</a> from <a href="http://www.openoffice.org/product/draw.html" title="DRAW: 
The powerful graphics package">OpenOffice Draw</a>, exporting it to an <acronym title="Scalable Vector Graphics">SVG</acronym> file and then importing it into <a href="http://www.inkscape.org/" title="Inkscape: Draw Freely">Inkscape</a>.</p>

<p><img src="http://www.neverfriday.com/images/blog/us-pop-chart.png" alt="U.S. Population Growth from 1950 to 2050"/></p>

<p>The font I used was <a href="http://en.wikipedia.org/wiki/Georgia_%28typeface%29" title="Georgia (typeface)">Georgia</a> and I used the green and grays from the Tango desktop palette. The chart was originally created in OpenOffice Draw and I'm impressed by how much information it included! It included all of the lines and all of the text. In the future, it might be wise to modify the chart as much as possible in OpenOffice Draw before resorting to Inkscape.</p>

<p>You can <a href="http://www.neverfriday.com/images/blog/us-pop-chart.svg" title="SVG version of U.S. Population Growth bar graph">download the SVG file here</a>.</p>

<script type="text/javascript" src="http://neverfriday.com/clickheat/js/clickheat.js"></script><a href="http://www.labsmedia.com/clickheat/index.html" title="ClickHeat: clicks heatmap"><img src="http://neverfriday.com/clickheat/images/logo.png" width="80" height="15" border="0" alt="ClickHeat : track clicks" /></a><script type="text/javascript"><!--
clickHeatSite = 'neverfriday.com';clickHeatGroup = 'infographics';clickHeatQuota = 5;clickHeatServer = 'http://neverfriday.com/clickheat/click.php';initClickHeat(); //-->
</script>]]>
    </content>
</entry>

<entry>
    <title>Relative Timing With Org-Mode</title>
    <link rel="alternate" type="text/html" href="http://www.neverfriday.com/sweetfriday/2009/07/relative-timing-with-orgmode.html" />
    <id>tag:www.neverfriday.com,2009:/sweetfriday//1.46</id>

    <published>2009-07-28T21:22:07Z</published>
    <updated>2009-07-28T21:24:58Z</updated>

    <summary> I hve been re-arranging my TODO lists using Emacs&apos;s Org-Mode and when I realized that it could calculate the exact hours taken for a bunch of tasks, I felt I should explore the rest of the Org-Mode manual and...</summary>
    <author>
        <name>Rudolf Olah</name>
        <uri>http://neverfriday.com/</uri>
    </author>
    
        <category term="Emacs" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Writing" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="emacs" label="emacs" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="orgmode" label="org-mode" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="writing" label="writing" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.neverfriday.com/sweetfriday/">
        <![CDATA[ <!-- Page published by Emacs Muse begins here -->
<!-- body -->
<p>I hve been re-arranging my TODO lists using Emacs's <a href="http://orgmode.org/">Org-Mode</a> and when I realized that it could calculate the exact hours taken for a bunch of tasks, I felt I should explore the rest of the Org-Mode manual and see what else I had been missing out on.</p>

<p>Org-Mode allows you to use <a href="http://orgmode.org/manual/Relative-timer.html">relative timers</a> which, it says, are useful for recording notes during a meeting or video viewing. I did not understand exactly how to use the relative timers, but it looks like they are like timestamps. Here's a brief run-down and example on how to use them.</p>]]>
        <![CDATA[<!-- extended -->
<p>Say you are watching a conference presentation on your favourite programming language, and you want to take notes. First, you would open up a buffer that is using <code>org-mode</code> and find the place where you want to put the notes. Then, you must start a relative timer by pressing <code>C-c C-x .</code> which starts the timer and inserts the current time (which is of course <code>00:00:00</code>). This timer will continue to run even while you are in other buffers.</p>

<p>When an interesting point is made, or whenever you feel the need to record the time, you press <code>C-c C-x .</code> again. Then you just make your notes as quickly as you can!</p>

<p>Org-Mode also lets you pause the relative timer with <code>C-c C-x ,</code> though I am not sure when you would want to use this. Maybe if the presenter is taking a break or if you were taking a break when watching a video?</p>

<p>Finally, to stop the timer, you press <code>C-u C-c C-x ,</code> (which is basically just adding <a href="http://www.gnu.org/software/emacs/manual/html_node/emacs/Arguments.html#index-prefix-arguments-132">a prefix argument</a>).</p>

<p>Here is a sample Org-Mode relative timer file:</p>

<pre class="example">
* <b>My Awesome Language (presentation)</b>
0:00:00 Start of presentation
0:05:33 5 minutes in and we hit some interesting points
I don't know, Ruby as your Awesome Language? Ugh.
0:06:04 Oh good, he mentioned Python! But where's Lisp?!
0:06:26 jerk skipped over the Lisp slide...
I don't get why people <b>*always*</b> skip over Lisp :-(
0:07:35 Well that was a short presentation (thankfully)
</pre>

<p>That is the trouble with Emacs and its modes. There are so many useful functions contained that it is hard to use them all or to even know about them unless you read through the manual.</p>
<!-- Page published by Emacs Muse ends here -->
]]>
    </content>
</entry>

<entry>
    <title>Composable Regular Expressions and Fields</title>
    <link rel="alternate" type="text/html" href="http://www.neverfriday.com/sweetfriday/2009/07/composable-regular-expressions.html" />
    <id>tag:www.neverfriday.com,2009:/sweetfriday//1.45</id>

    <published>2009-07-23T21:00:06Z</published>
    <updated>2009-07-23T21:06:19Z</updated>

    <summary> Martin Fowler wrote a brief article about composing regular expressions in order to make it easier to deal with individual &quot;tokens&quot; and to give them structure....</summary>
    <author>
        <name>Rudolf Olah</name>
        <uri>http://neverfriday.com/</uri>
    </author>
    
        <category term="Java" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Python" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Scheme" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="java" label="java" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="python" label="python" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="regularexpressions" label="regular expressions" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="scheme" label="scheme" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="scripting" label="scripting" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.neverfriday.com/sweetfriday/">
        <![CDATA[ <p><a href="http://martinfowler.com/bliki/ComposedRegex.html" title="ComposedRegex">Martin Fowler wrote a brief     article about composing regular expressions</a> in order to make it easier to deal with individual   "tokens" and to give them structure.</p>]]>
        <![CDATA[<p>As noted by a reddit commenter, string constants can be a bit   unwieldly to deal with and will break. <a href="http://www.scsh.net/docu/html/man-Z-H-7.html#node_chap_6" title="Pattern-matching strings with regular expressions, chapter 6 of the Scsh Reference Manual">Scheme Shell solves this problem with an s-expression-based structure syntax     of regular expressions called     SRE.</a> You can click that link to read more about it, but what I'll do here is convert Fowler's example to some SREs to show how much more useful structured regular expressions are when you use them in a Lisp-like language.</p>
<p>His structured pattern in the Java language looks like this:</p>
<pre>
const string scoreKeyword = @"^score\s+";
const string numberOfPoints = @"(\d+)";
const string forKeyword = @"\s+for\s+";
const string numberOfNights = @"(\d+)";
const string nightsAtKeyword = @"\s+nights?\s+at\s+";
const string hotelName = @"(.*)";
const string pattern =  scoreKeyword + numberOfPoints +
  forKeyword + numberOfNights + nightsAtKeyword + hotelName;
</pre>
<p>He also has an alternative method that joins strings with   whitespace:</p>
<pre>
private String composePattern(params String[] arg) {
  return "^" + String.Join(@"\s+", arg);
}
const string numberOfPoints = @"(\d+)";
const string numberOfNights = @"(\d+)";
const string hotelName = @"(.*)";
const string pattern =  composePattern("score", numberOfPoints, 
  "for", numberOfNights, "nights?", "at", hotelName);
</pre>
<p>Here is what that looks like in Scheme Shell:</p>
<pre>
(define number-of-points (rx (submatch (+ digit))))
(define number-of-nights (rx (submatch (+ digit))))
(define hotel-name (rx (submatch (* any))))
(define s+ (rx (+ whitespace)))
(define pattern (rx "score" ,s+ ,@number-of-points ,s+ "for" ,s+ ,@number-of-nights ,s+ "nights?" ,s+ "at" ,s+ ,@hotel-name))
</pre>
<p>Now that I've written that out, it looks cumbersome. It wasn't a huge pain to type out, but all of that whitespace matching looks redundant and I can see why Fowler wrote up the   <code>composePattern</code> function.</p>
<p>Let's try treating this problem differently by assuming that the important data is separated by whitespace, and let's call the stuff that's in between the whitespace a "field". By doing this, we no longer have to use regular expressions. We can now use a tool like AWK or something else to split each string into some fields and then look   at each field and turn it into the appropriate data type.</p>
<p>Here is my Python solution:</p>
<pre>
# fields:    0    1   2  3   4     5   6     7       8
example = "score 400 for 2 nights at Minas Tirith Airport"
fields = example.split() # Python assumes whitespace as the delimiter
numberOfPoints = int(fields[1]) # 400
numberOfNights = int(fields[3]) # 2
hotelName = ' '.join(fields[6:])   # 'Minas Tirith Airport'
</pre>
<p>There might be a slightly better solution that treats the hotel name differently, but it doesn't really matter. The point is that this is no longer a problem that requires the use and composition of   regular expressions.</p>]]>
    </content>
</entry>

</feed>
