08 June 2007

Hijack file in Clearcase

The Hijack command (Team|Hijack) is only available for use with files in snapshot views. Hijacking a file makes the file editable (changes from read-only to a read-write state) without checking the file out. This command lets you work on files when the ClearCase server is not accessible, such as when you are disconnected from the network.

Use ClearCase's Update View wizard (Team|ClearCase Tools|Update View Wizard) to convert the file's ClearCase status from Hijacked to checked out (Reserved checkout or Unreserved checkout) when the server does become available.

To hijack the active file from the Team menu, choose Team|Hijack "".

To use the context menu to hijack one or more files,

  1. Select the file or files in the project pane.

Use the Ctrl key or the Shift key to select more than one file.

  1. Right-click the selection, and choose ClearCase|Hijack Files from the context menu.
  2. Click OK to hijack the files.
  3. Click OK to close the dialog box.

Important: To convert a hijacked file to a checked out file (under ClearCase control), choose Team|ClearCase Tools|Update View to open ClearCase's Start Update dialog box. When you select the Leave Hijacked Files In Place option on the Advanced page of the dialog box, and click OK to update the view, the hijacked files will be treated as checked out files.

AddThis Social Bookmark Button Bookmark this article with any Bookmarker (Digg, del.icio.us, Technorati, reddit, Yahoo MyWeb, Newsvine, Furl)

17 May 2007

Apache 2.2 client denied by server configuration

Setting up and starting apache 2.2 went smoothly. The first hiccup occured when a virtual host was added. The site cannot be browsed. The log file says:
client denied by server configuration
Kind of like the problem that I ran into with the 2.0.54 installation
(13)Permission denied: access to /index.php denied


I thought it would be a user/group problem. Apache 2 had a wierd group set by default (#-1). With 2.2 it's not so wierd but a more orthodox 'daemon'. Why it wasn't set to nobody as it used to be with 1.3 is a mystery. Changing it to nobody didn't solve the problem.
Digging deeper, I found the problem in is actually in the root directory configuration section.

In 2.0 it's
Options FollowSymLinks AllowOverride None
In 2.20 it's
Options FollowSymLinks AllowOverride None Order deny,allow Deny from all
The added bit of extra security in 2.20 causes the docroot for the vhost been inaccessible. Just commenting out the access configuration stuff does the trick. A better solution is to add the following with the in the vhost block.
Order deny,allow Deny from all

AddThis Social Bookmark Button Bookmark this article with any Bookmarker (Digg, del.icio.us, Technorati, reddit, Yahoo MyWeb, Newsvine, Furl)

13 April 2007

Time Setting in Mediawiki


If you ever wondered about the wrong time shown in the wiki when you look at recent changes, then please take a note of the following.
By default wiki comes with Coordinated Universal Time (UTC) time setting.

Please change your preferences in our wiki by the following procedure if you have not done yet-
Login to your wiki.
Click on my preference at the top right corner.
Click on Date and Time settings.
Under Time Zone, enter 05:30 in the offset text box. (05:30 is the time difference between IST & UTC). This setting is for India. According to your country, you can change this setting.
Click Save.

It will really make some sense while tracking the changes made to any of the wiki pages.
This time preference will show the local time in the following pages-
Recent changes
Related changes
Page history, Image history
User contributions
Special:Newpages
"This page was last modified" at the bottom of pages
Special:Imagelist
Posted by Picasa

AddThis Social Bookmark Button Bookmark this article with any Bookmarker (Digg, del.icio.us, Technorati, reddit, Yahoo MyWeb, Newsvine, Furl)

12 April 2007

PC-BSD: A unix family OS

Introduction:

Now and then a new wind comes along in the ebb and flow of Linux distributions. OK, so I know PC-BSD is not Linux, but it's close enough. It's fair to say without going into technicalities and politics that BSD and Linux are cousins in the operating system world. It is also true that there is some cross-pollination between the two. I'm sure some BSD users have ogled at Linux distributions. Many a Linux user has flirted with the BSDs and or even fantasized about OS X. I know I have. This is exactly why I found PC-BSD attractive. At any rate, let's get to the review.
PC-BSD Vision (bullet points):
The software must be easy to install.
The operating system must be minimalist.
Software must be available, and easily installed.
The system must be dynamic, yet backwards compatible.
You can read the entire PC-BSD Vision here.

The Installation:
The installation is a simple, graphical one. I'’m not sure what toolkit they use for the installation but it looks fairly nice. The installation does just that and not much else. A minimal set of questions is asked. You don'’t even get to select the packages. From the vision, we can see that PC-BSD is targeted at desktop users and the functional and simple installation is appropriate for this purpose. Version 0.7.5 adds the ability to define a custom partitioning scheme.

PC-BSD partition editor


Installer progress


The Desktop:
Since I wasn't given a package list, I had to wait till the installation finished to find out what the default desktop is. After the usual post-installation reboot, the system automatically logged me into a nice KDE 3.4 desktop. Most desktop oriented distributions use KDE so this wasn't a surprise.

I was a bit disappointed with the complete lack of GNOME. More than that, Firefox, OpenOffice, Thunderbird and other popular applications were missing in action. The desktop looks like a standard KDE desktop with a few modifications. There are no unneeded packages or extra bloat. PC-BSD fulfills its goal of being a minimalist distribution (Pt. #2, Vision) quite well.
As you will notice from the screenshot, there is a familiar "My Computer" icon which gives you quick access to hard drives, CD-ROM drives, local network, and settings. In my daily use of PC-BSD, the "My Computer" icon has been very handy. It is also convenient for new users as it functions as a gateway to commonly accessed places. The PC-BSD developer'schoice to place this prominently on the desktop is a good move.


Default Desktop

Package Manager:

While fiddling around with the menu, I ran across an entry for "PC-BSD Program Manager (Remove Programs)" but clicking this only gave me a empty list. What I really wanted to do was to learn how to install programs. I'd heard about FreeBSD's ports system, but I had a feeling that if the system had a remove programs component, an install component was also likely to be present. I headed over to the PC-BSD website which, sure enough, had a list of downloadable packages.

Let me explain the package installation procedure. After you download, unzip, and double click the downloaded PBI file, the PC-BSD installer launches. Security is honored by asking for the root password. A wizard guides the user through installing the package. The user is also asked whether to install desktop or KMenu shortcuts. A slick progress bar is displayed while the actual installation takes place.

I followed this procedure with Firefox and it worked like a charm. Desktop and menu icons were installed as promised. Then I ran the Remove Programs utility again. Now instead of a empty list, it listed Firefox and gave me the option to remove it. I did so just to test the uninstall procedure which worked well. I went ahead and installed some other packages that I required for my day-to-day computing.

In my experimentation with the package manager, it works very well. Any Windows or Mac user will easily follow the procedure. In fact, since all PC-BSD packages use the same installer so adding packages is a more consistent process than Windows.

Another point worth noting is that PC-BSD packages are as self contained as possible. Each package is installed in its own separate directory. For example, Firefox is installed under "/usr/local/MyPrograms/Firefox1.0.4/". This directory contains the executable as well as any libraries it needs. This is a different approach from the majority of distributions that use global libraries.

This method of installing packages has these advantages:
1. Changes to system libraries don't break individual packages. Since all the libraries Firefox needs are in it's own neat directory, any changes to the system libraries doesn't affect Firefox.
2. While this method deviates from tradition, to the user it is transparent. The package installer takes care of all the messy details and the end result is a system that is less likely to break. It's a win-win situation.
The end result of all this work the PC-BSD team has done is that Joe User can download and install software the same way that he does on a Windows machine. And that's a big deal.

Package Creator:

I ran across the third component of the packaging system called the "Package Creator" on the package database. I was expecting it to be a hacker utility to created those pesky PBI packages but it was actually a graphical one. While I didn't create any packages of my own, there is a good tutorial on the subject. Package creation is a complicated by dependencies on every UNIX-like system. The separate libraries solution that I discussed earlier simplifies this problem. This means it's easier for more technically inclined users to create and upload packages and that's always a good thing. I'll have to play out with package creation under PC-BSD a bit more until I give my final verdict.

The Fine Print:

While the project is off to a solid start, there are a few components that need catching up. Like most projects, PC-BSD's documentation lags the development process. At this moment, the only resources users have is the FAQ and the forum. There is a handbook that is planned, but is under construction.

I'm not saying that the developer team is lazy. It's only natural for a system to be developed before documentation gets written for it. Quite to the contrary, PC-BSD's development has been progressing at a furious rate. The lack of formal documentation is made up by a burgeoning community of eager users on the forums. The developers have a good level of interaction with the users on the forums. This collaboration will hopefully iron out some of the smaller issues with PC-BSD.

Speaking of issues, I ran across a few things I'd like to forward to the PC-BSD crew. Since PC-BSD is a desktop operating system, a Windows user should be able to install and use it. At this point, after the installation, there is no "Getting Started" screen or anything of that sort. This could be as simple as implementing Konqueror to the PC-BSD website on the first boot. The user should be shown how to use the system, install and uninstall packages etc. Without a Getting Started document, a less experienced user will get stuck.

Similarly, it would be nice to see a document that lists key differences between Linux and FreeBSD. As someone who runs Linux as well as PC-BSD, I'm aware of the many technical differences pertaining to device names, commands, and runlevels. I've been educated well by the FreeBSD Handbook, but for users who are just starting out with FreeBSD, a less thorough guide is needed.

Another issue is the lack of packages such as Flash, Java, and other such plugins. I understand that inclusion of these packages is legally questionable but it may be something that needs looked into. The developers haven't completely ignored this problem, though. JavaWizardis a PC-BSD package that downloads and configures Java for your system. Hopefully something similar will be implemented for Flash. The presence of JavaWizard is a clear indication that unlike some other developers the PC-BSD team actually use their software. They are aware of the problem and are addressing it. Moreover, you can still use the FreeBSD ports to install some of the above packages but that involves hacking at the command prompt.

Conclusion:

It's easy to see that PC-BSD has a lot of potential. Note that PC-BSD is beta software. Version 0.7.5 is stable enough in my experience, but your mileage may vary. When it comes to the basics of installing the operating system and applications, PC-BSD wins hands-down. It is backed up by the solid and slick KDE 3.4. It is a welcome change to the mundane and ordinary. As I was wondering what lies ahead for PC-BSD, I found a Wishlist page that shows a roadmap. With further improvements, PC-BSD will be the next big thing. I recommend you try out PC-BSD today!

Source & Help: www.pcbsd.org

AddThis Social Bookmark Button Bookmark this article with any Bookmarker (Digg, del.icio.us, Technorati, reddit, Yahoo MyWeb, Newsvine, Furl)

10 April 2007

Configuring system to run an application on startup

How to configure your system to run an application automatically whenever you boot your system?

First create a shortcut of the application you want to run & put this shortcut to the following location-

D:\Documents and Settings\rtomar\Start Menu\Programs\Startup

Please remember to change “rtomar” with your username. You can put that application directly to this location if you don’t want to put the shortcut.
Following are some typical examples one would like to start automatically whenever he starts system-

Microsoft Office
Web Browser
Your mostly used IDE
Any exe file (In my case, I have an AutoIT script welcoming me on startup)

AddThis Social Bookmark Button Bookmark this article with any Bookmarker (Digg, del.icio.us, Technorati, reddit, Yahoo MyWeb, Newsvine, Furl)

09 April 2007

Deadlock Concept in Computing

Deadlock refers to a specific condition when two or more processes are each waiting for another to release a resource, or more than two processes are waiting for resources in a circular chain.

Deadlock is a common problem in multiprocessing where many processes share a specific type of mutually exclusive resource known as a software, or soft, lock. Computers intended for the time-sharing and/or real-time markets are often equipped with a hardware lock (or hard lock) which guarantees exclusive access to processes, forcing serialization.
Deadlocks are particularly troubling because there is no general solution to avoid (soft) deadlocks.

Deadlock concept can be described by the following picture.

AddThis Social Bookmark Button Bookmark this article with any Bookmarker (Digg, del.icio.us, Technorati, reddit, Yahoo MyWeb, Newsvine, Furl)

09 March 2007

Package management system

A package management system is a collection of tools to automate the process of installing, upgrading, configuring, and removing software packages from a computer. The term is most commonly used with regards to Unix-like systems, particularly Linux, as these systems rely heavily on it, with thousands of discrete packages on a typical installation being common.


In such a system, software is distributed in packages, usually encapsulated into a single file. As well as the software itself, packages often include other important information, such as the full name, a description of its purpose, the version number, vendor of the software, checksum information, and a list of other packages, known as dependencies, that are required for the software to run properly. This meta-information is typically entered into a local package database.

AddThis Social Bookmark Button Bookmark this article with any Bookmarker (Digg, del.icio.us, Technorati, reddit, Yahoo MyWeb, Newsvine, Furl)

27 February 2007

Difference between Offshore & Onsite

Difference between Offshore & Onsite
Offshore Posting



Onsite Posting

AddThis Social Bookmark Button Bookmark this article with any Bookmarker (Digg, del.icio.us, Technorati, reddit, Yahoo MyWeb, Newsvine, Furl)

22 February 2007

A myth called the Indian programmer

A myth called the Indian programmer:

They are the poster boys of matrimonial classifieds. They are paid handsomely, perceived to be intelligent and travel abroad frequently. Single-handedly, they brought purpose to the otherwise sleepy city of Bangalore. Indian software engineers are today the face of a third-world rebellion. But what exactly do they do? That's a disturbing question.

Last week, during the annual fair of the software industry's apex body Nasscom, no one uttered a word about India's programmers. The event, which brought together software professionals from around the world, used up all its 29 sessions to discuss prospects to improve the performance of software companies. But there was nothing on programmers, who you would imagine are the driving force behind the success of the software firms. Perhaps you imagined wrong. "It is an explosive truth that local software companies won't accept. Most IT professionals in India are not programmers, they are mere coders," says a senior executive from a global consultancy firm, who has helped Nasscom in researching its industry reports.

In industry parlance, coders are akin to smart assembly line workers as opposed to programmers who are plant engineers. Programmers are the brains, the glorious visionaries who create things. Large software programmes that often run into billions of lines are designed and developed by a handful of programmers. Coders follow instructions to write, evaluate and test small components of the large program. As a computer science student in IIT Mumbai puts it - if programming requires a post graduate level of knowledge of complex algorithms and programming methods, coding requires only high school knowledge of the subject. Coding is also the grime job. It is repetitive and monotonous. Coders know that. They feel stuck in their jobs. They have fallen into the trap of the software hype and now realize that though their status is glorified in the society, intellectually they are stranded. Companies do not offer them stock options anymore and their salaries are not growing at the spectacular rates at which they did a few years ago.

A Microsoft analyst says, "Like our manufacturing industry, the Indian software industry is largely process driven. That should speak for the fact that we still don't have a domestic software product like Yahoo or Google."

IIT graduates have consciously shunned India's best known companies, though they offered very attractive salaries. Last year, from IIT Powai, the top three Indian IT companies got just 10 students out of the 574. The best students prefer to join companies like Google and Trilogy. Krishna Prasad from the College of Engineering, Guindy, Chennai, who did not bite the Infosys offer, says, "The entrance test to join TCS is a joke compared to the one in Trilogy. That speaks of what the Indian firms are looking for."

senior TCS executive, who requested anonymity, admitted that the perception of coders is changing even within the company. He believes it has a lot to do with business dynamics. The executive, a programmer for two decades, says in the late '70s and early '80s, software drew a motley set of professionals from all kinds of fields. In the mid-'90s, as onsite projects increased dramatically, software companies started picking all the engineers they could as the US authorities granted visas only to graduates who had four years of education after high school. "After Y2K, as American companies discovered India's cheap software professionals, the demand for engineers shot up," the executive says. Most of these engineers were coders. They were almost identical workers who sat long hours to write codes, or test a fraction of a programme. They did not complain because their pay was good. Now, the demand for coding has diminished, and there is a churning."

Over the years, due to the improved communication networks and increased reliability of Indian firms, projects that required a worker to be at a client's site, say in America, are dwindling. And with it the need for engineers who have four years of education after high school. Graduates from non-professional courses, companies know, can do the engineer's job equally well. Also, over the years, as Indian companies have already coded for many applications like banking, insurance and accounting, they have created libraries which they reuse.

Top companies have now started recruiting science graduates who will be trained alongside engineers and deployed in the same projects. The CEO of TCS, S Ramadorai, had earlier said, "The core programming still requires technical skills. But, there are other jobs we found that can be done by graduates." NIIT's Arvind Thakur says, "We've always maintained it is the aptitude and not qualifications that is vital for programming. In fact, there are cases where graduates have done better than the ones from the engineering stream."

AddThis Social Bookmark Button Bookmark this article with any Bookmarker (Digg, del.icio.us, Technorati, reddit, Yahoo MyWeb, Newsvine, Furl)

30 January 2007

Java Coding Standards


Here I am writing some of the best practices & standards of java coding. These are some of the key points to be noted while writing a good java code.

STD-1 Package naming.
Package names contain only lower case letters. Never create a package which
uses a package prefix already being used by another entity, for example “javax”.

STD-2 Class and Interface naming.
Class names should be nouns using mixed
case with embedded words capitalized. Do not use embedded underscores within names.
Avoid acronyms and abbreviations unless they are already more widely used than their long
form (e.g. HTML). When using acronyms do not capitalize the whole acronym. Instead
treat it as a word and only capitalize the first letter.
Interface naming follows class naming exactly.
Proper class name examples:
MyDriver
MyClass
HtmlConverter

STD-3 Method naming and formatting.
Methods are active and, therefore, should be named using verbs. As with class names, use
mixed case except the initial letter is always lower case.
No spaces should exist between a method name and the opening parenthesis of a parameter
list.
Proper method name examples:
getX()
createX(x)
updateMyTable()

STD-4 Variable naming.
Variable names should follow those of methods. Do not begin variable names with dollar
signs ($) although the compiler will permit this.
Proper variable name examples:
myVariable

STD-5 Constant naming.
In order to make constants stand out in the code they are named with all capital letters. In
order in increase the readability of the names, separate embedded words with a single
underscore.
Proper constant name examples:
MY_CONSTANT_A
INCHES_TO_CENTIMETERS_FACTOR

STD-6 Use of JavaDoc comments is required.
Because the public interface to a class is key to being able to use the class effectively,
JavaDoc comments are not optional for public classes and methods. The specific formatting
and minimum content may be open for discussion but the presence of JavaDoc comments is
not.
JavaDoc comments are important in that they provide documentation which is external to the
source code and which can be easily maintained.

STD-7 Use of implementation comments is required.
JavaDoc comments are intended to define and describe the public interface of a class or
method. Implementation comments are for describing the internal implementation.

STD-8 Consistency of formatting is required within a source file.
Sometimes you acquire source code which differs from the accepted format you usually
employ, including your choices for indentation, use of white space, etc. When this happens
resist the impulse to mix your personal adopted format with the existing one. Respect the
existing code and format your additions consistent with the existing format. Then pursue the
option to reformat the entire source file as a separate task.

STD-9 Avoid local declarations which obscure declarations at higher levels.
Do not declare a block variable with the same name as a method or class variable. Doing so
unnecessarily obscures the code.

AddThis Social Bookmark Button Bookmark this article with any Bookmarker (Digg, del.icio.us, Technorati, reddit, Yahoo MyWeb, Newsvine, Furl)