28th November 2006

Technology- I Bought a Mac

Last week I got my new MacBook. It has been exactly 10 years since I last bought a Mac, just after I joined Microsoft in November 1996.

From 1984 through 1995 I was primarily a Mac developer. In the mid 90s the combination of the stagnation of the Mac platform (at that time) and the new stable Windows NT operating system brought me over to the Windows world. I was writing cross-platform software, but at the time I needed to reboot my Mac every time my application crashed, and Windows could just restart the process and keep going. As a developer you do that a lot so I started using the Windows machine more and more and eventually had little reason to keep using a Mac at all.

This year the situation has changed quite a bit. Im working on my own projects and would like to make sure that the web stuff works well with the Safari browser on the Mac. The Mac also has this application iCal which can sync calendars from a web-site and I want to make sure it works well with CalendarData.com.

But even more importantly, the switch to the Intel chips, something the Mac faithful had been speculating about for years, has made a huge difference in the practicality of using a Mac. My new MacBook is a GREAT Windows laptop. But best of all, with one key-press I can switch between the Mac OS, Windows Vista, and Linux and back to the Mac OS. Using the Parallels virtual machine software this laptop gives me the ultimate flexibility which is just a huge advantage.

After ten years away from the platform my Mac skills have gotten very rusty. As I usually do Ill be posting my discoveries on here as I play with new utilities and all that fun stuff. If you want to follow me, Judy’s Book’s deals site has a page of deals for the Apple store.

]]>

posted in Technology | 0 Comments

17th November 2006

Technology- SOAP and S is for Simple

I’ve seen lots of links today to Pete Lacey’s post “S is for Simple”. This more or less makes fun of just how complex SOAP turned out to be with all its layers of XML schema, options, and other such mess. The general point is dead on and I’ve been a big fan of simpler REST-style mechanisms for wiring things up. The SOAP stuff works great when you stick with a single vendors tool-kit, especially just cranking it all out in Visual Studio, but wiring up dissimilar platforms is still a mess.
Pete’s post points out that SOAP doesn’t really use HTTP and mostly just tunnels through it. It doesn’t put anything meaningful in the URL or use HTTP response codes in a meaningful way. He then points out that the SOAPAction HTTP header is mysterious and no one knows what it is for.
If I remember things correctly, SOAPAction is at least partly my fault. During the era when SOAP was being developed there were several different faction inside Microsoft involved with Internet protocol stuff. The faction that I was more associated with was more directly involved in the development of HTTP and HTTP extensions like WebDAV while another set of people had come from an RPC background and were developing SOAP. To be fair this was a classic case of a couple of groups of people by in large trying to work with each other, but not taking the time to really understand the other groups view-points, perspectives and expertise, and this was probably worse on the HTTP-fan side.
In any case, we were working with the SOAP guys to try to make SOAP more integrated with HTTP rather than just tunneling through it. HTTP has mechanisms of namespace, feature negotiation, authentication, error reporting and more, none of which SOAP used. On the other hand the SOAP guys were just trying to build their SOAP features and figuring out how to interact with all this HTTP stuff seemed like it was just going to delay them, plus it would make it harder to apply SOAP over other infrastructures (not that I’ve heard of anyone doing SOAP over SMTP or anything in real-life).
So we were left with trying to come up with practical arguments with why SOAP needed to follow more HTTP rules to be successful in the marketplace. For better or worse the only argument we really came up with was that HTTP protocols often have to go through HTTP proxy servers to get in and out of firewalls. By simply tunneling everything we pointed out that the administrators of those firewalls might lock down the traffic and not be able to differentiate between SOAP traffic, web-browser form submissions, etc. We didn’t want the proxy to have to parse all the XML in the request to tell what was happening.
Initially we were asking for SOAP to be handled over a different method from POST. Our argument was that HTTP methods were the extensibility mechanism for HTTP protocol stuff and since POST had another function, it was not appropriate to reuse it for a very different type of thing. The counter-argument was that there were various HTTP stacks and proxies that didn’t handle methods other than the built-in ones and by using a different method we would limit the reach of the protocol. The compromise was the SOAPAction header which a proxy could use to tell the difference between normal web-browser form submission and SOAP traffic, and differenetiate
between different types of SOAP requests. In theory this would give the administrators some needed control of their firewalls.
Cue forward a few years, and it was probably a mistake. I haven’t heard of anyone using it for anything useful and it just creates extra complexity and another thing to get wrong trying to interoperate between different implementations.
One last note- the Internet community has a long history of slapping the “Simple” term on things more as wishful thinking than reality.

posted in Technology | 0 Comments

10th November 2006

Technology- Paged SQL Queries

The last two times I asked a question on here the result was so succesful I figure I may as well try it again.

One of the most common scenarios for querying a database is a paged result, either in a
rich-client listbox scenario, or in a web-page where it shows you page x of Y. MySql has this cool syntax
where you can do something like:

SELECT * from xxx LIMIT 500,10

Which means give me lines 500-509 of the resultset I’m asking for. So if I’m displaying a page
with 10 entries on each page and want to show page #51, I just do the above.

As far as I can tell Microsoft SQL Server has no equivalent syntax. You can do something similar to this
with a cursor, but as far as I can tell its complicated to do (at least I haven’t seen any easy boilerplate
that I can use everywhere). Plus there are all these different kinds of cursors and its hard to understand the
performance trade-offs of each.

Now to be fair, I don’t know the real performance of the MySql implementation. Presumably when you say LIMIT 500,10
the database is calculating the first 510 lines of the result set and only returning 10. But the easy way with SQL
server involves returning all 510 lines and then throwing away the first 500, which can’t be better. Plus in
theory given the knowledge you want that 51st page, MySql could be doing some cool optimizations to improve
performance.

So- anyone with advice on the best way to do this with Microsoft SQL Server? Write please… Thanks!

]]>

posted in Technology | 0 Comments

6th November 2006

Politics- HBO Special Hacking the Vote is online

The HBO special “Hacking the Vote” is online now on Google video. There are few things
more important to our democracy than the basic fairness of the elections- that every vote gets counted and that
every citizen is given a fair opportunity to cast the ballot that they want to cast.

Related to this I wanted to raise another issue. Increasingly people are switching to mail-in ballots and in
Seattle this year the ballot is so thick that it requires two stamps. Granted, people have the opportunity to go
vote in person without paying anything, but given how much we save with the mail-in-ballots, shouldn’t the
state be paying for the postage? That would also reduce the opportunities for votes to be lost due to mailing
errors (although I do understand that the postal service is going to deliver ballots even if they don’t have enough
postage).

]]>

posted in Politics | 0 Comments

3rd November 2006

Technology- The Web is Awesome!

I just wanted to take a moment to reflect on how cool the web is. Yesterday I posted about the strange behavior I’ve seen on my laptop. This morning Eli wrote to point out that the symptoms appeared to be a disk-drive where DMA wasn’t working. He included a link to a Microsoft article which shows how to tell if DMA is working correctly. Sure enough my interface was configured to try to use DMA but for some reason it was in PIO (non-DMA) mode. Having determined the cause of the problem it wasn’t too hard to find some more detailed instructions on how to fix it. I made deleted a few registry keys to force the computer to redetect DMA mode, rebooted, and its now working perfectly playing glitchless audio and video and overall performing much much much better.

Eli also included a link to his blog Shouting Distance which is mostly focued on debugging. It seems like a great resource for some of these sticky issues I’ve discussed in the past few posts.

All in all I wish I’d posted about this much sooner- I’ve been suffering with this for months and now the problem is not only solved but its documented (somewhat) to hopefully help the next person who encounters a similar problem. How cool is that?

posted in Technology | 0 Comments

2nd November 2006

Technology- Laptop Driver Problems

In my last post I complained about debugging JavaScript in IE. I was totally wrong. Eric pointed me to a couple of sites and
since then I found the “advanced options” to turn on debugger support. I feel pretty clueless to have been missing those for
so long. There is also an IE “DevToolBar” that is a great help for inspecting the DOM, etc.

In the meantime I thought I’d complain about my laptop. I’ve got a Dell Inspiron E1505. I’ve mentioned it a few times before
and I’m happy to report that the blue-screens are much less frequent. I do
still get some sometimes- the main two causes seem to be wireless (which I now leave disabled whenever possible which pretty much sucks) and
when I connect to the laptop with remote access which seems to bluescreen the video driver sometimes (and I’ve updated to the latest).

The other persistant problem is there appears to be something wrong with the drivers for the hard-disk. Whenever my hard-disk is active
the system becomes very unresponsive. I really can’t play music or video, at least locally without it glitching enough to make it miserable. When I watch
with the Task Manager I see the kernel times (the red line you can turn on) appear very high anytime its busy using the disk (most of the
CPU is busy in kernel, not user tasks). This seems wrong but I’m
a bit at a loss about what to do about it. I’ve tried all the latest drivers off the Dell site, but if anyone has any suggestions, please email me.

]]>

posted in Technology | 0 Comments