<?xml version="1.0" encoding="utf-8"?>

<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<title type="text">How to Procrastinate</title>
<subtitle type="html"><![CDATA[
A tale of something else to do
]]></subtitle>
<id>http://www.howtoprocrastinate.com/blog/index.atom</id>
<link rel="alternate" type="text/html" href="http://www.howtoprocrastinate.com/blog" />
<link rel="self" type="application/atom+xml" href="http://www.howtoprocrastinate.com/blog/index.atom" />


<author>
<name>Afton Lewis</name>
<uri>http://www.howtoprocrastinate.com/blog/index.atom</uri>
<email>afton@howtoprocrastinate.com</email>
</author>
<rights>Copyright 2008 Afton Lewis</rights>
<generator uri="http://pyblosxom.sourceforge.net/" version="1.4.3 01/10/2008">
PyBlosxom http://pyblosxom.sourceforge.net/ 1.4.3 01/10/2008
</generator>

<updated>2009-02-05T15:28:00Z</updated>
<!-- icon?  logo?  -->

<entry>
<title type="html">Why You Should Use F# if you use C#</title>
<category term="/Tools" />
<id>http://www.howtoprocrastinate.com/blog/2009/02/05/WhyYouShouldUseFSharp-2009-02-05-15-28</id>
<updated>2009-02-05T15:28:00Z</updated>
<published>2009-02-05T15:28:00Z</published>
<link rel="alternate" type="text/html" href="http://www.howtoprocrastinate.com/blog/Tools/WhyYouShouldUseFSharp-2009-02-05-15-28.html" />
<content type="html">&lt;p&gt;So I&apos;ve been doing a lot of work in C# lately. That is, for the last six months. In fact I&apos;ve pretty much been doing nothing but C#, javascript (minus all that icky browser-stuff), and the occasional cmd.exe script. In other words, everything new.&lt;/p&gt;

&lt;p&gt;And except for cmd.exe, I actually like all of it. I used to think that C# was just like Java (specifically, just like Java 1.5, the version I learned at school and decided I&apos;d rather not use again thanks very much), so why would I want to use it, but I&apos;m a convert. If you&apos;re going to be using a C-syntax-style language, C# seems like the cream. I&apos;ve also been really grooving on the Javascript too, but that&apos;s for a later post.&lt;/p&gt;

&lt;p&gt;The things about it that I like in no particular order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Delegates and Lambda expressions. Seriously, there are just so many times when you don&apos;t want the overhead of defining a function, or when you want the close over a (set of) variable(s) that I really would miss this if I were working in C++ or Java. I&apos;m still not totally clear on when to use one and when to use the other. &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb383977.aspx&quot;&gt;Extension methods&lt;/a&gt;. This is just syntactic sugar over the c-style way of doing object oriented programming. Here, you can just define a method, and decorate the first argument with the &apos;this&apos; keyword, and voila! you can officially pretend that your method was embedded in the original object definition.&lt;/li&gt;
&lt;li&gt;var. Seriously, there are just so many times when you don&apos;t want to commit to a type yet. This saves you in two places: the places where the type is manifestly clear from the context, and places where you have a method that returns a type, but you anticipate that type changing frequently as you refactor.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb397680.aspx&quot;&gt;Object Literals&lt;/a&gt; and &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb397680.aspx&quot;&gt;Collection Initializers&lt;/a&gt;. Not as complete as Javascript object literals, but enough that you can define a dictionary literal for example.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now all that stuff is great. But I&apos;m actually not here to tell you about that. I want to talk about &lt;a href=&quot;http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/release.aspx&quot;&gt;F#&lt;/a&gt;. Not because I know it. In fact, I took a book out of the MS Library recently on it, but I returned it almost unopened. (Ditto for Lisp In Small Pieces. I know, I know, take away my geek license now.). But even though the only F# I know is how to end a statement (;;), it has stood me in good, uh, stead. This is because it fills in the gap of the one thing that C# has been missing: a &lt;a href=&quot;http://en.wikipedia.org/wiki/REPL&quot;&gt;REPL&lt;/a&gt;. And this is one thing that F# provides.&lt;/p&gt;

&lt;p&gt;So, if you&apos;ve ever wondered what is the actual string that a System.DateTime.Now.ToString() provides, wonder no longer. Well, what kinds of strings does a DateTime successfully parse? just try it. And no, this isn&apos;t the same as just generating a tiny sample program (trust me, after 6 months of learning/using C# on the job, my Visual Studio Projects directory is &lt;em&gt;full&lt;/em&gt; of tiny toy projects that exist only to answer a question about the language/syntax/semantics/libraries. But I&apos;ve replace the need for that with a single empty F# project that I use &lt;em&gt;strictly&lt;/em&gt; to provide a REPL. So now I just leave it running all the time, my beloved FSharp_repl project.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.howtoprocrastinate.com/blog/../images/FSharpREPL.PNG&quot; alt=&quot;F# REPL&quot; title=&quot;Pure Awesome&quot; /&gt;&lt;/p&gt;

&lt;p&gt;So seriously, go and download it now if you&apos;re on Windows (and using Visual Studio). It&apos;ll save you &lt;em&gt;hours and hours&lt;/em&gt; while you&apos;re learning. Plus who knows, you may even learn F#!&lt;/p&gt;
</content>
</entry>

<entry>
<title type="html">Things to Learn</title>
<category term="/Learns" />
<id>http://www.howtoprocrastinate.com/blog/2009/02/03/ThingsToLearn-2008-14-03-08-17</id>
<updated>2009-02-03T08:17:00Z</updated>
<published>2009-02-03T08:17:00Z</published>
<link rel="alternate" type="text/html" href="http://www.howtoprocrastinate.com/blog/Learns/ThingsToLearn-2008-14-03-08-17.html" />
<content type="html">&lt;p&gt;It turns out that there are a log of things that need to be learned when you do my job. And as far as I can tell, there is no end in site. So I thought I&apos;d make a little list of things that I&apos;m sort of embarrassed that I don&apos;t really know and see how much of it I&apos;m still ignorant of or embarrassed by in six months, a year, five years.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;SQL. Yeah, I took a course. The content dribbled out too slowly for me to pay attention. I assume that at some point someone will say &quot;go handle this database issue for us&quot; and I&apos;ll finally take the time to learn it.&lt;/li&gt;
&lt;li&gt;Linear Algebra. Yeah, This is a special case of &quot;math&quot;. Really I could just put &apos;Math&apos; here and it wouldn&apos;t be far wrong.&lt;/li&gt;
&lt;li&gt;Javascript. Funny story. I&apos;m actually learning it for a project at work right now. Unfunny part? Almost no HTML/CSS interaction. So really, a very limited form of Javascript.&lt;/li&gt;
&lt;li&gt;Parsing technology. Well, beyond recursive descent. You know, Lex/Yacc style parsing. Dragon-book parsing. You know, the &lt;em&gt;hard&lt;/em&gt; stuff. ;)&lt;/li&gt;
&lt;li&gt;Operating systems. That course that they make you take? I didn&apos;t get a chance to take it. I took advanced networking instead. Life is trade-offs.&lt;/li&gt;
&lt;li&gt;Assembly. Presumably x86. I&apos;ve made a few half-hearted stabs, but nothing ever really stuck.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I&apos;ll add to this doc as I remember more things, but I&apos;ll publish now. I&apos;ve been doing a lot of thinking about learning in my profession recently, and I suspect it&apos;ll be the source of a number of entries.&lt;/p&gt;
</content>
</entry>

<entry>
<title type="html">Let&apos;s Build a Compiler: The Beginning.</title>
<category term="/LBAC" />
<id>http://www.howtoprocrastinate.com/blog/2009/01/02/LetsBuildACompiler_TheBeginning-2009-01-02-17-37</id>
<updated>2009-01-02T17:37:00Z</updated>
<published>2009-01-02T17:37:00Z</published>
<link rel="alternate" type="text/html" href="http://www.howtoprocrastinate.com/blog/LBAC/LetsBuildACompiler_TheBeginning-2009-01-02-17-37.html" />
<content type="html">&lt;p&gt;The Post is &lt;a href=&quot;http://www.reddit.com/r/Afton/comments/7n1iu/lets_build_a_compiler_the_beginning/8zyc&quot;&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Discussion here: &lt;a href=&quot;http://www.reddit.com/r/Afton/comments/7n1iu/lets_build_a_compiler_the_beginning/&quot;&gt;A Compiler is born&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Code &lt;a href=&quot;http://github.com/Afton/letsbuildacompiler/commit/22afd7d98b1e690f67948a46dbd5ab2b82606173&quot;&gt;here&lt;/a&gt;&lt;/p&gt;
</content>
</entry>

<entry>
<title type="html">A Crazy Idea</title>
<category term="/Meta" />
<id>http://www.howtoprocrastinate.com/blog/2009/01/02/RedditExperiment-2009-01-02-17-33</id>
<updated>2009-01-02T17:33:00Z</updated>
<published>2009-01-02T17:33:00Z</published>
<link rel="alternate" type="text/html" href="http://www.howtoprocrastinate.com/blog/Meta/RedditExperiment-2009-01-02-17-33.html" />
<content type="html">&lt;p&gt;I had a crazy idea. I wondered if I could use reddit as a blog. Unsurprisingly, the subreddit for my name was unclaimed!&lt;/p&gt;

&lt;p&gt;My inaugural post: &lt;a href=&quot;http://www.reddit.com/r/Afton/comments/7l0k2/welcome_to_my_blog/&quot;&gt;Welcome To My Blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&apos;ll see if it works out.&lt;/p&gt;
</content>
</entry>

<entry>
<title type="html">A Deployment Plan Emerges</title>
<category term="/Meta" />
<id>http://www.howtoprocrastinate.com/blog/2008/10/16/ADeploymentPlan-2008-10-16-00-32</id>
<updated>2008-10-16T00:32:00Z</updated>
<published>2008-10-16T00:32:00Z</published>
<link rel="alternate" type="text/html" href="http://www.howtoprocrastinate.com/blog/Meta/ADeploymentPlan-2008-10-16-00-32.html" />
<content type="html">&lt;p&gt;Well, I can&apos;t tell you how many times I&apos;ve broken and fixed my site on the server that hosts it. Ok, it was 5. Anyway, it was too many. So my new system is very high tech. It&apos;s called rsync. Yeah. Fifty year old technology. Very swish.
&lt;p class=&quot;readmore&quot;&gt;&lt;a href=&quot;http://www.howtoprocrastinate.com/blog/Meta/ADeploymentPlan-2008-10-16-00-32.atom&quot;&gt;::read more &amp;gt;&amp;gt;&lt;/a&gt;&lt;/p&gt;</content>
</entry>
</feed>
