01 November 2012

Oracle Certified Associate, Java SE 7, Programmer Study Guide Review

This book review covers Oracle Certified Associate, Java SE 7, Programmer Study Guide (ebook version) from Packt Publishing, which was recently published. Inside the book you will find it covers general topics for the Oracle Certified Associate certification, and provides sample questions in all chapters that one might find in the exam.

Some of the topics that the book covers include the following:

  • Java data types
  • Decision constructs
  • Classes
  • Handling exceptions
  • Arrays and collections


Excellent explanations are provided on the topics the book covers. Especially on memory management which is a key area to understand about the Java language. Most other books don't provide the same level of explanation on this topic as this book does. Plenty of good advise is provided on handling exceptions in a Java application. All key Java 7 features are covered in reasonably good detail.

What is highly unusual about this book is that it aims to be more than just a certification guide by also acting as a general reference. Unfortunately that aim is not reached since some language basics are not covered, which include using Generics and the other key collection classes (HashMap, HashSet etc).

Highly recommend this book if you are going for the certification since it provides good coverage of the topics that are covered, and a decent number of questions for each topic that test what is learned. However this book falls a bit short on covering all the Java language basics that one would expect from a general reference.

27 June 2012

Installing Ruby 1.9.3 In Ubuntu 12.04

Do note that the ruby1.9.1 package is for Ruby 1.9.3 (with Ubuntu 12.04). The version number at the end of the package name is for the ABI version of Ruby (1.9.1) that the package covers.

  1. Install ruby1.9.1 package for the Ruby language (also installs the libruby1.9.1 package that contains the standard Ruby library)
  2. Install ruby1.9.1-dev package in order to install gems that use native extensions

11 June 2012

Installing Rails 3.2.3 In Ubuntu 10.04

Ruby needs to be installed before installing Rails. It is highly recommended that Ruby 1.9.2 or greater is used.

  1. Install Rails as a Ruby Gem – gem install rails -v 3.2.3
  2. Add the following PPA as a package repository – ppa:chris-lea/node.js
  3. Install the required python-software-properties package
  4. Update the package manager
  5. Install the nodejs package
  6. Install sqlite3 package
  7. Install libsqlite3-dev package
  8. Install the sqlite3 gem – gem install sqlite3 -v 1.3.5


Notes


It is highly recommended that the Rails documentation is generated in order to have an offline Rails API reference. Do the following to create the API reference:

  1. In your home directory run this command – rails new sample_app
  2. Navigate to the newly created directory
  3. Run the following command to generate the documentation – rake doc:rails
  4. Move the generated documentation from doc/api to your Documents directory
  5. Rename the moved documentation directory to rails-3.2.3-api-doc
  6. In the rails-3.2.3-api-doc directory create a shortcut to index.html on your desktop, or view index.html in the web browser and bookmark it

27 May 2012

Installing Ruby 1.9.3 In Ubuntu 10.04

Prerequisites for installing Ruby 1.9.3 via RVM are that GIT and Curl is installed.


Installing RVM


  1. Download and run RVM install script - sudo bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
  2. Add all users who need to use Ruby to the RVM group
  3. Logout and login
  4. Update RVM so that the rvm command can be run - rvmsudo rvm get head
  5. Reload the terminal (shell) - source ~/.profile
  6. Test to see if RVM was installed and configured properly - type rvm | head -1
          Terminal should output the following, rvm is a function



Installing Ruby 1.9.3


  1. Install Ruby 1.9.3 – rvm install 1.9.3
  2. Set the default version of Ruby to use to 1.9.3 – rvm use 1.9.3
  3. Test to see if the Ruby interpreter runs with the correct version – ruby -v


Installing OpenSSL And Readline Packages


  1. Install libssl-dev Ubuntu package
  2. Install OpenSSL RVM package - rvm pkg install openssl
  3. Reinstall Ruby with OpenSSL support - rvm reinstall 1.9.3 --with-openssl-dir=$rvm_path/usr
  4. Install libreadline6-dev Ubuntu package
  5. Install Readline RVM package - rvm pkg install readline
  6. Reinstall Ruby with Readline support - rvm reinstall 1.9.3 --with-readline-dir=$rvm_path/usr


Notes


Before starting on the installation of RVM you may need to change a setting in Gnome Terminal if it is used. In Gnome Terminal goto Edit → Profile Preferences. Within the shown dialog select Title and Command tab. Ensure that Run command as login shell is checked.