Archive for the 'Software' Category

subSyndicate

Once again, Yasashii has issued a press release regarding something I’ve done.

I purchased David Black’s book, Ruby for Rails, and was inspired to mogg together a (non-Rails) Ruby program to syndicate my SVN logs. Eventually, you guys may see my add the feed to OwlManAtt.com. I’m not sure yet…

I’m proud of the name of the fucking thing, too. subSyndicate is so perfect - Subversion Syndication, released by the Syndicate. I lol’d.

I would also like to point out that I’ve released this under the MIT license instead of the GPL. That’s a first for me.

Calgary, Alberta (Yasashiisyndicate.org) - Syndicate member Nicholas Evans is pleased to announce the Syndicate’s first software release, the subSyndicate Subversion Syndicator for UNIX and Linux.

About subSyndicate
The subSyndicate Subversion Syndicator is a simple piece of software designed to allow easy publishing of your Subversion logs via Really Simple Syndication, an Internet standard for content syndication.

Because subSyndicate is implemented in the Ruby programming language, it is portable across all UNIX and UNIX-Like (Linux) systems that are supported by the Ruby runtime environment. Support for Microsoft Windows is so far untested, but is theoretically possible.

About The Yasashii Syndicate
The Yasashii Syndicate, otherwise known as the Gentle Syndicate, is an organization dedicated to its execution of The Sekrit Plan. The Sekrit Plan’s goals, to outsiders, seem strange and mysterious. To syndicate members, however, The Sekrit Plan makes perfect fucking sense.

For more information about the Yasashii Syndicate, please see yasashiisyndicate.org/about.

subSyndicate

Subversion In Fifteen Minutes

I am pleased to announce that I have written a Subversion tutorial for the Syndicate. Please see the following press release from the Syndicate website for more details and a link.

Calgary, Alberta (Yasashiisyndicate.org) - Syndicate member Nicholas Evans is pleased to announce the release of the Syndicate’s first tutorial, Subversion In Fifteen Minutes. This is the first in a long series of document that the Syndicate plans to release as a part of its Seekrit Plan.

About Subversion
Subversion is the premiere source control management software package. The Subversion project was founded by a number of individuals who were discontect with CVS and its philosophies. Since its founding in June of 2000, nearly six years ago, incredible progress has been made.

About The Yasashii Syndicate
The Yasashii Syndicate, otherwise known as the Gentle Syndicate, is an organization dedicated to its execution of The Sekrit Plan. The Sekrit Plan’s goals, to outsiders, seem strange and mysterious. To syndicate members, however, The Sekrit Plan makes perfect fucking sense.

For more information about the Yasashii Syndicate, please see yasashiisyndicate.org/about.

Subversion In Fifteen Minutes.

Warm & Fuzzies: Workshop For Good

So at our last SCOSUG meeting, Al Gordon mentioned that there was going to be a Ruby on Rails workshop in DC that he was thinking about attending. This workshop is called ‘Workshop For Good‘, and it’s being put together by a teacher at a DC highschool.

Naturally, a Ruby on Rails workshop piqued my curiosity. Since Al was going, he said I could tag along with him…so I signed up. Currently, I’m #1 on the waiting list, but (judging by the email conversation I had with the organizer), I’m in, thanks to Al giving him a bit of a nudge. Kudos to Al.

As you may have infered from the name, this workshop isn’t Just Another RoR Class. It’s actually a fundrasier for the Chavez Public Charter School. From the Workshop’s ‘Purpose’ page, it seems like Chavez has been doing a lot for the community.

Our typical student enters 9th grade reading on a 4th grade level. Without significant improvement there is no way that student can succeed in college. We have a rigorous literacy program that pushes ability to the maximum rate of improvement. Last year our students showed more improvement in reading ability than any other school in DC.

Sadly, Chavez isn’t as much of a financial success as Yale has been (you know, Chavez can’t afford to buy Washington D.C. </yale-burn>).

Things that most people take for granted are missing in DC public schools. It’s a luxury for a class to have textbooks – you can practically forget about students having their own copy. Technology is largely outdated and worn down.

Hence, the fundrasier. It’s been a $400 registration fee. All five of the student slots had been filled by the time I registered (bloody college students, always whining about their student debts…it’s all beer money to them!). Because it’s charity, and for people who seem to know what they’re doing, I don’t mind the extra $200.

So I guess OwlManAtt will be doing DC in a few weeks. The trip is still sort of being planned. Cya down south!

Ramblings About Ruby on Rails

I pretty much spent all of Friday night, Saturday, and Sunday doing Ruby on Rails-related stuff. Finishing the Agile Web Development book, reading Why’s (Poignant) Guide to Ruby, and writing actual code.

First and foremost, let me say hot damn, the Ruby scripting language is elegant. I still do not comprehend all of it (but I’ve got most of it down thanks to Why!), but really. Damn.

@some_fucking_array.each { |input| print "#{input}\n" }

Or…

@user.user_preference.display_name = 'owlMANatt'
if @user.valid?
@user.save

PHP just ain’t got shit on that.

The guide I mentioned above, Why’s, is worth reading even if you don’t want to learn Ruby, by the way. It’s just that good.

Now, I said that I was writing code. What for, you may ask? A new project? Another half-hearted attempt at doing something?

Yup.

I’m hacking together a pet game (I know, I’m Mr. Unpredictable) with Ruby on Rails. I’m calling it freePets for now, in a parody of the never-quite-started-but-still-fucking-impressive freeCritters. The site will include numerous jabs at Eurleif for his lack of progress despite having been working on freeCritters for something to the order of three fucking years. As a bonus, freePets will be done before freeCritters.

I spent some of yesterday and all of today working on the register screen. Why did it take so long if Ruby on Rails rocks so much? I’m just a tool, that’s all. I’m getting the hang of this Ruby thing, so I should start humming along shortly.

But, I did not *only* write a register script, oh no! I wrote a wonderful unit test to automate the process of testing my register script. It was quick and easy to do, which is why we all love Rails so much!

I did learn about one serious limitation to Rails, however. Rails does not support compound keys. At all. No account number & UUID as a key for me. =(

Initial Thoughs on Ruby on Rails

As mentioned in my last post, I’ve been reading a book about Ruby on Rails. This book, Agile Web Development with Rails, consists of two major sections. In the first, a demo application (a shopping cart) is written. In the second, you get an excellent look through most major features and concepts in the Rails framework. The book also includes a (breif) primer to the Ruby language.

Rails is an interesting beast. It forces the design pattern of MVC down your throat. This, however, is not a bad thing. It allows Rails to make a bunch of assumptions about how your application is going to work. Based on these assumptions, Rails picks lots of sensible defaults. And Rails is all about defaults. Defaults save you time.

So, now, lets ponder the model. The model is the data your application deals with. Normally, this data is stored in a database (Rails supports MySQL, Postgres, Oracle, and more). But, since Ruby is an object oriented language, it would make sense for us to translate the model from a relational database into objects.

This is where Rails’ concept of models comes in. When you start a project, rails generates a lot of files with code stubs for you. In our project/app/models folder, we’ll find a bunch of classes that link together database tables. We can also find things that tell the model what to accept and what not to accept as valid input for a field. Rails even has a number of hooks that allow us to insert our own code to be run before or after a database operation (like, we can add a method to automagically log something every time we save an object).

Rails uses a kickass package called ActiveRecord (not to be confused with Microsoft’s LDAP implementation, ActiveDirectory) to interact with relational databases. Not only does it do all of the cool stuff from above, but it also generates methods for updating/selecting/saving/inserting, has built-in SQL sanetization, and lots of other cool features. You can read more about it in the Ruby on Rails API documentation.

Next up, we have the concept of controllers. Controllers are where a lot of where our application logic resides. Their job is to actually do it. They change the application’s state, find appropriate database records, and generally take care of business. They can then hand off what data they’ve gathered to the view, but more on that in a bit.

Controllers, like models, are also just more classes. One can invoke a controller by going to something like ‘example.org/myapp/controller_name’. Rails would look for a class called ControllerName in app/controllers/controller_name.rb.

Notice how the class name changed from what we specified in the URI to what it looked for. This is something Rails does a lot. The idea behind Ruby on Rails is that you can express ideas cleanly in something that looks human-readable. As such, Rails guesses at things that look nice, so you don’t have to specify them. ActiveRecord also does this by playing with the pluralization of the model to find the approprite database table. For example, if the model was called ‘Book’, the table it would look for is ‘books’.

Yes, I know. That sounds like a really, really bad idea. I agree with you, one hundred and ten percent. I have the feeling that I am going to be burned by Rails when I start developing in it because someone had the bright idea to teach their development framework the English language. This is my single biggest complaint with Rails (keeping in mind that I haven’t done much with it yet, having only read a book on it).

Finally, the view. Rails has two templating systems, rhtml and rxml. They’re pretty self-descriptive; rhtml is for HTML, and rxml is for XML. Rxml was covered very breifly, but it looks nifty for generating feeds. Rhtml was discussed much more completely. It offers all of the features of the Ruby programming language, making it incredibly flexible. Additionally, the book demonstrated how one could add a new templating system to Rails. It was not very hard.

Ruby also supports writing little modules that you can drop in and out, along with creating ‘helpers’. I’m not sure of their practical usefulness just yet.

There is a little Rails features that really makes Rails shine. When one generates form elements using the built-in form helpers, Rails can automagically highlight fields that have invalid input in them, with almost no work on the part of the developer. That’s really cool!

All in all, Ruby on Rails looks like it’ll be interesting. It seems easy. Agile Web Development with Rails was a great read. In fact, it was the first book of its class that I was able to read cover-to-cover in just a few days. I strongly advise it to anyone who is interested in developing under Rails.

« Previous PageNext Page »