Makai's Blog

RSS

Installing CouchDB 1.1.0 on Ubuntu 10.04 LTS (Lucid Lynx)

I needed to piece together several sources (see the links at end of this post) to install CouchDB 1.1.0 on Ubuntu 10.04 LTS (Lucid Lynx).

First, get build essentials:

sudo apt-get install build-essential

Next, install SpiderMonkey 1.8.5:

wget http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz

tar -xvf js185-1.0.0.tar.gz

cd js-1.8.5/js/src

make

make install

Get the libraries required for making, configuring, and installing CouchDB:

sudo apt-get install xulrunner-dev

sudo apt-get install erlang libicu-dev libcurl4-openssl-dev

Inside the CouchDB installation’s bin directory, run:

./configure –with-erlang=/wherever/your/erlang/install/is –with-js-lib=/usr/local/lib/ –with-js-include=/usr/local/include/js/

You should see:

You have configured Apache CouchDB, time to relax.

Run (enter your sudo password when prompted during the installation):

make && sudo make install

After installation, you’ll see:

You have installed Apache CouchDB, time to relax.

Next, run CouchDB by running this command from within CouchDB’s bin directory:

sudo ./couchdb

You’ll see:

Apache CouchDB has started. Time to relax.

Finally, browse to http://localhost:5984 or http://localhost:5984/_utils/ to make sure everything worked.

Sources:

  1. http://wiki.apache.org/couchdb/Installing_on_Ubuntu
  2. http://wiki.apache.org/couchdb/Installing_SpiderMonkey
  3. https://github.com/oreilly/couchdb-guide/pull/339

Urban Airship, Push Notifications on Android, and C2DM Tokens

I’m working on a cross-platform mobile app with the following technologies:

  1. JQuery Mobile
  2. PhoneGap
  3. Urban Airship
  4. C2DM (for Android push notifications)

While in the Urban Airship web console, I was creating a new application when I came upon the section specific to Android. The first field, Android Package, was easy enough (com.mobile.app). But I wasn’t quite sure what to put in the C2DM Authorization Token field.

After further research, I found I have to manually register for the Android C2DM service. My access was approved about two hours later.

Next step, how to create that C2DM Authorization Token? Luckily, Urban Airship provides a Python script to create the token. Within the Urban Airship Android download, there is a script named clientauth.py under the tools directory.

Just run clientauth.py, enter the Google account that was approved for access, enter your account password, and clientauth.py will print the your C2DM authorization token. Make sure to keep this token! Then paste the token into the Urban Airship field and you’re ready to create your Urban Airship application.

New Django Book in Progress

There are a dearth of up to date Django books that cover 1.3+ and the latest community projects. However, Reinout van Rees just announced he is working on a new Django book currently titled “Solid Django.” Hopefully this will lead to further interest in the Django project and continue the positive momentum for our community.

Link: “I’m writing a Django book”

Pretty Printing JSON With Python

Oh Python, you make a developer’s life so easy.

I executed a “python manage.py datadump > db.json” which sent the contents of my Django-created database out to a file. However, I realized that the results were all on one line and I wanted to go through the output to create some test data. A quick “more db.json | python -mjson.tool > db-pretty.json” command transformed the whole thing into a more readable format.

This is just one of many examples of why I love Python programming.

JQuery Mobile First Look Book Review

The reviews are starting to come in for JQuery Mobile: First Look, which I technical reviewed before publication. Looks like people like it so far.

Review: JQuery Mobile First Look Book Review

Corner University Ergonomics on Standing Desks

Cornell University presents some findings that dispute the supposed health benefits from standing desks, including height-adjustable desks that go from sitting to standing position.

In short, the researchers suggest sitting to do computer work but getting up every 20-30 minutes and moving around. The moving around part is critical: a short walk to get a drink of water, go to the bathroom, or head to a meeting is the best way to prevent the negative side effects on your body from sitting all day.

Link: Sitting and Standing at Work

Sep 8

Little Successes are More Fun than Big Failures

Having a bunch of little successes over time is a lot more fun than a big stinking failure after working hard on a project for years.

Well, of course, right? Isn’t it obvious that success is better than failure?

Yet why do most organizations, especially big companies, continue to produce big failure after big failure?

Look at what the federal government spends on failed IT projects each year. This happens across many agencies: FBI, DoD, DoL, DoJ, USPTO, etc etc. The private sector doesn’t do much better either. Look at the cluster that is HP’s TouchPad. Or what’s happening with Yahoo!.

There’s a solution for most of these failures: building from small successes instead of some pie in the sky idea that may not correspond to reality. This approach is essentially what the Lean Startup methodology teaches and a big part of what Agile software development is about.

Build from actual strengths that are grounded in reality, not from how you envision yourself or your organization in your head. Keep the fun little successes coming and in time you’ll create a big success without the risk of the big failure.

Sep 1

Standing Desks in WSJ

I love my home made standing desk at my apartment. I also occasionally convert my desk at work to standing position with some boxes so I can be more productive. Apparently it’s catching on. Here’s a WSJ article on standing desks.

Link: Standing Desks Are on the Rise (WSJ)

Introduction to the Agile Methodology

Arin Sime, founder of AgilityFeat and one of my former classmates at UVA, put together this great email course on the Agile Methodology. It’s great for those unfamiliar with Agile (especially clients you are trying to convince to use it!) and brushing up on your concepts.

Highly recommended!

Link: Introduction to Agile Course

Fantastic Explanation of What a Closure is

At 26 minutes into this video, the presenter gives a great summary and example of what a closure is in general and in JavaScript. The entire video is worth watching if you have the time.