[by Prof. Stephen Covey]
Our character is a composite of our habits. Changing habits is hard,but can be done by tremendous commitment. A (good) habit can be definedas the intersection of knowledge, skill and desire. Change is a cycleof being and seeing (visualization)
Our objective is to move progressively on a maturity continuum fromdependence to independence to interdependence. Although independence isthe current paradigm of our society, we can accomplish much more bycooperation and specialization. However, we must achieve independencebefore we can choose interdependence.
Habit 1: Be Proactive
The first and most basic habit of a highly effective person in any environment is the habit of proactivity. Being proactive means that as human beings, we are responsible for our own lives. Our behavior is a function of our decisions, not our conditions. We can subordinate feelings to values. We have the initiative and the responsibility to make things happen.
Look [at] the word responsibility-response-ability-the ability to choose your responses. Highly proactive people recognize that responsibility. They do not blame circumstances, conditions, or conditioning for their behavior. Their behavior is a product of their own conscious choice, based on values, rather than a product of their conditions, based on feeling. The opposite of proactive is reactive.The spirit of reactive people is the transfer of responsibility. Their language absolves them of responsibility. Proactive people focus their time and energy on their Circle of Influence (things they can control)in lieu of reacting to or worrying about conditions over which they have little or no control (Circle of Concern). In so doing, proactive people use positive energy to influence conditions and increase their Circle of Influence.
Habit 2: Begin with the End in Mind
To begin with the end in mind means to begin each day with a clear understanding of your desired direction and destination. By keeping that end in mind you can make certain that whatever you do on any particular day does not violate the criteria you have defined assupremely important, and that each day of your life contributes in a meaningful way to the vision you have of your life as a whole.
Begin with the end in mind is based on the principle that all things are created twice. There's a mental or first creation and a physical or second creation. The second, or physical creation, follows from the first, just as a building follows from a blueprint. In our personallives, if we do not develop our own self-awareness and become responsible for first creations, we empower other people and circumstances to shape our lives by default.
Leadershipis the first creation. Management is the second creation. Management is a bottom line focus: How can I best accomplish certain things? Leadership deals with the top line: What are the things I want to accomplish? In the words of both Peter Drucker and Warren Bennis, "Management is doing things right; leadership is doing the right things." Management is efficiency in climbing the ladder of success; leadership determines whether the ladder is leaning against the rightwall.
Habit 3: Put First Things First
What are first things? First things are those things that you, personally, find most worth doing. They move you in the right direction and help you achieve the purpose expressed in your mission statement.
Put First Things First involves organizing and managing time and events according to the personal priorities established in Habit 2(Begin with the End in Mind). Habit 2 is the first or mental creation. Habit 3, then, is the second,or physical creation. It's the day-in, day-out, moment by moment doing it.
Habit 4: Think Win-Win
In relationships and businesses, effectiveness is largely achieved through the cooperative efforts of two or more people. Marriages and other partnerships are interdependent realities, and yet people often approach these relationships with an independent mentality, which is like trying to play golf with a tennis racket-the tool isn't suited to the sport.
Most of us learn to base our self-worth on comparisons and competition. We think about succeeding in terms of someone else failing. That is, if I win, you lose. Or if you win, I lose. There is only so much pie and if you get a big piece there is less for me. People with this type of Scarcity Mentality find it difficult to share recognition and power, and to be happy for the successes of others, especially those closest to them.
Win-Win, on the other hand, is based on the paradigm that there is plenty for everybody, that one person's success is not achieved at the expense or exclusion of the success of others. Win-Win sees life as a cooperative, not a competitive arena. Win-Win is a frame of mind and heart that constantly seeks mutual benefit in all human interactions. Win-Win means that agreements or solutions are mutually beneficial and satisfying.
Habit 5: Seek First to Understand, Then to Be Understood
Communication is the most important skill in life. We spend most of our waking hours communicating. But consider this: You've spent years learning how to read and write. Years learning how to speak. But what about listening? What training or education have you had that enables you to listen so that you really, deeply understand another human being from that individuals' own frame of reference?
Seeking first to understand, or diagnosing before you prescribe, is a correct principle manifest in many areas of life. A wise doctor will diagnose before writing a prescription. A good engineer will understand the forces, the stresses at work, before designing the bridge. An effective salesperson first seeks to understand the needs of the customer before offering a product. Similarly, an effective communicator will first seek to understand another's views before seeking to be understood. Until people feel properly diagnosed they will not be open to prescriptions.
We typically seek first to be understood. Most people do not listen with the intent to understand; they listen with the intent to reply. They're either speaking or preparing to speak. They're filtering everything through their own paradigms, reading their autobiography into otherpeople's lives.
Habit 6: Synergize
Synergyis everywhere in nature. The intermingled roots of two plants growing closely together improve the quality of the soil. Two pieces of wood bonded together hold much more than the total of the weight held by each separately. The whole is greater than the sum of its parts. One plus one equals three or more.
The principle of synergy also holds true in social interactions. Two people, creatively cooperating, will be able to produce far better results than either one could alone. Synergy lets us discover jointly things that we are much less likely to discover by ourselves. It occurs when minds stimulate each other and ideas call forth ideas. I say something that stimulates your mind; you respond with an idea that stimulates mine. I share that new idea with you, and the process repeats itself and even builds.
Synergy works. It is the crowning achievement of all the previous habits. It is effectiveness in an interdependent reality-it is teamwork, team building, the development of unity and creativity with other human beings.
Valuing the differences is the essence of synergy-the mental, the emotional,the physiological differences between people. And the key to valuing those differences is to realize that all people see the world, not as it is, but as they are. When we value differences and bring different perspectives together in the spirit of mutual respect, people then feel free to seek the best possible alternative, often the Third Alternative, one that is substantially better than either of the original proposals. Finding a third alternative is not compromise, but represents a Win-win solution for both parties.
Habit 7: Sharpen the Saw
Habit 7 is the habit that makes all the others possible. Sharpen the Saw means preserving and enhancing the greatest asset you have-you. It means having a balanced, systematic program for self-renewal in the four areas of our lives: physical, mental, emotional-social, and spiritual. Without this discipline, the body becomes weak, the mind mechanical,the emotions raw, the spirit insensitive, and the person selfish.
This is the single most powerful investment we can ever make in life-investment in ourselves, in the only instrument we have with which to deal with life and to contribute. Yet when people get busy producing, or sawing, they seldom take time to Sharpen the Saw because maintenance seldom pays dramatic, immediate dividends.
This daily Private Victory is the key to the development of the Seven Habits, and it's completely within our control. Renewal is the principle and the process that empowers us to move on an upward spiral of growth and change, of continuous improvement.
Sunday, June 27, 2010
Wednesday, June 16, 2010
Blackberry: Compose Email Programmatically
In a 3rd party app for BlackBerry, in some cases, you may want to launch the internal applications like Emails, SMS, AddressBook, etc. in the running process of your 3rd party app. There are two procedures I tried, in which the first one works (High Five to BlackBerry API) and the second one need to be hacked more (an interesting area to explore when you want some fun). In this article, we will make an example of getting access to Message Apps.
1. The Bright Road
BlackBerry API provides the class Invoke (in package net.rim.blackberry.api.invoke) which allows third-party applications to remotely invoke internal applications. The way how to use it is as follows:
Under Class Invoke, there is a method:
public static void invokeApplication
(int appType,applicationarguments args)
in this method, the parameter int appType has the following options:
APP_TYPE_ADDRESSBOOK
APP_TYPE_BLUETOOTH_CONFIG
APP_TYPE_CALCULATOR
APP_TYPE_CALENDAR
APP_TYPE_CAMERA
APP_TYPE_MAPS
APP_TYPE_MEMOPAD
APP_TYPE_MESSAGES
APP_TYPE_PHONE
APP_TYPE_SEARCH
APP_TYPE_TASKS
Here we use APP_TYPE_MESSAGES and an instance of MessageArguments class as parameters in this method.
What you need to do is, in your app procedure, you need to write this code in invokeLater(). Here is an example:
UiApplication.getUiApplication.invokeLater(new Runnable()
{
public void execute(){
Invoke.invokeApplication
(Invoke.APP_TYPE_MESSAGES, new MessageArguments(...));
}
});
[References]
http://www.blackberry.com/developers/docs/5.0.0api/net/rim/
blackberry/api/invoke/package-summary.html
2. The Dark but Adventurous Road
While in the Message App, write this code:
String URL = ApplicationDescriptor.currentApplicationDescriptor.
getModuleName+"?"+"saved";
ApplicationManager.getApplicationManager.launch(URL)
So far, what I know about the parameters in Message apps are 'saved' (which lead you to the saved messages folder), 'search' and 'searchinit'. I believe there are some non-revealed args like 'compose', 'reply', etc. to be found!
[Reference]
(1). ApplicationDescriptor:
http://www.blackberry.com/developers/docs/4.6.0api/net/rim/
device/api/system/ApplicationDescriptor.html
(2). ApplicationManager:
http://www.blackberry.com/developers/docs/4.6.0api/net/rim/
device/api/system/ApplicationManager.html
Hack it! Enjoy it!
Saturday, June 12, 2010
BlackBerry Emails: Detect Email Contents in Apps
In your BlackBerry applications, sometimes you may want to 'intrude' on users' emails. For example, you may want to check the users' typings of keywords in the emails to trigger some feature you designed. Here is the way to get the email content in your application.
[Procedure]
Step 1: Create ViewListenerExtended and add it to Session
You need a ViewListenerExtended to listen the actions of 'Open', 'Close', 'Compose', 'Reply' and 'Forward' Emails. Here, ViewListenerExtended is an interface, you need to override the methods. For example, if you want to detect the moment when the user is composing the email, you need to override the method 'void newMessage (MessageEvent e)'. See Step 2.
Additionally, use Session.addViewListener([the listener you created]) to add the ViewListener in to the application.
Step 2: Override the methods in ViewListenerExtended
In the methods, if you want to get to the email contents, you need to find the manager which contains the email TextField. Here are the sub-steps you need to follow:
(1). Get the Current Email Screen
//Screen Type: net.rim.device.apps.internal.blackberryemail.email.EmailEditorScreen
Screen currentScreen = UiApplication.getUiApplication().getActiveScreen()
(2). Get the VerticalFieldManager from the Email Screen
//Manager Type:
net.rim.device.apps.internal.blackberryemail.email.EmailEditorScreen
$BodyVerticalFieldManager
$BodyVerticalFieldManager
VerticalFieldManager bodyManager = (VerticalFieldManager) currentScreen.getField(i);
(3). Get the Email TextField from the Manager
//TextField Type: net.rim.device.api.ui.component.ActiveAutoTextEditField
emailTextField = (ActiveAutoTextEditField) bodyManager.getField(j);
Step 3: Add FieldChangeListener on Email Text Field to detect the changes in Emails
(1). Create class to implement FieldChangeListener
(2). Override method 'fieldChanged' in your class
(3). Add your class to Email Text Field you got from Step 2.
You should be able to detect the email contents and trigger your desired features now. Enjoy!
Monday, June 7, 2010
BlackBerry API: ApplicationMessageFolder
BlackBerry ApplicationMessageFolder
From BlackBerry JDE API 4.6.0, BlackBerry applications can create custom messages and folders that are visible in the message list. An application can create an ApplicationMessageFolder that contains messages that the application creates. When an application adds an ApplicationMessage to a folder, the folder appears in the message list. A BlackBerry device user can open and view the custom message in a screen of the application that contains contextual information for the message.
Key Steps of Using Application Folder:
1. Register Folder
Class: ApplicationMessageFolderRegistry
In this class, call the method:
registerFolder(long folderId, String folderName, ReadableList collection)
to register a folder. The tricky part is the ReadableList collection. Since ReadableList is an interface which is implemented by UnsortedReadableList class, so here, it is safe to use UnsortedReadableList to store the ApplicationMessages.
Also a note here is, if you store the ApplicationMessages in a Vector, here you need to call:
UnsortedReadableList.loadFrom(Vector)
2. Implement Interface ApplicationMessage
long timestamp
String contact
String subject
int type (optional)
int status (optional)
2. Add/Remove ApplicationMessage to/from ApplicationFolder
In the class of ApplicationMessageFolder, there are two useful methods:
fireElementAdded(ApplicationMessage msg)
fireElementRemoved(ApplicationMessage msg)
3. Customize MenuItems for ApplicationMessage
The class of ApplicationMenuItem ensures us to create our own menu items. What we need to do is to inherit the constructor from super(int), in which the 'int' indicates the position of the item in the menu.
Interestingly, the place to register the menu items is not the ApplicationMessageFolder or the ApplicationMessage, but ApplicationMessageFolderRegistry. The method is:
registerMessageMenuItems(int type, int status, ApplicationMenuItem [] menuItems)
Here the type and status are referred to the specific type ApplicationMessage, For example, incoming message type can have View and Reply actions while outgoing message can have View action only.
4. Run(Object o) method in ApplicationMenuItem
If you register the ApplicationMenuItem from Step 3, then the Object o in method Run(Object o) is the instance of the selected (focused) ApplicationMessage, which you can get the information from.
Good Reference:
http://rim.lithium.com/t5/Product-Management-The/
Discussion-Application-Messages-API/m-p/75783
ApplicationMenuItem:
http://www.blackberry.com/developers/docs/4.6.0api/net/rim/
blackberry/api/menuitem/ApplicationMenuItem.html
ApplicationMessageFolder:
http://www.blackberry.com/developers/docs/4.6.0api/net/rim/
blackberry/api/messagelist/ApplicationMessageFolder.html
ApplicationMessageFolderRegistry:
http://www.blackberry.com/developers/docs/4.6.0api/net/rim/
blackberry/api/messagelist/ApplicationMessageFolderRegistry.html
Saturday, June 5, 2010
Run Two BlackBerry Simulators to Send and Receive SMS
If you are using ANT tools for compiling your Blackberry apps like me, then this question may pop up to your head before: How to configure .XML file to run multiple simulators to test SMS?
This is actually really simple. In your compile file (.xml), in the section of 'run simulator' (path of one simulator), set the following parameter as:
/sms-source-port=5000 /sms-destination-port=5001 /phone-number=18881234567 /pin=0x2100000B
in the section of 'run simulator2' (path of the other simulator), set the following parameter as:
/sms-source-port=5001 /sms-destination-port=5000 /phone-number=18881234568 /pin=0x2100000B
Notice here that the two simulators (fledge.exe) should be in different directories. After these settings, you should be able to run two simulators and send SMS to each other.
However, I found that BlackBerry simulators are not very reliable on tracking the outbound SMS, so I suggest that always be ready to use real device for testing although that may take longer.
Cheers!
Subscribe to:
Posts (Atom)