Friday, May 27, 2011

Contracting: End of Gig–some suggestions…

Often gigs are done on purchase orders. This means that you have lead time to prepare for alternatives if a renewal does not happen. I have had a few gigs where two weeks notice was required if the client decides to terminate early. Of course, the unexpected does happen, I recall one gig where I suddenly found that I could no longer sign in via-email or VPN into the client; I assumed it was a password issue – turned out that my contract was terminated abruptly (I had refused to work on December 25th for the new boss, and he terminated as a result – I was working for someone else in the same firm 6 weeks later…) It took almost a week before I got the official word through the agency that I was working through…

 

My usual practice is to always assume that the gig will not renew. This means that 4-6 weeks before the end of gig, I start putting out feelers. I will often drop resumes off to interesting adverts, looking for two types of gigs:

  • Straight Contract
  • Contract-To-Hire

With many firms, they will renew 4 weeks before the end of contract to insure you are retained. It’s good to poll other consultants at the firm about their experiences. If it is past the typical renewal date, then assume the worst and get your next work lined up.

 

I will often interview while still working on the current gig. Whether you declare that you expect to be renew is a subjective call. I usually do not; the current hiring practices that I have encountered do not reciprocate on this courtesy. Often these interview result in subsequent part-time gigs for the firms that I interviewed with. It’s effectively a form of marketing. The key is to start with the adverts that are of most interest to you.

 

If you hit the unemployed state, then you need to balance your cash reserves (as a consultant, you need cash reserves – at least 3 months), your pickiness for gigs and the seasonal hiring patterns. Typically gigs are most abundant in September and in January. Eventually, it may become “any work considered [seriously]”, and then “buddy, can I become an employee…”.

 

As a consultant, I like to have 2-3 part time gigs a year for several important reasons:

  • It keeps IRS happy – all of your income is not coming from one client!
    • A startup equity stake agreement will often substitute for revenue to IRS
  • It keeps you learning and upgrading skills and experience!
    • Some gigs may be “pro bono” or for equity stake. The purpose is building skills or building good will with folks.
    • Not adding and expanding skill sets will keep dropping your marketability as technology changes.
  • Keeping these side gigs short prevents burn out AND allows you to gracefully exit (i.e. end of contract) from situations that were not as advertised
    • I will often advocate a shorter initial contract for these – so exiting a bad situation is cleaner.

That’s it for today’s musings…

Wednesday, May 25, 2011

Employee Wage versus Consultant Rates

Recently an old colleague was nailed in layoffs at his company. He was originally a consultant, then became an employee, and now progressed (involuntarily) to alumni. He had two offers on the table for his next pay check:

  • 6 month contracting at $75/hr (B2B) to help a company determine their new development patterns. It would be a walk in, evaluate MVC3, etc and resolve what would be used. Then he was not expected to continue working there. He loved the people he interviewed with. It would get his skills up to date for the next job…
  • Employee situation as an architect paying $140K/yr. He was unsure about personal growth in this position.

To him, he deemed the two offers to be financially equivalent. I did not.

 

While it is not unusual to bill 60 hr/week as a contractor – there are enough occasions that you are locked to 40hrs/week – or should I say, the Purchase Order was written on a 40hr/week basis (you may bill 60hr/week – and then discovered that you have an unpaid vacation for a few weeks). So, I always assume a 40hr/week.

 

So, for one year it is 40 x 75 x 52 = $156,000. [No vacation, training or time off]  From this you need to subtract:

  • Employer Social Security aka Self-Employment Tax: ~ 6.7% or  $6,700/yr
  • Medical Insurance (depends on age & family size):   let us say $12,000/yr
  • Other taxes – in WA, B&O would be $1,300
  • So we are down to $136,000

Next, I usually factor in a “on-the-bench premiums” to cover the gaps between gigs, I figure 2 months in good times, 3 months in moderate times. So 10/12 x 136,000 = $113,000.

 

Now let us look at the items to add to the employee situation, $140,000 – assume 10 days of vacation and 10 (official holidays and sick days)  and 5 days of courses.  so we have  140,000 / 47 x 52= $155,000. Now add 50% matching for 401K, that’s $3,000 at least. $158,000.

 

So we have adjusted rates of $113K versus $158K…..

 

In other worlds, his rate should have been $75 /113 * 158 = $105.00.

 

Or, at $75/hr, the employee equivalent rate would be $140000/158 * 113= $100K.

 

From the business perspective, a $100,000 employee costs most firms $200,000 when all overheads are added in. So paying up to $150/hr appears rational, but this is often discounted because the contractors are more ad-hoc hired (and thus more risk of poor skills). The usual criteria is “as cheap as the market allows”. It is no longer unusual to see development departments that are 80% contractors and 20% employees – it makes economical sense as long as there are ample contractors who will work for far less than what an employee would cost(not what they get paid, but the loaded cost).

 

Many contract developers do not do the math and make poor decisions (i.e. work cheap).

 

Money is not everything

There can be other significant factors besides money. A friend recently posted that he has had 4 new bosses in the last 3 months.  Bosses can be bad or good. As a contractor it is easy to bail from a gig and no one will ask why you finished the gig! As an employee, you will be asked if you quit because the boss was intolerable.

 

One joy that I have as a contractor is that I buy my own hardware and software (with pre-tax dollars). I do not have to put up with junk or corporate budget constraints. As an employee, I could do that, but that would come out of my own after tax dollars (normally).

 

I learn long ago that I am a challenge junkie – when I was an employee, I would join a group to solve a problem, get things built or fix and then it slipped into maintenance mode --- which drove me crazy!  The life of a consultant means more learning and challenges then that of an employee. I also get to pick what I work on;  if it is interesting, I do it. If it gets boring, or the politics are bad, then I wait until the end of the commitment and do not renew.

 

Being a consultant is running a business

Business survives by reputation and promotion. I have seen several awesome developers bounce back and forth between being an employee and a consultant every 2-3 years. What typically happens is they get a sweet gig for a few years and when it ends, they cannot locate the next contracting gig easily; a hungry stomach drives them back to being an employee. They did not work on advertising or “good-will” development.

 

You need to keep several clients going at most times. Not for the extra money, but for the contacts that may lead to the next gig.

 

That’s it for my random thoughts tonight, bed beckons…

Advice to new (and some seasoned) consultants

At the start of this year, an old colleague that I have worked with in 4 different companies, decided to try consulting instead of being an employee. I gave him some advice of things that I try to do during my consulting career (and  as an employee). Here is a short list:

Weekly Report

If the boss prefers a weekly face to face, it is likely also a good thing to send a weekly report. For my current gig, I became slack because my key output was documents for review that always included the boss in the distribution list.  The key aspect is to enable the boss to be able to explain what you are doing (justifying your salary to his superiors) by just going to his mailbox.  Bosses that do not micro-management, often are not concern about week-to-week activities; they are concern about appearing to know what is happening. Make it easy for the boss!

Weekly Report Structure

My usual pattern is simple:

  • Declare what you did in the last week
  • Declare what you intended to do in the next week
  • Add any changes of priorities that happened during the week
  • Add any blockage that occurred and either
    • State how you are going to break the blockage,
    • Request how the boss can help to break the blockage.

In cases where there is too much work, and the boss is interested, I have included a section “Below the line”, listing things that should be done, but unlikely to get any cycles. I usually RANK ORDER them, so the boss knows (and can adjust) the priority for what I will do when I get spare time.

 

Now, we come to the rub – for the next report, you copy your intended and self-report the results. Some people find it hard to admit or document failures – admitting issues builds confidence that your information is reliable.

 

One advantage of the above is when the boss is forced to trim staff or consultants; it is easy to see what you have done. People usually do not eliminate people they perceive as strong performers, some one that defines goals and make them happen.  During my career, I have won several “CAN DO” awards.

 

Bottom line: The boss primary concern is usually those over him, and not those under him. Make it easy for him to answer the question “what is Ken doing, what is his role?”

 

On a side note, my wife does this with a weekly financial report that she sends me. The report shows savings, asset values, cash flow, spending by category etc. She and I are kept on the same financial page and there is no money-stress between us. There is none of the dangerous “oh she is spending money for her fun, I am entitled to do the same” that can destroy a credit rating. If she keeps in the budget, why should I care about where she directs money?

Make the Boss’s request happen…. or get him to modify it

Don’t say no – instead improve it so he cancels it.  Bosses sometimes make interesting requests. Don’t get into either a power play of who knows best, nor appear to refuse to do something promptly.  If you need to delay a request, then make sure you can explain why the delay is needed in simple terms.

Time to get back to the day-job. I may post more later.

 

Excellent Manual:

The best book that I have come across is

In Hostile Territory : Business Secrets of a Mossad Combatant

You can get it on AbeBooks.com for about $4.00 (Amazon has new copies at $99.00). The key work is “Business Secrets” – you will learn a lot of good stuff in it.

Windows Phone 7 (WP7) Default Color Codes

These are the colors you will find in Settings | Theme | Accent Color:

 

image

 

Magenta – ff0099

Purple – 9900ff

Teal – 009999

Lime – 99cc33

Brown – 996600

Pink – ff66cc

Orange/Mango – ff9900

Blue – 3399cc

Red – cc0000

Green – 339933

 

Thanks to Andy Robinson for pointing me to the correct tidbit about Mango.

Thursday, May 19, 2011

Things You Should Know About Windows Azure Diagnostics

Unhandled Exceptions Cause the Instance to Recycle

If you have an unhandled exception in your code the Windows Azure instance will recycle, tearing down the application domain and restart the instance. Unhandled exceptions are all exceptions that not caught with a try/catch by your code.

You can Write You Exceptions to Storage with Windows Azure Diagnostics

Windows Azure Diagnostics enables you to collect diagnostic data from an application running in Windows Azure. If you catch the unhandled exceptions in an overridden Run() method of the RoleEntryPoint class using a try/catch, you can write those exceptions to Windows Azure Diagnostics using the Trace class. Once they are written you can throw the Exception causing the role to recycle.

The Minimum Transfer Schedule of Windows Azure Diagnostics is 1 Minutes

Windows Azure Diagnostics writes the diagnostic data to local storage (local to the instance) and then transfers it to Windows Azure Storage at a scheduled interval. Part of configuring diagnostics is setting the ScheduledTransferPeriod. The minimum interval is 1 minutes from the start of the start of the instance. There are several things you should be aware of with this design:

  • If your worker role instance encounters an unhandled exception and logs it, and then recycles the next time it starts for longer than the scheduled transfer period the exception from the previous instantiation will be written to the Windows Azure Storage.
  • If your work role continually recycles from unhandled exceptions before it can reach at least the scheduled transfer period your exceptions logged in local storage will not appear in Windows Azure storage.
  • If the instance is recycled and doesn’t start in the same location, the exceptions written to the local storage that have not be transferred to Windows Azure Storage will be lost. This might happen in the case of a hardware failure where the instances need to be moved to a different location.
  • Exceptions that are logged do not show up instantly in Windows Azure Storage.

You Do Not Have To Throw the Exceptions that You Catch

Some exceptions like: OutofMemoryException should cause the instance to recycle. However, some exceptions like those derived from InvalidOperationException, can be caused when you have an error writing to Windows Azure Storage – these can just be logged.  Not recycling allows Windows Azure Diagnostics to write the exception to Windows Azure Storage faster – since the scheduled transfer period isn’t reset.

 

I create a method that performs a litmus test on the caught exceptions and then determines if I want to throw them or not.  Because this will vary from application to application you will have to develop your own litmus method.  Using the C# operator is will simplify this task.

 

{6230289B-5BEE-409e-932A-2F01FA407A92}

Getting Your Subscription Identifiers from Azure REST APIs

Currently, there is no way to get all the subscription identifiers associated with your Windows Azure Live Id from the Windows Azure REST APIs. All API calls require that you know your subscription identifier before making the call.

 

There is also no way to make a Windows Azure REST API call using your Live Id (like the Windows Azure Management Portal does) you need to uploaded a Management Certificate using the Windows Azure Management portal and pin it to a subscription before you can start making REST API calls.

 

Interesting to note, it appears that the Management portal supplies its own Management certificate to Windows Azure when you request a new subscription. If you delete that Management Certificate my guess is that you will no longer be able to manage your subscription via the Management Portal.

 

{6230289B-5BEE-409e-932A-2F01FA407A92}

Windows Azure Queues Are Not Queues

Just FYI: Windows Azure does not guarantee that Windows Azure Storage Queues are first in first out. If you require a guarantee first in first out persistent multi-tenant storage queue you are probably designing your multi-tenant application incorrectly. If you can see past it, try using SQL Azure and identities.

 

{6230289B-5BEE-409e-932A-2F01FA407A92}

Meeting the SLA for Windows Azure Instances

When Windows Azure performs a rolling upgrade of their compute clusters they bring down only one fault domain at a time. If you have only one instance of your Windows Azure Web or Worker Role running, when they bring down that fault domain for the upgrade your only instance will go down. In order to maintain the Windows Azure SLA you need to have more than one instance running. Multiple instances are spread evenly across all the fault domains automatically when the role is deploy. If you are running more instances then there are fault domains, some of the instances will be on overlapping fault domains, however they are still spread as evenly as possible.

 

During a rolling update, Windows Azure does not bring a second instance online on the upgraded fault domain before shutting down your first (non-upgraded) instance.  There are two reasons for not bring another instance online:

  • There is now way to know if your deployment supports having N+1 instances – since you requested exactly ‘N’ instances, bringing up N+1 (even temporarily) doesn’t break your design. For example, since this might be internal role, you may have your own load balancing algorithm that’s dependent on number of instances. Or you require a single instance of this specific role (e.g. coordinator).
  • If a new instance was brought online, it will not have the local storage of the previous instance. So it will behave like a re-image for the role.  After the upgrade it is more than likely your old instance (and the local storage) will return.  Which is optimal to a new instance with a ‘stale’ version of the local storage.

{6230289B-5BEE-409e-932A-2F01FA407A92}