[TECH] Rules Engine - Drool

Implement business logic with the Drools rules engine

Use a declarative programming approach to write your program's business logic

Using a rules engine can lower an application's maintenance and extensibility costs by reducing the complexity of components that implement complex business logic. This updated article shows you how to use the open source Drools rules engine to make a Java™ application more adaptive to changes. The Drools project has introduced a new native rule expression language and an Eclipse plug-in, making Drools easier to use than ever before.

Most of the complexities that requirements impose on today's software products are behavioral and functional, resulting in component implementations with complex business logic. The most common way to implement the business logic in a J2EE or J2SE application is to write Java code that realizes the requirements document's rules and logic. In most cases, this code's intricacy and complexity makes maintaining and updating the application's business logic a daunting task, even for experienced developers. And any change, however simple, incurs recompilation and redeployment costs.

A rules engine helps you resolve (or at least reduce) the issues and difficulties inherent in the development and maintenance of an application's business logic. You can think of a rules engine as a framework for implementing complex business logic. Most rules engines let you use declarative programming to express the consequences that are valid given some information or knowledge. You can concentrate on facts that are known to be true and their associated outcomes — that is, on an application's business logic.

Several rules engines are available, including commercial and open source choices. Commercial rules engines usually let you express rules in a proprietary English-like language. Others let you write rules using scripting languages such as Groovy or Python. This updated article introduces you to the Drools engine and uses a sample program to help you understand how to use Drools as part of your business logic

Drools is an open source rules engine, written in the Java language, that uses the Rete algorithm to evaluate the rules you write (see Resources). Drools lets you express your business logic rules in a declarative way. You can write rules using a non-XML native language that is quite easy to learn and understand. And you can embed Java code directly in a rules file, which makes the experience of learning Drools even more attractive. Drools also has other advantages. It is:

  • Supported by an active community
  • Easy to use
  • Quick to execute
  • Gaining popularity among Java developers
  • Compliant with the Java Rule Engine API (JSR 94) (see Resources)
  • Free

http://www.ibm.com/developerworks/java/library/j-drools/

Reference Sites:

SAVE ENERGY ? SAVE MONEY ? REDUCE GREENHOUSE GASES

SAVE ENERGY • SAVE MONEY • REDUCE GREENHOUSE GASES

 

SIX SIMPLE THINGS EVERYONE CAN DO:

 

DURING EACH DAY

 

1. Enable Energy Star or Power Management features on your computer where feasible.

Help save $140,000 and 560,000 kg of carbon dioxide per year by activating Energy Star or power management features on your computer. Energy Star puts the computer into sleep mode after a period of inactivity and is generally activated through screen saver setting panels.

 

2. Turn off the lights when a room is not in use for more than 5 minutes or if there is sufficient daylight.

It is a myth that fluorescent tubes use so much energy upon start-up that it is not worth switching them off.

 

AT THE END OF EACH DAY

 

3. Turn OFF :

• The lights - Few buildings have automatic systems that turn off lights.

• Your computer - If that computer or monitor light is on, it is still using power!

• Your monitor

• Laptops at the powerpoint

• Nearby photocopiers - Measurements have found that many photocopiers and

• Nearby printers - printers save little energy when in "power saver" mode.

 

WHEN WORKING AFTER HOURS

 

4. Light only your area (and access areas).

Light switches should activate selected areas only. Diagrams representing the selected areas should be easy to understand, clearly visible and mounted next to or near the switches in question.

 

5. Minimise air conditioner use. This one action can make a big difference.

 

6. Don't leave lights and equipment running once you have left the building.

Most after hours lighting and air conditioning switches can be used to turn equipment off as well as on.

 

Everyone can have an impact. By doing these simple things, together we can reduce the energy use by 5% ($1.5 million pa) and carbon dioxide emissions by 6 million kilograms every year.

Programmer's Jokes

Top Replies by Programmers when their programs don't work :

  • "That's Weird...
  • "It's never done that before.
  • "It worked yesterday.
  • "How is that possible?
  • "It must have a hardware problem.
  • "What did you type in wrong to get it to crash.
  • "There is something funky in your data
  • "I haven't touched that module in weeks!
  • "You must have wrong version.
  • "It's just some unlucky coincidence.
  • "I can't test everything!
  • "THIS can't be the source of THAT.
  • "It works, but it's not been tested.
  • "Somebody must have changed my code.
  • "Did you check for a virus on your system?
  • "Even though it doesn't work, how does it feel? "You can't use that version on your system.
  • "Why do you want to do it that way?
  • "Where were you when the program blew up?
  • "I thought I fixed that.
  • "This is not a bug,it's undocumented feature.

How to Cure Yourself of Nice-Guy Syndrome

http://www.ehow.com/how_2111845_cure-yourself-nice-guy-syndrome.html

How to Cure Yourself of Nice-Guy Syndrome
Step1
Acknowledge that you are out of balance. You could use a little machismo and if it's been awhile since you've been with a woman, you need that machismo immediately.
Step2
Write a list of attributes you'd like to cultivate, and make sure nice is not one of them. Nice is not a compliment. Nice is a four-letter word. Instead of striving to be a nice person, strive to be a confident, passionate, steadfast, generous, observant, forthright, loving, strong, charismatic person.
Step3
Get physical. Back away from your computer screen. Put down that joystick. Run, study martial arts, lift weights, build a house, ride a horse, play drums. These activities will help you get in touch with the raw, physical energy that is an essential element of a well-rounded man.
Step4
Become a sexual creature. Nice guys often have an androgynous quality about them. They do nothing to fuel that sexual tension that makes relationships between men and women so layered and juicy. Learn to give good hugs. Take a dance class where you will be close to women. Flirt everyday. Get comfortable in your body and with yourself as a sexual creature.
Step5
Just say no to women friends. Of course you don't need to get rid of your lady friends altogether, but if you aren't having as much romantic encounters as you'd like then you certainly don't need any more female friends. You need romantic interests. You need dates. The next time you meet a woman who strikes your fancy, don't try to be her friend first. Women rarely end up with their nice guy friends.
Step6
Practice flirting every day.
Step7
Cultivate deep interests. It goes without saying, a man with nothing going on will never getting it going on.
Step8
Stand your ground. If you have an opinion, state it. If you are angry, show it. If you think she is acting ridiculous, call her on it. Contrary to what many nice guys might think, women are not looking for a man to indulge her every emotion. We want a man who is grounded, assertive and isn’t afraid to call us on our bullshit now and again.
Step9
Seek input from women who make you hot. If you’re into a lady and she’s into some other guy, ask her what it is she likes about him. What does she find attractive? What is her standard type? Many nice guys take most of their clues about what women want from listening to women complain about men-they are too aggressive, are emotionally available, don’t call enough; instead of finding out what women like about the men they like.
Step10
Choose a role model. Who are the men you admire? What men seem to have it all? Study all aspects of their personality and define what makes them a well-rounded man. What can you learn from them?

'Brain decline' begins at age 27



Mental powers start to dwindle at 27 after peaking at 22, marking the start of old age, US research suggests.


" The natural decline of some of our mental abilities as we age starts much earlier than some of us might expect "

"In nine out of 12 tests the average age at which the top performance was achieved was 22. The first age at which there was any marked decline was at 27 in tests of brain speed, reasoning and visual puzzle-solving ability."

What is recession?

What is recession?

This story is about a man who once upon a time was selling Hotdogs by the
roadside. He was illiterate, so he never read newspapers. He was hard of
hearing, so he never listened to the radio. His eyes were weak, so he never
watched television. But enthusiastically, he sold lots of hotdogs. He was
smart enough to offer some attractive schemes to increase his sales. His
sales and profit went up. He ordered more a more raw material and buns and
sold more. He recruited more supporting staff to serve more customers. He
started offering home deliveries. Eventually he got himself a bigger and
better stove. As his business was growing, the son, who had recently
graduated from college, joined his father.





Then something strange happened.





The son asked, "Dad, aren't you aware of the great recession that is coming
our way?" The father replied, "No, but tell me about it." The son said,
"The international situation is terrible. The domestic situation is even
worse. We should be prepared for the coming bad times."





The man thought that since his son had been to college, read the papers,
listened to the radio and watched TV. He ought to know and his advice
should not be taken lightly.. So the next day onwards, the father cut down
the his raw material order and buns, took down the colourful signboard,
removed all the special schemes he was offering to the customers and was no
longer as enthusiastic. He reduced his staff strength by giving layoffs.
Very soon, fewer and fewer people bothered to stop at his Hotdog stand. And
his sales started coming down rapidly and so did the profit. The father
said to his son, "Son, you were right. We are in the middle of a recession
and crisis. I am glad you warned me ahead of time."





Moral of the Story: Its all in your MIND! And we actually FUEL this
recession much more than we think.

Good or Bad

Every person may not be good, 
but there is always something good in every person. 

Never judge anyone because every saint has a past and every sinner has a future.

[Good Sayings] dare to be different !

Others laughed, because I am Different. 
I laughed because all are same….

- "Swami Vivekananda"

Dare to be Different !

How Rahman composes a Melodious Tune

How Rahman composes a melodious tune

1. Rahman gets an offer from the director , and he studies the script everything . If he likes it then he agrees else he drop down the offer
2. Then he sees the actor/actress and accordingly determines the singer.
3. Rahman asks the director to give the exact situation of the song and why it is needed. If he is satisfied, then he proceeds.
4. Then Rahman sits and composes the song on his own and in his voice records every song.
5. Calls the singers after 12 am in the night [Mark it only after 12 am] and makes them hear the tunes.
6. Recording starts . He never modifies the song as per the singer but he modifies the singer as per the song .
7. Every sound in the studio is recorded even if a singer sneezes or coughs it is recorded and it is edited . If u remember in Kadhal Virus there is a song by Mano~ O Kadhale. There he coughs at one part. He had coughed it in the first day and then Rahman never got any realistic cough after that so he simply included the original cough.
8. A song recording goes upto 3-4 days . Sometimes male and female singers are recorded differently and then successfully mixed
9. After the vocal is over music starts . He gives his idea to his musicians and then the musicians suggest the background tune . 90% times Rahman doesn't like them and then he himself gives them notes and the musician have to play them. Few songs however had tunes inspired by his musicians like his flutist Naveen and drummer Sivamani. The musicians love ARR since he gives them freedom and helps them grow their talent .
10.Later the vocal is added to music or vice versa and then comes the technical part. Every interfaces start working , every part is edited , reedited and software are used and lets not get much into it ,but by the time a song is finalized it is one month and the best version is out. Some say he uses technology, but come to his studio you will know he uses technology only to polish stuffs.
http://rahmaniac.wordpress.com/2008/06/28/how-a-r-rahman-composes-a-tune-for-his-film/