Pages

Thursday, July 31, 2014


19 Top Tools for Java developers


shutterstock_124013509_javagears
It’s as true for Java developers as it is for woodworkers: You can’t do the job right without the right tools. Fortunately, there are plenty of Java tools designed to make it significantly simpler to write good Java code — and help you make your Java code even better.
You’ll probably know many of the tools on this list of 18 choices, but others may be new to you. And odds are you haven’t tried them all yet!
  1. GradleBuild tool. Automates the building, testing, publishing, deployment, and more of software as well as generating static websites or documentation.
  2. EclipseOpen-source integrated development environment (IDE). If you could have just one tool for Java development, Eclipse would be a good choice.
  3. IntelliJIDE made by JetBrains, available in an Apache 2-licensed community edition and a commercial edition. IntelliJ provides similar features to Eclipse, with a smooth, developer-friendly experience.
  4. YourKitJava profiler. Combines powerful analysis capabilities, on-demand profiling during both development and production, free embedding into production, and seamless IDE and application server integration.
  5. Clover: Code coverage tool from Atlassian. Runs in your IDE or continuous integration system, and includes test optimization to make tests run faster and fail sooner.
  6. MockitoMock library. Open-source testing framework that enables the creation, verification, and stubbing of mocks.
  7. Jetty: Lightweight, embeddable app server.
  8. Hibernate: Object-relational mapper. Implements the Java persistence API.
  9. VisualVMJVM monitor. An all-in-one Java troubleshooting tool that comes with the JDK.
  10. JUnit: Unit test framework. Core tool of test-driven development that enables repeatable, white-box testing.
  11. Jenkins: Continuous integration tool. Customizable with more than 600 plugins.
  12. Spring Boot: Spring application development system. Works in your build system. Supports Gradle and Maven.
  13. Guice: Lightweight dependency injection/inversion of Control (IoC) framework, from Google.
  14. Guava: Utility library. Contains core libraries that Google relies on in Java-based projects: collections, caching, primitives support, concurrency libraries, common annotations, string processing, I/O, and so forth.
  15. FindBugs: Static code analyzer. Classifies potential errors in code as scariest, scary, troubling, or “of concern.” Available as a standalone GUI or as a plugin for Eclipse, NetBeans, IntelliJ, Gradle, Hudson, and Jenkins.
  16. Jackson: JSON parser. Aims to be fast, correct, lightweight, and ergonomic for developers.
  17. Snappy:Compression/decompression library from Google Code. A great resource when speed is a requirement.
  18. JD-GUI: De-compiler. Standalone graphic utility that displays source codes of “.class” files. Free for non-commercial use (i.e., can’t be included or embedded in commercial products).
  19. Oracle-J Developer-GUI: Oracle JDeveloper is a free integrated development environment that simplifies the development of Java-based SOA and Java EE applications. JDeveloper offers complete end-to-end development  to Oracle Fusion Middleware and Oracle Fusion Applications with support for the full development life cycle.

Wednesday, July 23, 2014

Can switching to LPG or CNG damage your car's engine?
Always Center raised petrol prices while leaving diesel and compressed natural gas (CNG) untouched. After the hike, a liter of petrol in New Delhi cost Rs 73.60.
If you are a petrol car owner, the hike has definitely turned your monthly fuel budget topsy-turvy. But while you cannot reduce fuel prices, you can bring down your monthly fuel expenses. Here we list the various options at your disposal.
MORE MILES PER LITER
Even if you don’t want to convert to CNG or switch over to a diesel car, you can still cut down on your fuel expenses. Here’s how.
- Cut off the engine if the stoppage time at the traffic intersection is more than a minute.
- Keep tyre pressure at correct level. Over inflating can help, but more than 1-2 psi could affect the car’s handling and braking.
- Fill fuel in the morning when it is densest.
- If the car is parked in the sun for long, run the air-conditioner with the windows open for a minute or two and then close them and run the a/c in re-circulation mode. The hot air will escape faster without the air-conditioner having to cool it, thus reducing the load on the car engine. Keep the temperature inside the cabin at 24 degrees. Don’t chill the interiors. 
- Avoid sudden acceleration and braking while driving.
You can either convert your existing car to run on CNG or liquefied petroleum gas (LPG), or opt to buy a diesel car. 
But exercising either option will entail substantial funding. So you need to calculate the expenses of installation and registration (in case you switch over to CNG or LPG) or the additional fund required to buy a diesel car over a petrol version. 
CONVERTING TO CNG OR LPG
While several theories suggest that they damage the car’s engine, none of these have been proven. But what has been established is that running a car on CNG or LPG results in a drop in power output by 10-15 per cent.
But do ensure that you install an LPG or a CNG kit at an authorized outlet, preferably one owned or authorized by the car manufacturer. Badly installed sub-standard kits could lead to an explosion or a fire. 
Otherwise, you can even buy a car with a factory-fitted CNG kit. But keep in mind that the number of CNG or LPG stations are far fewer than petrol pumps, so do consider the waiting time you have to spend each time you decide to tank up.
CALCULATION
Fill up the tank, note the odometer reading and drive for around 200 km. If you have you have to fill up the tank with say, 15 liters of petrol, then the fuel efficiency of your car is 13.33 km/pl.
Now petrol costs Rs 73.6 per liter, so your per kilometer travel will cost Rs 73.6 / 13.33 or Rs 5.52
Find out the average running cost of LPG or CNG from other users or company claims. Add another 10-15 per cent to the information claimed. Suppose the running cost is Rs2 per km. So, your saving will be Rs 3.27 per km.
Suppose if installation and registration cost of the converted car comes to Rs30,000, then you need to run the car for 30,000/3.27 or  9,174 km to offset the cost. Beyond that you will gain in terms of running cost every kilometer. So, if you plan to change before logging that many kilometers, it makes sense not to go for a retrofit.
For LPG kit also, do the same calculation
DIESEL VS PETROL CARS
A few car owners Outlook Money spoke to said they had stopped using their petrol cars and were thinking of buying a diesel car. 
“I have a diesel Indica and a petrol SX4. I don’t use the SX4 anymore. If I need two cars, I will sell off the SX4 and buy a diesel car,” says Saugat Mahapatra, who lives in New Delhi. 
“I have a petrol car, but I don’t use it regularly, so I don’t see any need to convert it to CNG. If I need a car for regular use, I will have to buy a diesel car,” says Sandeep Singh, an owner of a Zen Estilo. 
However, not only do diesel cars cost more, even their maintenance is costly, so unless you drive it regularly, it could as well become your white elephant.
CALCULATION
Calculate the number of years you intend to retain the car, say 5 years, and the total kilometres the car will clock in a year, say 20,000 km.  So, in five years the car will run  100,000 kms.
Suppose your chosen diesel car gives a city mileage of 16 km/pl, so the total fuel consumption in five years will be 6,250 litres. The fuel cost in five year will come to 6,250 x Rs 41 or Rs 2,56,250 and for a petrol car, it will be   Rs 4,39, 000
So, the price difference between running a diesel and a petrol car comes to Rs 1,82,750.
Diesel cars usually cost Rs1 lakh more and servicing and maintenance is expensive by 25 per cent (say Rs20,000 more) So the effective gain will be Rs62,750.
Also consider the resale value of your car. Typically, in five years, a Rs5-lakh petrol car will sell for Rs2.5 lakh and a Rs6-lakh diesel for Rs3 lakh.
But diesel cars are now fetching a premium in the used car market and petrols are going for a discount (Say this is 5 per cent). So the monetary gain after factoring them in will be Rs3,15,000-Rs2,37,500. So, the total monetary benefit of a diesel over 
5 years will be Rs62,750 + Rs77,500 or Rs1,40,250.
There are other non-monetary factors too like driving ease (e.g., fewer number of gear shifts  while driving in slow traffic) and efficiency of air-conditioner). Largely, diesel scores on both counts.
With the price differential between petrol and diesel at around Rs30 per litre, financially, you would be better off with a diesel if you plan to run the car more than 35,000 km or so if you are talking about A, B or C segment cars.
WHAT’S ON OFFER 
Petrols are off buyers’ radar, so Sutirtha Sanyal went discount-hunting for them at dealerships 
MARUTI SUZUKI Alto, Wagon R Rs30,000 , SX4 Rs40,000
VOLKSWAGEN Polo Free Insurance + (2-year Maintenance Package (Rs25,000) 
Vento (Free stereo + exchange offer) or Free insurance + maintenance for topmost model
TATA MOTORS Indica Rs10,000-25,000, Indica Vista, Indigo Rs40,000, Indigo Manza
Rs15,000-35,000
HYUNDAI Santro Insurance + Rs6,000  + Rs2,950 (Petrol discount) i10 Insurance + Rs10,000 + Rs2,650 , i20 Rs2,850, Accent Rs10,000 + Rs3,200, Verna Rs3,100
CHEVROLET 
Spark, Beat, Aveo Free Insurance + 3-year maintenance
SKODA Fabia Rs15,000
NISSAN Micra Rs15,000
FORD Figo Insurance discount
The list is not exhaustive; discounts on offer at some dealerships at the time of going to press.

Tuesday, July 8, 2014

Exercises to Minimize Back Pain
Working for long hours in a cramped, sedentary work space taxes your spine, making most men prone to backaches. Try these simple exercises to reduce backaches in no time at all.
The increasing pressure of work life leaves little room for personal grooming and exercise.
Working for long hours, on a cramped sedentary work space, taxes your spine, making most men prone to backaches. The following article will provide a list of simple exercises that will reduce backache in no time.
1. Wall Slides
This exercise will help strengthen your knees and legs. Stand straight with your back against the wall and your feet apart by 1 foot.
a. With your back still touching the wall, slide down and bend your knees as you go. While sliding down count to five till your knees are at a 45 degree angle. Take care not to strain your knees. If you feel any discomfort in your knees, stop immediately.
b. Remain in this position for at least five seconds.

c. While counting to five, slide up the wall and straighten your knees to the starting position.
d. Repeat the above steps five times more. This exercise should be done 3 times a day for a week to be able to provide some relief.

2. Leg Raises

This exercise concentrates on your leg, hip and calf muscles and will help take the weight off the posture, off the spine.

a. Spread a yoga mat on the floor and lie down flat on your stomach.
b. Lift one leg off the ground.
c. Hold it in this position for at least 10 seconds. You will feel your thighs, buttocks, calves and hip muscles tighten.
d. Exhale while you gradually set your foot down on the floor again. Rest for 5 seconds.
e. Repeat this process with the other leg.
f. Practice this exercise 5 more times and do it 3 times a day.

3. Supine Leg Raise 
This helps in strengthening the spinal column and thigh muscles.

a. Spread a yoga mat on the floor and lie down with your back on the floor.
b. Lift one leg two feet off the ground.
c. Hold it in this position for at least 10 seconds.
d. Exhale while gradually setting the raised foot down on the floor. Rest for 5 seconds.
e. Repeat this process with the other leg.
f. Practice this exercise 5 more times and do it 3 times a day.

Say goodbye to backaches forever!

4.Pay attention to your posture:
This cannot be said enough. Slouching, sitting on sofas which do not offer firm support to the back and sleeping in an awkward position may give you a stiff back the next morning. Reclining in a chair without support to the lower back in the form of a cushion is a no-no. Sleeping on the side in the fetal position is the best way to take the pressure off a weak back.



Do you have a desk job? Then this workplace ergonomics article is a must for you.

5. Semi Sit-ups: 

This eases the tension in the spine by helping it stretch.
a. Lie flat on a yoga mat with your knees bent and your feet on the ground. Keep your arms underneath your head and your elbows parallel to the floor.

b. Only lift your head and shoulders off the floor and try to touch the knees with your nose.

c. Hold it for at least 10 seconds.

d. Exhale while gradually lying back on the floor to your starting position. Rest for 5 seconds.

e. Practice 5 more times and do it 3 times a day.

6. Standing Back Stretch 

This exercise is said to relieve the pressure from the spine and reduce backaches significantly.
a. Stand straight with your feet apart by 1 foot.

b. Place the palm of your hand on your lower back.

c. Inhale deeply while you gradually bend back and keep your knees straight. Take care not to strain your back too much.

d. Hold this position for 5 seconds.

e. Exhale and slowly return to your upright position.

f. Practice 5 more times and do it 3 times a day.

7. Hip Rolls 

This exercise concentrates on the hip muscles.
a. Stand straight with your feet apart and put your hands on your hips.

b. Slowly move your hips in a circular clockwise motion. Make sure that you only move your hips and not the whole body.

c. Do this for 10 counts.

d. Now move your hips in the anti-clockwise direction.

e. Continue with this movement for 10 counts.

f. Practice 5 times more and do it 3 times a day.

8. Knee Lunges: 

This exercise will strengthen spine, knee and thigh muscles. 
a. Stand straight with your left leg in front of your right.
b. Bend your knee forward gradually keeping your right leg straight and your left knee directly in front of your left foot.

c. Hold for 10 seconds.

d. Gradually move back to your starting position.

e. Repeat with your right leg.

f. Practice this routine 5 more times and do it 3 times a day.

9. Mid Back Stretch 

This exercise will ease the hip muscles and do away with any strains whatsoever. 
a. Stand straight with your feet apart and hands on your hips.
b. Gently twist to your left at the waist, going as far as permitted. Try to look over your shoulder and do not change the position of your feet.

c. Hold for 10 seconds.

d. Gradually twist back to your starting position. Rest for 5 seconds.

e. Repeat for the other side.

f. Practice 5 more times and do it 3 times a day.


By regularly performing these exercises, you will be able to keep your spine in excellent condition and backaches at bay.

भय ही प्रबल है।

दो उल्लू एक वृक्ष पर आ कर बैठे। एक ने साँप अपने मुँह में पकड़ रखा था।  दूसरा एक चूहा पकड़ लाया था।  दोनों जैसे ही वृक्ष पर पास-पास आकर बैठे।...