Public Road

A developer's journey

GiveCamp: The Most Fulfilling Weekend.

| Comments

This past weekend, I attended my second GiveCamp in Cleveland. Lasting from 5:00pm Friday to 3:00pm Sunday, 25 non-profit organizations benefited from the event thanks to the hard work of 203 volunteers! The vast majority of technical issues that GiveCamp non-profits faced were that their website was poorly designed, hard to update, and didn’t reflect their core message.

I worked in a small team with a non-profit* to completely overhaul their website to WordPress. By the end of GiveCamp, the organization was adding all of their content (heavily edited thanks to the copywriter volunteers) themselves, fixing one of the major problems they previously struggled with. As a result their new website can easily stay current with up to date information. It is important that the organization is self-sufficient by the end because at the end of the weekend, all the source code gets bundled up and turned over to the charities. Charities cannot expect the developers to support or maintain their codebase afterwards.

The most important part of Givecamp is that the non-profit organizations are able to not only benefit from an improved website but they are able to reach out to others regarding their offered services. And this is why GiveCamp is the most fulfilling weekend a developer can have.

*Note: As of this blog post, the new site hasn’t gone live yet. They are still in the midst of entering content.

Deploying a Rails/Coffeescript Project With Jenkins

| Comments

I was recently asked to setup Jenkins on our CI Box that is running CentOS 6. I wasn’t able to find a good guide, so I decided to create my own.

Installation

The first thing to do is to install development tools. Not all of these are needed, but they will save headaches in the future.

$ yum groupinstall 'Development Tools'

Next, the default version of Java included in CentOS is not compatible with Jenkins. You will need to remove the current version, and install Java 1.6.

$ yum remove java
$ yum install java-1.6.0-openjdk

The Jenkins wiki doesn’t mention this, but I had trouble running Jenkins without Tomcat 6.

$ yum install tomcat6
$ wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
$ rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
$ yum install jenkins

Start up Jenkins as a service:

$ sudo service jenkins start

Now Jenkins should be up and running, navigate to http://localhost:8080 in order to verify that it is working.

Useful Plugins

  • GitHub Plugin - Integration between Jenkins and GitHub.
  • Rake Plugin - Allows Jenkins to invoke Rake tasks as build steps.
  • Ruby Plugin - This plugin will let users use Ruby in the build scripts.
  • RVM Plugin - Runs your jobs in the RVM managed ruby+gemset of your choice.
  • Green Balls - Changes Jenkins to use green balls instead of blue for successful builds.

GitHub Integration

In order to get Jenkins to be able to pull a private repo from GitHub, you will need to generate private and public keys. I found the easiest way to do this is as the jenkins user.

$ su -l -p jenkins
$ ssh-keygen -t rsa -C "[email protected]"

Now upload the public key to Github, and test to verify it worked:

$ ssh -T [email protected]

Configuring a Ruby/Coffeescript Project

  1. Create a new project, and give it a name.
  2. Under teh Source Code Management setting, enter in it’s repository. I use the SSH git repo.
  3. Under Build Triggers, if you want to poll your repository every 5 minutes, enter: 5 * * * *
  4. Set the RVM enviroment: ruby-1.9.2-p320@project
  5. Configure the build.

Configuring the build is a customized process. I will include my build scripts so that you can base yours off of them.

# Setup
export QMAKE=/usr/bin/qmake-qt47
rm -rf ${WORKSPACE}/db/development.sqlite3
rm -rf ${WORKSPACE}/db/test.sqlite3
rm -rf ${WORKSPACE}/db/production.sqlite3
ln -fs /home/USER/Documents/PROJECT/development.sqlite3 ${WORKSPACE}/db/development.sqlite3
ln -fs /home/USER/Documents/PROJECT/development.sqlite3 ${WORKSPACE}/db/test.sqlite3
ln -fs /home/USER/Documents/PROJECT/development.sqlite3 ${WORKSPACE}/db/production.sqlite3
bundle install

#Run Jasmine and Rspec
bundle exec jasmine init
bundle exec rake jasmine:headless
bundle exec rspec

#Setup Cucumber and Run
/etc/init.d/xvfb start
export DISPLAY=:99.0 && bundle exec cucumber

Note: If you plan on running Cucumber tests, you need to install xvfb and modify your init.d.

$ yum install xvfb

Liquid error: No such file or directory - python -c “import sys; print sys.executable”

Wrap Up

My personal recommendation is to have multiple builds in Jenkins, instead of one large build. We currently have our jasmine/rspec suite checking for new commits every 5 minutes, while our cucumber build checks for new commits every hour. This helps to provide quick feedback to the developers, and prevents them from having to wait for Cucumber to finish running.

If you use this guide and run into any issues, leave a comment and I’ll try to keep this guide updated. I wrote this guide about a week after I setup Jenkins, so it is possible I left out some steps.

Rating Stars Liquify Plugin

| Comments

When I decided to move my Wordpress blog to Octopress, I couldn’t find an Octopress plugin to replace the plugin I used in Wordpress to rank how I did on my goal for the week. So I present to you my first plugin for Octopress, Rating Stars.

Results: Goal #8 - Cook Four Quality Home Dinners

| Comments

Whoa! So I’m only 6 months late in posting the results from my last goal. I’m going to try my best to give an accurate reflection of how I thought I succeeded in my goal, but given the time it might be a little hazy.

On the Sunday of that week I picked out 4 recipes and went shopping for the ingredients. During the week, I made two meals.

The chicken dinner turned out OK. I ended up burning some of the rice, but the glaze was delicious.

The chili on the other hand was delicious. This was my first time making chili, and I think I might need to enter the next chili cook off. I used ground turkey, chili beans, onions, green peppers, some sort of tomatoes that came in a can, and a jar of chopped jalapenos.

The biggest issue that I had with succeeding in my goal, is that each meal lasted 3-4 days. If I try this goal again, I need to pay attention to how big the serving sizes are for the recipes I pick out. However, this goal did teach me that if I can pick two days a week to cook a meal, I can eat more than Hamburger Helper and similar quick cook meals.

Goal #8 - Cook Four Quality Home Dinners

| Comments

After a long hiatus I am going to try to restart my Goal A Week project. Hopefully I will get back into the rhythm of weekly blogging.

This week’s goal is something I have been wanting to try for a while. I am a fan of the tv series Top Chef and love looking at the food porn pictures they show. Then I go shove some ground beef/turkey into the microwave to defrost, and make hamburger helper. Not exactly living the life in terms of food.

This week my goal is to cook four meals from scratch (and eat to leftovers the following day). I have already picked out the recipes for the week, and will be going grocery shopping later today. It’s often not that I can’t cook, but more of a not feeling like cooking. I am hoping to plate my food we’ll and take photos to post in my results.

Dober tek (good eats in Slovenian)!

Results: Goal #7 ΓÇô Take 3 Photos a Day

| Comments

These past few goals have been disasters. This goal was originally extended by a week due to it being monsoon season in Columbus. Then I extended the goal another week because at the end of two weeks, I only took one photo. It wasn’t that I didn’t try to reach the goal. I carried around my camera for two straight weeks (I lost interest midway through the third week), but I couldn’t find anything that made me want to take my camera out of my pocket.

The one photo I took

Goal #7 ΓÇô Take 3 Photos a Day

| Comments

I’ve always been interested in photography. I enjoy looking at people’s photos, but when I look at mine I rarely find a photo I like. This week, I will be using my Point and Shoot camera (no fancy DSLRs here) to take at least three pictures a day. There is no theme for the photos, let’s just see what catches my eye.

At the end of the week, I will post one photo from each day. I still am debating if I should post the original photo, or the photo after a little Photoshop magic. I am open to feedback on this, because I see both sides. On one hand, photography is about capturing the moment correctly, but on the other hand this is 2011 and who doesn’t touch up their photos?

Anyways, I’ll see you on Sunday with the results! Also, I would like to welcome any new readers from Facebook. I started linking my posts there so that my only readers aren’t my twitter followers. If you are new to this blog, I post a new goal for the week on either Sunday or Monday. Typically on the following Sunday, I post the results of that week’s goal. Rinse and Repeat.

Results: Goal #6 ΓÇô Spend Less Than $50 This Week.

| Comments

  • Sunday:

    • Arby’s 4.27

    • Taco Bell: 2.97

  • Monday:

    • Mac & Cheese: .57

    • PJs: 6.75

    • Bar: 9.00

  • Tuesday:

    • Pre-Seasoned Chicken: 3.52

    • Frozen Broccoli: .49

  • Wednesday:

    • Banquet Country Chicken: .88

    • Digiorno Stuffed Crust: 2.74

  • Thursday:

    • Hamburger Helper: .84

    • Ground Beef: .99

  • Friday:

    • Chicken: .79

    • Noodles: .75

    • Bars: 8.00

  • Saturday:

    • CiCis: 5.50

    • Movies: 6.00

Total: 54.06

Note: I ate leftovers a lot of the days for lunch/dinner. I didn’t bother including these since I already accounted for the cost. Also, a lot of meals were split with my roommate.

If it weren’t for the movie on Saturday, I would have met my mark. Still, with out knowing what I spend in a week, $50 was a good challenge. I found myself saying “no” to a lot of activities. Once you have a tight budget, spending $3 on a beer during the weekday doesn’t seem that important.

Celebrating my friend’s birthday on Monday set me back a bit, but you can’t put a price on friendship so I’m perfectly happy with the results. This week, I learned how much I spend a week when I am watching my budget. ~$50 seems like a lot for a weekly expense. I really need to watch my budgeting when I am not keeping a close eye on my wallet.

Goal #6 ΓÇô Spend Less Than $50 This Week.

| Comments

I am currently saving up for a pet hedgehog. Although I currently have enough money for one, I also need to save for college. Therefore, instead I will be cutting my spending to save enough money for one. I don’t really know how much a week I spend, but on Sunday I spent a little bit under $8 on food ($5 at Arby’s and $3 at Taco Bell). So for the week, I am shooting to spend a total of $50. This wouldn’t be too hard if I only counted my expenses to be food, but I am also adding bars (gasp!) into this. Therefore, in order for me to be able to drink this weekend, I need to spend somewhere in the range of $2-$4 on food a day.

I don’t know if this is too ambitious or not, but it will definitely be an exercise in will power. To tabulate costs, I will be carrying around a pen and a note card to write down every dollar I spend. Since when I go grocery shopping, I often buy for 2-3 weeks, I will only count the food I eat this week. Look forward to a long itemized list on Sunday morning!

Results: Goal #5 ΓÇô Archive Spring Break Footage

| Comments

This was an absolute failure. I opened up iPhoto once and tagged about one video. So now that I know that I failed, the question is why? Part of it is time management. I played a lot of Call of Duty: Black Ops with my roommate this week. That game is so addicting, but not as addicting as Castle Crashers which I purchased on Saturday. Consequentially, if anyone wants to play contact me via Twitter and I’ll give you my Xbox gamertag.

Another reason I feel like I failed is the software that I was using simply did not do what I wanted it to do. I’ve been tossing around a web app idea for a few days that I will briefly outline here:

  • Users upload small home video clips.

  • They are presented with a VERY simple UI that allows them to only split their video clips. This could be achieved server side using something similar to the Transcode utility suite.

  • They are then able to tag the event, location, and people in the clip, as well as a description of what is happening.

  • “Albums” are created based on the tags (such as event, location, or person) with a shareable link.

  • Each video has a flash video playback. This will probably be non-HD to save bandwidth costs.

  • People can then download the original clips to be used in edits of their own.

This idea roughly came to me this winter when I friend I ski with asked for my footage so he could make an edit. I would really like to implement it, but who knows if I will get around to it.