Thought For The Day

“He who would learn to fly one day must first learn to stand and walk and run and climb and dance; one cannot fly into flying.”
Friedrich Nietzsche

 

 

Starting a New Job? Make a Good First Impression with these Tips

If you just landed a new job, congratulations!  Now that you’ve already wowed them at the interview, do you have a strategy for making a good first impression when you arrive?  If not, read on.  We have some tips for impressing your new boss and coworkers at your next workplace:

  • Arrive on Time.  It’s never a good idea to be late when you’ve just started working somewhere new.  Since you probably aren’t familiar with the commute time to your new office, give yourself twice as long as you expect it to take on your first day.  Once you know how long the ride takes, adjust your departure time accordingly in the days to come so that you have accounted for rush hour traffic.

  • Be Flexible.  You never know what to expect on your first day of work.  One individual we know of arrived for her first day on the job only to find out that her computer wasn’t ready yet and the department was experiencing an emergency and didn’t have time to train her.  Instead, she was offered an empty desk and an employee handbook to study for a few hours.  While these types of scenarios are unpleasant, if it should happen to you, be accommodating and avoid assuming that this is indicative of how the rest of your employment there will go.

  • Be Positive.  You know that one coworker who complains a lot?  Don’t be that person.  Continual complaining creates an unpleasant work environment.  Instead, make an effort to be positive and upbeat.

  • Ask Questions.  During the first few weeks of a job, it’s not uncommon to feel overwhelmed.  However, by posing questions you’ll get better acclimated to your workplace and feel more competent.

  • Avoid Office Politics.  Don’t badmouth anyone or gossip and avoid spending time with people who do.  You want to remain above the fray, not be mired in politics at your new office.  

Object-Oriented Programming: Friendship

In the last article we wrote about inheritance - a crucial concept of object-oriented programming.  In OOP theory, inheritance leads to various possibilities for modelling our problem.  It allows the programmer to easily upgrade and broaden the model by adding new attributes or by modifying methods (method overriding).  However, some other basic C++ features need to be introduced before we can explain method overriding, overloading methods and operators, polymorphism etc.

Understanding inheritance, multiple constructors, privacy (all of which we've explained before) takes time and practice.  We recommend that you play a bit with the things we've learned so far and try to make some examples and simple programs of your own; one idea is to take our code example from the last article and try to modify methods, add new ones, write the constructors for the classes etc.  You could even try to model our example with cats and tigers.

Starting with this article, we are going to introduce some things we haven't mentioned so far.  It may look like these things don't have much to do with what we've learned so far, but they are very important for the concepts mentioned in the beginning of this article.

So, first, let's talk about friend functions and friend classes.  Friend functions and classes are marked using the friend keyword.  They are exceptions to the rule about accessing private and protected members from outside the class which we talked about earlier.

A non-member function can access the private and protected members of a class if it is declared a friend of that class.
This is done by including a declaration of this external function within the class, and preceding it with the keyword friend, like in the following example:
#include <iostream>
using namespace std;

class Rectangle
{
    private:
      int width, height;

    public:
      Rectangle() { }
      Rectangle(int w, int h)
      {
        width = w;
        height = h;
      }
      int getArea()
      {
        return width*height;
      }
      friend int getAreaExtern(Rectangle r);
};

int getAreaExtern(Rectangle r)
{
    return r.width*r.height; //width and height can be accessed even though they are private because the method is declared friend
}

int main()
{
    Rectangle rec(2,4);
    cout << getAreaExtern(rec); //returns 8
    return 0;
}

 

Similar to friend functions, a friend class is a class whose members have access to the private or protected members of another class.  Let's make an example:

#include <iostream>
using namespace std;

class Rectangle
{
    private:
      int width, height;

    public:
      Rectangle() { }
      Rectangle(int w, int h)
      {
        width = w;
        height = h;
      }

    friend class Circle;
};

class Rectangle; 

class Circle
{
    private:
      int radius;

    public:
      Circle() { }
      Circle(Rectangle r)
      {
        radius = r.width*r.height; //we can access members of Rectangle class
      }
      int getRadius()
      {
        return radius;
      }
};

int main()
{
	Rectangle rec(2, 4);
	Circle cir(rec);
	cout << cir.getRadius(); //8
	return 0;
}

 

Here we have a program which takes the area of one rectangle, and creates a circle with that value as the radius (a silly program, but suitable for explanation).  We can see in this example that the Circle class is allowed to access members of the Rectangle class.  This is due to the fact that Circle is declared a friend class to Rectangle.
Notice that we needed to add the class Rectangle line because the class Circle uses the class Rectangle (as a parameter of the constructor).

Another important thing is that friendship is never assumed: if A is friend to B, that doesn't imply that B is friend to A.  Also, friendship is not transitive, which means that the friend of a friend is not considered a friend unless explicitly specified.

Thought For The Day

“If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.”
Niels Bohr

 

 

How Businesses Use Sensory Marketing to Influence Buying Decisions

These days, marketers are all abuzz about sensory marketing.  If you haven’t heard of it before, sensory marketing can be defined as marketing that is designed to appeal to more than just 1 sense.  It is believed that by appealing to multiple senses, the consumer is more likely to be influenced on a subconscious level.   Curious as to how it works?  Below we offer up some examples of sensory marketing in action:

  • Swimming, Anyone?  For many people, the smell of pool chlorine is an enjoyable scent.  Wanting to take advantage of that, Holiday Inn actually creates that smell by adding a bucket of powder to the air system!  Additionally, the hotel chain pumps in the smell of roses for weddings and leather for business functions.
  • Everyone Loves Chocolate.  UK-based Royal Mail wanted to convince 6,000 advertisers to increase their spending on direct mail.  To do so, Royal Mail sent each of these individuals a personalized letter made of chocolate, encouraging recipients to taste, touch, and smell the letter.
  • Smooth as a Baby’s Bottom.  Johnson’s baby lotion deliberately designs their packaging to have a soft texture to transmit the lotion’s primary benefit to consumers.
  • Retailers Have the Beat.  While there is no singular type of music that all retailers use, most of them rely on music to subtly influence buyers.  Abercrombie and Fitch, for example, uses loud, upbeat music with a heavy bass to appeal to teens.  On the other hand, Victoria’s Secret plays classical music to create an impression of upscale exclusivity. 
  • Marlboro Gets Creative.  Marlboro—which has been banned from advertising in many parts of the world—has been forced to rely on a more subtle marketing approach.  The company is known to invest in the atmosphere of bars by including popular motifs associated with their brand identity:  images of horses, mountain-shaped seats, pictures of racing cars (Marlboro sponsors racing events), etc.