Saturday, December 24, 2011

Ubuntu 11.10 - Riak Installation

The beta version of the book Seven Databases in Seven Weeks was updated from using Riak 0.14.1 to 1.0.2. Getting everything set up correctly on Ubuntu was a bit of a pain at first. This was until I realized that the version of Erlang referenced in the book incorrect. The book references that R13B04 was needed , but in fact R14B03 is needed.

Another big problem that I encountered was installing Riak from the source archive. After decompressing and running make all I was getting an error referring to git. Not too sure why make was expecting to be run in an initialized repository. In case others have had installation problems below are the steps to set up Riak 1.0.2 on Ubuntu 11.04.


Installing Erlang
sudo apt-get install curl build-essential libncurses5-dev openssl libssl-dev fop xsltproc
curl -O https://raw.github.com/spawngrid/kerl/master/kerl
chmod a+x kerl
./kerl build R14B03 r14b03
sudo ./kerl install r14b03 /opt/erlang/r14b03 . /opt/erlang/r14b03/activate


Installing Riak
sudo apt-get install build-essential libc6-dev-i386
git clone https://github.com/basho/riak.git riak
cd riak
git checkout riak-1.0.2
make all
make devrel

Sunday, December 11, 2011

PostgreSQL 9.1: Installation Of Cube Extension

So I started working through Seven Databases In Seven Weeks. The first database introduced is PostgreSQL. With having zero experience with setting up or configuring PostgreSQL it took me a while to finally figure out how to install all of the modules/extensions that the tutorial requires. Below are the commands used to install the required modules PostgreSQL.


psql book -c "CREATE EXTENSION tablefunc"
psql book -c "CREATE EXTENSION dict_xsync"
psql book -c "CREATE EXTENSION fuzzystrmatch"
psql book -c "CREATE EXTENSION pg_trgm"
psql book -c "CREATE EXTENSION cube"


After that you should be good to go in working through the chapter.

Wednesday, December 7, 2011

CodeSmith Generator Download Archive

For those of you who still haven't upgraded to CodeSmith 6 you might be surprise that CodeSmith no longer has links to the previous version. Yes, the previous version is still hosted on the website, but without knowing the exact url you would never find it. The links that I found all point to the generic download page, which only contains the downloads for the latest version of CodeSmith Generator.

To help facilitate the need for a download archive below are the links to both the Standard and Professional version of CodeSmith Generator.

CodeSmith Generator 5.3.4.12823 Professional
CodeSmith Generator 5.3.4.12823 Standard

Sunday, October 9, 2011

Prepare Ubuntu 11.04 For Google AppEngine Development

1) Install Python 2.5
The AppEngine SDK requires Python 2.5 but sadly Ubuntu 11.04 has 2.7.1 installed by default. The easiest way to get Python 2.5 installed on your machine is to do the following.

  • Open a terminal and and type the following commands.
    sudo add-apt-repository ppa:fkrull/deadsnakes sudo apt-get update
    sudo apt-get install python2.5 


2) Install AppEngine SDK

  • Download the current version of the AppEngine Python SDK (1.5.4)
  • Extract the archive to your desired location. I just installed extracted the archive to my $HOME directory.
3) Edit the SDK Scripts
Unfortunately, since the SDK will only work for Python 2.5 we need to edit each of the SDK scripts to ensure that Python 2.5 is used when running the scripts. Remember, the default version of Python on Ubuntu 11.04 is 2.7.1. If we don't edit the scripts to use Python 2.5 the scripts will be run using the default Python interpreter.
  • Open each of the following files.
    • /$HOME/google_appengine/appcfg.py
    • /$HOME/google_appengine/bulkload_client.py
    • /$HOME/google_appengine/bulkloader.py
    • /$HOME/google_appengine/dev_appserver.py
    • /$HOME/google_appengine/gen_protorpc.py
    • /$HOME/google_appengine/remote_api_shell.py
  • Replace the first line of each of the files that reads #!/usr/bin/env python with one that reads #!/usr/bin/env python2.5


4) Add SDK To The $Path Environment Variable
You want to add the SDK directory to the $PATH environment variable to make executing the SDK scripts much easier. As opposed to having to type in the full path of the SDK script, $HOME/google_appengine/dev_appserver.py, you will only have to type dev_appserver.py.

  • Open your $HOME/.bashrc file and scroll to the very bottom.
  • Add the following lines of code
    # set PATH so it includes the Google AppEngine SDK
    if [ -d "$HOME/google_appengine" ] ; then
    PATH="$HOME/google_appengine:$PATH"
    fi
That's pretty much it.

Thursday, August 11, 2011

Taking Another Sip of Ruby

It's been about 5 years since I've touched Ruby. I've always had an interest in the language, but never haven't ever been really seriously motivated to seriously learn.

So last night I decided to try and pick it up again. This time though, actually learn to breathe Ruby.

Installation couldn't have been easier if it tried. The first step was obvious:

USER$ sudo apt-get install ruby

This command installed Ruby 1.8.

Step number one down, about a million to go.

Tuesday, December 28, 2010

Making The Move To Github

This week I'm making the switch from Beanstalk to github. I've heard a lot about git so it's really exciting to make the switch from Subversion.

Saturday, January 10, 2009

Pro WCF: Practical Microsoft SOA Implementation

Title: Pro WCF: Practical Microsoft SOA Implementation
Authors: Amit Bahree, Shawn Cicoria, Dennis Mulder, Nishith Pathak, and Chris Peiris
Publisher: Apress
ISBN10: 1-59059-702-8
ISBN13: 978-1-59059-702-6

Stars: ** 2/5

Finishing this book I came away feeling a bit disappointed. Apart from The Pragmatic Bookshelf I hold Apress as the bar for other publishers (Microsoft Press sadly right now Microsoft Press lies at the bottom) and this book doesn't make the grade. If I didn't know who the publisher was before reading this book I would never have guessed it was Apress.
 
Writing Style
You can tell that this book was written by multiple authors. Though the writing style did seem to flow on most occasions, in others things seemed to jump around.  This is especially true when it came to the QuickReturns Ltd. case study. Early on in the book the transition from discussing a technical aspect to the case study was seamless. Later on in the a transition from the two was very abrupt. This made it very obvious that the authors working on the meat of the book didn't always work together with the author of the case study. This made the book seem a bit too dry to keep anyone's attention for too long.
It also seemed that the authors were trying to hit a certain page count in writing the book. Every few pages it will seem like your reading the same paragraph over again that you read in a previous chapter. If all of the filler was taken out the page count would have been reduced by at least 10%.

Best Practices
Another disappointment was the fact that the authors kept saying something to the effect of "this is just an example and is not a best practice" but then never really went into what the best practices are. This book should not have ended with chapter 13 discussing the implementation of SOA interoperability. Instead the book should have continued on to chapter 14 to present the QuickReturns Ltd. case study in a real world, enterprise, best practices scenario. With the lack of this final chapter the book is left dry and somewhat useless outside of academia.

Errors
Littered throughout the book are numerous technical and grammatical mistakes. When I started reading the book I had the full entintion of making note of each mistake to report back to Apress, but sadly I only made it a third of the way through before giving up, and glad I did. 

The book has been out for almost two years (January 15, 2007) and Apress only has one correction on the errata page. This shows that there have been numerous readers like me who took the time to point out the errors but have gone unnoticed by Apress and the authors.

Summary
I know I've said a lot of negative things about this book but overall for me it served its purpose. My intention for this book was to be a supplement for Microsoft's .Net Framework 3.5 - Windows Communication Foundation Training Kit in my attempt to pass the 70-503 exam at the end of this month. In that regard, I'll say again, it served its purpose.

Links: