Career tips at Microsoft

I have always been hesitated to write this post but since I’ve been fortunately enough to have great career mentors and I recently got to a new career stage, I’d like to share some of the career tips that benefited me over the years:

  1. Before you get to senior level, there’s only one tip: Get things Done, well, the direct words were slightly different, to quote from a Partner level mentor. Well, there’s more:
  2. Assume you can do your own work very well, start to think about what you can do to help others or the team. For example, if you observed most devs are doing the same manual effort over and over again, maybe you could write a tool to automate it and save everybody’s time.
  3. If you look around, you should always be able to find some inefficiency somewhere. Maybe the unit tests have low coverage, maybe the perf of the product is not so good in certain scenarios. Those are opportunities for you to step up.
  4. Junior devs would like to spend a lot of time. That’s a good thing. But time doesn’t equal to results. You should always focus on your time and effort on the most important things. I know sometimes it’s not very clear what the most important things are. But if you take a look at your manager’s commitment, or the business priorities of the whole product group, you should have a better picture.
  5. Always document things, especially with partner teams. It’s very easy to forget what you discussed in a meeting. Having everything documented would usually guarantee there’s no misunderstanding.
  6. Have a sense of ownership. I’m not talking about claiming or even fighting for the so-called ownership of important features or components. I’m talking about in general the sense of feeling you’re the owner of the product your team is working on. If there’s an issue or a customer question, never simply say “it’s not my feature or my bug”.
  7. Pay attention to communications and soft skills. Sometimes it’s common sense and learning how to better deal with people is a life lesson. I’m not going to talk about this in details but remember, this could be a blocker when you want to grow your career to senior or beyond.

I welcome any comments and feedback.

P.S., due to some personal reason, I didn’t write any blog post for a long time. I’ll try to be more active now.

ExpectedExceptionBaseAttribute and “Object reference not set to an instance of an object”

You’re writing unit tests with Visual Studio and you want to verify that you’re throwing the correct Exception. You could use ExpectedExceptionAttribute class but it only allows you to verify the type of the Exception. You might want to verify other properties so you decide to create a subclass of ExpectedExceptionBaseAttribute, which allows you to have your own Exception verification logic.

Unfortunately, if you’re using Visual Studio 2012 RTM (or with Update 1 or Update 2). You will run into a weird error at run time: “Object reference not set to an instance of an object”.

What’s the solution? Install Visual Studio Update 3.

You can get more details from here: https://connect.microsoft.com/VisualStudio/feedback/details/758875/-testtools-unittesting-class-deriv

Weird Error of Log Parser

Log Parser is a great Microsoft tool for processing text-based data. Its scriptable COM components can be easily consumed by .NET applications.

Recently I ran into an interesting error when using the COM components with C#. The data input for the parser is a TSV ((tab-separated values) formatted text log file. Here is code:

LogQueryClassClass logQuery = new LogQueryClassClass();
COMTSVInputContextClassClass inputContext = new COMTSVInputContextClassClass();
inputContext.iCheckpoint = “MyCheckpoint.lpc”;
ILogRecordset recordSet = logQuery.Execute(“SELECT * FROM test.log”, inputContext);

I got all NULL values in the result records or the following exception:

Unhandled Exception: System.Runtime.InteropServices.COMException (0x80094004): Error parsing query: Header for file “test.log” contains an empty field name declaration [Unknown Error]

The weird thing is if I commented out the line which assigns iCheckpoint for incremental parsing, the code would work. Eventually I found out that I needed to specify the CodePage of the inputContext since the text input was encoded in Unicode. So the solution is to add the following line:

inputContext.CodePage = -1; // -1 is Unicode, default (0) is the system codepage

Seattle Works Day 2007

1,000+ participants at 30+ project sites added up to nearly 4,000 hours of service in a single day. Seattle Works Day is a fun and easy way to green up Seattle.

Microsoft also broke Seattle Works Day records. We had three projects this year with over 300 participants – our largest group ever. Microsoft has sponsored each individual on the Microsoft team so it’s free for us.

I signed up for the Washington Middle School project. We went weeding, edging, and laying bark mulch at the school. Our help is important as the Seattle School District has limited resources and they have committed to reducing the use of pesticides to make this area safer for all.

The good: the Green theme. It’s great to see we’re making an effort to keep our urban green spaces beautiful and available for safe outdoor recreational activities.

The bad: nothing really bad, although I felt the music was a little too loud at the after-party. It could have been easier for me to meet more people and talk with them.

The dirty: it was raining throughout the time we were doing the project. I’m actually a special person who enjoys raining. With the rain, getting dirty part is even more fun. 🙂

I joined Seattle Works Day 2006 and I’m looking forward to Seattle Works Day 2008.

New Adventure

After working in SQL for more than 19 months, I have decided to pursue a new opportunity in Office Live. On June 1, I’ll begin my Office Live adventure.

10 Reinvigorating Facts About Microsoft’s Profits

I’d like to share an interesting article on Microsoft’s profits published a while ago:

10 Reinvigorating Facts About Microsoft’s Profits

Microsoft last week announced quarterly revenue of $14.4 billion and net income of $4.93 billion. In other words, Microsoft’s daily net income is about $55 million. That’s $55 million in pure profit every 24 hours. Do some quick math and you’ll learn it takes Microsoft only about…

  • 10 hours or so (yes, hours!) to exceed Red Hat’s (NYSE: RHTNews) quarterly net income of $20.5 million.
  • four days to exceed Research In Motion’s (NasdaqGS: RIMM) quarterly net income of $187.9 million.
  • four days to exceed Starbucks’ (NasdaqGS: SBUX) quarterly net income of $205 million.
  • one week to exceed Nike’s (NYSE: NKENews) quarterly net income of $350.8 million.
  • two weeks to exceed McDonalds’ (NYSE: MCDNews) quarterly net income of $762 million.
  • two weeks to exceed Apple’s (NasdaqGS: AAPL) quarterly net income of $770 million.
  • 18 days to exceed Google’s (NasdaqGS: GOOG) quarterly net income of $1 billion.
  • 23 days to exceed Coca-Cola’s (NYSE: KONews) quarterly net income of $1.26 billion.
  • five weeks to exceed IBM’s (NYSE: IBMNews) quarterly net income of $1.85 billion.
  • 10 weeks to exceed Wal-Mart’s (NYSE: WMTNews) quarterly net income of $3.9 billion.
  • While I feel impressed and proud, I realize it’s challenging for Microsoft to keep or even exceed the current achievement. To grow a multi-billion business, in my opinion, is way harder than to grow a multi-million business. The dynamics of the IT software industry are changing in a very fast pace. Customers expect constantly innovations and there’re new competitors coming up every day. Nevertheless, I strongly believe Microsoft will continue to excel with her smart employees, firm leadership, and healthy corporate culture.

Progressive Development

My mentor James at Microsoft recently started a blog with the name “Progressive Development”. It talks about best and worst practices of software engineering in the format of entertaining conversations between two figures Motley and Maven.

I knew James through his class at Microsoft and he is a fantastic teacher with excellent engineering knowledge and passion on software quality. His blog entries on engineering practices are definitely worth reading.

Progressive Development: Zany Adventures in Software Engineering with Maven and Motley

Bluehat message recall incident: flashback to Bedlam DL3

If you don’t know what Bedlam DL3 means, I encourage you to read this blog entry You Had Me At EHLO… : Me Too!

Yesterday, a similar event happened, in a smaller scale though.

Someone sent an announcement email to the Bluehat Alert DL with more than 1000 members at the company. The email was actually sent from the DL itself.

Not long afterwards, somebody replied saying that the url in the announcement message was incorrect.

The sender then recalled the message and asked for recall notification to see whether the recall is successful or not. What’s the consequence of this recall? Every member of the DL (or more precisely, every Outlook client) sent a recall notification to the sender, that is the DL itself! Assuming the number of members in the DL is 1500 (the actual number should be bigger than this), the total number of message generated was 1500 * 1500 = 2.25M.

The entertaining value of this message recall incident is not less than that of the Bedlam event. Here are some of the funny emails from people who got flooded with the recall messages:

– Whoever is testing denial of service attacks using Outlook 2007 was successful. Congratulations, we’re prepared to hear your talk at BlueHat.

– The most noteworthy that happened since the BEDLAM days is that we learned how to delete mails faster.

– By Design.

Welcome to Bill Lin’s blog!

It’s not easy for me to start out the first blog entry so I’ll make it succinct. My name is Bill Lin and I’m a developer on the ADO.NET team. As a dev, I’ve worked on the team for 8 months. I currently am working for SqlClient.

Moving forward, topics I expect to talk about include SqlClient and SQL Server. But it’s possible to see things that are not data related:)