Is Your Website Ready for a Surge In Traffic?

With the vast increase in the number of people shopping online, it’s more important than ever that businesses prepare for traffic surges around the holidays.  Is your website ready?  Not sure?  Read on to find out which steps you should take to handle holiday-related traffic spikes:

  1. Compress and Resize Images.  Images can significantly reduce page load time, particularly large, high-resolution images.  Check your site to make sure images are optimized, especially on those pages that see the most traffic (your home page, for example).

  2. Keep the Site as Static as Possible.  Although dynamic content is more engaging to users, it also requires a lot of memory and processing power.  By reducing dynamic content on those pages that users are most likely to enter your site on—landing pages and the home page—you can make the user experience more enjoyable without having to completely overhaul your site for the holidays.

  3. Use a Content Delivery Network (CDN).  If you’re expecting heavy traffic, you may want to offload it to a CDN.  A CDN is a “large distributed system of servers deployed in multiple data centers across the Internet.”  Essentially, CDNS have the capacity to handle heavy volumes of traffic more effectively than smaller hosting providers.  See our previous article for further explanations.

  4. Perform Load Testing.  Load testing allows you to create a simulated environment to see how well your website responds to various requests.  This will give you an idea of what is likely to occur when holiday shoppers visit your website.  If you’re using Visual Studio Ultimate, it has built-in load testing capabilities. Alternatively, you can try Yahoo’s YSlow or Google’s PageSpeed.  Both of these tools will analyze your website to determine page load times and provide recommendations on which action steps you can take to improve your site’s performance.

Object-Oriented Programming: Function Overloading

In this article we are going to talk about function overloading, a concept already mentioned before.  Function overloading (or method overloading) is the ability to create multiple functions of the same name with different implementations.  Calls to an overloaded function will run a specific implementation of that function appropriate to the context of the call.  If you remember, we've explained a similar mechanism when we talked about constructors: we were able to write multiple constructors, as long as their signatures (argument lists) were different.

When you call an overloaded function, the compiler determines the most appropriate function definition by comparing the argument lists.  This process is called overload resolution.

A good practice when overloading functions is:

If two functions have the same name, they should perform the same kind of task (and vice versa).
This is the so-called rule of semantics preservation.

 

As we said, overloaded functions must have different number of arguments, and/or different types of arguments.  Return types can be the same, but don't have to be. It isn't enough to have different return types as the only difference between two functions.

Let's give one common example of utilizing function overloading.  We will write multiple functions for calculating the volumes of different objects.


#include 

using namespace std;

// volume of a cube
int volume(int s)
{
    return s*s*s;
}

// volume of a cylinder
double volume(double r, int h)
{
    return 3.14*r*r*h;
}

// volume of a sphere
double volume(double r)
{
    return (4/3)*3.14*r*r*r;
}

int main()
{
    cout << volume(10) << endl;
    cout << volume(2.5, 8) << endl;
    cout << volume(4) << endl;

    return 0;
}

 

If you run the program, you will see that the correct versions of the functions were called (since there was no ambiguity - all of the three argument lists were different).  In the next article we will continue with operator overloading.  The idea is similar, but the implementation will be a bit more complicated because different groups of operators are overloaded differently.  Operator overloading is a powerful feature, and we'll make sure to cover it in detail.

Code sample: http://goo.gl/NxVDQF

3 Alternatives to Traditional Office Gift Giving

Does the thought of participating in Secret Santa at the office stress you out?  For most of us, the notion of coming up with a great gift for that coworker we barely know in accounting is a daunting prospect.  To make it easier on you, we’ve got some ideas on how your office can forego traditional gift giving while still having a festive time around the holidays:

  1. Have an Office Potluck.  Food makes for an enjoyable alternative to gift buying.  Consider having a potluck for the holidays.  If you want to really mix things up, develop a theme for it.  For instance, you could hold an international potluck and ask everyone to bring a food that is reflective of their heritage.

  2. White Elephant, Anyone?  A white elephant exchange gives you the opportunity to get rid of useless items or bad gifts that you’ve received.  As such, they’re pretty popular.  Ask everyone to bring in a wrapped gift to the office.  Traditionally, the gift should be one that has little value and is something you already own.  Determine an order and have the first person select a gift and unwrap it.  The second person can then take the first person’s unwrapped gift or select a wrapped one.  This continues until the last person has chosen a gift.  Then, the first person has the opportunity to go once again, either keeping his gift or selecting someone else’s.

  3. Book Exchange.  This is a great idea if you have an office full of avid readers.  Ask each person to bring in their favorite book.  Then, draw names randomly to determine which book goes to which individual.  This can be an interesting way to discover more about your coworkers while being introduced to new authors.  Bonus points if you have people inscribe a short note in the book about why it’s their favorite!

5 Tips for Earning Your Next Promotion

Want to wow your boss?  Ascend the corporate ladder?  Keep reading.  We have 5 suggestions for how you can impress your superiors to earn a promotion:

  1. Do What It Takes.  Sometimes a job calls for extraordinary effort.  For instance, you might need to come in early and stay late for a new product launch.  Alternatively, you might be called into the office at 3AM over a critical production issue.  Employees who ultimately get promoted are the ones who are willing to go above and beyond their job description i.e. who are willing to do whatever it takes.

  2. Have a Positive Attitude.  While it’s important to work hard, that alone is not enough to get you promoted.  If you’re taking on extra responsibilities while grumbling about them—or frequently display a pessimistic attitude—research shows that you’re 62% less likely to be promoted, according to the managers surveyed.

  3. Solve Problems.  We encourage you to be a proactive problem solver.  When an issue arises at the office, don’t just run to your boss and expect him to come up with a solution.  Instead, spend some time identifying solutions to the problem before meeting with your boss.  Your boss will appreciate your ability to independently resolve problems, rather than dumping them on his lap.

  4. Develop Mentoring Relationships.  According to Quint Careers, “one recent study found that in 4 out of 5 promotions, those promoted in the company had a mentoring relationship with someone higher in the company who helped spread the good word about them.”  Try to develop relationships with higher-ups in your organization and if your employer has a formal mentoring program in place, take advantage of it.

  5. Ask.  When you feel confident that your promotion request will be well-received (after a recent workplace success, for example) schedule a meeting with your boss.  Prepare in advance by making sure that you can cite why your performance merits a promotion, which position you would like to be promoted to, and what your qualifications are for it.  This direct approach will be far more successful than simply hoping that your boss notices your merits and will mention a promotion first.

Thought For The Day

“Wrinkles should merely indicate where smiles have been.”
Mark Twain