Tuesday, June 29, 2010

Java Tips.

Java Tips.

Are you smart enough ???

This time, I want to share some tools and overview knowledge with you.

You may be developer or debugger or coder or whatever ... but you may have to write so-called rubbish coding ...
First, please try to develop in OO way.
Don't think it is too restrict to do something as you wish to do in another way.
Always be OO.

Don't write 4500 lines of code in one class as most of the terribly terrible, stupid and air-head developers always code their program.
Try to think as a guy whose IQ is 30.
You cannot do so much.
So divide and conquer one by one.
Am I clear for this.

Let's say you want to create a payment system.
I need 1004 different methods.
Please don't put even two methods in one class.
Try to use interface to group properly.
I hope you will not be so impatient type like me.
Be patient. And it can save time later.

Think and think and think first.
Thinking can take time but it can be lesser than re-do process. Don't overlook anything.
Your code will be compact and will become monkey-proof soon.
I write the monkey proof codes for a year. I hate the tester says ...he still can input nonsense data.
So use properly for your checking classses and package it as a util pakage. And can use that util thoroughout your life as the poor man plow his or her fields with the same plow.

What I wanna highlight is to follow the standard. It can be difficult to say which standard you have to follow. Please don't make your standard higher than your current company's standard. Let them suffer their pain. Don't waste your valuable time for standardizing company's CVS and standard procedures better than the current one.

Let's say for Agile Development, you may need very good plan for testing. Otherwise, the development will be failed in no time. Very good architects can guess within 10 mintues which architectures they should choose for which projects. Don't work together with the architect who thinks he sees too much ....:) .. It is better sucide yourself in order to fulfil impossible deadlines.

Please check your man day rate also. Let's say, if your man day rate is 800SGD or 2000SGD . If they gives you 5 mandays and they charged the client 20000 SGD. Write your code as worse as possible and told them ... time constriant can drive me crazy .... :) ....

What I wanna mention is try to be fair your skill and mandays.
Don't overdo.
It can be hazardous to your health. OK?

Another important things for all developers are that don't let the team lead know how much you can do .... Please save your time in this way ... If you can do x amount, they will give you x+1 amount of jobs. So try to maintain your performance in 70 at most. Don't use if not neccessary. But I suggest to learn for betterments of yourself. If will lead your life happy, joyous and peaceful ...:) And I want to let you know don't stick around on old technology and tools. Explore more and you will find easier way. Try to learn about power tools that can double up your development speed. I found middle-gen to generate out Hibernate Mapping in 20 minutes ...which can take more than 2 hours + in traditional way. But don't inform to your company which toolyou are using now ...

And don't never, ever write the boiler plate code that can crash your whole sever or system withing a few minutes to 2 or 3 days. I cursed a lot for the previous collegue for those kinda codes. I hate to fix these things. Sometimes, they never close the method properly. After two or three years when the DB is fat enough and these untidy boiler plate codes make the system crash frequently. It is not easy to track down. Don't be unhappy to read boring forum discssions on various issues and try to contribute what you had learnt and exercised.

I encourage you to read the Java Standards and try to read optimization for coding. It can improve your coding skills so much.

And please always keep in mind Java is OO, so please think in OO ways. Don't do in traditional ways that will stack your enhancement and will affect your OO design.

Think smart ...
is better than work hard without knowing anything.
In deed if you had thought carefully and well-rounded from different points of views ...., the development is as easy as ABC, or as drinking the banna juice......

Good Luck, mate ....!!!

With Regards,

No comments: