Wednesday, October 19, 2005

Adam Bosworth on Speaking Up

Adam Bosworth posted an essay on "Speaking Up", the responsibility of us, as members of our world, to speak up and ensure that reason and logic decide our course. His summary says it better than I ever could:

It is time to speak up. It is time to say that facts are what matter, not faith, that human progress is accomplished through unfettered use of reason and inquiry and tolerance and discussion and debate, not through intolerant and irrational acts of terror or edicts. For all of our children and for the future, speak up against this wave of intolerance and irrationalism washing over the world.
I could not agree with him more on this issue. Decisions that impact people's lives should be made based on careful study and reasoned research, not blind faith nor political whim. Decisions need to be made that factor in the entire context, not just your personal beliefs. This applies equally, whether talking about voting to potentially repeal the gas tax here in Washington (a terrible idea in my mind, we need that revenue to fund transportation infrastructure/repair), dealing with educating our children about evolution, or deciding fiscal policy for the nation.

Friday, October 14, 2005

A taste of Java

I've spent the last few weeks reacquainting myself with Java. I've toyed with it a little over the last 7 years, but nothing serious. My job previous to Microsoft (so roughly 8 years ago...) involved working with Java, so this was not a virgin introduction. Besides, Java and C# are not really that different, syntactically. In fact, I've been surprised at how similar many of the utility libraries really are. Of course, I keep confusing my work-mates by calling things by their .Net name, rather than their Java name. It doesn't help that Java 1.5 added a whole new set of classes that are named just like the .Net equivalents.

Which gets me to my first point. What is with Vector and Hashtable being synchronized? I've been performance tuning our latest code and the Vector's synchronization overhead is huge! I understand the desire for correctness (synchronization) but the cost is so high for the majority of usages where that overhead is completely unnecessary. Now I understand why I've seen so many research papers on analyzing Java code to factor out synchronization where it is not actually needed. How about we just have a better class library? (Note: that doesn't mean that .Net is a good baseline either...) The solution? Add new classes! yay! Now half your code uses Vector and half uses ArrayList. sigh.

One huge factor in helping me jump back into java so quickly has been Eclipse. Aside from being slow, huge, and having key combinations that make me think more fondly of vi, this beast rocks. Intellisense is easy and fast. Background, incremental compile means that the basic development cycle of code/compile/test is fundamentally changed. Integrated JUnit means testing is easier than eating a jelly donut. The CVS integration is lovely, logical, and intuitive.

Some things I miss:

1) Version control with a concept of a checkin spanning multiple files (like Subversion). CVS is the industry standard, but I really miss being able to call up all the changes (spanning multiple files) that went into a checkin.

2) Good profiling tools. At Microsoft, I had access to some quite excellent internal profiling tools . It appears that most of the good java profiling tools are rather expensive. Thanks to the joys of classpaths and jars, I also find it rather tricky to get a good setup. The free tools I've tried are usable, but hardly optimal for medium or larger sized code-bases.

3) Struct! How I miss being able to define structures and arrays of structures. I can't believe that they implemented Generics (and I'm not a fan of how they did that either) and haven't addressed this huge deficiency. I want an array of structs, not an array of object references. The alternative makes me feel like I'm back programming in Basic; you allocate an array for each field of your struct, or you store everything in a giant Object array, and mix it all together.

Everything I've been working with is lower-level stuff, no UI, thus I can't really comment on the GUI libraries and since there is no .Net counterpart to what we are building, I can't comment on performance either. I'd love the time to port this whole thing to C# and compare performance...

One thing I really do like about Java is the wealth of options. There is such an incredible variety of libraries and tools out there, it is amazing. After being stuck in a Microsoft, Not Invented Here, culture for so long, it is wonderful to be free to benefit from such a community.

Actually, I think that the community aspect transcends Microsoft's NIH issues. Java has been around much longer, and is the language of choice for lots of people doing simple, cross-platform tools. This has created an ocean of interest that has turned into real code. Microsoft has never been good an encouraging such attitudes. People who build cool things on Microsoft's platforms are usually consultants who then sell what they build, rather than giving it away. On one hand, this means that some of the offerings for Java are less polished, but on the other hand, building on Microsoft's platform has a lot of hidden extra cost. All those tools and public code that you get for free with Java carries a huge advantage. There is a fundamentally different attitude in the user-bases of C# vs Java, that goes far beyond the language itself.

Friday, October 07, 2005

you know you are a computer geek

You know you are a computer geek when you stay at work till almost 9pm on a Friday just to get the latest performance numbers from you latest batch of changes. The best part was that it was worth it! One of the things I love about programming, is how a few hours ot intense work can sometimes provide amazing returns. ... of course there is still that last bug that will probably take me all of Monday to track down... sigh

Now I'm off to go dance my arse off in celebration.

The curse of Middle management

I had a long discussion with a friend of mine about Longhorn aka Windows Vista. He had just caught up with news and some of the recent interviews with Jim Allchin. He knew I had some involvement with the OS divisions, and was just generally curious for my perspective 2 weeks out of the company.

In my view, a lot of the problems at Microsoft stem from bad middle management. Microsoft has built up a whole ecology of managers, who are at least as concerned with their career as they are with making good decisions. I've interacted more than I like to admit. The effect is that upper management doesn't hear a clear story about what is really going on. I think the phrase I used was that they 'massage the message'. Combine that with long release cycles and lack of accountability falls out as an inevitability.

One of the reasons I left is because I just don't see any way out of that mess. I am humbled by MiniMicrosoft and his determination to be part of the solution. His loyalty is impressive. To me Microsoft has always just been another company, one of many. When Microsoft stopped being the right thing for me, it was time for me to move on. Microsoft is still a great place for many reasons. It has the best benefits of any company I've ever heard of. It has great people. It has a huge customer base, and some really amazing customers and MVPs. It has some amazing internal-only tools. But I don't think it will ever be the hotbed of creation that it was 10 years ago.

Sunday, October 02, 2005

Comment spam

I logged in today to see that I had over 60 messages about new comments on entries to this blog. Every single one of them was comment spam. Every one. So I've changed it to only allow registered users to comment.