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

Friday, October 9, 2009

Shutdown Remote Ubuntu Machine

SSH protocol is used to exchange data between two networked devices using a secure channel. Ubuntu server machines with ssh installed on them can be reached from other computers on the network. Ubuntu's synaptic package manager easily installs ssh for your server machine. In order to reach remote ubuntu server machines with ssh installed on them, type the following command from command line of the client machine:
$ ssh remoteUserName@remoteMachineIPAddress
replace remoteUserName and remoteMachineIPAddress with appropriate values. Then you will see that it is asking for adding to the list of known hosts. write 'yes' for confirmation. Then type following from the console window and press enter, the remote machine will shutdown.
$ sudo shutdown -h now