Fun Facts about Presidents

Happy President’s Day!  In honor of the national holiday, we wanted to share with you some fun facts about our past presidents:

  • Ironically, Independence Day has not fared well for our former presidents.  James Monroe—the nation’s 5th president—was the 3rd president to die on July 4th.

  • Today, it would be unthinkable to imagine President Obama sneaking in a nude swim—imagine how quickly that video would go viral.  Yet one of our former presidents was a regular skinny dipper.  John Quincy Adams liked to spend his mornings skinny dipping in the Potomac River.

  • The White House wasn’t always called the White House.  Until Roosevelt officially named it the White House in 1901, it was commonly referred to as the President’s Palace, President’s House, and Executive Mansion.

  • James A. Garfield had a very unusual talent.  Reportedly, he could write with both hands at the same time in different languages!

  • Benjamin Harrison was president when electricity was first installed in the White House.  However, he feared being electrocuted and refused to touch the light switches.

  • Rutherford B. Hayes struggled with lyssophobia as a young man.  Haven’t heard of it?  It’s a fear of going insane.

  • Charles Guiteau shot President Garfield with a .44-caliber pistol called a British Bulldog.  He said that he chose that gun because he believed that one day, it would look good on display in a museum.  Ironically, the whereabouts of the gun today are unknown.

  • JFK’s father gave him a pretty underwhelming recommendation when he applied to Harvard.  His dad characterized his son by saying that JFK Jr. was “careless and lacks application.”

  • Andrew Jackson was said to have fought in nearly 100 duels, most of them involving the honor of his wife, Rachel.  Surprisingly, although he was shot multiple times, his dueling was not the cause of his death.  He died from a combination of tuberculosis, dropsy, and heart failure. 

3 Questions to Ask When Hiring a Digital Marketer

Are you overwhelmed trying to manage all of your company’s social media accounts?  Is it a struggle to continually be responsible for coming up with new content?  If so, your business may be ready to hire a digital marketer to take over its social media accounts.

More and more these days, it’s commonplace for small businesses to retain a marketing consultant to assume this role—otherwise, the task of creating content, developing social media strategy, and implementing it can become very time-consuming as your organization grows.  To get you started in the hiring process, here are some questions to ask when selecting a digital marketer:

  1. Are you experienced in my industry?

It will be extremely helpful if the digital marketer you select has prior industry experience.  Marketing can be very industry-specific and if the person you select has a relevant background, it’s going to be easier for him to get quickly up to speed and develop a successful marketing strategy for your company.

  1. Do you have past clients I can speak to?

Anyone who you consider working with should be willing to allow you to speak to past clients.  This will give you the opportunity to ask how professional the marketer is, whether he completes work in a timely manner, etc.  Also, you can determine how satisfied the past clients were overall with the marketing consultant’s performance.

  1. How will you measure success?

It’s important for you to understand how your digital marketer will determine success.  Is it by Facebook likes?  The number of new Twitter followers you’ll have?  Your percentage of market share?  This will be the standard that you use to evaluate whether your consultant is meeting his professional objectives and helping your business grow in the way that you intended.  

Have You Taken a Vacation Lately?

Do you stingily hoard your vacation days and then, never use them?  Does the thought of using one of your 50+ days of vacation cause you to break out into a cold sweat?  If so, you’re not alone.  Americans seem to be very reluctant to use all of the vacation days they have earned.

In fact, the research firm Harris Interactive did a survey of 2,300 workers who receive paid vacation and discovered that only 51% of them used their vacation time and paid time off.  Worse still, most Americans actually work when they’re supposed to be taking time off.  As many as 61% of American workers reported that even though their family members grumbled about it, they still worked while they were “on vacation.”

Contrast this to our European counterparts.  While US workers typically don’t use 429 million vacation days annually, workers in France, Germany, and Scandinavia usually take about 6 weeks off each year.  Some countries in Latin America are even more generous than that with time off.  Heck, in Brazil, they get 30 paid vacation days and 11 paid holidays.  A year.

It would be one thing if American workers didn’t mind doing without their vacations but that really isn’t the case.  Most US workers—53% of them according to one survey—report feeling burnt out and overworked.  Furthermore, 66% of US employees said that burnout is eroding productivity, and 40% of those who are burned out say that overwork is motivating them to search for a new job.

The takeaway from all of this is that if you haven’t scheduled a vacation in a long time, we encourage you to do so soon.  A vacation can reduce stress and actually increase your job productivity, because time away will help you to return to the office with a refreshed mindset.

Thought For The Day

“Pleasures flit by - they are only for yourself; work leaves a mark of long-lasting joy, work is for others.”
Dmitri Mendeleev

 

 

Object-Oriented Programming: Polymorphism; Virtual Methods (1/2)

In this article, we're going to begin a very important 'chapter' in C++, and we'll also be learning about some of the most important concepts of object-oriented programming.  But first, let's begin this lesson by defining polymorphism.

Polymorphism in computer science is often defined as context dependent behavior.
Simplified, this means that one object can behave differently in different situations (we'll clarify with examples).

Let us emphasize that we will be talking about a type of polymorphism which in literature, is referred to as ad hoc polymorphism.

The term ad hoc polymorphism refers to functions which can be applied to arguments of different types, but which behave differently depending on the type of the argument to which they are applied - hence, these functions are called polymorphic.

Mechanisms which enable and support such behavior in C++ are method/operator overloading and method overriding.  In the case of overloading, we say that static polymorphism is exhibited, while overrided methods exhibit dynamic polymorphism.

Method overriding is something we've mentioned when we talked about inheritance.

Definition: Method overriding, in object-oriented programming, is a language feature that allows a child class to provide a specific implementation of a method that is already provided by one of its parent classes.  The implementation in the child overrides (replaces) the implementation in the parent by providing a method that has same name, same parameters or signature, and same return type as the method in the parent class.
The version of the method that is executed will be determined by the object that is used to invoke it (different behaviors in different situations --> polymorphism).  If an object of a parent class is used to invoke the method, then the version in the parent class will be executed, but if an object of the subclass is used to invoke the method, then the version in the child class will be executed.

Another thing we should mention, which will be useful for later, is a concept called "the substitution principle", which states: in a computer program, if S is a subtype of T, then objects of type T may be replaced with objects of type S (i.e. objects of type S may substitute objects of type T) without altering any of the desirable properties of that program (correctness, task performed, etc).  This means that an object of the child class can be assigned to an object of the parent class, but not vice versa.  This will be important next time, when we try to explain how exactly method overriding is performed "under the hood".

 

For now, let's just introduce the virtual keyword:

If a class overrides a method in its base class, the method should be declared virtual in the base.
So, we need to write the virtual keyword in order for the correct method to be called.  Let's see an example, and we will continue in the next article:
#include <iostream>

using namespace std;
 
class Base 
{
    void print() 
    {
        cout << "Base" << endl;
    }
};
 
class Derived : public Base 
{
    void print() 
    {
        cout << "Derived" << endl;
    }
};
 
int main() 
{
    Base b;
    Derived d;
    b.print(); //prints "Base"
    d.print(); //prints "Derived"
    Base *bp = &d; //this is what the substitution rule is about - child assigned to parent
    bp->print(); //however, this prints "Base", even though that is not what we want
    return 0;
}

/* In order for the correct version of the method to be called, we must declare the method virtual in the base class, like this */
/* Everything else stays the same */

class Base 
{
    virtual void print() 
    {
        cout << "Base" << endl;
    }
};

int main() 
{
    ...
    bp->print(); //now, "Derived" is printed
    return 0;
}