July 20, 2008

New Blog!

Heads up everyone. I’m moving my main blog back to www.matschaffer.com.

Tumblr has been pretty good to me, but I got frustrated the lack of comments and difficulty posting code snippets. This will likely be my last post to tumblr, so please update your feedreaders and bookmarks accordingly.

Thanks! -Mat

July 17, 2008
Scalability is not your problem, getting people to give a shit is.

Tim Bray at CIM

Tim Bray came to talk to us at CIM. I was extremely gratified when he started the talk by essentially telling us all to at least learn Rails. I guess it’s time for me to do that rails brownbag.

We got a recording for posterity too. Thought I don’t get the impressions we’ll be permitted to release it. :(

July 5, 2008
June 24, 2008
June 16, 2008
Be transparent. Share your work constantly. Solicit feedback. Appreciate critiques. Let other people point out your mistakes. You are not your code. Do not be afraid of day-to-day failures — learn from them. … Cherish your history, both the successes and mistakes. All of these behaviors are the way to get better at programming. If you don’t follow them, you’re cheating your own personal development.
June 7, 2008
Here’s the first problem. The new KDE launcher is a gynecologist interface: There you are, sitting in front of a 20″ screen, but the programmer has dictated that you have to do everything by poking around in a small box.
June 6, 2008

Removing things accidentally committed to git

So a few days ago I accidentally checked a bunch of my mp3s into the git repo for matschaffer.com. This blew out the size of .git and made clones a pain. So I wanted to remove it. I got some help from “jast” in the git IRC channel which set me straight.

In this case I had committed and pushed the mp3s, then committed one more change after that. So the bad commit was HEAD^^, but I also had HEAD^ that I wanted to keep.

Here’s what I did:

# Save any changes after the bad commit
git format-patch HEAD^

# Reset everything back to the bad commit
git reset --hard HEAD^^

# Remove the accidentally checked in file
git rm --cached thefile

# Amend the bad commit
git commit --amend

# Restore the other change from patch file
git am 

# Clean up.  Note this will eliminate any chance of undo-ing this process
git reflog expire --expire=0 --all
git prune --expire 0

# If you need to, you can force a push to correct the history on a remote repo as well
git push -f

After this my local .git was still pretty big (as was the server’s repo). But any new clones were nice and small. So I just created a new clone, and copied that up to the server via scp and all was well. It was a bit of a pain, but it was neat that git is capable of doing these sort of operations. Under subversion you’d need a system administrator to do this sort of stuff.

June 5, 2008

Big Ideas (Don’t get any) on Vimeo (via Vimeo)

Hang in there past the loading noise in the beginning. Totally worth it.