Coding Alone is Tough

I know a bunch of people that read this are working alone, which means your learning alone. I spend all day coding by myself just like this.

I’ve been in the same spot, waiting for answers on Stackoverflow to questions and searching my brains out. I even took a job with a WordPress company in the hopes of getting code review on a regular basis. Unfortunately it didn’t really pan out that way.

Just like the author of the post, I joined a local Ruby Brigade and while most of the other members don’t program PHP or WordPress there is still so much to learn. Every time I go out I leave with more knowledge about being a good developer.

To hear some of the smart things I’ve learned check out this post.

Missing the Vibe in the Rails Community

For a while I was involved pretty heavily with the Ruby on Rails community. I did design consulting on a number of application interfaces and some frontend programming. Alas, those days have passed and I’m 100% WordPress and PHP focussed.

Now I like WordPress and PHP just fine but one thing I really miss from the Rails community is the focus of the developers. Take the time to listen to [Ruby Rogues 47][rr47]. I love the depth that the Rails community, and [@dkubb][dkubb] in this episode, works hard to test all their code.

While all the WordPress developers I know want to do a good job, there is simply a different vibe of excellence in the Rails community. This overall vibe is something I miss.

I know Dan since he lives locally and he has imparted a bunch of other knowledge to me that applies to more than just an single language. These are items I remember him saying to me, my memory may be imperfect.

1. If you can’t fit your function on the screen then you need to ask yourself if it’s too complex.
2. If a line of code has to wrap to the next line, you probably need to make sure it’s not too complex.

I think about those items with every site I build. The tips in the podcast are even better, certianly worth a listen for any programmer.

[rr47]: http://rubyrogues.com/047-rr-coding-disciplines/ “Ruby Rogues 47: Coding Disciplines”
[dkubb]: http://twitter.com/#!/dkubb “Dan Kubb on Twitter”

Why Rails Feels like a Developers Only Playground

sample rails code

sample rails code
sample rails code

I’m a designer and I work on Ruby on Rails projects or at least I’d like to. I actually competed in the Rails Rumble 09. The issue is continuing to find any work designing projects for Rails. This despite the fact that I’m told on a regular basis there is a shortage of designers working with Rails.

So here’s the question…why does the Ruby on Rails world still seem like a playground reserved for developers only?

Job Ads for Developers

Look around at the work advertised for Ruby on Rails. Do you see any job ads for designers that work with Ruby on Rails? Sure there are a few but it’s what like 2% of the total compared to the jobs looking for developers? When confronted with this fact it’s easy to dismiss the shortage of designers so often spoken of. Sure you say there’s work but no one knows where it is.

Documentation

Rails documentation always assumes a certain level of knowledge. Knowledge that is really the pervue of developers.

I know the lead developer of Datamapper we’re in the Fv.rb together. In response to questions on how to switch from Activerecord to Datamapper in a Rails project he created a commit by commit conversion which he referred me to when I decided to work on an app. Figured why not use Datamapper when the project lead is around for questions.

Unfortunately the commit by commit directions still leave some information out. Point one, where is the rails_datamapper plugin? Go head try to search for that text specifically. Yeah that’s right you find lots of info on Rails and Datamapper but the actual plugin?? Nope.

I know that Dan acknowledges that documentation is a weak point and that’s great. He wants to do something about the state of Datamapper documentation. Unfortunately it seems that all rails projects are in this state. I just happen to be picking on Datamapper right now because I know Dan. It seems like the Rails world been in this state for a long time and there doesn’t seem to be any change on the horizon.

‘Just a Designer’

Yeah the guys I work with at the Fv.rb are joking, but otherwise it seems to be a mentality that goes through dev’s heads. They can’t design but don’t want to take the bit of extra time to help someone get up to speed. Most designers are more than smart enough, and many are willing, to learn some new technologies if someone is willing to give them a helping hand.

Unfortunately most developers seem to think that you’re “just a designer.” Sure designers do arty things but most people are smart enough to learn web development if only they have the interest. A helping hand is all most people need.

Developers Interest Wasted

RTFM. Really RTFM. Yeah that’s what I was told when I was in the Spree IRC channel. Now I realize I’m not the best Rails Developer out there and I may have asked a simple question, but I had read the manual. I had spent a week going through the manual and I still wasn’t clear on a point but wanted to make sure I set my development environment the best way possible. So when I asked my question I was told to RTFM. I wasn’t even provided with other material to read as suggested in a recent article of Rails Magazine.

Lucky for me I attend a local Ruby Brigade so I had some other people to ask the same question. They were able to tell me the difference between running the Gem version and running from source in a few minutes and why I should do it one way or the other.

The reality is that I know that IRC channels are filled with people asking silly questions. I know I didn’t start off with an introduction and experience level or anything like that, but really is IRC a time for that? I use the same Nick everywhere. My name is on the Rails Rumble 09. I wasn’t asking a question that I hadn’t looked for, so why the response?

The Solution

So how can we help Rails be a bit more friendly to the designers among us? How about we make sure that documentation contains portions that don’t read like a cell phone contract. Let’s make sure that we have an extra measure of patience when questions get asked. As Yehuda mentioned:

The problem is that a new developer simply has no conceptual model for the problem at all.

How about helping the new developer develop their conceptual models so they can help themselves. Let’s teach a man to fish. How about provide a link to the reading material needed then if the question comes back give a helping hand.

Yeah those suggestions might be a bit simplistic but lets at least start somewhere.

The Best Windows Ruby on Rails Setup Part 2

Episode 2 - The Best Windows Ruby on Rails Setup, Part 2
Episode 2 - The Best Windows Ruby on Rails Setup, Part 2

This is the second part to getting a Windows machine set up for Ruby on Rails Development by having Ubuntu running inside Virtualbox. View Part 1 here. Today’s screencast will walk through installing Ruby, rubygems 1.3.5 and Rails with rubygems, and SqLite3 as well as installing my preferred code editor Komodo Edit. Watch the screencast or read below for the written instructions.

Edit

This same procedure has now been tested on Ubuntu 9.10 and works fine.

Play

View Part 1

Installing Ruby

To install Ruby in Ubuntu we can simply install from the built in repository in Ubuntu. You don’t need to compile this from source if you don’t want to.

[bash]sudo apt-get install ruby-full build-essential[/bash]

Now let’s see what version of Ruby we have.

[bash]ruby -v[/bash]

This should return something along the lines of:

[bash]ruby 1.8.7p5000 (2009-02-22) [i686-linux][/bash]

And finally let’s check to make sure the Ruby library is working.

[bash]ruby -ropenssl -rzlib -rreadline -e ‘puts :Hello'[/bash]

Should return

[bash]Hello[/bash]

Installing Ruby Gems

Ruby Gems should be compiled from source using the latest version of Ruby Gems. The first line of bash I run just runs two commands one after the other.

[bash]
mkdir src
cd src
wget http://rubyforge.org/frs/download.php/57643/rubygems-1.3.4.tgz
tar -xzvf rubygems-1.3.4.tgz
cd rubygems-1.3.4
sudo ruby setup.rb
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
[/bash]

Nothing shows as output form the last command. It creates a symbolic link.

Installing Rails

Now that we have Ruby Gems installed Rails is a very simple thing to install. You should think of Rails to Ruby as you think of jQuery to Javascript. Rails is simply a set of assumptions about how you want to use Ruby that is bundled into a Gem. Install Rails through Ruby Gems with a single line.

[bash]sudo gem install rails[/bash]

Testing Your Rails Installation

Now that we have Ruby on Rails installed properly we should test it just to be sure.

[bash]
cd ~/
mkdir sandbox
cd sandbox
rails test-app
cd test-app
script/server
[/bash]

Now open up Firefox and enter “localhost:3000” into your url bar. You should see the standard Ruby on Rails starting app page.

Edit

As you’ll notice in the screencast Rails works but gives a warning and I wasn’t sure what it was. Thanks to Brian Mayle who helpfully points out the answer in the comments. We still need to install the sqlite3 connector. So run the following two lines and you’ll be right as rain.

[bash]
sudo apt-get install libsqlite3-dev
sudo gem install sqlite3-ruby
[/bash]

Installing Komodo

Finally we’re going to install Komodo Edit which is my preferred code editor for Ruby on Rails projects. I have tried Bluefish, Netbeans and many other but just keep coming back to Komodo Edit as superior for how I work.

Start by downloading Komodo Edit and just directly opening it in the Archive Manager. Drag the resulting folder onto your desktop and jump back into the terminal and run the commands below.

[bash]
cd ~/Desktop/Komodo-Edit-5.2.0-4075-linux-libcpp6-x86
sh install.sh
[/bash]

Now it’s going to ask where you want to install your software. I like to keep things organized so I install all of the custom apps inside my Home folder in a folder called software. Run the following commands to accomplish this.

[bash]
/home/myuser/software/Komodo-Edit-5
[/bash]

Next we have to insert the executable in our PATH variable with the command below.

[bash]
sudo ln -s ‘/home/myuser/Software/Komodo-Edit-5/bin/komodo’ /usr/local/bin/komodo
[/bash]

Now you’ll have a new ‘icon’ on your desktop that says ‘komodo-edit-5.desktop. This is the actual icon to launch the application but first we need to right click on it select ‘Properties/Permission” and check the box that allows executing as a program. You should now see the proper Komodo Edit Icon.

I like to drag this icon into the software folder we created and then from there drag it into the top bar in my Ubuntu installation so I can launch the application easily.

Conclusion

Now we have a working Ruby on Rails development environment with a working code editor. If you have any questions let me know in the comments.

Links used

Play

The Best Windows Ruby on Rails Setup Part 1

I recently purchased a new computer and had to get Ruby on Rails installed on it. Up to this point I’ve been using my wife’s Macbook for ROR development on weekends. It was time to make the jump to a dedicated environment that didn’t interfere with the Facebook cravings of the wife.

Instead of just diving blindly into setting it up I tapped the knowledge of one of the guys I know who works at Engine Yard and worked on Windows.

Update: Wayne E. Seguin of RVM now has a Rails Windows Installer so you can really install Ruby on Rails in Windows easily.

Update: I have now installed Karmic Koala in Virtualbox in Windows 7 and the process is exactly the same.

His answer to me was…the best way to install Ruby on Rails in Windows is to get Linux. So watch the screencast as I install Ubuntu in Virtual Box on my Vista PC.

Play

View Part 2

Download Links

Play