Archive for the ‘Open Source Software’ Category

Updating Git to the Google Groups Git-OSX-Installer

Friday, September 19th, 2008

gitLogo_vert.gif

As I was reading my Git Book this morning I noted that I was on v1.5.4.3 on my laptop, and it just occurred to me to check what the latest version of Git really is. I liked that this guy made an installer package that worked great as a Universal app on 10.5 (Leopard), but how far behind was he?

Turns out, a little bit.

I found that he had released a v1.5.5.0 Universal for Leopard that fixed the syncing over http, I think, but then I went to the source, and Git is really on 1.6.0.2 (stable), and that's a more significant version jump. Also, I saw that the Google Groups Git-OSX-Installer was on 1.6.0.1, and while it was Intel-only, that's all I've got for Leopard. So that seemed like a good move to make.

The first package deposited a lot of things in /usr/local/bin and such, whereas the Google Groups package is in /usr/local/git and everything is hanging off there (for the most part, we'll get to the exceptions in a minute). This looked like a cleaner uninstall as well, should Apple decide in Snow Leopard (10.6) to add in Git like they did Subversion for 10.5.

So I figured out how to get rid of the old package. Go into it's Contents directory and there should be a file called Archive.pax.gz where all the files are packed together. We can get a look at them with:

  gzip -d < Contents/Archive.pax.gz | pax -v | awk '{ print $9 }'

and all the files will be listed. Nice. I made a script to clear it all out and ran it. I then installed the new Git 1.6.0.1 package and it went in well, but the git commands like git-svn weren't in the /usr/local/git/bin directory, so they weren't going to be seen by the command line. I suppose that's not what this guy's doing, and that makes me a little nervous, but I'll go with it for now.

In order to get the paths right, I had to modify the installed file /etc/paths.d/git to look like:

  /usr/local/git/bin
  /usr/local/git/libexec/git-core

and then make use of the fact that in OS X 10.5, Leopard, the directories /etc/paths.d and /etc/manpaths.d are set up to take files listing directories to add to their respective paths if you know how to use it. So I added to my !/.tcshrc the lines:

  #
  # First, let's pick up all the paths from the system
  #
  if (-x /usr/libexec/path_helper) then
    eval `/usr/libexec/path_helper`
  endif

and we'll get the directories added to the path.

I then set up my Git global environment so that I should be ready to start working with it. I added my name and email... set up to use the colors on the commands... set up the ignore file... that kind of stuff. Nothing necessary, but all nice things to do before starting to use the tool. I think I'm ready.

Note: I like this logo for Git more as it seems to say to me the adding and deleting as well as the cycling nature of source control. And at the same time, like an emoticon, turn your head sideways and it's "Git". Sweet. Clever cats, these guys.

UPDATE: Interesting... it seems that as I read more, the commands like git-svn are really simply alternative ways of calling git commands directly. For example, git-svn is a direct command for git svn (no hyphen). This means that the Google Groups installer was right and I didn't need to add the /usr/local/git/libexec/git-core/ directory to my path! Very interesting. However, as you can imagine, if you want to call git-svn directly, then you need this directory in your path.

I've decided that the book I'm reading does not use the hyphenated commands, so I'm going to leave the install as-is and that's a big load off. It means that the guys building it are thinking the same as the author, and that's the kind of consistency I need in learning a tool like this.

Getting Closer to Using Git

Thursday, September 18th, 2008

gitLogo.gif

This morning I was chatting with a good friend and we were talking about working with Git, and the next step for me is to get a good book Git like I had on CVS when I was learning it. I want to know how the repo is laid out, how to fix it, etc. I do not want to look at this as a 'black box' as that's just far far too dangerous for a developer to trust a single component. You should know how it works, just in case it might fail, so you can fix it.

Anyway, I found this book that looks to be very nice. So I ordered it as a PDF because I have my Kindle if I need to view it in that format, but I don't need another paper book. I've got a quick start on it on my Mac, and we'll see how long it takes me to get through it. I need to really understand what it's doing and then I'll feel comfortable putting my code in it. I also want to see how I want to set up anything on the home network to hold things there. Just don't know.

Which brings up another point made by my friend - get a Git hosting plan like GitHub. I have to say, I haven't been a huge fan of hosted CVS sites like SourceForge because of the licensing they put on the repos stored there. This was the reason for setting up my own CVS repo. But then I got HostMonster and I'm a huge fan of hosting now. I just have to be sure they aren't going anywhere.

So I signed up for a free GitHub account - I can upgrade it anytime to a paying account if I want to put my stuff there in a private repo, which I'll do if I decide not to set up my own Git repos at home. I certainly like the way they handle it - SSL and all, and the prices aren't too bad, but for the 'Small' plan, it's $12/month and that's $144/yr and that's more than I pay for HostMonster with a lot more storage, etc. HostMonster just doesn't seem to have Git hosting - yet. I'll have to check with them to see.

In any case, I'm getting a lot closer. Read the book, pick a hosting plan and start. Sweet.

Blocking MSN Chat Spammers

Wednesday, September 17th, 2008

Adium.jpg

For the last several weeks I've been getting tons of these p0rn spam chats on Adium from my MSN/Hotmail IM account. I suspected that there was a way to block all new, uninvited, contacts, but I was trying to do it through the Accounts panel, and it was even easier than I thought.

Under 'Adium' in the menu, select 'Privacy Settings...' and then select the single service and select 'Allow only contacts on my contact list'. Simple as that. Now I'm not going to get all these chats about their web cam not logging into MSN... forget it, dudes... I have a better tool for IM - Adium.

As an aside, I have to say that Google is amazing. I typed this problem in and within 5 sec. I had the answer. Amazing stuff the internet. Amazing.

Warming Up to the Idea of Distributed Source Control

Friday, September 12th, 2008

gitLogo.gif

I've been thinking about Subversion today. It's been brought on by the fact that the main Subversion server for the Shop has been down due to some reason that they never explained. At the same time, my local CVS pserver has been working just fine. But it got me to thinking. svn is nice for the ability to do svn status and get diffs and such. That's really nice. But if that's something you want to have, why not take it another step and make it all on your box - there's a Distributed SCM system. Like Git.

So... is it time to get into something like Git? Not sure. I was talking to a friend a while back and he's going in that direction because there are a lot of advantages to this scheme. Face it - the one thing CVS, Subversion, ClearCase, PVCS, etc. all have in common is that they have a central repository. This is great for a company that wants to have a 'vault' for their code. Some place to lock down, back-up, secure and control.

But if you say that's not important because there will be enough copies of the repository around, you don't have to worry about losing the whole thing. You can get it from your buddy. OK, "bad" for corporate-types, but for guys writing code on Open Source projects, it's ideal. I've got it - you've got it, and I don't have to constantly be connected to "The Source" to work and have version control. I only need to be connected to "The Source" if I want it to have what I've been doing.

Think of the case where one developer fixes one file and some of the other members need to get this file. With CVS you all get it when you do anything SCM-related. Nice if you have a fast network connection to "The Source", but if you don't it's painful. And if you don't need the change, you get it anyway, most likely.

Git (as an example) would let a group develop different parts of the project without having to connect to one another until they decided that it was time to share code - then they'd do it. And only then, share what they wanted. You could choose to have Git hosted in a central location for synching - much like a traditional 'primary' repository, if you wanted. There's no one way to do it.

I'm getting interested in the idea of having a central Git repository for historical records and then using Git locally to do most of the work. It would mean larger disk space usage, but I'm guessing with decent laptop drives it's not that big a deal. And there's TimeMachine to back it up. Might be a good idea. Have to give it more thought.

Decided to Download Bean 1.3.3

Thursday, September 11th, 2008

Bean.jpg

Bean 1.3.3 was released recently (I read about it today) and I used to be a big fan - until I got iWork '08. At that point, I thought "Hey, I've got Pages - what do I need Bean for?" And the blog posting I read makes a good point - Bean is just lighter weight, and there are plenty of times that you need TextEdit and Pages, and there are plenty of times you don't. For those other times, Bean is a great alternative.

There is a school of thought that says Don't get three different tools when two will do. Or one. And I can certainly agree with that. To date, I can't say as I've had a need to use Bean, but I can see the logic. In reality, there have been precious few times I've needed Pages, but I like to have it just in case.

Maybe that's the reason for Bean - just in case. Good enough for me. Great for free.

Conceded to Removing Constants from BKJEP’s getSymbols()

Wednesday, September 10th, 2008

BKit.jpg

Today one of the more annoying developers I work with reported a 'bug' in the BKJEP parser's getSymbols() method - saying that the symbols 'null', 'e', and 'pi' weren't supposed to be there. Well... those are the constants I added a little while back to allow the testing for null as well as the basic math constants. So they are symbols in the JEP sense of the word, but this guy's code wasn't smart enough to realize that not all symbols are those that he supplied.

What I think he's doing is assuming that all symbols are, in fact, tickers to be processed. He then tries to process these tickers, doesn't trap for the possibility that the user entered bad data, and then it bombs because he's done all this optimistic coding and this is just the first place it's been caught.

My first response was to say "Nope. These are symbols and you need to deal with the fact that users might enter bad data as well." But then I got to thinking. Were constants the equivalent of variables?

I had thought BKJEP overrode the getSymbols() method from JEP, but it hadn't. So I really was free to think of this in terms of what they user might really want. When I took the annoying developer out of the mix, and thought about the role of constants in the expression parsing I came to the conclusion that it probably is better to think of them as "invisible" to the variable space. They aren't to be changed... they support the processing, but may take no part in it's execution... in many ways they aren't the same as the other variables returned from getSymbols().

So I filtered them out of the getSymbols() call. I suppose that the better thing to add would be a getConstants() and then maybe a getAllSymbols() or something like that. It you break down the JEP symbols in a way that I thought it was originally, but wasn't: variables, constants, and both.

So, I guess the lesson is try to keep an open mind and even an annoying jerk of a programmer can get something right - even if by accident.

Fixed Scaling for Axis Changes of the BKSimpleScatterGraph

Tuesday, September 9th, 2008

BKit.jpg

A developer stopped by today - OK, well he didn't stop by, I had to walk to his place, but still... he pointed out that if you make a selection on the z-axis of the BKSimpleScatterGraph and then change the x (or y) axis, the graph doesn't properly re-scale it's limits.

The code I had in for the rescaling was (is) in the updateVisibility() method and that wasn't getting called for axes changes. All I had to do was to place a call to that method in the setColumnsToGraph() and it picked up the rescaling nicely.

Good fix, all changes now are reflected in the re-drawn graph.

Upgraded My WordPress Installations to 2.6.1

Tuesday, September 9th, 2008

wordpress.gif

I finally noticed that Fantastico at HostMonster had the update to WordPress for 2.6.1 - so I updated the two weblogs that I have there and they went off without a hitch. I have to say that it's nice to have Fantastico, as I've done this manually and it's a lot of crummy details, and this way it is one click and about 30 seconds and it's done. Very nice.

Unfortunately, as soon as I get WordPress to 2.6.1 it's telling me that 2.6.2 is out and that I need to upgrade. Tough... I'm going to have to wait for Fantastico and it's upgrade scripts. There's no reason to push the envelope that fast.

Oh... and I'd heard that the remote publishing was going to be turned off by default in 2.6 - but as I looked in my settings for the weblogs, I noticed that the XML-RPC and Atom publishing were turned on by default. So maybe they changed their minds. Would be nice to see they responded to the requests of users like me.

Twitterrific Tweets a New Beta – 3.2b3

Tuesday, September 9th, 2008

Twitterrific.jpg

I got a neat little tweet this morning from Twitterrific saying that they had a new public beta available with more tweets, better security and a host of fixes. I had to get it - I tweet every now and then, but love listening to the tweets of friends, and Hodgman - that's an interesting guy.

They have been working hard on the iPhone version so it's understandable that they haven't updated the Mac desktop client in a while, but it's nice to see that they are back at it. Cool.

Firefox 3.0.1 and Growl Integration – Excellent

Monday, September 8th, 2008

Firefox.jpg

This morning I fired up Firefox and after about a minute I noticed a Growl notification about there being updates to some plugins or themes that I have installed. I love touches like this. It's always the little things that separate the good code from the great code. It's easy to see the "web browser" part of the task, it's a lot harder to say "Hey, if this guy has this free notification system, then let's use that and let him know what we found." Those kinds of details are not obvious, but they make a huge difference in the appearance of polish and finish to an app.

Firefox is good. I run it everyday. I know Safari is what I use more, but it's still nice to see both have the nice polish of Mac apps.