Tuesday, April 7, 2009

Dealing With Branches

Ok shitbags -- and I mean that in a loving way -- I am going to anger peeps and holmesies alike, because VCSs, editors, religion, and politics are things you do not discuss unsolicited.

History
I have a shitload -- maybe even 2 shitloads -- of homework to do right now, so instead I'm doing this. I used to use git. It was my first, and it treated me well until it went all Chris Brown on me (cue "Rehab", by Rhianna). THEN I realized that I had to find a new lover^H^H^H^H^HVCS. Mercurial was, and still is, the babe that rules my life in this realm. Sleek, fast, leet, she has everything I was looking for.

Then came the day that I realized "Hey, this whole branching thing is pretty damn cool!" I was using git at the time (I've been using them both, with different projects). Then I went back to my lil' ol' project using hg, and needless to say I was quite surprised to find that it's branching sucked more dick than a Swedish hooker (see here for information on its failsauce sans citron). After poking around, I came across a few things such as tasks and bookmarks for it, but they're just not the same. It has been my vow to be the one to bring branching to the mercurial world. I mean I don't know python nor do I enjoy it... but that's just a small detail when you're as old as I am. I personally feel that git style branching is the way to go for big things, like Rubinius' C++ branch and then its later stackfull branch, and that tasks are the way to go for smaller things.

Main part
I don't really have a main point to this post. Just that branches are important, is all. I don't like how git is all esoteric and hard to use (let alone understand -- on the same note, take a look at the Mercurial source and marvel at their documentation!), but I seem to not have any other choices besides Mercurial and Git to get access to their speed. It'd be super sweet to have a third contender that was fast AND well documented... but that is a story for another day. In terms of finding a new VCS that was everything I had dreamed of... she's in the works, but let me just say that she is a babe.

Sunday, March 22, 2009

Making Mistakes

So here I am, writing my first blog post since 6th grade. Let's see how this goes, shall we?

The other day I had accidentally committed a file that worked on my machine but failed on everyone else's. I was unaware that this change was committed, and thus a little flurry of emails was sent around to everybody *but* me (more on this later). Then finally a solution was sent around to which I was CC'd. It said that the appropriate changes had been made, and we can all relax now. I take issue with the last part of that email because this one simple command happens to exist: `git checkout master~5 FILE`.

Whew, the mild anger that may have been expressed is over.

So there are some things to be learned from this:

Forgive Easily
This is more in the sense of code, rather than people, although it certainly applies to both. Tom Mornini once said to me, "Rubinius forgives easily", in that if I make a mistake, then the error can be easily reverted, no harm done; this is where `git checkout` comes in! With this neat-o command, you can revert was was wronged in about the 5 seconds it takes to review `git log` and type the proper command, and then you can be on your merry little way. "But wait, Mr. Seydar! How does this apply to things when multiple files got fucked up?" Real simple, champ: `git checkout master~5 .` will have you back on the road in no time. 

Typical Social Network
And of course, here's why I wasn't contacted initially as soon as the issue reared its ugly head - I'm not in their usual social network, and we're all working on this in our spare time! True, I *should've* been contacted, but I wasn't, because they don't think "Hey, did I include that kid?".


So let's get a nice quick lil' summary of what's up here: I learned two good lessons, one of which has already been drilled into my head (the first one). This experience was good because I got to learn the second lesson, the one about why things can happen.

Forgive easily and include your entire work team in your social network. Done. QEMFD

Friday, March 20, 2009

Test

Testing this allllll niiiiiiiiiight loooooooooooong