Paul Dix's blog

This Week in Rails

Here's the second edition of this week in Rails. This week I'm keeping things short and sweet.

This Week in Rails

Welcome to the first post in a new series which focuses on Ruby and more specifically, Ruby on Rails. My goal is to provide links and a little bit of commentary on interesting blog posts and discussions from the previous week. I have my rss reader pointed to a bunch of Ruby focused blogs, but I'm sure there are things of interest that will slip past me. If you notice something that you think is worth sharing or a blog I seem to be ignoring, please don't hesitate to contact me directly or post in the previous week's discussion.

There are a number of ways I can go with the week in review. I could provide links to a bunch of stuff in the blogosphere or provide just a few links with my own thoughts. Right now I'm leaning towards around five links per week. I could certainly provide more, but I'm worried about inundating people with too much material (a problem I have with my own growing list of rss subscriptions).

While I won't be doing it this week, I would also like to talk about anything I think is noteworthy from the Rails Google Group and possibly write about any interesting commits from the Rails core team. As always, feedback is greatly appreciated.

Without further delay, here's a little roundup of Ruby and Rails related posts from the last seven days.

Interactive Programming with the REPL

In this week’s post I’ll discuss the joys of interactive programming. For those who write only in compiled (or byte code compiled) languages this may be a foreign concept. There seems to be some level of this feature in most scripted languages. In Lisp interactive programming is supported by a feature known as the REPL, or read-eval-print-loop. It is also known as the top-level listener or simply the top level. Ruby has something similar called the IRB, or interactive ruby shell. In Python it’s just the interactive shell.

Basic Lisp Syntax (or Why Lisp Hurts My Brain)

This week I’ll be getting into some of the basics of the language. I’ll also explore some of the syntax differences that make Lisp look so funny. Rather than just listing all the features of the language, I’ll use some examples and explain how each works. Without further delay, let’s take a look at a basic piece of Lisp code.

Explorations into Lisp

After a long break from writing I’m ready to get back to work! Over the next few months I’ll be studying algorithms, AI, and Lisp. Given that this will be my focus, I’ve decided to write about the experience of learning Lisp as I progress. This is the first in a multipart series about Common Lisp and programming languages in general. I’ll be looking at different programming idioms and comparing specific constructs in Lisp, Ruby, C++, C# and whatever I feel like pulling out at the moment.

DHTML Floating Resizable Content Panes

I’ve continued to look for a reusable DHTML floating content pane. During my searching I dug into, revisited dojo and came across something new. Here’s the quick lowdown on what I found.

Ajax Toolkits, Widgets and Rails

Originally I planned for this post to be a sort of how to for creating floating content panes in a Rails application. If you’re unsure what I’m talking about have a look at protopage or Winlike for decent examples. I didn’t want to write everything from scratch so I began a search for reusable code in the form of a widget that I could use that would make sense for the example. What I found was that there’s a lot out there and there are different approaches to web based widgets. What follows are a few of the things I found and an open question on what the best approach may be.

Using UUID/GUID as Primary Key in Rails

A project I'm working on has a difficult requirement to meet. It needs to be able to support a multi-master database model. If you're already familiar with the concept, please forgive the following short introduction. This means that multiple systems need to be able to create records in their local database and sync up to other ones later. Connection among the systems is not guaranteed to be up 100% of the time. A prime example of this type of system is Microsoft's Active Directory.

Mozilla as a Thick Client Development Platform?

With Ajax being all the rage, people have been forgetting about client applications. Well there are times when you’re on a plane or in one of those horrible corners of the world (like your local Starbucks) that don’t have free accessible WiFi and you’re forced to work with what you have locally. One of the things I love about Ajax apps is the fact that they’re cross platform and deploy instantly. I’d like to get to the same point with thick client applications and it looks like Mozilla may be the platform of choice for the future.

At this point I’ve only done the bare minimum of research into the subject, but I’d like to share what I’ve found and start a discussion on the topic. I’ve found that the main tools in Mozilla for developing applications are XUL (XML User Interface Language) and XPCOM (Cross-platform Component Object Model). XULRunner seems to be the framework that encapsulates these goodies for creating client applications. XULRunner also provides functionality for networking, file access and some other stuff. It seems that upcoming versions of Firefox will be installed with XULRunner, so any system with the latest Firefox installed will have the framework available. XULRunner can also be installed without Firefox so applications built on the framework don’t have a Firefox deployment requirement.

Security Should Start with Education

Before I get into the details, let me give you a little background… In addition to contract work and my dreams of starting up something of my own, I’m working on finishing my degree in Computer Science. One of the classes I’m currently taking is Advanced Programming. Undergraduate computer science curriculums focus very heavily on Java and this class seems to be a chance for the students to get exposure to other languages (namely Perl, ANSI C, and C++). Much of this class consists of labs and little programming projects. The trouble with these is that almost no mention is made of security issues. I’ll describe a couple of the assignments to give you an idea of exactly what I’m talking about.