Friday Java Quiz: It Can't Go Simpler Than This
Q: What will this program print? true? or false?
import java.io.*;
public class Foo {
public static void main(String[] args) {
Serializable bar = null;
System.out.println(bar instanceof Serializable);
}
}
Git At Home
Here's a little experiment that I did last night after Kyle's Git talk—I put this blog under Git control.
I have been maintaining the content of this blog in Subversion since March 2005, 1292 days ago (and in CVS before that). When I moved this blog from my Fedora Core 6 box to my Debian box 64 days ago, I don't have enough disk space on the partition to hold the 1.9G Subversion workspace. So I simply used the 916M export from Subversion.
One of the questions I asked yesterday was the disk space usage of Git. And Kyle assured me that its much less than Subversion. So I gave Git a try:
[weiqi@gao] # feta install git-core Blah Blah Blah [weiqi@gao] # df -h /var Filesystem Size Used Avail Use% Mounted on /dev/mapper/gao--2006-var 2.9G 2.0G 732M 74% /var [weiqi@gao] # git --version git version 1.4.4.4 [weiqi@gao] # git init-db defaulting to local storage area [weiqi@gao] # echo *.bak > .gitignore [weiqi@gao] # git add . Blah Blah Blah Blah Blah Blah ... [weiqi@gao] # df -h /var Filesystem Size Used Avail Use% Mounted on /dev/mapper/gao--2006-var 2.9G 2.2G 550M 80% /var [weiqi@gao] # git commit Committing initial tree 9c31562f7a84c42ebab872d245a49b637b1e0395 [weiqi@gao] # df -h /var Filesystem Size Used Avail Use% Mounted on /dev/mapper/gao--2006-var 2.9G 2.2G 546M 81% /var [weiqi@gao] # du -sh .git 187M .git
So everything fits in there nicely. What would have been a 1.9G Subversion working directory now fits into a 1.2G space. (This is a bit of an unfair comparison because I did not convert my Subversion repository to Git, so I don't have much history in Git, yet.) And yes, Git is blazingly fast.
I'll just have to push it to another box from time to time.
And here's how the repo looks in gitk, a Tk GUI that Kyle demoed yesterday:
Git At The JUG
Today is JUG day.
The JUG did a Git talk.
Kyle Cordes gave the talk.
Kyle gave the talk without PowerPoint.
Kyle demoes Git on Windows.
A Gtk+ GUI Git tool did Kyle use on Windows.
The tool showed trees of his projects: branches and merges and stashes
Git is fast, said Kyle.
Git is the distributed version control tool to choose nowadays, said Kyle.
$ git init Blah Blah Blah $ git add . Blah Blah Blah $ git commit Vi opened up for commit comments
GitHub is a host of Git stuff, free for open source, pay for non-open source.
No Eclipse plugin yet. Have to press F5.
Git can detect file movements within the workspace, based on similarity.
Git does not do expanded keywords.
Kyle brought a little thumb drive that contained the Linux kernel repository.
The actual repo is in three files, the largest is about 200MB.
The whole Git workspace (with the repo) is usually smaller than the Subversion workspace (with only the latest version).
We had a reasonable crowd. Many questions, many answers.
We had extraordinary giveaways.
Many people went home with prizes. Mine is Oracle VM and Oracle Linux! Mark won the new Ruby IDE from JetBrains.
Watch this space (and that space) for the presentation material (a one page PDF, which just shows you that you need to come.)
CodeToJoy didn't make it here today, but he really wanted to get people's opinions about OCItv.