Prasanna Says

Tuesday, February 19, 2008

Soft skills

Soft Skills that every IT Professionals must have

A career in the field of information technology (IT) is one of the most sought these days. Most engineering college graduates land up in the IT industry. While, a job as a software engineer looks very lucrative at first glance, once you get into the industry, you realise that it is not just your technical skills that will keep you in the race.

You need something more to ensure that you are able to do a good job. In other words, you need some extra skills to ensure that you are able to keep the job after you land it. These extra skills are called 'soft skills'.

What are the advantages of soft skills?

Your soft skills or people skills decide how fast and well you climb the ladder of success. Here are some of the advantages that your soft skills can reap for you:
  • They help you grow in your career
  • They give you an eye to identify and create opportunities
  • They help develop relationships with your colleagues and clients
  • They develop good communication and leadership qualities in you
  • They help you think beyond dollars.

After reading the advantages your soft skills can get you, you would want to know what is it that you need as a technical person to grow as a professional and climb the ladder of success.

Here are some soft skills which will help you grow not just as a professional but also as a person:

A never-say-die attitude

Any task that comes to you or your team, undertake with a can-do attitude. Slowly you will observe that you and your team have become the favourite of the management. Every accomplished task boosts your self confidence and pushes you one step closer to success.

Communication

This includes verbal, non-verbal and written communication. Be sure that you are able to put across your point clearly and confidently. As an IT professional you will need to work with colleagues and clients of various nationalities and backgrounds. Ensure that you are able communicate clearly with them. This applies to teleconferencing as well.

Learn to listen

Listening is an essential part of communication. Ensure that you listen attentively. This will help make the other party feel comfortable while interacting with you and improve your communications.

Be a team player

Help your team members help themselves. Be friendly and approachable. If your team is stuck somewhere look out for ideas to overcome the obstacle together.

Learn to delegate

Chances are you will have junior members on the team. Recognise their strengths and delegate them the right work.

Give credit to those who deserve it

Do not all the credit for a job well done. Pass on praise or recognition from superiors to team members who deserve it. Doing it publicly or in front of your boss will further instill a feeling of confidence among your team.

Motivate yourself and others

As you look ahead to grow in your career you will need to deal with various people under you. You can not expect quality results from a team whose motivational level is too low. So, stay motivated and keep others motivated.


Develop leadership qualities

A leader is a person whom people are ready to follow. Develop qualities that will make people follow you not because they are required to but because they want to. Even while operating in a team, take a role to lead and facilitate the work for other members.

Control your sense of humour

When you are working with people from various cultures you need to be extra careful with your sense of humour and gestures. Behaviour that is acceptable among Indian colleagues might be considered obscene or disrespectful by people from other cultures. Stay away from controversial topics or ideas in the office.

Mentoring

This is a quality one needs to develop in order to grow. If you want to grow in the hierarchy, you need to help sub-ordinates grow. Be a good mentor. Help them understand things better. This not only improves the work environment but also improves your work relationships.


Handling criticism

When you are working with people, at times you will be criticised while at others you will be required to criticise your colleagues or sub-ordinates. Ensure that you take the criticism constructively and look at it as an opportunity to grow. Similarly, while criticising others shoose your words carefully and keep it professional. Destructive criticism will lead to loss of respect and trust. Let your criticism help the other person grow.

IT-preneur

Like an entrepreneur, have a risk-taking attitude. Learn to take responsibility for failures and pride in a job well done.

Managing spoil sports

While working in a team there will always be one or two people with a negative attitude. This attitude can be contagious. Employ tactics to deal with such people and improve motivation.

E-tiquette

Keep an eye on your e-mails for proper language. Open up the e-mail with a suitable address and end with a thanking note. Your words should convey the correct meaning and invoke the desired action.

Multitasking

As you climb the ladder of success, you will need to handle work from various fields. For example, you will have to interact with your technical team on project success, with the HR department for team appraisal and recruitment, with clients on project requirements or problems etc. Organise and plan to fit in all the required activities into your schedule.

Once you have developed these soft skills along with your technical skills you will find that you are a lot more confident about your capabilities.


Note: This Article is taken from rediff.com

Monday, February 4, 2008

SQL Tips

Also Vist: Sql Part II


1. Multiple row generation from DUAL

select rownum i from dual connect by level <= 16

Above query works only in 10g

select rownum from dual a, dual b connect by level <>

This query works on both 9i and 10g


2. Lock Query

SELECT s.username dbuser,
owner || '.' || object_name "Object",
s.osuser,
s.PROGRAM,
lk.sid,
lk.type lock_type,
decode(lk.lmode, 0, 'None', 1, 'Null', 2, 'Row-S', 3, 'Row-X', 4, 'Share', 5, 'S/Row-X', 6, 'Exclusive', to_char(lk.lmode)) lockmode,
decode(request, 0, 'None', 1, 'Null', 2, 'Row-S', 3, 'Row-X', 4, 'Share', 5, 'S/Row-X', 6, 'Exclusive', to_char(lk.request)) requestmode
FROM v$lock lk,
v$session s,
dba_objects ao
WHERE lk.lmode > 1
AND object_name LIKE 'JAI%'
AND s.username IS NOT NULL
AND lk.sid = s.sid
AND ao.object_id(+) = lk.id1

To find and kill the locking program..

select session_id from dba_dml_locks where name = 'JAI_RCV_HEADERS' ;

select sid, serial# from v$session where sid in ( );

alter system kill session ',';

repeat alter stmt for all sids obt. in 2nd query

3. Desc query

In oracle, you would have used desc to describe the table. Now let us see, how to generate DESC output through sql query.

SELECT column_name || ' ' || decode(nullable, 'N', 'not null', ' ') || ' ' || data_type ||
decode(data_type, 'NUMBER', decode('' || nvl(data_precision, -1), '-1', '', '(' || data_precision || ',' || data_scale || ')'),
'(' || data_length || ')') fields
FROM all_tab_columns
WHERE TABLE_NAME = 'PO_VENDORS';


4. How to disable a not null constraint.

In case you have created a database column as 'not null'. And you don't want it to be 'Not null' then how will you change it?

eg:
create table temp_temp ( a number not null, b number not null)
And your want to remove "Not null" constraint for columns A.


Ans:

sql> desc temp_temp:
Name Null? Type
------------------------------- -------- ----
A NOT NULL NUMBER
B NOT NULL NUMBER


Get the Not null Constraint name from the database.


SQL> select constraint_name, search_condition from all_constraints where table_name='TEMP_TEMP';

CONSTRAINT_NAME SEARCH_CONDITION
----------------- ---------------------
SYS_C00258673 "A" IS NOT NULL
SYS_C00258674 "B" IS NOT NULL


In the results look for the row with name of the column(like "A" is not null) in the search condition. Take the corresponding constraint_name


SQL> alter table temp_temp drop constraint SYS_C00258673;

Table altered.

SQL> desc temp_temp
Name Null? Type
------------------------------- -------- ----
A NUMBER
B NOT NULL NUMBER

Not null constraint is dropped from the Table.


5. How to convert row values into columns. or how to perform multi dimensional query?

For Eg
Dept Year Amount
A 2005 100
B 2005 500
C 2005 344
A 2006 400
B 2006 122

Here you need to display the report in following format. That is comparative sales analysis of each department between 2005 and 2006.

Dept 2005 2006
A 100 400
B 500 122
C 344 0

The challenge is to bring the row values into columns. And here is the solution.

SELECT dept, sum(decode(year,'2005',amount,0)) "2005",
sum(decode(year,'2006',amount,0)) "2006"
from temp_temp
group by dept;



6. How do give if condition within the column.

This is so simple problem, you can use Case when clause to do that.

select ename, eid,case when salary <=1000 then 'A'
when salary <=2000 then 'B'
when salary <=3000 then 'C'
when salary <=4000 then 'D'
when salary <=5000 then 'E'
else 'F'
end from emp;


But how will you do switch-case without use when clause?

Here is the query to do the same stuff.

select ename, eid,decode(greatest(salary,0),least(salary,1000),'A',decode(greatest(salary,1001)
,least(salary,2000),'B',decode(greatest(salary,2001),least(salary,3000),'C',decode(greatest
(salary,3001),least(salary,4000),'D',decode(greatest(salary,4001),least(salary,5000),'E','F')))))
from emp order by 3;



7. How would you select the range of rows from the table?

Say for example, you wanted to select the rows from 2 to 5.

Solution:

select dept, no
from (select dept, rownum no from temp_temp)
where no between 2 and 5;


8. How can one dump/ examine the exact content of a database column?

SELECT DUMP (col1) FROM tab1 WHERE cond1 = val1;

DUMP (COL1)
----------------
Typ=96 Len=4: 65,66,67,32


For this example the type is 96, indicating CHAR, and the last byte in the column is 32, which is the ASCII code for a space. This tells us that this column is blank-padded.


9. Find out foreign constraints refering your table

select table_name, constraint_name from user_constraints
where r_constraint_name IN (select constraint_name from user_constraints where table_name = 'XML_DOCUMENT' and constraint_type = 'P')
and constraint_type = 'R' ;




Also Vist: Sql Part II

Saturday, February 2, 2008

VIM Quick Reference

Basic movement
h l k j . . . . . . . . . . . . character left, right; line up, down
b w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . word/token left, right
ge e . . . . . . . . . . . . . . . . . . . . . end of word/token left, right
{ } . . . . . . . . . . . . . beginning of previous, next paragraph
( ). . . . . . . . . . . . . . .beginning of previous, next sentence
0 gm . . . . . . . . . . . . . . . . . . . . . . . . . beginning, middle of line
^ $ . . . . . . . . . . . . . . . . . . . . . . . . . first, last character of line
nG ngg . . . . . . . . . . . . . . . . . . . line n, default the last, first
n%. . . . . . . .percentage n of the file (n must be provided)
n . . . . . . . . . . . . . . . . . . . . . . . . . . . . column n of current line
%. . . . .match of next brace, bracket, comment, #define
nH nL . . . . . . . . . . . . line n from start, bottom of window
M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . middle line of window

Insertion & replace ! insert mode
i a . . . . . . . . . . . . . . . . . . . . . . . . . insert before, after cursor
I A . . . . . . . . . . . . . . . . . . . . insert at beginning, end of line
gI . . . . . . . . . . . . . . . . . . . . . . . . . . insert text in first column
o O. . . . . .open a new line below, above the current line
rc . . . . . . . . . . . . . . . replace character under cursor with c
grc . . . . . . . . . . . . . . . . like r, but without affecting layout
R . . . . . . . . . . . . . replace characters starting at the cursor
gR . . . . . . . . . . . . . . . . . like R, but without affecting layout
cm. . . . . . . . . . . . . change text of movement command m
cc or S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . change current line
C . . . . . . . . . . . . . . . . . . . . . . . . . . . . change to the end of line
s . . . . . . . . . . . . . . . . . . . . . change one character and insert
~ . . . . . . . . . . . . . . . . . . . . . . switch case and advance cursor
g~m . . . . . . . . . . . . switch case of movement command m
gum gUm. . . lowercase, uppercase text of movement m
m . . . . . . . . . . shift left, right text of movement m
n<<>>. . . . . . . . . . . . . . . . . . . . . . . shift n lines left, right
Deletion
x X . . . . . . . . . . . . . . delete character under, before cursor
dm. . . . . . . . . . . . . . delete text of movement command m
dd D . . . . . . . . . . . . . delete current line, to the end of line
J gJ . . . . . . . . join current line with next, without space
:rd - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . delete range r lines
:rdx - . . . . . . . . . . . . . delete range r lines into register x

Insert mode
ˆVc ˆVn . . . . . . . . . insert char c literally, decimal value n
ˆA . . . . . . . . . . . . . . . . . . . . . . insert previously inserted text
ˆ@. . . . . . .same as ˆA and stop insert ! command mode
ˆRx ˆRˆRx . . . . . . . . . insert content of register x, literally
ˆN ˆP. . . . . . . . . . . . . . text completion before, after cursor
ˆW . . . . . . . . . . . . . . . . . . . . . . . . . . . delete word before cursor
ˆU . . . . . . . . . . delete all inserted character in current line
ˆD ˆT. . . . . . . . . . . . . . . . . . . shift left, right one shift width
ˆKc1c2 or c1 c2 . . . . . . . . . . . . . . . . . . enter digraph {c1, c2}

ˆOc . . . . . . . . . . . . execute c in temporary command mode
ˆXˆE ˆXˆY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . scroll up, down
hesci or ˆ[ . . . . . . . . . abandon edition ! command mode

Copying
"x . . . . . . . . . . . . use register x for next delete, yank, put
:reg - . . . . . . . . . . . . . . . show the content of all registers
:reg x - . . . . . . . . . . . . . . show the content of registers x
ym . . . . . . . . . . . yank the text of movement command m
yy or Y. . . . . . . . . . . . . . . . . . .yank current line into register
p P . . . . . . . . . . . put register after, before cursor position
]p [p . . . . . . . . . . . . . . . . . . . like p, P with indent adjusted
gp gP . . . . . . . . . . . like p, P leaving cursor after new text

Advanced insertion
g?m. . . . . . . . . . perform rot13 encoding on movement m
nˆA nˆX . . . . . . . . . . . . . . +n, −n to number under cursor
gqm . . . . . . . format lines of movement m to fixed width
:rce w - . . . . . . . . . . . center lines in range r to width w
:rle i - . . . . . . . left align lines in range r with indent i
:rri w - . . . . . . right align lines in range r to width w
!mc - . filter lines of movement m through command c
n!!c - . . . . . . . . . . . . . . filter n lines through command c
:r!c - . . . . . . . . . filter range r lines through command c

Visual mode
v V ˆV . . start/stop highlighting characters, lines, block
o . . . exchange cursor position with start of highlighting
gv . . . . . . . . . . . start highlighting on previous visual area
aw as ap . . . . . . . select a word, a sentence, a paragraph
ab aB . . . . . . . . . . . . . . . . . . . select a block ( ), a block { }
Undoing, repeating & registers
u U . . . . . . undo last command, restore last changed line
. ˆR. . . . . . . . . . . . . . . .repeat last changes, redo last undo
n. . . . . . . repeat last changes with count replaced by n
qc qC. . . .record, append typed characters in register c
q. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . stop recording
@c . . . . . . . . . . . . . . . . . . . . execute the content of register c
@@ . . . . . . . . . . . . . . . . . . . . . . . . repeat previous @ command
:@c - . . . . . . . . . . . execute register c as an Ex command
:rg/p/c - . . . . . . . . . .execute Ex command c on range r
b where pattern p matches

Complex movement
- + . . . . . . . . . line up, down on first non-blank character
B W . . . . . . . . . . . . . . . . . . . space-separated word left, right
gE E . . . . . . . . . . . end of space-separated word left, right
n . . . . . . . . down n − 1 line on first non-blank character
g0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . beginning of screen line
g^ g$. . . . . . . . . . . . . . . .first, last character of screen line
gk gj . . . . . . . . . . . . . . . . . . . . . . . . . . . . screen line up, down
fc Fc . . . . . . . . . . next, previous occurence of character c
tc Tc . . . . . . . . . . . . . before next, previous occurence of c
; , . . . . . . . . . . . . . repeat last fFtT, in opposite direction
[[ ]] . . . . . . . . . . . . . . start of section backward, forward
[] ][ . . . . . . . . . . . . . . . end of section backward, forward
[( ]) . . . . . . . . . . . . . . . . . unclosed (, ) backward, forward
[{ ]} . . . . . . . . . . . . . . . . unclosed {, } backward, forward
[m ]m . . . . . . . . start of backward, forward Java method
[# ]#.unclosed #if, #else, #endif backward, forward
[* ]* . . . . . . . . . . start, end of /* */ backward, forward

Search & substitution
/s - ?s - . . . . . . . . . . . . . search forward, backward for s
/s/o - ?s?o - . . . . . search fwd, bwd for s with offset o
n or / - . . . . . . . . . . . . . . . . . . . . . repeat forward last search
N or ? - . . . . . . . . . . . . . . . . . . . repeat backward last search
# * . . . search backward, forward for word under cursor
g# g* . . . . . . . . . . . . . same, but also find partial matches
gd gD . . . local, global definition of symbol under cursor
:rs/f/t/x - . . . . . . . . . . . . . . substitute f by t in range r
b x : g—all occurrences, c—confirm changes
:rs x - . . . . . . . . . . . repeat substitution with new r & x

Special characters in search patterns
. ˆ $ . . . . . . . . . . . any single character, start, end of line
\< \> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . start, end of word
[c1-c2] . . . . . . . . . . . . . . a single character in range c1..c2
[ˆc1-c2]. . . . . . . . . . . . . . . .a single character not in range
\i \k \I \K . . . . . . . an identifier, keyword; excl. digits
\f \p \F \P . . a file name, printable char.; excl. digits
\s \S . . . . . . . . . . . . . . . . a white space, a non-white space
\e \t \r \b . . . . . . . . . . . . . . . . . . . hesci, htabi, h -i, h i

\= * \+ . . . . match 0..1, 0..1, 1..1 of preceding atoms
\ . . . . . . . . . . . . . . . . . . . . . . . separate two branches ( or)
\( \) . . . . . . . . . . . . . . . . . . . . group patterns into an atom
\& \n . . . . . . . the whole matched pattern, nth () group
\u \l . . . . . . . . . . . next character made upper, lowercase
\c \C. . . . . . . . . . . . . .ignore, match case on next pattern

Offsets in search commands
n or +n . . . . . . . . . . . . . . . . . . . n line downward in column 1
-n . . . . . . . . . . . . . . . . . . . . . . . . . n line upward in column 1
e+n e-n . . . . . . . n characters right, left to end of match
s+n s-n. . . . . .n characters right, left to start of match
;sc . . . . . . . . . . . . . . . . . . execute search command sc next

Marks and motions
mc . . . . . . . . . mark current position with mark c 2 [a..Z]
‘c ‘C . . . . . . . . . . . go to mark c in current, C in any file
‘0..9 . . . . . . . . . . . . . . . . . . . . . . . . . . . go to last exit position
‘‘ ‘" . . . . . . . . . . go to position before jump, at last edit
‘[ ‘] . . . . . go to start, end of previously operated text
:marks - . . . . . . . . . . . . . . . . . . . print the active marks list
:jumps - . . . . . . . . . . . . . . . . . . . . . . . . . . print the jump list
nˆO . . . . . . . . . . . . . . . go to nth older position in jump list
nˆI . . . . . . . . . . . . . . go to nth newer position in jump list

Key mapping & abbreviations
:map c e - . . . . . . .map c 7! e in normal & visual mode
:map! c e - . . . . map c 7! e in insert & cmd-line mode
:unmap c - :unmap! c - . . . . . . . . . . remove mapping c
:mk f - . . . write current mappings, settings... to file f
:ab c e - . . . . . . . . . . . . . . . . . add abbreviation for c 7! e
:ab c - . . . . . . . . . . . . show abbreviations starting with c
:una c - . . . . . . . . . . . . . . . . . . . . . . . remove abbreviation c
Tags
:ta t - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . jump to tag t
:nta - . . . . . . . . . . . . . . . . . . jump to nth newer tag in list
ˆ] ˆT . . . jump to the tag under cursor, return from tag
:ts t - . . . . list matching tags and select one for jump
:tj t - . .jump to tag or select one if multiple matches
:tags - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . print tag list
:npo - :nˆT - . . . . . . jump back from, to nth older tag
:tl - . . . . . . . . . . . . . . . . . . . . . . jump to last matching tag
ˆW} :pt t - . . . . . . . . . . . preview tag under cursor, tag t
ˆW] . . . . . . . . . . . split window and show tag under cursor
ˆWz or :pc - . . . . . . . . . . . . . . . . . close tag preview window

Scrolling & multi-windowing
ˆE ˆY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . scroll line up, down
ˆD ˆU . . . . . . . . . . . . . . . . . . . . . . scroll half a page up, down
ˆF ˆB . . . . . . . . . . . . . . . . . . . . . . . . . . . . scroll page up, down
zt or z - . . . . . . . . . . . . . set current line at top of window
zz or z. . . . . . . . . . . . set current line at center of window
zb or z-. . . . . . . . . . .set current line at bottom of window
zh zl . . . . . . . . . . . . scroll one character to the right, left
zH zL . . . . . . . . . . . . . scroll half a screen to the right, left
ˆWs or :split - . . . . . . . . . . . . . . . . . . . split window in two
ˆWn or :new - . . . . . . . . . . . . . . . .create new empty window
ˆWo or :on - . . . . . . . make current window one on screen
ˆWj ˆWk . . . . . . . . . . . . . . . . .move to window below, above
ˆWw ˆWˆW. . . . . . . . .move to window below, above (wrap)

Ex commands ( -)
:e f . . . . . . . edit file f, unless changes have been made
:e! f . . . . edit file f always (by default reload current)
:wn :wN . . . . . . . . . write file and edit next, previous one
:n :N. . . . . . . . . . . . . . . . . . . . edit next, previous file in list
:rw . . . . . . . . . . . . . . . . . . . . . . . write range r to current file
:rw f . . . . . . . . . . . . . . . . . . . . . . . . . . .write range r to file f
:rw>>f . . . . . . . . . . . . . . . . . . . . . . .append range r to file f
:q :q!. . . . .quit and confirm, quit and discard changes
:wq or :x or ZZ . . . . . . . . . . . . . write to current file and exit
hupi hdowni. . . . recall commands starting with current
:r f . . . . . . . . . . . . . . insert content of file f below cursor
:r! c . . . . . . . . insert output of command c below cursor
:all . . open a window for each file in the argument list
:args . . . . . . . . . . . . . . . . . . . . . . . display the argument list

Ex ranges
, ; . . . . . . separates two lines numbers, set to first line
n. . . . . . . . . . . . . . . . . . . . . . . . . . . an absolute line number n
. $ . . . . . . . . . . . . . . . . the current line, the last line in file
% * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . entire file, visual area
’t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . position of mark t
/p/ ?p?. . . . . . .the next, previous line where p matches
+n -n . . . . . . . . . . .+n, −n to the preceding line number

Folding
zfm . . . . . . . . . . . . . . . . . . . . . . . create fold of movement m
:rfo. . . . . . . . . . . . . . . . . . . . . . . . . . . .create fold for range r
zd zE . . . . . . . . . . . . . . delete fold at cursor, all in window
zo zc zO zC . . . . . . . . . . open, close one fold; recursively
[z ]z. . . . . . . . . .move to start, end of current open fold
zj zk . . . . . . . . move down, up to start, end of next fold

Miscellaneous
:sh - :!c - . . . start shell, execute command c in shell
K. . . . . . . . . . . . . . . lookup keyword under cursor with man
:make - . . . . . . start make, read errors and jump to first
:cn - :cp - . . . . . . . . . . display the next, previous error
:cl - :cf - . . . . . . . list all errors, read errors from file
ˆL ˆG . . . . . . . redraw screen, show filename and position
gˆG . . . show cursor column, line, and character position
ga . . . . . . . . . show ASCII value of character under cursor
gf. . . . . . . . . . . . .open file which filename is under cursor
:redir>f - . . . . . . . . . . . . . . . . . . redirect output to file f
:mkview [f] . . . . . . . . . save view configuration [to file f]
:loadview [f] . . . . load view configuration [from file f]
ˆ@ ˆK ˆ \ Fn ˆFn. . . . . . . . . . . . . . . . . . . .unmapped keys