Half-Penny For Your Thoughts

rounded down to the nearest cent



Categories


Recent Articles




Computing

RadRails

A few weeks ago, I broke down and bought a laptop. My first two computers were laptops, but once I hit college, I decided the cost outweighed the benefits. But over the the past few months, I’ve realized that I move from computer to computer enough that having a laptop instead would be a boon to my productivity.

I decided to leave Windows on the laptop and do most of my development within colinux. I’ve struggled to find an editor for developing within windows that I really like. While I’ve used Crimson Editor quite a bit, it’s out of active development and occassionally leaves me very frustrated (FTP issues in particular, which is not much of an issue for me now). So, I’d planned to use KDE’s Kate editor within colinux.

You can ignore the preceding two paragraphs. They’re merely anecdotal.

Then, I stumbled across RadRails. It’s an extension of Eclipse, which I know I’ve looked at before, but apparently dissavowed for reasons forgotten. While RadRails is pre-1.0, I’ve been extremely pleased. The stand-alone version comes with the SVN plugin bundled, so it’s been near to perfect for me. One of my favorite features is the ability to start/stop my development servers directly from RadRails.

Now that I’ve used RadRails on my WinXP laptop, I decided that for many functions, I like it better than Kate. And I definately like it’s SVN integration better than kdesvn (Although I have had a couple of weird errors that I can’t now remember). You can also just install three plugins on top of Eclipse to get all the RadRails functionality (listed here), which I found useful because I wasn’t sure how to go about installing the stand-alone on Ubuntu. This way, I used apt to get Eclipse, then installed the three plugins. For anyone like me new to Eclipse, to install the plugins, open Eclipse, and go to Help->Software Updates->Find and Install. Pretty self-explanatory after that, but I didn’t think to check the help menu until after a bit of Googling.

One more tip for the Plugin install for those new to Eclipse: To get the full Rails goodies, go to Window->Open Perspective->Other… then click “Rails” and “OK”. Gives you, for example, the servers list.

Update 10/11/06: I guess I should have looked earlier, but the RadRails community page has a lot of helpful tips, including an article about setting up RadRails in WinXP. (Particularly helped me in getting rake tasks to work).


Computing

To believe in SQL

Comment from the Ruby on Rails blog:

John Griffiths on 30 Nov 17:23:

There are currently two things I really believe in right now, SQL and Web 2.0.

He goes on to say about Ruby on Rails:

it’s like PHP on ACID!

Okay, quoting that second snippet was purely gratuitous on my part.

I was about to write about something else, but then I read this. I suppose my first reaction was along the lines of Help us all if SQL is one of the two things left to believe in. Of course, that would have been before I saw that Web 2.0 was the second. Incidentally, no, I don’t think he meant the word believe in the way I just took it. But the fact that I initially read it that way is why I’m blogging about it.

Wait, why am I blogging about it?

Oh, right. I think it’s that SQL is something that can be “believed” in. I do like SQL because it is a roughly standardized language for interacting with all sorts of databases…in theory…anyway, more standarized anyway than, say, javascript. And the sad thing is that that level of standardization is to be so admired, especially when the standard is insane. Yes, yes, okay, making it roughly english maybe makes it easier for it to sent as a stream of text, but I think we can safely jump off that train now…please…it’s 200-friggin-6. Dagnab string of bytes…

I’m rambling.

I would like to see a lower-level standard for interacting with databases, that has nothing to do with writing english statements, but which each language could use in the way that best fit that language. And, yes, SQL could be one of those languages. And that standard could let the db specify validation rules such that the db-interacting library (a la ActiveRecord) could use those validations instead of requiring the programmer to define them in the model or elsewhere. Also, relationships between tables…

Of course, those are just my momentarily rambling thoughts…


Computing

Keeping up with rails

Rails 1.2 has all these RESTful goodies. Or, that’s the idea I get. I’ve read several things this past week, and think I can make use of REST ideas, but I can’t explain them. (And no, I’m not going to find a good link either. Ha!)

The point I’m getting to is that I realize the need to determine a balance between learning every new tool and trick and ‘getting things done’. This is a problem I often find myself having. I want to program the “best way” but how to learn all that’s out there? Of course, the answer I come to is to learn what I can, but when it’s time to work, work. I’ll rarely do things the absolute best way, but there’s probably a law of decreasing returns on such learning.

Anyhow, I guess that’s to say to aspiring programmers, don’t try to figure it all out (good advice anyway, I think). Reading blogs seems to be one of the best ways to get the snippets of knowledge needed to decide on various topics if I should find out more. On the other hand, I’m certainly no expert.

Just typing out loud…


Computing

Collaboas, Collaboas, everywhere

There’s sort of a point to this article, but it may take me a few paragraphs. Feh, isn’t blogging great? I could write an appropriately structured article, but since I am the lone editor here, I can also conduct a non-quite stream-of-conciousness discourse, then, at the last possible moment, suddenly introduce a thesis. And you say, thanks for that meandering and irrelevant comment.

For those of you using subversion for version control, particularly for your rails applications, Collaboa is a useful tool. It includes repository browsing and a ticket system for projects stored in subversion, and is a rails application. Functionally, it’s similar to trac, but since I’m accustomed to rails, Collaboa is a better resource for me.

In reference to the title, there have actually been a couple of forks of Collaboa.

  • Titra, if I remember right, was forked in order to add in time tracking features. I’ve never tried it.
  • Retrospectiva is a fork created a month or two ago, with some different design goals, I guess.

Anyway, probably all three are good tools, although Collaboa is what I use for lack of any pressing reason to switch.

One issue that interests me is that none of these projects aim to provide a functionality like sourceforge, rubyforge or Google code, that is to provide the functionality for multiple, disassociated projects (To clarify, at least Collaboa has multiple projects support, but it’s a web application that organizations install and use, rather than a web service hosting multiple projects. Right, if that made sense.). Another thing I’ve noticed is how projects hosted by these large web service sites tend to have much less attractive and functional repository browsing than that offered by the above projects.

Okay, actually approaching the point. Despite telling myself I should do so, I haven’t contributed anything to Collaboa. However, I did get the bug this week to start playing around with a rails project interacting with a subversion repository. Collaboa uses Subversion bindings for ruby via SWIG (or that’s my understanding) to interact with a repository on the local machine. I wanted (for fun) to set up to interact with a remote repository via svn-serve. Once I found the protocol specification it was quite simple, by which I mean, I had no idea what I was doing. But, over the past couple of days, I’ve learned a lot about Ruby’s TCPSocket library, and about Subversion. The code I’ve written can actually do a directory listing now. So, it’s been a lot of fun, and maybe I can release it someday. I think I saw that Collaboa will soon have the repository interaction abstracted, so other repository types can be used, so maybe this will be something I can contribute. We’ll see, eh?


Computing

Another Use for Rails Scaffolding

Like many people learning Rails, I started off using scaffolding extensively. Then, after a few months of getting familiar with Rails, I figured I was unlikely to have much use for the scaffold generator. It’s a great tool when you’re first learning rails. Later, it becomes a bit like most user-friendly functions: a limiting pain. Fortunately, scaffolding is presented in everything I’d read about rails as a tool, primarily for getting started. After that I turned to the other generators (when I realized there were simpler generators).

And then, a couple of nights ago, I found myself wandering the scaffold generator’s code. Changing a piece here, ripping out a piece there, but for the most part leaving it intact. And then I ran my modiified version. I intend to do so often. And I won’t mind it’s user-friendliness a bit.

For admin areas of sites, I’ve started re-using the same helper functions, layout, arrangement on the page, etc. Since this is all back-end stuff, I needn’t worry making it fit with the public layout of the site, and can focus on functionality over aesthetics. I can also predict pretty well the functions I’ll be using. Now, what I have didn’t look a whole lot like what scaffold produces, but the kinds of things scaffold generates (controller, views, etc) and the way it connects them were very close to what I needed to cease copying and pasting.

So, I changed up the scaffolding code, and voila, in a couple of hours, I have my admin scaffolder. And fortunately, the scaffold generator proved easy to understand and modify (well, mostly).