On Consulting

I have worked for over a decade as a software consultant, and I have run ART Consulting, a small consulting firm. I started because I was an efficient programmer, but the business of consulting is largely about sales, collections, and recruiting.  These are my observations on the business.  

Sales
The way you get leads in consulting is to build a reputation.  To build a reputation, do things and tell people.  I have been fortunate to get a lot of work through word of mouth and professional connections. The connections are from past jobs and networking.  Being a part of high profile, successful projects helps.  You can also speak at local tech meetups of conferences, blog, write a book, contribute to open source.  Martin Fowler is an example in software consulting of someone building a reputation as an expert and promoting his consulting agency, Thoughtworks.  I think Watson winning Jeopardy is one of the greatest publicity stunts in the industry.  But you don’t have to be Martin Fowler or IBM, if you are competent, you can build a reputation within a small geographical or technical community with reasonable effort.  Consider positioning your company as expert in a field, perhaps an emerging programming language or an industry.

Selling consulting services is asking questions about the project.  The customer wants to tell you about the project and they want to see that you are interested and getting it.  If you have a baseline of credibility,  I don’t recommend spending a lot of time trying to sell your company or even worse, bashing the competition.  Bragging about your accomplishments and your team seems to be less effective than getting the customer to talk about their job.  When I go on a sales call I often start writing information about the project as if I had won the business.  

I have made sales mistakes. I was on a job and the sales guy encouraged me to upsell.  We had a meeting to consider buying BEA WebLogic (long before being bought by Oracle).  I launched into my pitch about how we had a guy that had been using WebLogic for 6 months.  Later, I learned everyone in the room had been using at their previous employer for 12 months.  Know your audience before you pitch.  Another amatuer mistake to make is criticizing the company’s past design decisions.  Often you will be speaking with the people that made those decisions.

Knowing negotiation tactics is invaluable.  I suggest reading Secrets of Power Negotiations.  I once knew a competitor that was winning tons of business, but they were overwhelmed with work and wanted me to help out.  They were charging rates that were too low and I couldn’t help them out.  Don’t be afraid to ask for higher rates, especially if you have too much work.

Schmoozing is fun.  I’m talking about taking people golfing, buying meals, giving them swag, getting tickets to events, bringing food to the office.  Some places have policies that limit employees from accepting gifts from vendors.  I think giving back and being generous is rewarding, if you feel unethical consider donating money to your client’s favorite charity.

An employee commission program is something to consider.  The first consulting firm I worked for offered a $100 bonus for setting up a sales meeting for anyone with a budget, and 1% of sales if it led to business.  Later they put a cap on it at $1,000,000 of sales, because a lead I had given them led to over that amount.  The next time I got an opportunity like that I started my own company.

If you hire a salesperson, consider the trade off of salary versus commission.  Lower salary and higher commissions incentives the sales people to close deals, but you don’t want them to be too desperate.  Most places base commision on a percent of sales.  However, I think it’s important to also have incentives for salespeople to negotiate good hourly rates.

Collections
Not collecting payment is a big risk, it can erase years of profit and put you out of business.  I have seen extremely risky measures taken to cover payroll.  Customers don’t pay for various reasons: quality issues, lack of funds, bankruptcy.  Once I saw a company not pay subs because they couldn’t collect from their client. I have heard big firms, like IBM global services, aim for 90% collection rates, but small firms usually seem to do well until they can’t collect a big bill.  

Here are steps you can take to mitigate this risk:
Consider the financial strength of the company before accepting the job.  Ask about their ownership and backing, profitability, and reputation.  I have never asked for a credit check, but it’s a common practice in some industries.  Talk with a credit manager, even in another industry, for tips.

Avoid using words like “fixing bugs” on invoices.  Customers hate to pay for that type of work.  Use words like modify and change.  If customers won’t pay and complains about quality issues, acknowledge any problems and reassert you expect to get paid….  for example:
customer: “this project has been a disaster.  I’m not paying for this crap”
response: “I agree we would have all preferred it go more smoothly, and we still expect to get paid.”  
It’s easier to get paid if you can competently handle quality issues.  That includes acknowledging problems, solving them and discussing plans to prevent that problem from recurring.  If you are in the unfortunate position of trying to collect while there are outstanding quality issues emphasize that you are working on them.  Avoiding responsibility, being defensive, and blaming others is typically not what clients want to hear.  If you repeatedly discount due to quality issues consider firing the employee or the client.

Typically, I bill every 30 days with 30 day payment terms.  Consider reducing the billing cycle and terms to 2 weeks for high risk customer.  Most of my clients pay before the 30 day terms.  Some consultants offer a 2% discount if you pay within 10 days.  It’s called “2 10 net 30.”  I typically don’t offer this but, it can incentivize companies to pay early and help reduce days sales outstanding.  If an invoice is late, ask when you can expect to get paid.  Often it’s an oversight.  The phrase “When can I expect that June payment?” is less confrontational than “Where is my money?  I want my money.”  Under the most generous scenario,  if a company is 30 days late I am likely to warn them I can’t afford to continue to work for them without prompt payment.  At 60 days late I would seriously consider halting work on the job.  I have never resorted to legal action.  I believe trust is important with clients and lawyers are the main winner in lawsuits.  However, it is standard practice in some industries to turn outstanding bills over to collection agencies at 90 days outstanding.  Typically, it’s a lawyer that will report them to a credit agency.  Warn them 10 days before you do and give them an opportunity to pay.  

I typically avoid any threats related to withholding source.  Trust is a key component of the relationship.  Also, if the customer is having cash flow problems, I want to do what I can to help them out.  The code you have already written is a sunk cost.  It’s usually better to see the code put to good use than withhold it.

If you don’t pay your sub-contractors or employees word will get around and it will be difficult to recruit.  Pay them, even if you can’t collect.  Keeping a reserve fund can help a company survive billing issues, but it is demoralizing to tap into it.  Taking on debt or investment is another way to survive, but you are raising the risk of long term failure.

Utilization Rates
Staying busy and not “on the bench” can be a challenge.  You may have to pay employees for sitting around doing nothing.
-Many firms use sub-contractors.  Cutting a sub is less damaging to your reputation than laying off an employee. I recommend the staff be 10% - 20% contractors, but base it on risk.  Also consider making new hires contractors for a period.
-The firm I worked for wrote it into their contracts that they needed 30 days of notice if ending a job.  That gave sales time to find new positions for employees.
-Hopefully you are doing a good job and will acquire long term customers or a steady flow of referrals.

Fixed Cost projects and Estimation
A big risk is accepting a fixed cost project, running over time estimates and effectively working at a very low rate.  I mitigate this problem is by rarely accepting fixed cost projects.  If you choose to do a fixed cost project,  I suggest doing a thorough specification.  The specification should be billable and insist that any changes after the agreed on fixed cost will result in a separate hourly based cost.  

Another reason fixed cost projects are so difficult is because estimating time is extremely difficult.  Even when I am billing by the hour, people often want estimates.  I always try to estimate the smallest amount of work possible.  The approach of breaking the work into smaller pieces lowers the risks of underestimating, and the process of fleshing out the details helps justify the estimate.  I have worked on projects where we billed for several weeks of work to do the estimate.   My goal is to under-promise and over-deliver, but it’s easy to be optimistic during the estimation.  Unforeseen problems are often the reason for overages.  A non-technical customer once asked for an estimate on how long it would take to debug a problem.  I told him “It’s like asking me how long it will take to find a set of misplaced keys.”  

Gross Margin
The profit in consulting is to increase the spread between the rate you pay workers and the cost you bill clients.  My first job in 1997, I was making $30k/ year (effectively $15/hour) and I was billing $90/hour.  That’s a good spread.  If you are paying out more than 75% of the hourly bill rate to the workers, it may not be worth the risk and effort. I think paying out 50% to worker is standard (i.e.100% markup).  Sales commission might run 10%-15%.  However, it varies for subs and employees and it’s all subject to negotiation.

If the spread is too out of whack it can create bad will on both sides.  That’s the reason I don’t recommend disclosing to the workers how much the company is billing per hour, but it often leaks.  Different places have different approaches but it’s key that you keep a balance between your rates and the quality of work you do.  

It’s a good idea to get your employees and subs to sign non-compete agreements.  Although it varies by state (California doesn’t uphold non-competes), that means if the employee or sub wants to work directly for the company you should get compensated.  The fee is subject to negotiation. You might place an employee for free, if a client that has paid a lot of money to you, and you have an ongoing relationship.  A high volume staffing agencies might want 15% of the first year salary, where as a lower volume more specialized recruiter might want 20% to  25% of the 1st year salary and signing bonus for a placement.  

Professionalism
One important rule is to not get involved in the politics of the company you are working for.  They are like a family.  They may bad mouth each other, but if a consultant from another company says something negative it will not be received well.  I have tried to make a habit of not saying things about people that I wouldn’t say to their face.  It has had the side benefit that I find myself saying more things to people because I already have rehearsed being diplomatic.  

Also be honest on hourly billing.  Don’t fudge.  

Incidentally, I hate doing time sheets.  And I wrote an iphone app that makes it easy if you are working on site.  The app is OnSite Time Tracker and it has location based features.

Recruiting
There are a lot of avenues for recruiting.  I usually hire people that I have worked with before.  Hiring people from your staff’s network is another sound approach.  A lot of companies have a bonus for recruiting.  One interesting approach I have seen is building rapport with CS professors and get referrals for the most promising students.  Increasingly people are turning to social media.  One of my friends hired someone off angel list.  Networking is another way to meet potential candidates.

Beyond that, people need to want to work for you.  Ask for good rates so you can be generous to employees.  A good bonus package can help attract talent, but it’s tricky. One way is to do a bonus as percentage of salary.  The upside to bonus as a percent of a salary is it can unify the company, and encourage team work.  The downside is that sometimes certain teams are making most of the money by working more.  In that case, it can create resentment.

Conclusion
If you are a customer of mine, don’t take this to mean you can not pay me for 60 days :)  These are rules of thumb, subject to conditions.  Let me know your thoughts on the business and if you need web or mobile development, contact me at andrewt at gmail.com.

On writing code

For me, the goal of writing code beyond getting it to work, is that another programmer can easily read and understand it.  Quality code has the same characteristics as any good writing.  It's concise, well structured, and clear.  Often when writing code you have a lot of domain knowledge and context in your head and it can influence you to ambiguously name variables.  It's amazing later to look at code you wrote and wonder what you were thinking. Some of the best programmers can keep more in their head and have less need to write self documenting code.

I often think it might make sense to call programmers writers or authors... It might remind them that  what they write will be read, not just by the compiler, but by their future selves and others.

Here are some rules of thumb I use:

Variables:
Don't use a variable to mean more than one thing.  Use separate variables.

Use constants, not "magic numbers."
Use companyTypeId == CompanyType.OEM instead of companyTypeId == 3.

Don't be afraid to use long variable names. Often my variable names are 2 or 3 words.  This is especially true when you have autocomplete.

Use conventions to name variables. Use is or has at the beginning of boolean variables. Capitalize constant variable names.

Pick specific, unambiguous variable names.  Leave out the computer science lingo, like master, detail, object, or entity.

Refactor variable names liberally.

Structure
Use functions for complex if statements.
Use
   if(obj.isValid())
instead of
  if(obj.x > 00 && obj.y > 0 && obj.z > 0...

Think of functions like a paragraph, best kept to less than one page, and it expresses one idea.



If I had more time, I would have written a shorter letter. - Mark Twain

There are only two hard things in computer science: cache invalidation and naming things - Alan Kay

Elon Musk hangs up on Barron's intervewer

Bill Alpert writes for Barron's in a front page article titled: "Trouble ahead at Tesla"

"I have no interest in an article that debates what we consider to be an obvious point -- which is that there is a dramatic reduction in battery costs," Musk said, after a few questions. "You clearly do not understand the business. My apologies. I am terminating the interview."

Tesla shorts, this is your wake up call.  Batteries are improving.


Tesla Shareholder's meeting

Money quote from yesterday's Tesla shareholder's meeting.  Elon Musk said, regarding traditional dealerships to sell EVs...

"It didn't work for Fisker, didn't work for Coda.  In the last 90 years, when did it work?"

Why I invested in Tesla

Vision
I believe Tesla is likely to disrupt the automobile industry based on Elon Musk's 3 stage plan:
Stage 1: a high price, low volume car (Roadster release in 2008)
Stage 2: a medium price, medium volume car (Model S released 2012, Model X scheduled 2014)
Stage 3: a low price, high volume car (Gen III, to be released in 2016 or 2017)
This plan matches well to the technology adoption curve. My investment in Tesla is a bet that when the Gen III is released it will reach the mainstream market and see explosive growth. It's planned to cost less than $40,000, and have a minimum range of 200 miles.


Elon Musk
The main reason I believe in Tesla is Elon Musk. He has a solid track record founding Zip2, PayPal, and Space X. He has risked his own fortune on Tesla.  He was also in a similar position when he founded PayPal. Many other "green tech" companies are failing, like Fisker, Coda, and Solyandra. PayPal was an unlikely survivor of the .com crash, and many of their competitors failed due to problems with fraud. PayPal was able to survive by focusing on the highest risk problems, and I see a direct parallel with Tesla's focus on battery and charging technology.

Thinking like a VC
Tesla is a speculative stock and I don't judge it on fundamentals like P/E ratio. I use criteria that Venture Capitalists use like a strong vision, a good team, long term obsession (started in 2003 and AC propulsion before that), a huge market (2012 14.5M vehicles sold in US, and  80 million worldwide) and fanatical early adopters.

Why? EVs are technically superior to ICE
EVs are technically superior to ICE (internal combustion engines). Some of these advantages are specific to Tesla, but are largely true of all EVs. Charging the Model S is cheaper than gas (approximately 1/5 the cost, plus free superchargers for trips). There is no stopping at gas stations, less maintenance (eg. no oil changes) and no emission testing. The heater warms up immediately. It accelerates quickly because engine is electric, and has no transmission, so full torque is available at any speed.  The Model S handles well because the floor is heavy from the batteries, and it lowers the center of gravity.  It has a lot of room (see frunk) because the engine is the size of a watermelon and sits between the two back wheels (eliminating the driveshaft) Also, long term we have to move to sustainable energy because oil is finite resource.  Although energy from the power grid is not sustainable today, it's likely to be long term. Even today EVs power from the grid is 3 times more efficient than an ICE.

Why now?
The Model S represents an inflection point in battery energy density and cost. The current barrier to mainstream adoption of EVs is the cost and range of the batteries. Just as cell phones in the 80s were large, expensive and had short battery life, the EV suffers from the same problems currently.  Historically energy density improves 7-8% yearly in battery technology and that trend will likely lead to improved price and performance that is superior ICE. ICE are not undergoing the same improvements in price and performance.

Tesla's battery technology is ahead of competitors.  Telsa’s “secret sauce” is the battery pack.  Tesla battery packs use thousands of standard Lithium ion batteries (commonly used in laptops), which lowers cost and supply chain risk.  Although the batteries are commodities, the technology surrounding them is secret. The batteries are liquid cooled, and have higher energy density than competitors. I suspect the software managing the battery is critical. Also, Tesla is working with their battery supplier, Panasonic, to produce batteries optimized for use in an automobile.


The innovator’s dilemma: why existing competitors are likely to fail
Incumbent market leaders typically fail to adopt to disruptive technologies.  Existing businesses have too many conflicts and lack focus to adopt. It is similar to IBM's failure to adopt to the PC revolution like Apple and Microsoft. Other examples include sail ships versus steam boats, hydraulic excavators versus cable actuated, and vertically integrated steel mills versus mini mills.

They typically focus on current customer needs (see innovator’s dilema). Often new technology, like Tesla, is ridiculed in it’s early stages, but that is a positive indicator to many Venture Capitalists.  Since their customers don't take the technology seriously, neither do the incumbent businesses. People say electric cars are toys for the rich, and the same comparison were made about early car models.   They typically focus on their core competencies, in the case of existing car manufacturers that is mechanical engineering and the incremental improvement of the ICE, not battery technology.

There are competing vehicles from existing car manufacturers, but Tesla is currently outselling all of them. The Chevy Volt, Nissan Leaf and Ford Focus are more expensive than the cars they are competing against.  Whereas the Model S is competing with cars in it’s prices range (Mercedes S Class, BMW 7 series, and Audi A8).

Tesla Stores and SuperChargers are strategic innovations that existing car companies are currently showing no interest in.


Tesla Stores
Tesla stores and internet sales model eliminates the overhead of dealerships. It lowers inventory and storage costs (Imagine a world without car lots!).  The prices are fixed, and there is no haggling. The stores increase exposure and impulse shopping by being in high traffic areas, like malls.  The trade off is you can't drive it off the lot.

Existing dealerships are fighting Tesla, and many state laws prevent Tesla from closing the sale in the store. Tesla is unlikely to concede short term because their interests are not aligned. Dealerships are focused on volume, not on selling a new, niche products.  Existing dealerships make a large profit on service centers.  EVs require much less service, and Tesla’s strategy is operate maintenance centers at break even.  No car company in the last 90 years has succeeded using the dealership model. The existing car companies can not afford the risk of alienating their dealerships to experiment with other sales models. Tesla needs to resolve this issue before Gen III cars go to market. It's likely Tesla will prevail because popular opinion is in their favor, and silicon Valley tech companies are increasingly relying on social media to defeat incumbent businesses in political battles.


Super Chargers
Tesla superchargers helps address range anxiety and facilitate long trips.  Super Charger use is free to customers.  The Super Charger rent is low because they they often increase the value of the property by using existing parking and drawing high net worth drivers.  The power costs are also low because they largely run on solar power.  Super Chargers can now transfer 3 hours of drive time in 20 minutes.  Tesla feeds high power DC voltage into the batteries at the SuperChargers to reduce charging time.  This is a key strategic and engineering development that is, to my knowledge, not on the radar for other car companies.  


Tesla’s Super Chargers are designed to work with Teslas and it’s possible Tesla’s main business could end up being selling drive trains and super charger access to other car companies.  They currently sell electric drive trains to Mercedes and Toyota.  As stated by a JP Morgan analyst, Adam Jonas, regarding super chargers... " we may be witnessing an interplay of technology, industrial strategy and capital not unlike Cornelius Vanderbilt and the railroads, or Thomas Edison and electrical distribution."  Tesla may be setting the standard for high voltage DC transfer for charging for generations to come.  They are also storing energy in battery packs at the super charges, presumably to reduce demand at peak hours.  I suspect the long term goal is to rapidly charge vehicles without being constrained by the power available from the grid.


The Model S is awesome.  
It won the MotorTrend car of the year. Consumer reports gave it a 99 out of 100. Test drive one if you're not convinced.


Tesla is considered by some investors to be a tech company, not an automobile company. Cars are becoming increasingly software oriented. Elon Musk's software experience at PayPal is an asset. Also, Tesla is in silicon valley, the heart of the computer software industry. Over The Air software updates are one example of Tesla leading in software engineering. The 17 inch display looks like a big ipad. I wouldn't be surprised to see an app store one day. Remember, the secret sauce for the battery is the software. Plus, I suspect, Tesla wil be able to adopt new software driven technologies like auto-pilot faster than other car companies, because high tech electronics and software is in their DNA.


Financing Plan and Resale Value

Tesla is offering a financing plan that is similar to a lease, but it allows the tax rebates of ownership that range from $7,500 to $15,000. The tax rebates effectively covers the down payment. The customer makes monthly payments, and Tesla will buy the car back in 3 years for 50% of the base price and 43% of options. They advertise it as the same resale rate as other luxury sedans. The purpose is to give consumers peace of mind that the car will hold it's value, because there are limited used Teslas to consider for resale value. However, Tesla roadsters are retaining their value, which mitigates the risk. The Roadster may have high resales due to it being a limited collectors item, but it's important that the battery degradation is not a severe factor.


Risks
The risks for Tesla, as with any emerging technology, are numerous. It is a speculative stock. The macro economy at the time of Gen III launch is a big factor. Automobiles are a discretionary purchase. An earthquake in California has the potential to devastate the company. The biggest risk is the however is the core of Tesla's focus, engineering affordable, safe, long range battery and charging technology.


Wild speculation about the iTv

Apple is rumored to be releasing a tv soon. Here is my wildest speculation about what it might include.
iTv will have a retina display.
iTv will have an app store similar to existing apple tv, but with a more apps, especially games.
iTv will have a microphone and a camera built in.
FaceTime will be included out of the box.
Siri like integration for commands to find shows.
Camera will have motion sensing abilities like kinnect.

There will be a mobile app for iTv for control and navigation, like slow motion and rewind controls.
There will be a separate iTv remote with basic buttons that runs over wifi.
The iTv remote will have an accelerometer like wii/roku remotes for games
iTv will offer a service similar to cable that includes on demand programming and a cloud dvr.

iTv will not allow external devices to integrate.  It will have wifi or ethernet as only inputs.

Apple will discontinue external Apple TV devices.

Here are some of the apps:
There will be a ton of content apps. Like the existing  iTunes, netflix, youtube, etc.  Later including hbo go, espn, hulu, vimeo, justin.tv, etc.
There will be tons of games.
Video conference apps (facetime at first, but later google hangout, skype etc.)

-there will be an app called laugh track that play the real laughter of people that have watched the show.

-there will be an app called mystery science theater 3000 that allows users to record commentary or jokes over media.  It also lets users upvote the best comments.

-there will be an app that allows other users to re-edit content you have bought and distribute only the edits.  Example: pulp fiction or momento in chronological order, or every scene from scarface where the F word is used.