Tuesday, March 29, 2011

FW: What Not to Say

What Not to Say About Someone's Appearance

Don’t say: “You look tired.”
Why: It implies she doesn’t look good.
Instead say: “Is everything OK?” We often blurt the “tired” comment when we get the sense that the other person feels out of sorts. So just ask.

Don’t say: “Wow, you’ve lost a ton of weight!”
Why: To a newly trim person, it might give the impression that she used to look unattractive.
Instead say: “You look fantastic.” And leave it at that. If you’re curious about how she got so svelte, add, “What’s your secret?”

Don’t say: “You look good for your age.”
Why: Anything with a caveat like this is rude. It's saying, "You look great?compared with other old people. It's amazing you have all your own teeth."
Instead say: “You look great.”

Don’t say: “I could never wear that.”
Why: It can be misunderstood as a criticism. (“I could never wear that because it’s so ugly.”)
Instead say: “You look so good in skinny jeans.” If you slip, say something like “I could never wear that…because I wasn’t blessed with your long legs.

What Not to Say in the Workplace

Don’t say: “That’s not my job.”
Why: If your superior asks you to do something, it is your job.
Instead say: “I’m not sure that should be my priority right now.” Then have a conversation with your boss about your responsibilities.

Don’t say: “This might sound stupid, but…”
Why: Never undermine your ideas by prefacing your remarks with wishy-washy language.
Instead say: "What’s on your mind." It reinforces your credibility to present your ideas with confidence.

Don’t say: “I don’t have time to talk to you.”
Why: It’s plain rude, in person or on the phone.
Instead say: “I’m just finishing something up right now. Can I come by when I’m done?” Graciously explain why you can’t talk now, and suggest catching up at an appointed time later. Let phone calls go to voice mail until you can give callers your undivided attention.

What Not to Say During a Job Interview

Don’t say: “My current boss is horrendous.”
Why: It’s unprofessional. Your interviewer might wonder when you’d start bad-mouthing her. For all you know, she and your current boss are old pals.
Instead say: “I’m ready for a new challenge” or a similarly positive remark.

Don’t say: “Do you think I’d fit in here?”
Why: You’re the interviewee, not the interviewer.
Instead say: “What do you enjoy about working here?” By all means ask questions, but prepare ones that demonstrate your genuine interest in the company.

Don’t say: “What are the hours like?” or “What’s the vacation policy?”
Why: You want to be seen as someone who focuses on getting the job done.
Instead say: “What’s the day-to-day like here?” Then, if you’ve really jumped through every hoop and time off still hasn’t been mentioned, say, “Can you tell me about the compensation and benefits package?”

Tuesday, March 15, 2011

Periodically Import XML Data into Excel

This is a VBA app (run in Excel 2007) that I developed to automatically import online XML data into a Excel file every 1 minute.
Here is the download link
XML Data Importer

KML Circle Generator

This is a VBA app (run in Excel 2007) to generate a LineString path that looks like a circle in KML file. You can download the app from the following link:
KML Circle Generator

Many thanks to the author of the online KML Circle Generator for sharing the source code. For some reason the above online tool that I have used for over one year isn't working now:(


Thursday, March 3, 2011

No Function MOD(a,b) in VBA

Can you believe that in VBA you cannot call MOD(a,b) function although it works fine in Excel cells??!
Well, you can use the operator a MOD b if both a and b are integer numbers.
But there is no direct MOD function in VBA because VBA 2003 does not support MOD (number, dividor) as a WorksheetFunction.
Therefore, I have to write the following function:

Function fmod(a As Double, b As Double)
fmod = a - b * (a \ b)
End Function

Don't assume those funcstions are exactly the same!

If you see functions sharing the same name in different programming environments, don't jump to a conclusion that they are exactly the same!
Today it took me a lot of time to find a bug in a VBA macro. I just didn't understand why the function atan2(a,b) cannot return the correct answer.
After carefully reading the description of this function in the Microsoft Visual Basic Help, I realized that I mistakenly assumed that the atan2() in VBA (worksheet functions) is the same as the atan2() in c++. I was wrong!!

In Excel Developer Reference:
returns the arctangent of the specified x and y coordinates.

In C++ Developer Reference:
C Library, cmath (math.h)
     double atan2 (      double y,      double x );
long double atan2 ( long double y, long double x );
float atan2 ( float y, float x );
y: Floating point value representing an y-coordinate.
x: Floating point value representing an x-coordinate


See?! The meanings of the first and the second parameters in C++ are switched in VBA!!