New Series: Rails Application Walkthrough

My wife is a professional photographer with a great eye. She has a natural talent for photography that comes through in her work. Her customers love their pictures, of course, and they love to tell their friends about them. So we had the bright idea to put a page of customer testimonials up on her website. Anyone can bang out a static html page, but where’s the fun in that? Besides, it’s sort of clunky for her to get a quote from a customer, send it to me and then I update the web page. It would be much better if there was some system where a customer, fresh from viewing their online proofs could gush about how wonderful their pictures came out right then and there. Sounds just like a guestbook, doesn’t it? We’ve all seen what happens to them right?

Yup, you guessed it: spam.

What we need is a web app that lets a user submit a testimonial and posts it only when it’s approved. It shouldn’t be hard to write, especially with our new favorite framework, Ruby On Rails.

So let’s get started, er… rolling.
Read more…

The Art of the Exit

So you’re discovered that the company you work for has a culture of failure, and there’s no light at the end of the tunnel. You’ve finally realized that you’re better than that, that you deserve a good place to work. You’re ready to move on, to roll the dice at that monster of a gig, one that will be rewarding and make work fun again.

One thing that you should think about while you’re seeking a new position is your exit strategy, for a couple of reasons. First, it lets you focus on the real reasons for your departure, not just the dust-up in last week’s status meeting, or the early release of your project without your knowledge. You should be able to formulate in one or two concise statements your reason for leaving. Once you have this firmly defined, reframe it in a way that isn’t disparaging to your soon-to-be-former employer. For instance, instead of “That rotten jerk lied to me” could be couched in more positive terms: “I feel I was mislead regarding the responsibilities that were assigned to me“. Don’t mistake this for political correctness; you will be asked why you’re leaving your position in almost every interview you participate in.

Read more…

Culture of Failure

Have you ever given thought to the culture in your workplace? Does it engender success or are you set up to fail? As a developer, do you think that success is properly recognized in your workplace?

We’ve all worked at a place where the deadlines are tight, the feature set large, and pressure is everywhere. In this compressed environment, failure is the norm. Quality is the first thing to go on the relentless march to the next release date. Given the needs of the business, how can a company change from this culture of failure to one of success?

Software development is a tricky business. We’ve all heard (nay lived) the Iron Triangle and the pressures it creates: given the three choices of fast, cheap, and good, only two are attainable. If you then consider scope (aka features), it complicates the picture:

Each of these three constraints affect quality; it is the challenge of company to find the right balance, oftentimes as a result of knowing your customer. If your product is for the enterprise, how often do you need a full product release? Will your existing customers upgrade once a quarter? Once a year? How often can your sales team successfully sell a new version?

Read more…

Textmate on Windows – Introducing ‘E’

I’ve been using Emacs as my editor of choice for many years now, long before it was officially released for DOS and Windows systems. I started with the OEmacs port after getting tired of an old editor called pmate. PMate was a TECO derivative that had four buffers but only one was backed by a file, the rest were memory buffers only. The key commands were almost as bad as VI — to exit the editor you had to type $xe$xh, where $ was really the escape key. I’ve posted earlier about configuring Emacs for RoR development and not soon afterwards I ran across a post on AB about a new editor that can use textmate bundles.

There’s a good review of E here. Installation was smooth and the auto-update of my existing cygwin installation was pretty slick. A couple of points: you may have to remove RUBYOPT from your enviroment. The other bit is to grab the latest bundles from the svn repository and overwrite the ones that come with the installer.

Nit: I can’t tell e to default to rails mode for ruby code.

Going Mobile

I had to rebuild my old Transport ZX (stargazer1) laptop a couple of months ago when I had to replace the failed hard drive. I put XP on it instead of Win2K and though it’s a little slower that it was, all is fine. I’ve kept the install light — no MS Office, no Outlook, no VisualStudio, but what I do have is a complete Ruby development setup, Emacs, Firefox and the like.

I chose Instant Rails for this machine instead of my usual approach of installing ruby, then rubygems, et al. It’s a little odd to get used to, but it does it’s job quite well. I recommend it for those who want to give RoR a quick spin about the block. It’s well suited for following tutorials and screencasts found online.

The other largish piece of software I put stargazer is Ubuntu. It was the easist install of linux that I’ve ever done, and I’ve done quite a few, starting with SLS Linux that came on 26 5.25″ floppy disks. I have two gripes with Ubuntu.

  1. The option of how to install the bootloader is hidden from the user. Instead of installing into the linux partition and wiring itself into the XP boot menu, grub was installed in the MBR. I would have preferred that XP bootloader was used by default.
  2. I can’t install updates. Every time I try to update a package, the system complains that a file within the installed package is “missing a final newline”. There seems to be no cure for this. I used the same CD to install Ubuntu into a VMWare-based VM and THAT install went fine, and I don’t get that error. Updates install smoothly. Go figure.
  3. The vaunted apt can’t get the latest version of ruby, rails or emacs because they’re not packaged for 7.04 and I’m confused about how to install a gem. The ‘net is full of dire warnings about mixing install methods on an apt-based system2
Anyway, the upshot is that I can do mobile development now, and just in time. I spent most of the day working on a rails based app, henceforth known as PM. More details to follow in another post.

1. It’s called stargazer because I also use it to control my ETX-90 telescope
2. Yes, I know that’s three gripes. I’m having a buy-two get-one-free sale.