Saturday, April 17, 2010

Installing Fast Debugger for NetBeans 6.8 on Ubuntu 9.10

NetBeans IDE enables RoR developers to set break points in specific parts of source files. It is time consuming to use print statements to trace application development process. Because Fast Debugger uses native C extensions, gcc and some other extra packages need to be installed on your Ubuntu 9.10:

$ sudo apt-get install build-essential autoconf

Above command installed the following extra packages :
automake autotools-dev dpkg-dev fakeroot g++ g++-4.4 libstdc++6-4.4-dev m4
patch

Now you need to install ruby1.8-dev package to compile any native extensions.

$ sudo apt-get install ruby1.8-dev

Above command installed ruby1.8-dev package.
Now the ruby-debug-ide gem should build successfully.

$ gem install ruby-debug-ide
Building native extensions. This could take a while...
Successfully installed ruby-debug-ide-0.4.9
1 gem installed
Installing ri documentation for ruby-debug-ide-0.4.9...
Installing RDoc documentation for ruby-debug-ide-0.4.9...

NetBeans automatically detected Fast Debugger.$ gem list

*** LOCAL GEMS ***

actionmailer (2.3.4, 2.3.2)
actionpack (2.3.4, 2.3.2)
activerecord (2.3.4, 2.3.2)
activeresource (2.3.4, 2.3.2)
activesupport (2.3.4, 2.3.2)
linecache (0.43)
rack (1.0.1)
rails (2.3.4, 2.3.2)
rake (0.8.7)
ruby-debug-base (0.10.3)
ruby-debug-ide (0.4.9)

Thursday, December 31, 2009

Coupling and Cohesion

Time spent on software design process takes the most significant part of the software development life cycle. Taken design decision affects the whole product positively or negatively so at this point, coupling and cohesion come into play.
Coupling is defined as a measure of intermodule connectivity. There are different forms of coupling such as data,stamp,control and common-environment coupling.
Cohesion helps to determine how functionally the intramodule components are related. Principal forms of cohesion are listed as functional, sequential, communicational, procedural, temporal, logical and coincidental.
General design approach includes generating highly cohesive and loosely coupled modules. Highly cohesive modules contain logically related operations together into the same structure and that helps to define responsibility at a specific location. Designing loosely coupled modules decreases dependencies to other modules so a small change in one dependent module does not break other parts.

Monday, November 23, 2009

Set JAVA_HOME and PATH on ubuntu 9.10

Instead of installing JDK from synaptic package manager, you can manually download JDK 6 Update 17 from http://java.sun.com/javase/downloads/index.jsp. After downloading "jdk-6u17-linux-i586.bin", make it executable by changing its mode and run to install by issuing following commands.

$ chmod 777 jdk-6u17-linux-i586.bin
$ ./java_ee_sdk-5_08-jdk-6u17-linux.bin

After that point edit your /etc/profile file to add lines below:
$ sudo gedit /etc/profile

PATH=(yourJDKInstallationFolder)/bin:${PATH}
export PATH
JAVA_HOME=(yourJDKInstallationFolder)
export JAVA_HOME

Save /etc/profile and logout. To test your JAVA_HOME location and installed java version type from the console:
$ java -version

$ echo $JAVA_HOME