How to survive a leadership vacuum?

What are leadership and a leadership vacuum?

Leadership is the capacity to inspire, guide, or direct a group of people or an organization toward a result. Typically, a good leader creates a clear vision with goals, then motivates others to share the vision and work to achieve the goals. A leadership vacuum appears when there are no leaders, current leaders are ineffective, or when leaders are locked in battle.

Is there a leadership vacuum in my organization?

There might be a leadership vacuum when:

  • Key people show up late, come down with the flu, miss the flight/bus/train often, etc.
  • People work by themselves, with little collaboration (the silo mentality)
  • The Directions are weak, vague, wandering or poor
  • Groups and their leaders argue each seeks limited resources and a position of higher status and control
  • The turnover rate is higher than usual (> 30%)
  • In short, people are basically drifting.

What happens if I do nothing?

“Employees don’t leave jobs; they leave bosses, especially there’s no boss. Employee satisfaction doesn’t necessarily depend on what we give our employees, but who”.

Leadership vacuums can happen at the country level, within an institution, even households, and can lead to culture damage, even putting businesses out of business.

How can I survive a leadership vacuum?

Be organized and clear. If you’re a team leader, organize your team by redrawing the boundary of authority and responsibility. Otherwise, your team will act their way out or wait for direction. The longer this takes, the harder it will be to get everyone back on track.

As an individual, this is also an excellent time to think about your personal goals and see if it matches the team goals. What’s your hidden agenda? Do you want to change the world or a 9 to 5 job that just pays the bills?

Be decisive and persistent. A true leader makes timely thoughtful plans to keep the confidence level high in the team. Another approach is to look for innovators who are comfortable with the unknown and can bring in new ideas. Once decided, protect the message and keep moving the organization forward. On the other hand, if you’re waiting for an opportunity to lead, this is the best time to step up and fill the gap.
Be transparent and visible. When in chaos, what’s the big picture or the organization? Reaffirming the vision and goals will also reassure the team that everything will be fine. Please invite others to do what they can. It’s a good time to share initiatives and honor contributions.

This article was originally published on EdLab Blog. Thanks for reading and feel free to share your comments below.

Upgrade to Hexo 3

I’ve use Hexo for a while and deply my blog on Github. Upgrade to Hexo 3 is extremely simple.

  1. Upgrade Hexo command line tool
    $ npm install hexo-cli -g
  2. Update your package.json
    • Basically replace old dependencies

      "dependencies": {
      - "hexo-renderer-ejs": "*",
      - "hexo-renderer-stylus": "*",
      - "hexo-renderer-marked": "*"
      + "hexo": "^3.0.0",
      + "hexo-generator-archive": "^0.1.0",
      + "hexo-generator-category": "^0.1.0",
      + "hexo-generator-index": "^0.1.0",
      + "hexo-generator-tag": "^0.1.0",
      + "hexo-renderer-ejs": "^0.1.0",
      + "hexo-renderer-marked": "^0.2.4",
      + "hexo-renderer-stylus": "^0.2.0",
      + "hexo-server": "^0.1.2"
      }
    • Add Hexo version This step is very important, your hexo cli wont work if you didn’t add this
      "hexo" : {
      "version" : 3.0.0
      }
  3. Update deployer settings
    • Install deployer first
      $ npm install hexo-deployer-git --save

    • Update deployer config
      -  type: github
      - repository: git@github.com:ryanhanwu/ryanhanwu.github.io.git
      + type: git
      + repo: git@github.com:ryanhanwu/ryanhanwu.github.io.git

It’s done, happy blogging.

Upgrade to Sublime Text 3

Moved all my settings and snippets from Sublime Text 2 to 3, the Sublimelinter is much better, especially for a Node.js developer.

Backup all my settings on Github

Download whole project here

On the other hand, some packages are snippets and syntax highlights (LESS, Jade …etc), some are productivity tools.

Find more details on Package Control.

How to monitor iPhone's HTTP traffic

I usually wonder how my iPhone apps communicate with their servers. I had a debate with my ex-coworker about the security of app communication. He thinks we can use simple HTTP protocol for app communication, including authentication. But I insist that we should use more secure way for transmission in apps.

Let me use an example to demonstrate how little an app protects the content and how easy it is to monitor the traffic of an iPhone app.

According to Apple’s document here. I choose tcpdump and take 7-11 Taiwan app as an example.

This app provides coupon for Starbucks. I want to get the content of this coupon.

The steps are as following :

My Default Shell Configuration - Oh-my-zsh

###History of my default shell
I started to learn C Shell because of the part-time job I had got during university. They were using FreeBSD as the default working environment. At the second year of the job, I tried Tcsh and Bash, then made Bash my default shell.

From time to time, I started to use Mac in recent years and also changed to use zsh.

Using Node.js to redirect and proxy normal HTTP+WebSocket traffics based on hostnames

Usually I used to use a single server to host several developing or experimental projects. Thus I need a quick solution to forward different request to these services. I had tried to use nginx before. But now I have a easier way to do so.

  1. require modules

  2. config proxy(forward) and redirect mappings (hostname based)

    var proxyOptions = {
    router: {
    "api.testAppX.com" : 'localhost:2041',
    "dev.api.testAppX.com" : 'localhost:2042',
    "www.testAppY.com" : 'localhost:10520',
    "test.oldApps.com" : 'localhost:10520',
    'bc.ryanwu.co' : 'localhost:8888'
    }
    },
    redirectOptions = {
    'olddomain.com' : 'http://newdomain.com/',
    'www.olddomain.com' : 'http://newdomain.com/',
    'blog.olddomain.com' : 'http://newdomain.com/blog/'
    };

Best way of singleton in Objective-C

It’s very useful during iOS development

static GeneralData __strong *generalDataObject = nil;

@synthesize currentUser;

+(GeneralData *) getInstance
{
static dispatch_once_t pred;
dispatch_once(&pred, ^{
generalDataObject = [self new];
});
return generalDataObject;
}

Usage

  1. Add Data

    firstViewController.m
    #import "GeneralData.h";

    - (IBAction) passValueButton:(id)sender {
    {
    User *user = [User new];
    user.name = "Mary Jane";
    user.age = "21";
    [GeneralData sharedInstance].currentUser = user;
    }
  2. Read Data

    secondViewController.m
    #import "GeneralData.h";

    - (void)viewDidLoad
    {
    [super viewDidLoad];
    User *loggedInUser = [GeneralData sharedInstance].currentUser;
    NSLog(@"Name : %@", loggedInUser.name);
    NSLog(@"Age : %@", loggedInUser.age);

    }

Reference : StackOverflow

JavaScript number only lock

function(event) {
// Allow: backspace, delete, tab, escape, and enter
if ( event.keyCode == 46 ||
event.keyCode == 8 ||
event.keyCode == 9 ||
event.keyCode == 27 ||
event.keyCode == 13 ||
// Allow: Ctrl+A
(event.keyCode == 65 && event.ctrlKey === true) ||
// Allow: home, end, left, right
(event.keyCode >= 35 && event.keyCode <= 39)) {
// let it happen, don't do anything
return;
}
else {
// Ensure that it is a number and stop the keypress
if (event.shiftKey || (event.keyCode < 48 || event.keyCode > 57) &&
(event.keyCode < 96 || event.keyCode > 105 )) {
event.preventDefault();
}
}
}

Make UILabel glow

You have to import QuartzCore

#import <QuartzCore/QuartzCore.h>

Then apply effect on your UILabel or titleLabel.

myLabel.layer.shadowOffset = CGSizeMake(0.0, 0.0);
myLabel.layer.shadowRadius = 20.0;
myLabel.layer.shadowOpacity = 0.5;
myLabel.layer.masksToBounds = NO;