Archive for the 'Technology' Category

Interviews at MS

October 15th, 2009 | Category: Technology

Check out this recent story about a developer interview at Microsoft.  I know Igor through a mutual friend back in Georgia.  Igor came up to Redmond for a conferece a few years ago when I was still there.  He reminded me of me – enthralled with everything Microsoft and willing to work to make himself an expert so he’d have a chance to work for the empire.  After I read this recent post about his interview with Microsoft, he reminded me even more of myself!  My first interview at Microsoft went badly as well.

This was a long time ago, not long after I was out of college.  The year must have been early 1997 when I was really into Microsoft technology and programming.  I spent all of my commuting time on the bus reading programming books.  I spent much of my reading time before bed reading programming books or a subscription to MSDN magazine.  With this rate of information intake, I became one of the top programmers at my company pretty quickly, but I was still unprepared my interview at Microsoft.

I expected my interview at Microsoft to concentrate on high level technologies like MFC and COM, which I’d pretty much mastered.  Indeed, when I did get asked questions about COM, I knocked them out of the park and the interviewer was outwardly impressed.  However, the rest of the interview, say 90% of it, was just straight C programming.  It’s hard for me to remember the exact questions I got, but here are some:

  • Reverse the words in a sentence.  This was pretty tough for me at the time, since it required careful attention to pointers.  Today, it’s a piece of cake.  I eventually got it, but my solution wasn’t impressive or quick.
  • Write a function to convert a number to a string and a string to a number.  I did decently on this, but nothing to impress according to Microsoft standards.
  • Write a function to reverse the bits in a byte.  This one I completely flunked.  I stood in front of the whiteboard for a long time, just silent, with no help from the interviewer.  At the time, I felt like an idiot, but in retrospect, I suspect he had no idea what to do with me either.  I gave a ton of interviews at Microsoft myself, and I would have been ashamed to behave as this interview did.  Regardless, I’m sure he wasn’t happy with my performance and I didn’t get the job.  But, even worse, I left not really wanting the job.

About three years later, I got the chance to interview again and this was when I landed my job at Microsoft.  I was way more seasoned as a programmer (I still regard GeoGraphix as the best programming job I’ve ever had), and I knew what to expect.  In short, I crushed this Microsoft interview.  However, I did think it was pretty easy by typical Microsoft standards.  The hardest question that I can remember was:

  • Something like, write a function to reverse a string using a char* but keep in mind that the string is a multi-byte character string.  Dang, I wish I could remember the details of this one a little better, but the trick was that you simply couldn’t write a string reverse; you also had to take into account that some of the characters were more than one byte.

One thing to note about Microsoft interviews is that when you’re in front of that whiteboard trying to find a solution to a really hard program, you’re also expected to write very clean and efficient code.  When I came on board the team and finally got my first look at some real Microsoft code, I was shocked.  “Wait, this is Microsoft right?  Who wrote this code!?”  That story is for a different post.

A few years later, when I felt I needed another change but was still interested in programming, I went on my last round of interviews.  I interviewed for the Office group, for Internet Explorer, and a couple of others that I don’t recall.  Office and IE were the most memorable because they were the closest that I came to getting an offer, but I never did.  In retrospect, this was a good thing, but I left again with a sour taste in my mouth about the whole interview process.  The questions that I was asked this time were ridiculously hard.  The ones I remember best, though still it’s fuzzy, were from the office group:

  • A problem involving binary trees.  I had prepared for binary trees, but this problem had a twist on it that made it really hard.
  • A problem that I later discovered was taken out of the Programming Pearls book.  In case you don’t know, this book has some super hard problems in here that some university classes take a couple of weeks to study.  I was expected to solve it in one hour.  I never did, but I was happy with how well I did.
  • I went through a few more questions but I can’t recall the details.  But, it suffices to say that they all dealt with either trees, hash functions, or lists.  Each was really hard.  I may have had less than a 50% success rate, but, again, I was personally happy with the progress I made on each.  I assumed that this would be taken as positive.

After maybe four or five interviews, I was shown back to the hiring manager’s office.  I’d had a great conversation with him the week before.  He had waived the screening interview because he was impressed enough with our conversation.  However, this time, he came in with a scowl and promptly announced, “Well, it seems it’s not going that well for you.  I’m not going to bother with an ‘as-appropriate’ (MS terminology) interview with you.”

I gave him a shocked looked and retorted, “Oh, I was under the impression that I was doing pretty well.”  This prompted mixed-up looks from both of us at each other.  To make a long story short, our short conversation eventually turned to me giving him a stern but nice lecture about how his team interviewed me on one skill, algorithmic programming, which I had already professed was my weakest trait.  If this was what they were looking for, then they likely made a good choice, however, if they were looking for a well-rounded developer which strength in distilling problems to their most simple components and a flair for creativity, then they failed.  I honestly can’t remember that much, but I seem to recall that he was a little shocked that I talked back to him the way I did.  I’m no super MS programmer by any stretch, but I had been at MS long enough to know that there are plenty of so-called geniuses that cause all sorts of problems with the code that they write and that hiring manager should look for balance on their teams.

After that, I made special strides to be a different sort of interviewer.  I never asked the super hard programming problems.  In fact, my problems were pretty easy.  Of course, if you wanted a chance, you had to nail it, and if you did, you had to be able to intelligently take it to the next level, explain why, and show your own brand of excitement while you do it.

I was proud of my track record:  People that I strongly endorsed when on to become great full-time hires.  Some people that I “no-hired” (MS terminology) and who were hired anyway eventually ended up being fired.  I can think of two right now!  Not to mention the numerous interviews that I conducted in China, which was a completely different animal.

To close, I wish you would have asked me to help you prepare in advance, Igor.  You gotta know the linked list backwards and forwards.  I know you do, but at least now you’ve had your trial by fire and you’ll be ready next time.  Those interviews can be unsettling.  I’ve never experienced the phone “whiteboard” interview.  I bet it’s even worse than the basic whiteboard interview.  Give it some time and try again.

3 comments

My Apartment

September 20th, 2009 | Category: China,Entrepreneur,Technology

Want to see some pictures of the apartment I live in?  See below.  Since I’m no longer at MS and am trying to work for myself, I’m a little low on cash flow.  So, I’ve moved into a cheaper place and am rooming with a former colleague of mine.  Actually, it was an easy transition since we’re both very low key.  I do sorta miss the privacy, but it’s not bad at all, and can be fun at times.  Anyway, I had a housing budget at Microsoft.  Actually, it was super high, until I brought it down to the reasonable level and negotiated the difference into a cash bonus instead – haha!  But anyway, my place was about 8000RMB before, which is almost $1200.  That’s pretty high end for Shenzhen (which is already an “expensive” city for China).  My place was really big too – 3 bedrooms.  Much to much for me, but I picked it because it was the cleanest place I found in a neighborhood that I knew.  The landlord turned out to be fantastic too.  She even dropped the price way down (to 5500, I think) when I announced that I had to move out (just before coming to the US for the summer).

Anyway, there were a couple of ‘hoods that we thought about moving to.  In the end, we ended up finding a place in “Hai An Cheng”, or “Coastal City” which is the name of a big mall near here.  It’s a nice area; the mall attracts a lot of high end businesses and restaurants and there is still plenty of local flavor.  There are way more local restaurants and stores that I can quickly get to now than before.  The only downside is that it’s not close to a subway.  But, I’ve found the key busses that can take me where I need to go.  Some are quite fast.  Who needs a car?

The rent is 3500RMB a month, about $500.  Split in two, that’s $250 per month.  Not too shabby.

I have a Filippino friend down the street whom I’m jealous of.  He’s got the best place for the money I’ve ever seen.  A very cozy apartment that matches roughly the same dimensions as mine.  But, a sweet kitchen and a well-designed bathroom too.  It’s only 3000RMB.  If he moves out, I’m jumping on that place without waiting.

3 comments

Software Release

September 19th, 2009 | Category: Entrepreneur,Technology

My first project after leaving Microsoft was to re-release my WebSnatcher products.  Except, this time, I wanted to give this old lineup a brand new handsome face.  That included:  bundling my two products together as a simple “web downloading suite”, update the new graphics with artwork from someone who knew what they were doing, a new name, and a new website.  Of course, I included some small enhancements and a few key bug fixes, but there wasn’t really that much new in terms of functionality; it’s just a much better looking package that runs much better on vista and Windows 7 and, as a package, it’s much cheaper (by a third).

The development was a pain.  The primary source of that was wanting to move the main product, the product formerly known as “WebSnatcher”, to Unicode.  Well, that didn’t work at all (and I believe I covered exactly why in a previous post), so rolling that back was kind of a pain, especially not having source control.

Then, just before I went to the US, I ran out of time and didn’t have all the software that I needed to prepare the installation.  My copy of InstallShield was in my storage unit and one of my first jobs was to pull that out and put together the installation while I was in the US.  But, upon arriving in the US, I discovered unlucky mistake:  Apparently the software that protects my product had corrupted one of my DLLs.  After trying numerous workarounds, I realized I was stuck and had to wait until I got back to China in order to rebuild the DLL and protect it again (I had some vague memory that the protection software would corrupt files one in a hundred times or so…actually, I now have no idea if that’s true).  So, I gave up on releasing my software and forsaked two months of revenue.  But, when I started the project up again in China, I realized that it wasn’t the software at all, it was just some absurd new security feature in Vista.  How many times has Vista prevented me from “realizing my potential”?  Well, let’s not even bother counting.  I immediately got a copy of Windows 7 and installed it on my laptop and reproduced the error.  I fixed it by manually registering the stupid COM DLLs on install and not automatically through DllRegisterServer().  Easy fix…once I knew what the problem was.

Well, as big a disappointment as that was, it paled in comparison to setting up the fulfillment operations.  I assumed that once the product was actually done, setup created, website running, and everything, that the big problems were behind me.  Oh no.  And what’s worse, these problems were even more stupid than the Vista problems.  In fact, all throughout this release, every problem I ran into was not a problem solved by creativity or innovation, but some dumb barrier placed by some bad design choice or lousy support system.

It started off pretty well.  I was set on fully automating order fulfillment.  Before, when a user purchased a product, I’d get an email notification.  Then, I’d log into my Windows machine, start up the software that protected my product, input their name, generate the key, then save the registration key as a text registry file.  I’d then start up my email program, copy the usual mail text from a text file and paste it into the email, then add the registration key as an attachment and send the email.  I got pretty good at this, where it would take two to three minutes to fulfill.  It wasn’t that big of a deal since I didn’t get that many orders, but the one huge downside was that it was dependent on me.  If I didn’t check email, someone wouldn’t get their key for a day or more (if I were a user, that would irritate me).  If I went on vacation and couldn’t bring my laptop, they wouldn’t get their key for a week, or maybe more.  But, at least I set up an autoresponder to let them know (no matter, that would irritate me too).  So, I was committed to 100% automated fulfillment.

The software that I use to protect my application came with a ‘C’ API to implement your own key generating tool.  That’s exactly what I needed and it fit the requirement of the regsoft.com, my fulfillment company of many years.  They simply needed the registration key to be output to stdout (text in a console application, basically) and to know the arguments that you required to be passed to your application.  Easy enough, and I was able to implement it in just a couple of hours (the one party in this whole affair that did do a good job was the protection software).  I then, according to regsoft’s instructions, emailed regsoft and asked them to evaluate my application, I attached the application in a zip file (renamed to .ziz), I included a readme.txt file with the arguments I required and sample output.  I did everything to the letter.  They said they’d review it in two days and get back to me.

Two days came, nothing.  So I wrote back.  I got an email response saying something like, “Oh sorry, we got your email but the file wasn’t attached.  Please send it again.”  I sent it again this time from two different addresses.  Two days later, I followup and get the same response.  This time I send another email and add an FTP link with username and password (which I tested) where they could download the file.  Two days later, maybe more, I follow up again.  I get the same response, except this time they suggest that I add a link where they can download it.  So, I write back nicely saying, “You guys don’t seem to have your act together.  I’ve already provided all of this.” to which they replied with profuse apologies.

It was a little too late anyway because I had learned of another fulfillment company, a sister company in fact, called regnow.com.  This looked more attractive anyway because they had an extensive affiliate network.  So, I was committed to switching.  I started the process to get my software selling on their site.

Of course, their system was way more complex than regsoft’s.  I actually liked the regsoft system quite a bit; it was well designed, they just lacked the affiliate network and their customer service was lacking at times.  Combine the two and you’d have a strong combination.  Anyway, just getting through the first two pages took a whole afternoon.  They had huge sections to prepare affiliate marketing kits and so on.  I had to create graphics from the artwork that my designer created for me in all sorts of dimensions.  No matter, I plowed thorugh it.

Then I got to the automated key generation section.  I assumed that I’d be able to use my little Windows console app to generate my keys.  No such luck.  They had much stricter requirements:  You had to submit source code, not an executable.  And it had to be compiled by the GCC compiler (uh oh) and be able to run on a Solaris machine (or whatever).  Well, I looked a bit into this, but I hate these open source compilers; just getting them to work is a monumental effort.  I don’t understand why they enjoy making it so hard, well actually, I think I do, I should write a post on the psychology of programmers.  Anyway, I realized this was going to be an effort so I first had to ask a key question:  “My key generating application is dependent on a Windows DLL (the protection software DLL), there is no way around this.  Do you support an app that can run on Windows?”  I never really got an answer to that question, but I did submit my source code just to see what would happen.  A tech representative wrote me back with a long list of errors and told me to fix them.  Most all of them were from Windows identifiers that the GCC system didn’t understand.  OK, that settled it for me; this was the wrong battle to engage in.  Was there another solution?

Turns out, there was something that looked promising.  I had recently purchased an upgrade to my protection software which included many updates in custom key generating options.  One was a CGI library.  I’d never done that before, but how cool would it be to generate keys over the web?  Regnow supported this, that was good.  So, I just needed to upload the library to my cgi-bin folder on my website and create a little web page to test it.  I uploaded the library, wrote the page (even easier than writing the first application), and tested it.  ERROR.  So, I opened a ticket with my hosting company to find out if they supported this.  I was suspicious of one little line in their CGI documentation:  make sure your script ends in .pl or (one of the other popular CGI scripting languages).  Mine was a compiled library.  Maybe this was impossible to work.  Regardless, my ticket was there.  In the mean time, I posted the “do you supported compiled CGI libraries on your server?” question to another hosting company.  They wrote back right away with “Yes”.  Would I end up switching hosting companies too?

In the mean time, the other company took forever to answer.  The first response they gave me was, “Can you set up a test page?” to which I replied, “Look at my original request; I’ve pasted in text you need to test it.  Just save that text to a ‘test.htm’ file and open it.”  I won’t go into the details of all the back and forth, but finally they confirmed that it was indeed true – they only supported scripts, not binary CGI solutions.  Time to switch hosting companies.

I started trying to switch hosting companies.  I figured out the plan I wanted and the duration (I wanted the max length so the monthly rate would be very low).  But, my credit card was denied.  Oh no, not now.  I tried jumping over to some software that bypassed the China filters and disguised my IP address.  Still failed.  I called up the company and told them what was going on.  They suggested that I either go to Hong Kong or call someone in the US to make the purchase for me.  So, I called my mom and we walked through it at least two times, maybe three.  DENIED!  Remember, this is all balancing times between the US and China so much of these conversations took place late at night or early in the morning for me.  I called the bank and told them that I was running into these problems.  They suggested that I call the hosting company back and explain to them that I had contacted the bank and so on.  She also gave me a phone number that they could call in order to verify that I was telling the truth.  Back on the phone with  the hosting company, the customer service agent was great; he seemed to understand the pain that I was going through.  As he was communicating with some of the people looking into the credit card, he would quietly pop back on the phone with me and tell me, “They’re asking me if you sound like a real American” to which I could only reply in my best Apu voice, “Yes, thank you, hot dog, Britney Spears…”  We finally got it all straightened out, but I had to email over a scanned copy of my passport and explain again the situation, the people I talked to, the bank phone number, etc. etc. I was relieved when I woke up the next morning and I saw an email message, “Welcome to Host Gator!”  YES!!!

It took me only five minutes to upload the CGI key generating library and test it.  It worked!  Score another one for the protection software!  Now, it was just a matter of getting it plugged in to the Regnow system.  But, remember what I said about it being complex?  Well, it was basically impossible for me to figure out without plowing through reams of web page help which was badly indexed and had no search (what?!?).  So, I spent the next several days on email with support back and forth.  I asked for a phone number twice; never got one.  While these guys were helpful, they were constrained by this complex system, and their time zone.  It was basically an email per day unless I was lucky enough to catch one of them early in the morning (my time) in which case I’d get two emails in one day.  In between all that, technicians were changing parts of my submission, deleting sections, etc. etc.  This prompted more emails like, “Hey, I just added this, what happened!?”  It was a big mess, and they have a lot of improvement to make here.

I realize this post is already long so I’d better stop.  If I went into all the additional little problems of getting this product out the door, I could go on for another few paragraphs.  Let’s just say that it’s finally done and I’ve very happy with it.  An order came in almost right away and it was so sweet to not have to do a thing.  I’m looking forward to turning more of my attention to another project and spending a few hours a week working on marketing this software, something I never did the first time around (I think I could have done really well if I had any business sense back then).

I never would have thought that this little project would have been such a pain.  As they say in Chinese:  “Hao3 Shi4 Duo1 Mo2″,  “????”, or “The road to success is paved with hardship”.  Neat how you can say all that in just four words, huh?

Well, here t’is, finally!

Snatcher and Son banner

4 comments

Windows 7 Review

September 01st, 2009 | Category: Technology

I realized that I finally had to upgrade my Windows installation on my laptop in order to debug my upcoming software release.  For the longest time, since the beginning of my summer trip, I was assuming that a problem that I was having with one of my DLLs was due to my piracy protection software corrupting the file.  In reality, it was, of course, some new weird junk security feature that was introduced on Vista.  Back in China, after tracking the problem down, it was undeniable that fixing it would require me to install a new Microsoft OS.  Folks who know me know that I think that Vista was a horrible release.  Horrible, expensive, lengthy…just bad in every way.  In fact, here’s a Microsoft anecdote:  I can recall sitting in on a meeting with the VP in charge of Vista.  He was shouting and complaing and pleading and asking, “Why can’t we do this?  Apple has been doing this for years?!”  When the explanation came, he put his head in his hands and shook his head back and forth saying, “This is so depressing.”

That says it all.  OK, it’s not news that Vista is junk.  However, I have been surprised by Windows 7.  And it only had to do a few basic things much better:

  • Improve the wireless connectivity and interface.  It’s way better on Windows 7; in fact, it’s better than the Mac (can you believe I’m saying that?).  Actually, I’m not sure what this was like on Vista, but it was ridiculous on XP:
    • When you type in the Wireless password, you have to type it in twice!  Why?!  You’re not setting the password, you’re just accessing the wireless network!
    • Once you connect to wireless, the UI is out of sync:  Though the machine is connected to the wireless internet, the button at the bottom says “Disconnect”, while the wireless network says, “Not connected”.
  • Improve the stupid “Start” menu.  This was an easy fix and much better in Windows 7.
  • Improve the speed.  Windows 7 start up time is similar to XP.
  • Improve the worst feature of Vista:  the cumbersome security.  Way better in Windows 7; you barely notice it.  UAC will not become a household acronym.

On top of that, the new taskbar is way better.  It looks great, it’s simple, and accessing your open applications is almost as good as Apple’s Expose.

I’m looking forward to upgrading my desktop machine to Windows 7.  I’ll do that as soon as the product is officially released.  I’ve been running XP SP1 (yes, that’s SP1) for a long time now.  When I tried installing SP2, the machine wouldn’t boot.  From that and other lessons like that, I’ve also always turned off system updates.  But, I’m beginning to hope again with Windows 7.

No comments

Where’s php.ini?

August 20th, 2009 | Category: Entrepreneur,Technology

I had a heck of a time hunting down the location of php.ini on my Mac.  I needed to set the PHP error reporting setting to ‘true’ for my local installation.  Though I much prefer the file system organization of the Mac to Windows, I don’t know it nearly as well.  After some digging, I finally found the file.  On top of locating it, I had to set the permissions so that I could make the necessary change to the file.  Here are the steps:

1)  Find PHP5.  It’s a pain in the axe.  It’s located at /usr/local/php5/lib.
2)  Access the parent folder in the finder by typing “/usr/local/php5″ in the dialog at “Go->Go to folder…” menu item.
3)  Right click on “lib” and choose “Get Info”.
4)  Under “Ownership and Permission”, click on the lock icon.
5)  Change the permission so that you now have permission to write to the file.  You’ll have to put in your admin password a cupla times.
6)  Navigate to the “lib” menu now and find the “php.ini” file.  Double click on it and choose “TextEdit” as the application of choice (make it the default app too).
7)  Make the necessary changes and…done.

No comments

Couple days at the cabin

July 22nd, 2009 | Category: Technology,USA

After the climb of Slippery Slab Tower, I headed into Cashmere to hang out at Robert’s cabin for a short retreat.  The great thing is that there was no internet connection, phone, and so on.  I was planning to stay there for about four or five nights, but ended up staying less after Daniel confirmed a Wednesday departure for a trip to the North Ridge of Forbidden Peak.

Though I ended up staying for only two full days, I accomplished a lot.  Basically, my schedule:

  • Wake up, have breakfast
  • Dig a little section of trail on the property until about 8:30 or 9:00
  • Work on WordPress development
  • Have lunch
  • Go into town to check email and do a little bit of internet surfing, two hours max
  • Work on more WordPress development
  • Dinner, read, go to bed

Actually, it was a great break from the usual routine and it confirmed suspicions that I had about my personal productivity.  One of the problems in China was that the internet was so slow that I’d be working on a certain web page, but it would take a little to long to load.  So, I’d tab over and open another page, another site that I needed to work on, investigate, read, or whatever.  Naturally, that page would take a while to load as well, so, I’d open another tab and repeat the process.  Eventually, I’d have ten or so tabs open and rotate to each one as they finish loading.

Switching focus between tasks is undeniably costly.  After a few weeks of this, it became apparent to me that this rapid switching between tasks was costing me a lot of time.  Spending time at the cabin away from the phone and the internet empirically demonstrated that being away from these distractions causes productivity to jump.  So, in only two days I wrote a WordPress plugin that reads a folder on a website and displays each of the files as downloadable links.  This was the first time that I’d written anything in the PHP language.  Not only that, but I also created two admin settings pages that integrate into the WordPress admin panel:  one for uploading files, and one for deleting files.  If I were working on this project in a normal environment, it would probably take me a week to write this.  So, how do I enforce this undeniable law of productivity in a normal environment?  Well, I hope I can qualify this better in the future, but to start with, setting distinct time limits on tasks, in units of hours only, is a good start.  Also, simply accessing the internet at specific times helps too.  I may have to get back on my email checking schedule…

Anyway, thanks, Robert, for the opportunity to stay at the cabin.  I enjoyed it.

No comments