The Basics of Programming: Functions

In programming languages, functions are one of those things that sound complicated or abstract.  Yet, they can easily be explained in simple terms, and with comprehensible examples.

Let’s say you want to write a program that involves a lot of calculations with 2D points, like calculating the distance between two points.  You could just write the formula for Euclidean distance in place, every time you want to calculate the distance.  However, you could also write the formula only once and “wrap” that formula a bit, so that you can call that segment of code every time you want to use the distance formula.  Since we want a piece of code that will work for every two points, and not just specific points, we need special syntax that will enable us to call the function we’ve written when it’s needed.

This syntax is almost identical in most widely used languages such as C or Java.  Since all of our examples have been written in C so far, we’ll also present the syntax for writing and calling functions in C.  For simplicity’s sake, the example we’ll be using is quite triviala function that adds two numbers.

int Add (int a, int b)


return (a + b);


Now, let’s explain what this means.

Add is the name of the function.  The int before the name means that the function’s return type is an integer (return type i.e. the type the result will be).  Integers a and b are called parameters of the function, and the return (a + b) statement means that the result of the function will be a + b.

It’s important to realize that a and b parameters represent any two integers for which you want to call the function.

Note: if your function doesn’t return anything, you will write the keyword void instead of the return type.

Here’s how you actually call the function:

int aa = 5;

int bb = 3;

int result;

result = Add (aa, bb);

We declared and defined two variables, aa and bbnote that the names do not have to be the same as the names of the parameters in our function definition.  Then, we used these variables as arguments of our Add function.  Its important to differentiate between the terms “parameter” and “argument”: parameters are only related to function definition, and when you call the function, you are passing arguments for parameters of the function.  Since the function returns an integer, we can assign that integer to our result variable, since their types are the same.

Now that you know the syntax for writing and calling a function, you can write whatever function you want; here are a few more examples:

Note: everything written between /* and */ signs is a comment; it will be ignored by the compiler.
You can also comment a line, by writing // at the beginning of the line, but the first way is more in the style of C.

/*a function that writes the first n numbers onto the console*/
void WriteNumbers (int n)


for (int i=0; i<n; ++i)

printf(“%d ”, i);


/*a function that returns 1 if the number is dividable by 3, and 0 if it isn’t*/
int IsDivisable (int num)


if (num%3 == 0)

return 1;


return 0;


Readers of our series may notice that we have used new constructs here, which will be explained next week in video demonstration.  So stay tuned!

Making Contact with Leads (Part 2 of 2)

In part 1 of our 2-part series, we discussed how difficult it can be to make contact with a new lead.  We also identified ways that you can increase the likelihood of making contact: respond promptly, be persistent, call at optimal times, and be aware that 8-9AM and 4-5PM are the times that you are most likely to get a new lead on the phone.

In our second installment of this series, we’ll discuss the remaining things that’s book, The Ultimate Revenue Engine, has identified as the most important factors when it pertains to getting ahold of leads:

  1. Day of the Week

Wednesday and Thursday are by far, the best days of the week to get ahold of someone.  Schedule calls for then if you’re trying to reach new contacts.  Studies show that on Mondays and Tuesdays, it’s significantly more difficult to try to reach a new prospect.

  1. Direct Phone Numbers

By using direct phone numbers, Inside Sales is referring to using a desk line or a cell phone number.  While hopefully you have this information already, it’s easy to find if you don’t.  Simply use Google to do a wildcard search on a person’s name and area code.  For example, you would enter your search terms like this: Jane Doe (708)***-****.

  1. Choose Local Number Technology

Prospects are more likely to answer their phone if the caller ID displays a local number.  If you are calling locally, that’s to your benefit.  But if you aren’t, there is technology available that will make your number appear local.  By using a local number, you’ll increase the likelihood of speaking directly to your lead by 57.8%.

As you know, getting a prospect on the phone can be frustrating.  However, it doesn’t have to be.  By taking into account the research done on this topic, you can experience a dramatic increase in your contact rate—something every sales representative can appreciate!

Thought For The Day

“A thousand words will not leave so deep an impression as one deed.”
Henrik Ibsen



The Right Way to Conduct Competitor Analysis

Before we discuss the best way to conduct competitive analysis, we’d like to take a moment to tell you why it’s so important.  For one thing, it can give you a feel for what your competitors are doing—right or wrong—so you can learn from them.  By analyzing their marketing strategies, you have a better idea of how you can competitively position your own company in the marketplace.

With that in mind, we would recommend that you do the following research:

Visit Competitors’ Websites

Go online and see what content your primary competitors have on their websites.  Which products and services do they offer?  Are their offerings substantially different from yours?  How does their pricing compare?  How do they fuel customer engagement?  For example, do they allow website visitors to sign up for newsletters?  If you can sign up for product literature, do so.  This will give you a better feel for how they use print media and/or email campaigns to generate more business.

Examine Their Social Media Efforts

In what ways are they interacting with their customer base?  Do they use Twitter or Facebook?  Do they have a blog?  How often do they post to their social media accounts?  Daily?  Weekly?  Do they generate a lot of comments in their blog posts?  Use this information to inform your own social media strategy.  For instance, if they’re doing something that works well for them, consider implementing it for your own business.


While this information can be helpful, it's of no value to you if you never use it.  So, we recommend that you put some time aside to determine what you like and don’t like about your competitors’ approaches.  Perhaps you can modify some of their successful strategies for your own organization.  Alternatively, you may realize that there’s a gap in the marketplace—nobody is selling Widget X at the low price point that you are, for example.  This information can then help you to determine your own best marketing strategy going forward.

Confidence: A Key Determinant of Workplace Success (Part 1 of 2)

“With confidence, you have won before you started.” ….publisher, Marcus Garvey.[1]

Think about it—those things that you have approached with the greatest degree of confidence are the ones that ultimately were the most successful.  In the first part of our 2-part series, we’ll examine this in greater depth and address why confidence is so beneficial in the workplace.    

Higher Achievement

For one thing, confident people experience better outcomes.  Take the case of salespeople—you might be surprised to learn that 20% of them achieve about 80% of sales.[2]  One of the key things that distinguishes these top performers from their average-performing peers is confidence.  In fact, confidence is considered one of the most important qualities for a salesperson to possess.  

Optimism Leads to Better Decisions

Confident people are more optimistic about their abilities and subsequently, expect to experience success.  This optimism—coupled with their positive expectations—means that they experience less stress overall.  As you might imagine, people who make decisions from a calm and confident perspective experience better results than those people who lack confidence.

Workplace Advancement

A recent study evaluated 100 professionals and found a strong correlation between confidence and workplace success; the most confident professionals had higher earnings and more promotions.[3]  Dr. Katharine Brooks, director of Liberal Arts Career Services at The University of Texas at Austin, explains this by saying that confidence makes people more likely to take on challenging yet manageable projects and to achieve new goals.  She further adds, “Employers will know that they can trust you with a project and that you are likely going to be good at motivating others as well.”[4]

As you can see, the benefits of confidence are far-reaching.  In the next installment of our 2-part series, we’ll discuss what you can do to develop greater confidence in the workplace.