Showing posts from 2010

Swimming the corporate ocean - 3 : "Colleagues"

Hi All, hope my first two parts was well appreciated (I did not receive any brickbats, that is my idea of appreciation..:) ). I was thinking about what to write next and then suddenly in the midst of the office, I found the answer, "Colleagues". I am pretty carefully using the term colleagues because they may or may not be your friends. WARNING : This may and may not can change on a day to day basis or in most probabilities, appraisal periods..:). To me, IT is all about resources, and not humans. And at the end of the day what the organisation wants is the best resource and not the best human being around. This what causes the change between the may and may nots.

               There are two kinds of colleagues you often see. Lets see the kind whom we want more. I remember seeing Ice Age the other day, and in a scene where the mammoth almost dies but saves the tiger, the tiger asks the mammoth, "Why did you save me ? you could have lost your life in the …

Swimming the corporate ocean - 2 : The Tag "Freshers"

Well...I really did not want to write the Part-2 here thinking companies would fire me for providing gyan without any monetary benefits or experience which is the price you pay to learn all crap, but still curiosity and democracy combined with some comments that my article was what exactly what they wanted to tell made me continue this...

The topic I was more interested and gathered some research on is the most used term in the Corporate World, "FRESHERS". Hearing that used to give me a warm feeling, think that term was coined to make newbees feel comfortable and mostly they are more fresh and work more. But the way the term is used in the current scenario? pathetic, bleedy, atrocious (I am not allowed to add bad words because that makes me lose couple of male fans...huh...males are the current females..;)). Puns apart, what does the term fresher mean? Technically, "A freshman (or sometimes fish, freshie, fresher. Slang plural frosh' or freshmeat) is a f…

Connecting to postgres database in java code

To connect you java program with postgres driver, add the postgres library jar (postgresql-jdbc3-8.2.jar or any current jar file) file in the libraries. Then the following code can be modified for your particular database and table.

package javaapplication1;
import java.sql.*;
 * @author shankar
public class Main {

     * @param args the command line arguments
    public static void main(String[] args) {
        // TODO code application logic here
          System.out.println("-------- PostgreSQL JDBC Connection Testing ------------");

      try {
            Connection connection = null;

             connection = DriverManager.getConnection("jdbc:postgresql://","postgres", "postgres");
       if (connection != null)

                  Statement s=connection.createStatement();
                  String query="select ad_a…

Performance Enhancement in Ubuntu 10.04

I am using ubuntu for an while now and over the last few months and I find that the performance of my system has been drastically reduced. I know its more because of improper system management than hardware ineffectiveness (mine is a 2gb ram with 160gb hard disk). If it were windows it would have been simple..:) Run disk defragment, %prefetch%, %temp%, temp in cmd and delete all temporary files. But ubuntu is more fun, because you don't employ some tool to do the job that you should bend yourself and do..:) So here is the list of things that i did in order to increase the performance of my Ubuntu System.

1.Prelink:               Go to Synaptic Package Manager and search for 'prelink' and you will find  a single app. install that and then come over to terminal and edit the following file, /etc/default/prelink
i.e give
gksu gedit /etc/default/prelink
and in the file that opens up, change the PRELINKING=unknown to PRELINKING=yes.
This will help in prelinking applications, ena…

Openbravo Environment Setup in Eclipse

I have been using Openbravo for about an year now and what I noticed is that its a big jungle to get into first. You have to learn all about Ubuntu (the preferred platform), then setting up the stack viz, Java, Postgres, PgAdmin(GUI of postgres), Tomcat, Ant, Openbravo, Pentaho(BI tool), etc etc...A good play ground to dig and play, but you can be rest assured your suits wont go unscathed more often than not. This is where you need a good dig tool and IDE's are just for that task.  Though my personal favorite IDE is Netbeans, Eclipse is the preferred environment for Openbravo, so I decided to go through that route..:)

I went through  a lot of hardships, but nevertheless the result was satisfying and i wanted to bring you that. There is a Eclipse installation Manual (, but I can assure you that with that link, its bound to take you at least 2 days to…

Openbravo works with Postgres 9.0 !!!

I was quite fascinated with the hype around postgres 9.0 that competes itself with Oracle and other proprietary servers. So i decided to test it out myself. I did not have the big heart to install it in my ubuntu that already runs 8.4, so installed it in my windows. I usually don't use windows for Openbravo development. Reason: I was conditioned ubuntu is the preferred environment for Openbravo. But then seeing Postgres 9.0 and pgadmin in fullswing, I could not  resist myself from installing the development stack for Openbravo in ubuntu. It was child's play for me in ubuntu as I had installed at least 10-20 copies of it already. But in windows7 its a different story all together. For the first time i thought ubuntu is easier than windows to configure. After 2 days of struggle, all i could have was Openbravo deployed in server in false mode..:). I knew it was the issue with space allocation, but not sure where to resolve. Then I read in some blog that when we run the Tomcatw e…

Swimming the Corporate Ocean..:)

Being a new bee to the corporate world I had no clue how this world was functioning. The pros who were already there told it was a con world. Let me bring you a jist what I was adviced so that you can also take it or thrash it and learn by your own experience..:). It was worse than the worsest(forgive me for my stupid word, but tats how worse it is..:) ). Talents and brilliance are worth tissue papers in rest rooms here and what matters here is how much you sell yourself.  You should be able to sell yourself to your boss, sell yourself to every other shitting creature around without whose help you are just worth the shit you are. Beyond all this you should work a little just to show you are working..:). These are all secondary adjustments someone new to this industry has to make. But first thing first, HR.

Lot like me think HR in offices are for nothing but wasting time and energy. But the pros told me they were worth lot more crap than that. They run the office. They form the rules an…

ODI's are still alive

Last week was enthralling and an awe inspiring week for all cricket fans specially from the sub continent. First was the battle of the power houses. The No.1 team in test cricket(India) vs The No.1 team in ODI(Australia). It was a shame that it was reduced to a 2 test series, but the excitement it proved made us even more thirsty for even more. Both the test went down the wire and it all came down to the individual brilliance of Laxman, Ishant (Test 1) and Sachin, Pujara(Test 2). But not to forget the technical and tactical acumen of dhoni that not only won us the series but provided aussies a white wash, a wound that will take a lot of time to heal.

Next in line was the Bangladesh-New Zealand ODI series. Not only this made the world turn around bangladesh when they wrapped up the series 3-0, but made the world believe they are becoming a world class team by completing a 4-0 white wash which will forever be recorded in history as one of their all time achievements, way to go bangladesh…

Both Ends of a Knife : THE END

I am not going to continue Both Ends of a Knife... Its one of the many things in my life that i started but did not go on to end. I did not want to end it so soon. Its years and years of work. So i am reserving it after 50..;) But i will keep blogging about variuos generic things. This is one more reason why I am stoppin because, there are too many other things around the world that needs to be communicated across to people. So sorry to all my dear readers and my fellow mates who thought i was a good finisher. May be i am a cool opening dasher..:)

Displaying Images in Openbravo

A picture speaks thousand words. True, often an image of an girl speaks more than her resumes..:) (just stole the thoughts from an HR. I am not part of any anti-women community., in fact I am one from the opposite community..:)  ) .Images are one of the key features of any ERP System. Specially in a feature rich application like Openbravo, images would add more beauty to the window..:) Openbravo provides a table called ad_image that saved image in the form of binary data or in the form of URL. Now in general when you want the reference data from some other table in Openbravo, we use the tabledir to provide direct table mapping or table reference to reference data.But in the case of ad_image table if you reference it as tabledir, it just comes as a dropdown as attached below. Show all
    But that does not show the true power of the image table. To display an image in the grid view and pen view, the "reference" type of the respective column should be set as "Image BLOB&q…

Both ends of a knife - 11

I had never been to Andaman in my whole life and the only two things that I heard about Andaman was the jail and earthquakes. So decided its gonna be a boring tour out there. Though i was reminded many times before i left that its a training, I preferred referring it to as tour. Niki's dad smiled at me and i found the reason a little later. I reached there through flight, no guess for the fact that Niki's dad was the sponsor. I was not officially into the mission yet, so accomplishments. The first thing or rather the only thing I noticed about Andaman was the water. Its one more place where water lives around you rather than you living around water else where..:) I was made to wait in airport for an hour before an animal came and took my bags and me. I refer the person as animal not because of disrespect. If there is any animal that would match him, it could only be a cheetah waiting to pounce upon its prey. He was around 6.5 height and would weigh approximately hundred and as…

Both ends of the knife - 10

Writer’s Note:
              First of all sorry to all my readers who have been following my blog faithfully for the delay in the story. I was caught up with couple of technical issues that prevented me from posting the novel for a while. Past is past. Here I am back again with a bang...:)  “Both ends of a knife” is not just another novel that I write for name, fame or time-pass. It’s my dream, a vision that has taken long years to take shape. Each word and each character has been through my mind at least hundred times before I present it to you. You readers are special to me and this story is my small dedication to you. Lets get back to the story…a small synopsis; ram has just become agent Nik to take revenge on people who killed his dad and also threatening to do the same to the Nation. And we are hearing everything through Ram’s eyes.

              Life after I became Nik was not always the same. It was something different and finally I knew I had a purpose to live. But for the cause…

Both Ends of a Knife - 9

He finished his beer and I had also done with my mountain dew and just then I was wondering why he brought me in the middle of the class and telling me all this past history. I decided may be they were work friends and he wanted to help me out financially. The whole idea of being pitied by and being helped by my lover’s dad was little awkward for me. I thought of standing up and leaving when he saw me once again. But this time i saw a completely different face of him. His eyes were wet. I repeat. HIS EYES WERE WET. I never thought he had room for emotions let alone crying in his life. But today, for the first time in my life, i pitied him. Crying didn’t suit him. I just saw him. I wanted to tell him not to cry and above all ask him the reason why his eyes were wet. It didn’t occur to me that time that too much of beer could also wet one’s eyes (that i learn't a little later). He looked at me and said i wish i could have saved your dad from them...What do y…

Email Validation using Callouts in Openbravo

Hi all, I have a written a simple java code that validates an email ID. This is not a completely validated one, but a basic validated one. This can also be also used as a template for creating callouts in Openbravo. special mention to my colleague pandi and one more thanks to ivan from Openbravo in helping me accomplish this task...:)

package org.openbravo.erpCommon.ad_callouts;

import javax.servlet.ServletException;
import org.apache.log4j.Logger;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.openbravo.erpCommon.ad_callouts.SimpleCallout;
import org.openbravo.erpCommon.utility.SequenceIdData;
import org.openbravo.erpCommon.utility.OBError;
import org.openbravo.scheduling.ProcessBundle;

public class Email_CL extends SimpleCallout {

    private static final long serialVersionUID = 1L;
    private static Logger log = Logger.getLogger(Email_CL.class);
    protected void execute(CalloutInfo info) throws ServletException {


Phone Number Validation in postgres

I took a simple number validation code across net and modified it to check phone numbers. It allows only numbers,plus symbol(+) and underscore(_) operators

-- Function: isphoneno(character varying)

-- DROP FUNCTION isphoneno(character varying);

CREATE OR REPLACE FUNCTION isphoneno(character varying)
  RETURNS boolean AS
    RETURN $1 ~ '^[0-9,+,-,.]+$';
  COST 100;
ALTER FUNCTION isphoneno(character varying) OWNER TO tad;

Both ends of the knife - 8

We drove in his car, it was Hyundai Accent, the car i dreamt of owing some day, but somehow decided otherwise today. I felt an ego burning inside me. I didn't want to give her what her dad had already given her. She used to always boast to me about how good her dad was to her and how she always got what she wanted, nothing more or nothing less. Whenever i hear such talks i hear a sense of jealousy inside me, coz i wanted her to be even happy only because of me. That’s my nature. I am really really possessive about her, coz i don't possess anything else in this world. So decided it had to be a benz. Well all these apart, I have still having butterflies under my stomach coz i saw a brand new gun under his shirt. I thought he might have bought it today just to finish me off. And after around half an hour we stopped at a old guest house. A typically setup for a typical ending i thought.
            All along the journey I never spoke with him nor did he. We both kept he…

Both Ends of a Knife - 7

After i did my 12th, there was no intention in my mind to continue studies. Plainly because we were feeding on ajay and it was bit awkward though he treated us like his sons. I spoke about it to ajay one day and he felt I was partly right. He was more in favour of the western culture where youngsters go in search of their life after they do their basic schooling. So he told me that i should not stop studying but start searching for a side income so that i don't feel awkward staying as unpaid guest but also move away from these unwanted distractions(by all means he meant niki). Its not that he was against love, but he felt my age was not right for it and i was not mentally ready for it. I wished to tell him that to some Love is an experience in life and to few like me, love is the elixir of life. How can i tell him that it is niki because of whom i am able to bear all losses and all talks behind me. My brother shyam was just two years old and i looked more like a dad to him and eve…

Restoration of Openbravo Environment

All of us depend on backup most of the time. Thats one side-effect of innovative product development. Sometimes when our imagination unfolds in the form of thousands of ideas, the first thing that suffers is the application coz its new for it and the last thing is you coz u got to restore it..:) Sometimes we do development in one environment and recreate the environment elsewhere. I will present how I did it for Openbravo in ubuntu. Openbravo in ubuntu has two parts. One if the folder structure and the other of course is the database. I use postgres as database because of the simple reason that its free. So the first step is i need a backup or a dump of the database. If you have pgadmin installed this is a easier task. Just right click on your database, and choose backup. In the options that present before you, choose the plain option. This option is to create a backup in plain text format that you can see. You can almost sense whats there in that dump with the plain format backup.

Both Ends of A Knife-6

As they walked by divya said,” hope your team is in high spirits. I think you ll surely win tomorrow.” ajay just smiled and said, “I love you like hell.” She hid a big smile and blushed and asked,” I hope we live for a long time happily. When shall v marry?” Ajay thought for a while and said, “After four years divs. By then I would surely be in the national team and would have got a bank job or any government job and you would have also made it to the national team if you continue performing like this. But the truth is I want to marry you this instant. I want to be the best husband the world has seen as you are the best girl the world has seen”. Divya was leaning on his shoulders and holding his hands and they walked with a single shadow. Divya slowly hissed near his ears, “I want to die this instant. I am too happy.” Sometimes truth is truly stranger than fiction. A lorry came out of somewhere as usual with malfunctioning brakes and sent both ajay and divya flying and both came down …

Both Ends of a Knife - 5

Though we were great friends we mostly met only in school and not anywhere else. But that day she herself asked whether I could take her out for a movie. I was shocked first. But then we decided upon it and I along with four of my friends including her and a girl went to mayajaal. We got tickets for a Hindi movie called ‘rab ne bana di jodi’ (god has made a pair…I wish I too made). As you all expected we both sat next to each other and truly the a/c in the hall was taking its toll on us. She was in a sky blue salwar and couldn’t help but keep watching her. I even told her that but she thought I was teasing her and punched me in my shoulders and continued watching the movie. Ouch, I jus then felt the pain in my heart..:). It was too cold and she was slowly holding my hand that was then too warm at the sudden feeling of love in my heart. She was barely three centimeters away from me and it was extremely difficult to concentrate even on the king srk. I was about to talk to he…

My Dance1

I have never been a great dancer in my life, but i love dancing and love to dance to big audiences and at a big stage.I really can't dance when there is no crowd before me. I love the butterfly flying in my stomach whenever i see large audience and to perform before them. I have only three of my dance videos with me and i have shared one in this blog. This was in my MCA first year in Anna University and in the large Vivekanda Auditorium. The occasion was the Annual Alumini Meet. True the audi was not completely full but neither was completely empty. People were just back after lunch and our performance was the indicator whether they ll enjoy or sleep through the rest of the day. I cant boast much, but i can assure you that they did not sleep..:) Well the dancer dancing with me is Lawrence, my class mate, best friend and one of the persons due to whom i did that performance. We actually decided v would dance only the nit before and practiced from nit 2-5. There was on more classmat…

Both ends of a knife (Part -4)

It was then that happened. The thing that transforms a free careless girl into an ever-watchful woman, a man into a beast.I hope you all understand. Geet was never the same ever after. That was the first thing ram lost. His childish innocent geet. Their relationship was the never the same again.

Geet now started to feel shy even to see ram’s face and ram moved away from her not wanting to make her uncomfortable. Ram slowly got used to this life and he then got other friends and slowly but steadily geet sunk deep into his heart. The last time ram saw geet was during their final tenth exams. After that geet’s family had transferred to Mumbai. For the first time since his childhood ram was feeling lonely.
            Ram joined his high-school in a nearby area and a new school did nothing to console him but it did damp his spirits more and made him completely shy and fearful. His first few days or even months went by when his name was mentioned only during attendance. He always prefe…

Both ends of a knife (Part -3 )

Now the time he spent in his home was really little where he slept in the nights after his dinner which also many days he finished in geet’s home itself. His dad was in a mnc but in the D-grade which meant he had to work lot to run the family. So ram never got to talk to him or play with him and they were together only when he took them for beach or cinema. And ram was afraid of him because the only time he spoke much with him was when he had to get his progress card signed. With all his hard work and troubles the only results his dad expected was ram’s marks. So he was naturally disappointed always at ram’s marks. It took many years for ram to realize his feelings but by that time it was bit too late.

Ram also always had the habit of trying to please all. He always thought and believed he can make anyone happy as he was not much happy about the way his life was going. After ram had reached eighth grade the friendship between him and geet was put under scrutiny by some of his fellow ma…

The Jabulani Effect

I was out for a team lunch sometime back just at the group stages of the '10 Fifa world cup and one of our directors mentioned that some consultants who analyzed the stocks and various other features had predicted England to win the world cup. I told him just one thing, England are a gr8 team but still they chock at important times, on the other hand Spain is one team that will go all the way, because they do a lot of short passes and often have possession and create chances. The reason why I surely said that is because of this one word,”Jabulani”. It sounds more like one of the punishments provided to bad people in the tamil movie anniyan, but actually its the name of the official world cup ball. This world cup will be remembered more because the nature of the ball decided the victorious beholder. The jabulani was peculiar at long balls. When the ball was lofted it often changed angle at the last moment. Even maradona who was one of the greats of the game, or even the greatest of…

Both ends of a knife - Part 2

He was named Ram Kumar an year after his birth the delay mostly due to the fear whether he will withstand for a year. But ram was a true warrior right from his birth. He always tried to match his counterparts and mostly failed in vain, but somehow inside he knew he was winning himself. Ram was mostly alone and was found mostly with his best companion an old disassembled tape recorder. He was always trying to figure out why the wires were so twisted upon and tried to straighten them up, but as in his life things were never easy for him to figure out. At the age of three he was joined in a school where he got an admission in spite of his dancing legs just because of his witty speech where he compared his principal’s dress with a cheetah’s skin. Thus ram got his first entry into this society and he understood soon it was better not to mingle with it.
He was always crying when his dad and mom left him in the school not because of fear but because of missing sorely his mom’s l…

Both ends of a knife (Part - 1) (My Novel)

The pregnant lady forgot to scream until the doctor did, and he started to scream. He was four hours ahead of time to feel this earth, but he knew he would always have time in his life to even it up. He was not yet ready to see this bright world (though just on the outset) and was craving again for the eternal darkness and warmth he felt in his mother’s womb. May be he did not realize there were many more things he is going to be jus craving before he reaches the second womb of motherland. After quite a reluctant opposition and with undesired struggle from the maternity department, he rose with the sun…
            The mother was very happy to hear that she had a son but that too did not last long when she discovered that the child was just about a kilo and was barely fifteen centimeters in size. The nurse had actually fitted him in her palms and showed to her. She fainted. In her Subconscious mind she traveled back to the day when that forgettable incident happened…It was …

My First Novel

Writing or story telling was a passion to me way back in my life. Well, there is no future for writers specially in countries in India where books are time wasters basically. that along with my family pressure to earn made me stop writting books and verses (கவிதைகள்). But now i have reached a point where i need certain relaxation to my life and i found solace in story writing. I began writin my first novel, but was not sure how to get it across to you all. If i write more than ten lines itself no one reads it, so ebook surely wont work. Then thought blogs are the best place to release that. I wanted to do something different and thats the reason why this unique idea of publishing a novel part by part came up to me. I expect you all to read it, comment it, encourage me or at least thrash it. Well my world has mostly revovled around my friends and i am sure you all will be with me in this comic yet brave attempt. Fasten your seat belt guys...the journey begins from tomorrow...:)

Validations in Openbravo

Validations in openbravo are meant to ease the user's interaction with the system. The most simple example would be, there are two tables c_country and c_region provided in the core module. Now at run time when an user chooses a country he would want the regions of that particular country to be displayed. this is achieved by validations. Validations can be applied to four basic data-types in openbravo.  They are Button, List, TableDir and the Table. Now to add a validation go the validation menu in the Application Dictionary-->Setup. Provide a new name under your module and add your logic in the Validation code column. There are 3 types of validations possible viz, SQL,Java and JavaScript. Lets do the SQL type. now to validate the region all you got to add is "c_region.c_country_id=@c_country_id@" . Now add this in column "c_region_id" in any table that you have used. Now for further insight, the "@" symbol is used to fetch the value of the variab…

Display Logic and read only logic In Openbravo

Using display logic in Openbravo is a primitive task but might seem a lot more difficult until you get hold of it...The display logic can be applied at the window-field level. Lets see a example. We have two fields married which is a check box and children which is a text box. Now at runtime we wish to display the children text box only if the married is ticked. So to apply this Logic we need to write a display condition in the children field. The logic is very simple. just type @married@='Y' in the display logic column of the field children.Now for read only logic, if you want the children field to be defaulted to 0 instead of hiding it, we need to do it at the table-column level. In the children column type@married@='Y' in the read only logic field and set the default value field as 0.

Openbravo 2.50 shortcuts

hi all,
       I have been working with Openbravo for quite a while and with fairness to all the other ERP's, Openbravo is a good look and feel providing ERP. I used "good look and feel" instead of "good user interface" because User interface is the ease with which the customers acquaint themselves with the application. In that sense the last that a guy who is recording a sales order would want is the mouse. Its such a world that every little second delay could rob you off a customer. With a feature rich application like Openbravo lots of navigations is required. Though the developers dont feel the delay, the customers are robbed off quite a few vital seconds. This is where the shortcuts come into place. well...not all are required for all, some meant at developers alone and others at the customer alone, but may be getting used to the basic ones will save a lot of dwell time for both.

– CTRL+M - move the focus to the menu
– CTRL+Shift+M - expand or collapse t…