Author Archive

What this freelancing lifestyle is missing

Wednesday, July 28th, 2010

In a word – “Feedback”. Plain and simple.

It’s a given that while we work with our customers and clients we get some feedback along the way – “This is good”, “This needs to move over here”, “Make this red”, etc. That sort of feedback, however, is a little superficial in the grand scheme of things and not quite the feedback we’re in need of most. The feedback I’ve been missing for the past few years is the piece of the traditional employee-employer (“working for the man”) relationship. We might bitch and moan about it when we’re there within that context, but to be frank – the annual review is crucial. How else are we to know what we need to improve on?

As a freelancer – these constructs no longer exist if we don’t want them to. Which is nice to begin with. We’re free! Right?! Right. But, over time the novelty and the doubt will creep in and you’ll be left wondering – “What is it that I could do better?”. I’ve found myself longing for this feedback as of late and, while it’s a little scary and my lizard brain is wailing like a banshee, I’m pulling the trigger.

I’ll be asking my clients upon project completion just what it is that I did well on, and what I done poorly or could use some work. To some it might be counter-intuitive – “They hired you, right? They had to have confidence.” – but I’m more interested and excited to know for sure. No gray area. No guessing. No assumptions. Running a business is just that – it’s business. There’s nothing personal about this. Tell me how my business can be better.

I’m sure a good number of my fellow freelancers have been doing this for months (years) and wondering what’s taken me so long. I really wish I had an answer for that, but I don’t. Would those of you who have been doing this have any suggestions? Are there any questions you’ve asked that get the most constructive and helpful reaction?

Continuing on this theme, but a different post for another day, is feedback from a different slice of our professional life – our peers. To be continued …

Posted in Work | 6 Comments »

Debugging in Cucumber

Saturday, July 17th, 2010

As a relative newb’ to cucumber I realize there’s a lot to get caught up on. The one thing I do know is that there’s a lot that I don’t know. Having said that, when I run into a barrier or an issue and I want to dig into the source to figure things out, what do you do?

You break out ruby-debug, of course.

Add require ‘ruby-debug’ to features/support/env.rb and throw a breakpoint into your step definitions.

That’s all well and good, and it works just fine. But what do you look for while you’re in there? I spent the better part of an evening looking for how I could sniff around the html source cucumber was testing against and couldn’t find it. Lots of searching for how to pear into @response and @request – which end up being nil as far as I can see.

I had no idea.

Until I read this post from the LoED on how to test your source’s validity. In there was the answer:

page.body

Eureka!

Baby steps. I’ll figure this all out yet.

Posted in Web Development | 2 Comments »

rvm, ree, nginx and phusion passenger

Friday, March 12th, 2010

A production web / application server that I maintain has been around for mostly wordpress and static sites we host for some of our clients. Soon, however, the need for some Rails-based client sites will be popping up for us over there. Traditionally the set-up for those apps have been in clients’ own hosting environments, or were apps I hosted in a dedicated app-server slice of my own. So, the need crept up, and now I’m left planning for now, and the future. And what is that future, you might ask (ok, probably not)? Rails 3, of course.

The baseline reference implementation for Rails 3, as I know it, is 1.8.7, but has been tested to work with Ruby 1.9, and also functions properly with Phusion’s Ruby Enterprise Edition (henceforth known as REE). To say that Ruby is in a transition phase is an understatement. The community has been hard at work trying to get gems, frameworks, their associated plugins, etc, to work with all of the new shiny ruby-based toys. In order to accurately test, the RVM project has stepped up as the solution for testing and developing across multiple Ruby interpreters.

New server setup, quickly moving innovation, growth and change … all of these point me in one direction – drinking the RVM kool-aid and getting right into it. But not without a few hiccups. Here are my steps in getting things rolling with rvm, nginx, ree and passenger.

Note: Don’t install nginx at first thinking that passenger will end up being installed as a plugin, or module. I wasted some time in doing that. When you go through the process of installing passenger it’ll ask to compile and re-install nginx. So we’ll get to that eventually.

To get everything compiling as I wanted I had to install a handful of obvious, and not-so-obvious, packages and libraries. To wit:

sudo apt-get install ruby-full build-essential curl libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev libgcrypt11 libgcrypt11-dev bison libreadline5-dev

Your mileage may vary.

Also, the irony doesn’t escape me that we needed to install ruby, “ruby-full”, in order to install a bunch of other rubies. But hey, whatever.

Install rvm. It’s as easy as following the instructions at the RVM site. I chose to go the gem route. Follow the instructions as are given and things will be fine. The only hiccups I had involved some libraries that are taken care of in the above package installs.

Install the versions of ruby you’d like. rvm install 1.8.6,1.8.7-head,ree,1.9.1

According to fellow boston.rb’ist @techiferous we use 1.8.7-head, because

# Rails 3 needs Ruby 1.8.7. Use rvm to manage Ruby versions. Do “rvm ruby-1.8.7-head” NOT ruby-1.8.7-p249 (broken gems).

After some time compiling and wrangling everything together you should have a handful of different rubies at your disposal. Please visit the rvm site for examples, use cases and general information. It’s worth your time.

At this point I switched to ruby-ree in preparation of the passenger and nginx install. rvm ree. A quick ruby –version now tells us that we’re running ruby 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux], MBARI 0×6770, Ruby Enterprise Edition 2010.01.

Install Passenger and Nginx. gem install passenger && rvmsudo passenger-install-nginx-module will get you started. Here’s where the install of Nginx goes down, as noted in the text after you run the command:

Nginx doesn’t support loadable modules such as some other web servers do,
so in order to install Nginx with Passenger support, it must be recompiled.

I chose to customize my own install and selected the second option. Do whatever you’re most comfortable with. I prefer to have my compiled source in /opt/local, but again, it’s all a matter of preference. After some more compiling, we were all done and have a newly compiled install of Nginx, with Passenger, Utilizing the REE ruby interpreter.

Last but not least, go thank Wayne Seguin for the work on RVM. Amazing work!

Posted in Web Development | 1 Comment »

« Older Entries |