avi sinha

Ranch Hand
+ Follow
since Mar 15, 2009
avi likes ...
Google Web Toolkit Hibernate Java
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by avi sinha

Hi Deepak,

The UserJobExecution class looks good except some encapsulation issues. Please find my suggestions below to narrow down the area.

1. Use generics for ThreadLocal return type.It will make it more readable. Where are you setting it?
2. Don't swallow the exception. Do you want to hit the service even when the user object is not available?
3. Use proper encapsulation in both the classes. you will never know who is changing the variables from outside.
4. Make the User class immutable to protect it. I don't think it should be mutable.
4. Use logs/assert in the execute method to verify whether everything is correct there. If everything looks fine, i guess the problem is inside the executeService or with the client.


chris webster wrote:Well, I don't know how things work in India, but I've been a freelancer (contractor) here in the UK for 20 years, so here's my £0.02.

As you already know, freelance work pays a lot more than regular employment, partly because freelancers are generally expected to have specific high-demand skills/experience and partly because freelancers may have to survive for months between contracts (I've had spells up to 18 months out of work in the past). Planning for and dealing with this insecurity can be quite a burden sometimes e.g. it's OK if you know you are going to be out of work for 3 months and then find a job, but not so good if you are out of work for an indefinite period and can't see where the next job is going to come from. This will depend on your local job market, which I suspect is probably better in India than here in the UK!

But you will also have to be prepared to go where the work is, which may involve a lot of extra expense or disruption to your personal life.

As a freelancer you are responsible for your own training/skills development, because usually an employer is paying you to apply your existing skills, not to acquire new ones on their time. You will usually learn something new on every contract (if not, it's time to shift your target market), but you will need to invest time/money in keeping your skills up to date and develop new skills e.g. you might have a 12 month contract using skill A, which may mean your skills in B start ageing pretty fast.

Also, it can be very hard to break into new areas as a contractor, because employers usually recruit you for the things you've done a lot of, not the things you want to do. This may be a particular problem if you want to get into a different role e.g. project management, as you need experience to get the job, and you need a job to get the experience!

You also need to be responsible for your own finances - taxes, pensions/savings etc - and I've seen new contractors who quickly get into trouble with the taxman because they've spent all their tax money on a fancy new car. You need to save for the periods when you may be out of work, and also for the time when you may not be able to carry on contracting e.g. if you have a family and feel you need more job security. Get some advice from a reputable accountant on how to manage this stuff properly, as it's much easier to get things right at the outset than try to resolve problems later on. If you have any freelancer colleagues, ask them privately for recommendations here, but use your own common sense too: if a deal sounds too good to be true, it probably is.

Perhaps the biggest problem for contractors is that after a while it may be very difficult to get back into regular employment. You may accumulate a lot of skills/experience, but many employers will be wary of hiring somebody who they already know is happy to change jobs every 6-12 months: they may wonder how long you will stay with them. This can be a problem when the market is down, as people try to retreat into more secure regular employment, so there is greater competition for jobs and employers fear you will quit and go back to contracting when the market improves.

Those are some of the bad things about contracting. Now for some of the good things (apart from the money).

Flexibility and variety - you will need to be flexible and adapt quickly to different roles, different businesses, different technologies (hopefully) and different working environments, but this is a good thing as it gives you broader experience and is also a lot of fun. Even the bad experiences are useful lessons - in hindsight at least! After all, it's better to work for a bad company and know you will be leaving in 6 months, than take a permanent job there that you can't get out of.

No politics - well, not much. You will need to be able to fit into a new team structure easily and get along with your colleagues professionally, but generally you will not have to get dragged into office politics, because nobody is going to promote you and you'll be gone in a few months anyway. In some workplaces the regular staff may show hostility towards contractors, perhaps over your pay or your role in the team, but this is rarely personal and is usually a sign of an unhappy workplace where the organisation is failing to treat its own people decently. Ignore this kind of thing and just focus on doing your job well and being helpful to your colleagues. This should ensure that you can get good references and maybe build up a network of satisfied ex-clients and colleagues who may be able help you find work in future.

Independence - you are responsible for your own career and you can choose which directions to go in, provided you can find the right jobs of course! But you are not tied to a particular dead-end job or restricted to a particular career path as you might be in some organisations. You can also choose to take time out e.g. for study or travel or personal development etc, although some potential clients may ask you to explain what you were doing during this time out as they may be suspicious of long gaps in your professional experience.

In your situation, it sounds like you are probably at the earliest stage where you could reasonably go contracting, as usually contractors are expected to have a little more experience. Check your local job sites to get an idea of what kind of skills/experience are expected for contractors in your target market. If you are far below the threshold, maybe wait a year or two before going contracting full time and concentrate on expanding your skills/experience in the meantime.

On the other hand, you already have a potential client lined up for your first full-time contract, which gives you a great advantage: by the time you are looking for another contract you will have more experience and (hopefully) at least one satisfied customer. You will have to judge for yourself whether you would be in a position to find a new job after this first one. Also, make sure these people really are going to give you the work - you don't want to quit your job and find they've changed their minds.

If you decide to leave your current job and go contracting, make sure you do so amicably e.g. give them proper notice and make sure you get a decent reference off them, even if it means waiting a bit longer. You never know when you might need a friendly ex-employer to vouch for you, or an ex-colleague in a new company to recommend you.

Working freelance demands different skills from permanent employment, the risks and rewards may be greater (but the rewards are not always worth the risks), so you need to decide for yourself if you think this would be a good route for you at this stage in your career.

Good luck, either way.

Thanks a lot Chris for providing a clear picture of all the aspects. You are just a life saver for me. Now , i think a full-time company job would be better for me.

Thanks again
Avi Sinha
12 years ago

Anayonkar Shivalkar wrote:
The standard rate in India is 25-30% raise in old salary (some companies even go till 35-40%).

I agree with your point but does it apply to all the developers irrespective of their roles?? How about a company which gives 6lpa to a fresher??

Anayonkar Shivalkar wrote:
However, I'm not sure about what type of work you've done (it seems good, as you've said that you've got a good reputation in your company).

Just to list some of the critical things i have done so far -
memory leaks & performence related fixes
Hibernate tuning & Db optimization
Websphere dynacache implementation
security related fixes ( Includes some cryptography)
some pattern & framework implementations like 'Open Session In View' & 'Factory for Ui generation'
Gwt Code optimization using code splitting, UiBinder, Editor, eventbus, MVP etc
Internationalization things
some PUSH related works related to Comet & ICEPush
A web version of Iphone Configuration Utility along with remote mobile push using Microsoft ActiveSync
A framework for the migration of old JsTree based trees to ExtJs Async trees etc etc. ( There are a lot many too.)

One point i just forget to mention ( which indeed is a good point in my opinion.) -- I don't hate JavaScript and have expertize over debugging and fixing JavaScript issues.

Hope this provides you a better picture of me.

Avi Sinha
12 years ago
Sorry for the late reply. I was quite tied up with work and couldn't reply. Thanks a lot for the valuable suggestions.

Vikram Kohli wrote:Sorry about asking this way, but is Job location a reason, or Money is the reason to change the job? Unless there is not a very strong reason, change of job should be avoided. Specially when you are already doing good in your present job.

Frankly speaking, Money is the reason for all this. There are some other reasons too including job location & work-culture ( Its not like my company has a bad working environment. This is quite specific to my project.).
I had joined the company due to some personal reasons. I had very good offers from reputed companies while joining and the CTC they were offering at that time was more than what i am getting right now. So this makes me think that 'I am a bit underpaid'.

Vikram Kohli wrote:
Will it not be possible for you to wait till the appraisals and then take a call.

I have already received the increment for this year. You won't believe , i am in the best band for both the years i have worked here ( I don't know why....they are quite good at cost-cutting) . There are offering me the role change and hike just because they don't want me to go. The client knows me and my capabilities very well ( I had received an award from the client a couple of months ago.) and this is certainly going to hamper their business.

Vikram Kohli wrote:
And finally about freelancing: It's a great way to not only enhance your technical knowledge, but also help a person to understand the dynamics of business. You are a company in your own.

It's a big compliment. Thanks a lot.

Avi Sinha

12 years ago
Thanks a lot Anayonkar, Vikram and Chris for your valuable suggestions. I am going to post my comments separately.

Anayonkar Shivalkar wrote:
On the other hand, some people don't like the 'unsafe' feeling of being a full time freelancer, so they take up a job for security and consistent income, and then go for part time freelancing.

I am quite worried about this that's why i am thinking of going for the second option. I have seen a lot of differences in the availability of jobs due to even slight changes in the currency conversion rates.

Anayonkar Shivalkar wrote:
If you accept a job in descent company, then you don't have to worry much, but then be aware that most of the companies would decide your salary on your previous salary - so your new salary might be quite less than the freelancing offers you have. But then you'll get paid every month and salary will increase in time and - well you know the routine

Frankly speaking, I am aware of this fact and i know that $3000 is just too much for a guy having 2 years of experience (In India). So how much can i expect from good companies here?? I would be more than happy if i get around 8lpa. is this feasible??

Anayonkar Shivalkar wrote:
On the other note, you can share some tips on this forum about how to go for (at least part-time) freelancing - which would be a great help to some people who are willing to enter in that field.

Sure. I will create a new topic and will my share my story. Hope, this will help others to start their career as a freelance contractor.

Avii Sinha
12 years ago
Hi Ranchers!!

I have 2 years of experience and am working in a CMMI Level V company in Noida(India). I have expertize over Java/JSP/Servlets ( SCJP & SCWCD with good scores), Spring, Hibernate, GWT, GAE, EXT-GWT, EXTJS and other related technologies. I hold a good reputation in my company, have received two awards. I am quite well known for solving critical problems . Apart from my regular job, i am working as a part time freelancer and hold a very good reputation on freelance websites too( shouldn't say part-time as i generally draw much more than what i draw from my company. more than twice. ). I have worked with top notch professionals as a freelancer (to mention : Vice President of J.P.Morgan, Senior Solution Architect AT&T Wireless..).

I had signed a bond of two years with my company and next month i am going to complete my two years.Currently i am getting 3.91lpa and my manager has promised me to give around 30-40% hike and a role change ( Software Engineer to Senior Software Engineer with an additional 8-10% hike ).

But i have already decided to switch my company due to some personal reasons. Also, I am feeling quite tired due to the burden of freelancing over my regular job. so i am going to apply some brakes on it. I can see two options now-
1. can go for full-time freelancing. ( Have got some offers from my clients to work for them from home. They are ready to pay good bucks >$3000/month )
2. can go for a good company with a decent salary.

i just need your help in figuring this out. I am unable to decide it. Also, If i select the second option, how much should i expect ?? will the companies consider my freelancing experience as a valid experience ?

Thanks for your time.. Hope to hear from you soon

Avii Sinha

12 years ago
Hi Santosh,

Please don't create multiple threads for the same problem.

12 years ago

Jeff Verdegan wrote:

avi sinha wrote:Well, I just wanted to add a 'can be true' scenario to make it more clear.

Fair enough.

I probably would have couched it in a more cautionary sense though, along the lines of "While you may sometimes see == giving true for Strings, that's a side-effect of the constant pool. It sometimes misleads people into thinking you can compare Strings with ==, but just like with any other class, you need to use equals() for comparing Strings' contents."

that's why i had added

analyze these lines:

. I wanted the guy to do some research on it.
12 years ago
Hi Martin,

Your comparator is supposed to deal with Rental. In other words, it can be used to sort Rental objects not Integers.

12 years ago
Well, I just wanted to add a 'can be true' scenario to make it more clear.

Thanks anyways Jeff
12 years ago

Jeff Verdegan wrote:
While that's true, it's not really relevant to the question...

Are you sure , it is not relevant? so how are you going to describe the immutability and the need of StringBuilder??

and there's probably no situation in which it's appropriate to test for string1 == string2..


, unless you're the author of the String class and are writing String's equals() method.

I think 'final' is still there... I won't get a chance.

Thanks & Regards
12 years ago

Mario Skrlec wrote:I'm a big newbie to Java and this might be the most simplest code of all codes but I still need help with it.

This is basic code so, please don't tell me exactly whats wrong, give me a hint so i can figure out myself. Thank you!

Hi Mario,

Just to add one more point...I think you are reading the input from the console. The '==' operator here can return true too in case you are matching two literally defined String variable references. The reason is the pooling of String objects.

Just analyze these lines:

12 years ago
Hi Peter,

I think the problem is related to the theme you have inherited. are you using any theme?? ( check your module.gwt.xml)
Also, use firebug to inspect the dialogbox element. The dialog box is right here but the styles are creating issues.

hope this helps.

12 years ago
Hi Peter, why don't you just use the methods of Date class. I think using setTime & getTime, you can achieve the needful.

12 years ago
Hi Rainer,

if the issue still persists, just change the Map to HashMap & List to ArrayList ( or any other implementer which you are using) and give it a try .
Providing concrete datatypes sometimes resolves the serialization issues and also enhances the performance.

12 years ago