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

<rdf:RDF
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns="http://purl.org/rss/1.0/"
 xmlns:cc="http://web.resource.org/cc/"
 xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:syn="http://purl.org/rss/1.0/modules/syndication/"
 xmlns:admin="http://webns.net/mvcb/"
>

<channel rdf:about="http://www.littleredbat.net/mk/blog/">
<title>littleredbat/mk: blog</title>
<link>http://www.littleredbat.net/mk/blog/</link>
<description>Matt Keller's Blog</description>
<dc:language>en-us</dc:language>
<cc:license>http://creativecommons.org/licenses/by/2.5/</cc:license>
<items>
 <rdf:Seq>
  <rdf:li rdf:resource="http://www.littleredbat.net/mk/blog/story/68/" />
  <rdf:li rdf:resource="http://www.littleredbat.net/mk/blog/story/67/" />
  <rdf:li rdf:resource="http://www.littleredbat.net/mk/blog/story/66/" />
  <rdf:li rdf:resource="http://www.littleredbat.net/mk/blog/story/65/" />
  <rdf:li rdf:resource="http://www.littleredbat.net/mk/blog/story/64/" />
  <rdf:li rdf:resource="http://www.littleredbat.net/mk/blog/story/63/" />
  <rdf:li rdf:resource="http://www.littleredbat.net/mk/blog/story/62/" />
  <rdf:li rdf:resource="http://www.littleredbat.net/mk/blog/story/61/" />
  <rdf:li rdf:resource="http://www.littleredbat.net/mk/blog/story/60/" />
  <rdf:li rdf:resource="http://www.littleredbat.net/mk/blog/story/59/" />
 </rdf:Seq>
</items>
</channel>

<item rdf:about="http://www.littleredbat.net/mk/blog/story/68/">
<title>Defining Recursion Algorithmically</title>
<link>http://www.littleredbat.net/mk/blog/story/68/</link>
<description>This is too much text to twitter, so it finds a home on my blog. From Andrew Plotkin via Wikipedia :

"If you already know what recursion is, just remember the answer. Otherwise, find someone who is standing closer to Douglas Hofstadter than you are; then ask him or her what recursion is."

</description>
<dc:date>2008-05-27 08:37:34</dc:date>
<cc:license>http://creativecommons.org/licenses/by/2.5/</cc:license>
</item>

<item rdf:about="http://www.littleredbat.net/mk/blog/story/67/">
<title>Lisp Advocacy at its Best</title>
<link>http://www.littleredbat.net/mk/blog/story/67/</link>
<description>Kenny says , Go Write Something in Lisp!</description>
<dc:date>2008-05-19 09:29:17</dc:date>
<cc:license>http://creativecommons.org/licenses/by/2.5/</cc:license>
</item>

<item rdf:about="http://www.littleredbat.net/mk/blog/story/66/">
<title>Xrandr solved my linux docking station woes</title>
<link>http://www.littleredbat.net/mk/blog/story/66/</link>
<description>I had to switch from the proprietary nvidia drivers to the vanilla 'nv' driver, but that enabled xrandr and now I can take my T61 (running Ubuntu Hardy) on and off my docking station -- without restarting X!

</description>
<dc:date>2008-05-09 15:59:53</dc:date>
<cc:license>http://creativecommons.org/licenses/by/2.5/</cc:license>
</item>

<item rdf:about="http://www.littleredbat.net/mk/blog/story/65/">
<title>OSS wifi (finally) on on my T61</title>
<link>http://www.littleredbat.net/mk/blog/story/65/</link>
<description>From dmesg on my new(ish) Lenovo T61 running Ubuntu Hardy Heron:


iwl4965: Intel(R) Wireless WiFi Link 4965AGN driver for Linux, 1.2.26k
iwl4965: Copyright(c) 2003-2008 Intel Corporation
iwl4965: Detected Intel Wireless WiFi Link 4965AGN
iwl4965: Tunable channels: 11 802.11bg, 13 802.11a channels


I finally got the OSS driver for my wifi card to work - thanks to the Linux Wireless project . Version 1.2.0 of iwl4965, included with Hardy Heron, didn't work for me - neither did its predecessor that shipped with Gutsy. But version 1.2.6k is working fine. Joy! - no more ndiswrapper for me. &lt;grin /></description>
<dc:date>2008-04-26 20:41:37</dc:date>
<cc:license>http://creativecommons.org/licenses/by/2.5/</cc:license>
</item>

<item rdf:about="http://www.littleredbat.net/mk/blog/story/64/">
<title>Boston Lisp Meeting</title>
<link>http://www.littleredbat.net/mk/blog/story/64/</link>
<description>The inaugural Boston Lisp meeting was  well attended. Lisp is not dead language - at least not in Cambridge and within sight of the MIT campus. I'm a relatively new lisper (thanks Peter for the excellent introduction ) and it was fun to talk with people who code full time in common lisp. </description>
<dc:date>2008-03-04 21:50:24</dc:date>
<cc:license>http://creativecommons.org/licenses/by/2.5/</cc:license>
</item>

<item rdf:about="http://www.littleredbat.net/mk/blog/story/63/">
<title>Git Backstage, Under the Covers and on the Down Low</title>
<link>http://www.littleredbat.net/mk/blog/story/63/</link>
<description>Don't tell my employer, but I'm an
undercover git user. Officially, my
company
uses Clearcase
UCM - but I do almost all my coding outside Clearcase. I use
git behind the official version control system. I'll tell you
why I risk a scolding from my boss 1 and the IT
department for using an unsanctioned
tool. But to do that, I'll have to tell you a bit more about both
Clearcase 2 and git.

Clearcase Basics

Clearcase is a centrally managed, client-server type system -- a
big server hosts the repository which tracks all the project's info:
individual files, the directory tree, versions, branches, users,
permissions, Social Security numbers, DNA sequences, etc. The client
(that's you) gets a working copy of the project files and tools to
interact with the server. Checking out, checking in and viewing
history all require connecting to the server. You can't do a thing
without being tethered to the central repository.

In the Clearcase UCM development model, programmers create new
"streams" ("branches" in generic terms), each having an "activity"
(which is Clearcase talk for "changeset"). When you checkin a file,
it's recorded against an activity. Therefore, an activity is a set of
checked-in files (and directory changes). Other developers on the
project won't see your changes until you "deliver" (merge) your
activity (changeset) to the parent stream (the main branch). End of
vocabulary lesson.

Where Clearcase Falls Down

My biggest issue with the Clearcase model is that it inhibits both
experimental and iterative programming. I assert the following: 


Experimental coding requires branching . Let's hope this isn't
a
controversial
statement . The only arguments people make against branching are
practical - their VCS s
don't support it well. Or they don't support merging well. Clearly, if
you had a VCS that could branch and merge well, you'd use it all the
time.
Clearcase discourages experimental branching as streams are
centralized, limited and public. On my project, creating "unnecessary"
experimental streams is discouraged as each stream incurs the
maintenance penalty of using more resources on the server.
Merging in Clearcase is also less than perfect. Instead of a
patch-based approach, Clearcase restricts merges to streams to have a
common baseline. And guess who has to create, maintain and recommend
these baselines? You, the user. Want to merge between streams that
have diverged - that don't share an exact baseline? Forget it: you
have to go outside Clearcase to do it.
Finally, Clearcase activities don't allow logical commits within
an activity - a checkin is limited to just one file. You cannot
checkin 4 files as a group representing a logical change. This makes
it hard to both organize your work and revert multi-file changes if
they don't work out.


Let's see if git could help. (Ok, it can - or else why would I
continue writing?)


Git Comes (Quietly) to the Rescue

Git is the distributed VCS used by Linus to maintain the Linux
kernel. Where Clearcase requires a centralized server, git requires
none -- the repository is stored in a single hidden directory at the
top of your project's file tree. You can create a git repository from
an existing project very easily:


cp -R /my/clearcase/project /my/git/project
cd /my/git/project
git init
git add .
git commit


A git repository is local and under your complete control, you
don't need any anybody's permission to create one. And obviously you
don't need network connectivity to a centralized server. You won't
need to file a single TPS report to setup a git repository. And, if
needed, you can keep your repo a secret.

What was I complaining about? Oh yes, branching and logical
commits.

Branching is simple and lightweight in git. Let's say you're
working in your 'bug_fix' branch, and you decide that the
fix could be simplified by moving some methods from class Foo to
class Bar. Here's how you'd create a new branch called
'foo_refactoring', make some changes in it, and then merge those
changes back to the master branch:


cd /my/git/project
git checkout bug_fix
git checkout -b foo_refactoring
// make some changes to Foo and Bar, compile, and test
git add Foo.java Bar.java
git commit -m 'Refactored Foo'
git checkout bug_fix
git merge foo_refactoring


If you decided the refactoring was unnecessary, you could have
skipped the merge -- or even permanently removed the experimental
branch. The branch was created quickly -- just to try out some
ideas -- and it can be ignored or removed. Branching is up to you,
not the sysadmin.

Finally, git lets you build logical changesets. As you can see in
the foo_refactoring example, a commit can contain any number of file
changes. You can build a new feature piece-by-piece, committing chunks
of related work together.  This is good for both you and your
reviewers!

So, how are you going to use git behind your VCS?


Getting it to Git

Getting your Clearcase (or CVS, Subversion, Perforce, etc) code into
git is easy: copy your working dir to some local drive space and do
the "git init; git add .; git commit" sequence.

Dealing with rebases is easy too. Other users have probably made
changes to the codebase (in Clearcase) and you'll need to merge your
work with theirs before merging to the main stream. You can handle
this by rsyncing the upstream code into a git branch, then using
git
rebase to merge that code into your development branch - fixing
any conflicts as necessary. Git rebase basically pops your current
commits off your branch, merges with the requested branch, then
re-applies your commits. It helps keep the history of your changes
simple. I recommending doing all development work in a sub-branch off
master (master is git's default branch) and keeping master for
rebases. For example:


cd /my/clearcase/project
cleartool rebase -recommended // or 'cvs up' or whatever
cd /my/git/project
git checkout master
rsync -r /my/clearcase/project /my/git/project
git commit -a -m 'rebased from clearcase'
git checkout dev_branch
git rebase master


Getting it back to Clearcase

Git has made my daily coding much nicer - but if I want my code
built into my product, I still have to get it back to Clearcase.

I find the simplest and safest way to do this is by applying a
series of patches to the Clearcase controlled working dir. You can ask
git to generate a patch for a single commit using git diff :


git diff 345983 > my-change.patch


But if you give git-diff a branch name instead of a commit, it will
generate patch files for each diverging commit between the two
branches. Assuming your master branch represents the rebased Clearcase
branch and your dev branch has been 'git rebased' to master, this is
exactly what you need!


cd /my/project/git
git checkout bug_fix
git diff master > bug_fix.patch
cd /my/clearcase/project
// checkout any files if necessary
patch -p2 &lt; /my/git/project/bug_fix.patch


Build, test and submit in Clearcase - you're done!

Final Thoughts

Having a full understanding of your VCS's data model is essential to using a it correctly. Perhaps the root cause of why I prefer git over almost any other system is 
its simple conceptual model ( Git for Computer Scientists does a nice job explaining the data model). Clearcase is typical enterprise software -- its feature sheet is very long and highlights words that CIOs love like "reliable", "maintainable", and "support contract", but the documentation is thrifty when discussing the systems internals. Version control is too essential and too difficult to trust to a system you don't understand. So I use git - behind the scenes if necessary.


1 Hi Boss! What I'm discussing here is not really any less safe than having un-committed work in any working dir (which everybody does). But the threat of a knuckle slapping adds some drama to this post - don't you think? ;-)

2 Almost everything discussed in this
post is true of any centralized version control system (CVS,
Subversion, etc), not just Clearcase.</description>
<dc:date>2008-02-06 09:40:59</dc:date>
<cc:license>http://creativecommons.org/licenses/by/2.5/</cc:license>
</item>

<item rdf:about="http://www.littleredbat.net/mk/blog/story/62/">
<title>Mozilla Thunderbird + Google Calendar = 404 Extension Not Found?</title>
<link>http://www.littleredbat.net/mk/blog/story/62/</link>
<description>Is it possible that there isn't a Thunderbird extension that parses incoming meeting invites from Outlook and offers to add them to Google Calendar? A quick web search finds ... nothing. Huh. I'll add that to my coding TODO list.

Update: it exists !

</description>
<dc:date>2007-04-11 20:22:07</dc:date>
<cc:license>http://creativecommons.org/licenses/by/2.5/</cc:license>
</item>

<item rdf:about="http://www.littleredbat.net/mk/blog/story/61/">
<title>CSS Naked Day: April 5!</title>
<link>http://www.littleredbat.net/mk/blog/story/61/</link>
<description>To know more about why styles are disabled on this website visit the Annual CSS Naked Day website for more information.</description>
<dc:date>2007-04-05 08:51:21</dc:date>
<cc:license>http://creativecommons.org/licenses/by/2.5/</cc:license>
</item>

<item rdf:about="http://www.littleredbat.net/mk/blog/story/60/">
<title>Who Needs a CIO?</title>
<link>http://www.littleredbat.net/mk/blog/story/60/</link>
<description>The Long Tail, in "Who Needs a CIO?" reinforces some of the points I made in my recent post My Intranet Sucks . 


You might have expected, as I had, that most Chief Information Officers wanted to know about the latest trends in technology so they could keep ahead of the curve. Nothing of the sort. CIOs, it turns out, are mostly business people who have been given the thankless job of keeping the lights on, IT wise. And the best way to ensure that they stay on is to change as little as possible.



No wonder that the prevailing discussion among the university CIOs was about "relevance". Users no longer value what they do. It doesn't require a "C" title to keep fat pipes to the wide-open Internet open. A zillion free hosted services on the web have replaced the functionality of the IT departments service by service, just as minerals replace the cells in dinosaur bones. Talk of extinction was in the air, and rightly so.


Somehow I doubt that my IT department will "get out of the way" and let the employees, the real innovators in the company, use internet-based tools for "confidential" corporate business. Sigh.</description>
<dc:date>2007-02-28 08:59:32</dc:date>
<cc:license>http://creativecommons.org/licenses/by/2.5/</cc:license>
</item>

<item rdf:about="http://www.littleredbat.net/mk/blog/story/59/">
<title>Programmers Can't Program?</title>
<link>http://www.littleredbat.net/mk/blog/story/59/</link>
<description>Jeff Atwood, at Coding Horror is flabbergasted by the number of programmers who can't program . The post claims that a significant number of programming interviewees struggle to write tiny programs like:


.... a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".


Can this really be true? Where do these "programmers" come from, I wonder? 

There's a related quote in Dreaming in Code where Joel Spolsky , commenting on formal software methodologies, says,


Anyway, the majority of developers don't read books about software development, they don't even read Slashdot. So they are never going to get this, no matter how much we keep writing about it.


Here we have 2 sources of anecdotal evidence suggesting that there are a large number of "programmers" who just don't care about programming. I suppose that any career that pays well attracts people who are more interested in the paycheck than the work, but programming is such a demanding task that I had assumed most practitioners gave a crap ! I'm saddened to hear otherwise.



</description>
<dc:date>2007-02-27 10:44:41</dc:date>
<cc:license>http://creativecommons.org/licenses/by/2.5/</cc:license>
</item>

</rdf:RDF>



