Archive for December, 2008

Debuggin’ in Rails

December 26th, 2008

This is a for-my-benefit-reference post like the last 2.  Perhaps I’ll do a better write-up of ruby-debug at a later time.

“info breakpoints” to see the list of set breakpoints.

Adding a project to cruisecontrol.rb with git and on a different branch

December 18th, 2008

While I’m at it…

./cruise add <project name> -r <repository url> -s git -b <branch name>

Deleting a remote branch it git

December 18th, 2008

This is another “command I always forget and want a reference to” post.

To delete a remote branch, type: git push origin :<branch name>.

Apple strikes again

December 18th, 2008

This time it’s with TextEdit, which is probably WAAAAAY better than Notepad, because Micro$oft didn’t write it.

Well, true to Apple’s form of thinking its users are too dumb to know how to use a computer, I found out that TextEdit does not let you choose what extension to put on a file.  I’m doing a MySQL create table statement, and copying/pasting the results of a show create table statement was overloading the terminal window– really weird text was coming out, and MYSQL couldn’t make sense of it.  So I decided to paste it into a simple text editor, save that as a .sql file, and then import that into the database via the command line.

Now, I know that file doesn’t have to have a .sql extension.  I like it that way though, and seeing how I’m the user, the computer should listen to me.

So what happens when one goes to specify one’s own extension on a file in TextEdit?  One is treated to the following dialog box (which is modal, of course):

An Apple staple

It isn’t particularly difficult to save a file with a different extension, and Apple’s philosophy of hiding any sort of file-system-level issues from ALL users weakens TextEdit’s usefulness.  When I’m using a Windows machine and need to quickly test something in HTML (for example), I load up Notepad, quickly enter the snippet under test, and then save it as an HTML document.  I would not have any such luck as a TextEdit user.

Am I left the option of changing the extension in Finder after?  Sure.  But that requires leaving TextEdit, finding the file, praying that I can even see the extension, and so forth.  Not the gold standard of usability.  Do I have a more able text editor on the machine?  Yes, TextMate, but it’s a bloated monstrosity (ever done a ‘Find in Project?’) without the power of Visual Studio, and it doesn’t come to mind for quick editing tasks.  And yes, in this particular example, the extension didn’t actually matter because thankfully mysql is better software than TextEdit.  The point is, I should be able to use a different file extension if I want to. Not all users are as scared of the file system as you think Apple.  Leave us the option!

This is yet another reason why I would never spend any of my own money on an Apple computer.

Edit: So, I got mad and wrote the post.  Then I gave the file the extension I wanted and tried importing it into my database, only to be greeted by the following error: ERROR 1049 (42000) at line 1: Unknown database ‘tf1ansiansicpg1252cocoartf949cocoasubrtf350′.  I thought, “I sure don’t remember specifying database tf1ansiansicpg1252cocoartf949cocoasubrtf350.”  TextEdit is serious when it says it only does .rtf files.  That polution of a .sql script is quite normal for an .rtf.  So Apple does not provide a plain text editor, or if TextEdit does do plain text, it isn’t readily apparent.

2nd edit: apparently it does other file formats, if you choose them from a drop-down menu on the save dialog box.  However, you’re still locked into the extension associated with the format.  And it doesn’t have a plain-text option.  TextEdit still loses.

Apple gripe: Pages file format

December 5th, 2008

Since Pages is from Apple, one would expect it to be awesome and without flaw.  Unless of course one hadn’t been baptized in the Church of Apple.

I know that the standard when there is a problem with something Apple is that it’s the user’s (my) fault, but I’m not so sure on this one.  I’m trying to upload a Pages document to Basecamp.  Now, Basecamp is made by 37Signals, some of the most rabid Apple fans out there (but also the origin of Rails, so they get just a snicker on their stance).

It turns out Pages saves “documents” as a directory with several files below it (they call it a “package,” but calling my unwrapped Christmas presents wrapped Christmas presents doesn’t make it so).  I’m sure there is a reason for that, just as I’m sure there’s a reason for the obnoxious screen capture behavior built into OsX (OSx?  Who cares?).  The problem is that browsers don’t do folder uploads, so one can’t just upload their Pages document without first zipping it up.  Then, presumably one would have to unzip it to read it again.  Zipping/unzipping isn’t a terribly painful process, but neither is stubbing my toe– not exactly the gold standard against which I measure an action.

Of course, this could just be the fault of every browser, because if it weren’t, then it would be Apple’s fault.

Come on Apple! Or is that one should never have to transfer a Pages document?  Stuff written in Pages should only ever be viewed on that same machine?  Did Apple just miss the existence of the Internet, or do they expect everyone to only use Apple products which, presumably, are equipped to ship a folder around? If Pages is any indication of Apple’s quality (and it seems to be), why on Earth would someone want to switch?

Of course, on all the message boards, all anyone talks about is how bad Microsoft products are, WHILE THEY’RE HAVING PROBLEMS WITH AN APPLE PRODUCT! It would be funny if I didn’t have to work with Apple products.