Categories
All MacBU

A million errors? Really?

Well, yes and no. Yes, when I added up all the errors reported from each of the separate projects that I was trying to build, the total was somewhere over 950,000. However, that does include lots of duplicate errors (for example, from one header that had several errors, and that header was included over and over again), cascading errors (the parser choked on a line, causing it to get confused by the subsequent correct lines of code and thus report lots of bogus errors) and other sundry items that inflated the error count.
So, we didn’t actually have to make 1 million edits to the Office source code, but we did have to slog through a lot of output to clean things up. Including fixing lots of the warnings…
And no, I certainly didn’t do it all by myself. We have a great team of developers at MacBU who collectively tackled this transition. I’ve just been the point man. This long process has been very interesting and I’ve seen a lot of code I’d never looked at before, but I’m ready for us to complete the switch so I can get back to coding real features.
Perhaps tomorrow I’ll discuss the joys of assembly code in a multi-architecture world…

Categories
All MacBU

Whither Xcode?

Rick Schaut, one of the devs I work with, had an excellent post back in March about the MacBU’s transition to Xcode. Now that Apple has released Xcode 2.3, I thought I’d chime in with a little more info on our progress.
First, let me acknowledge that as an employee of the MacBU at Microsoft, I too am under NDA both with Apple and with Microsoft. As such, there’s a lot of specific detail I can’t comment on publicly.
I want to start by telling you about my role here. I’m a development lead in the MacBU, with a team of 4 devs reporting to me. (No, Rick is not one of them…) Part of my team’s responsibility is tool evaluation and maintenance. For the last few years I had been our point-of-contact and liaison with Metrowerks. My team tested their pre-releases of CodeWarrior, filed bugs with Metrowerks, updated our code to adhere to their ever-stricter-and-more-standards-compilant compiler, and rolled the updates out to the MacBU as they shipped. Given my experiences with that aspect of our tools and external dependencies, my manager asked me to take the lead dev role in our coordination with Apple as we investigated switching to Xcode.
So, we created a virtual team for me to lead (virtual in the sense that the other devs on the team did not report to me in the official ‘chain-of-command’) and we dug into our source to see what the impact would be. Apple’s announcement last summer about switching to Intel chips took us by surprise. I mean, sure, we had seen all the commentary on the rumor sites and whatnot in June 2005, but way back in early 2004 when we were planning out the schedule for the version of Mac Office to come after Office 2004, we had no inkling of the impending switch and thus had not put any time into our schedules for it! This meant that our early investigations had to not only identify what code would be affected, but how long it would take to change over and how that would affect our shipping schedule. Now, I can’t give any details here, but suffice it to say the changeover would not come for free!
The decision to switch dev tool environments was pretty much a slam dunk, especially after Metrowerks announced they were getting out of the Mac dev tool business and would not be producing any Intel tools. That then set us up to start working with Apple, getting early seeds of what was then Xcode 2.2, and running our code through it.
wwwwwwwhhhhhhhiiiiiiiiIIIIIIIIRRRRRRRRRRRRRRRRR!
That was the sound of the fans in my G5 taking off after trying to compile Mac Office in Xcode! You see, Xcode uses GCC, and one of the great things about GCC is that it is incredibly standards-compliant. Unfortunately, one of the really annoying things about GCC is that it is incredibly standards-compliant. Parts of Mac Office date back to the mid-1980s (Remember Excel 1.0 for the Mac?). Office is so large that the older code hasn’t necessarily been brought up to modern styles/conventions/standards, and we routinely migrate code from Win Office into Mac Office. Win Office uses Visual Studio, which wasn’t always so compliant itself, meaning that we sometimes inherited code that needed some friendly compliance coercion. 🙂 Our first passes at compilation generated almost a million errors and several million warnings!
Then, there were the issues in the Xcode IDE itself. Now, I want to be very clear up front that Apple has done a heck of a job with Xcode. They have been incredibly helpful and have provided a ton of assistance to us as we work on the transition. Apple has done a huge amount of work on Xcode in the last couple of years. Xcode, however, is a relatively new IDE whereas CodeWarrior has been around for over 10 years and had become pretty mature. In the last year, we’ve worked with Apple on literally hundreds of feature requests, trivial bugs and critical bugs, suggestions for future releases, documentation clarifications, etc.
That last bit is actually one of the neatest things about this transition from my perspective. Apple’s tools, being so nitpicky about code standards, have helped us find and fix bugs in our code and make the next version of Office a better product. At the same time, the sheer amount of code we’ve thrown at Xcode have enabled us to help Apple make Xcode a better IDE, which in turn helps us be more efficient, write more features, and yes, make a better product! Our two companies can and do help each other improve. It’s a great concrete example of how positive our business relationship really is.
So, where are we now? Almost done. Yes, Apple has shipped Xcode 2.3. No, the MacBU is not totally done with the transition (more of those picky details I can’t actually talk about.) But we’re close! Perhaps one day soon I’ll get an email (I’m at home on parental leave right now) saying we fixed that last line of code and we’ll be fully on the Steve bandwagon.
With that, I’ll close this out for the evening. Its 12:30am and my new baby daughter is starting to wake up and ask for her next bottle, and the bottle always has a higher priority than the blog…

Categories
All Personal

Fun with CSS

I’m a procedural programmer at heart. I’m quite competent with C and C++, can cobble together something in Perl or Python, and dimly remember Pascal. However, I’ve only dabbled at a bare minimum in HTML over the years since running a trivial web site on my Mac IIsi in college. So here I am now, futzing with the php and css pages for the WordPress theme I’m using. I wanted to get the XML feed icon on the sidebar, instead of using text in the footer. Looks like I got it to work, but it took me a while. Thank goodness for Transmit and TextWrangler, which let me edit files transparently over FTP.

Categories
All Personal

Here we go!

I’m going to use this blog to ramble about a variety of stuff, be it whatever I’m thinking about at 1am, or what I did today, or perhaps even about work. I’m too lazy to keep a work and a home blog separate, and I’m sure that if I tried I’d end up dropping one or the other eventually.
So last night my wife and I were watching Memoirs of a Geisha. Decent movie, followed the book about as well as any movie adaptation ever does. The cool thing was that as we were watching near the end, my wife and I both said roughly simultaneously “Hey, we’ve been there!” as the screen showed a quick shot of a small street in the Gion area of Kyoto. My wife and I got engaged in Kyoto back in April 1999. That was a fun trip — she understands Japanese better than I do, but I’m a little more comfortable speaking it and we had some great round-robin conversations with people.
I’ve been to Japan a few times. I lived in Okinawa for a summer between my junior and senior years in high school, and have been to Tokyo in 1999, 2001, 2002, and 2004. Okinawa was a lot of fun, and it whetted my appetite for the Japanese culture. (Although Okinawa’s history and culture itself is quite distinctly different than that of the main part of Japan…) I studied the language and history in college, and then spent 3 years studying the language out here in Seattle. I’m not at all fluent, but I can manage to get myself around reasonably well enough. I’ve visited Tokyo for fun and for business each a few times and always had a great time. I’d love to see more than just the megapolis sometime, though. Perhaps travel to Hakone, or the Hokkaido winter festival, or down to Shikoku or Kyushu even. Someday…