Friday, September 30, 2005

Wow

I can say that over my career, I have seen some similar questionable behavior like the ones described in this blog:

http://nobodygotfired.blogspot.com/

It's very disappointing, and paints a bad light for the consulting arms of software companies in general (IBM Global Services was specifically mentioned, but I've got to think that MCS is not exempt).

Is anyone surprised by this? I'm not.

Thursday, September 29, 2005

Pressure Engines

We, as a nation [and as a planet], are trying to rid our dependency on oil. At the moment, hydrogen seems to be the best replacement for refined petroleum products, like gasoline. It is extremely common, relatively cheap to produce (extract), and is very friendly to the environment. There are only a few things to work out before mainstream adoption will take place.

But, hydrogen-powered engines are still internal combustion designs. Is harnessing the power of a controlled explosion the only way that we can cheaply create mechanical work?

The typical internal combustion engine works because of pressure: squeeze a fuel-air mixture into a tight space (using a piston) and then ignite the fuel, either using an electrical spark or just the heat caused by the compression (I'm having flashbacks to high school chemistry: p*v/t). The resulting explosion and its rapidly expanding gases push against the piston (the only thing around that can move in response to the pressure) and moves it, which in turn rotates the crankshaft.

So, our automobile engines truly only require a source of pressure in order to perform work. The need for fuel, like gasoline, is only a secondary requirement of the design.

Is burning a fuel the only way in this universe to quickly create the pressure that is needed to perform a unit of work (like moving a piston)? Is there no other type of chemical reaction that will generate enough pressure in a very small timeframe to replace the need to burn fuel? Baking soda and vinegar-powered automobiles, anyone?


___

(Oh, and shouts go out to DK and BAX readers. Yes, I check my logs regularly. I'm narcissistic)

Wednesday, September 28, 2005

Web-based IM Client

As a consultant, I often find myself isolated from the team of other consultants in my company. One extremely useful tool that we use is Instant Messaging. It's got all of the goodness of ringing someone's cell phone without the costs associated (using up minutes), and with less disruption. Plus, you can relay URL's and other information via the chat conversation, which are instantly accessible by the recipient (try conveying a complex URL to someone over a cell phone, and you see where I'm coming from).

However, when I work at client sites, I'm often blocked from using any of the IM products that we use (Yahoo and also MSN Messenger) due to overprotective firewall policies. This makes it a real pain for me to ask quick questions, meaning that I have to resort to email or calling a cell phone. And a lot of the time, a person won't check email for hours, or I get voicemail when I call them.

I discovered something a while back, and was reminded of it today by another blog. MSN Messenger has a web-based IM client that will allow me to penetrate the firewall, yet still be able to IM the people using the Win32 client.

http://webmessenger.msn.com/default.aspx?R=1

I think they did a great job with the UI: it looks like a Win32 application, not a web app.

Any other web-based IM success stories?

Tuesday, September 27, 2005

What is a Clustered Index?

While at the local User Group meeting tonight, I was asked "What is a clustered index?" (because this question has been popping up in a lot of job interviews lately). Note to self: Start asking candidates this question during interviews....

At least from the SQL Server standpoint, you can think of a clustered index as being the physical ordering of the database records as stored on disk. Yeah, yeah, this is not technically correct, but if you start thinking in this way, then you will have the gist of what a clustered index is.

SQL Server stores data in 8 KB pages. If you can fit 1000 different rows of a particular table in one 8 KB page, then great! But, one page will contain at least one row of data.

Tables without a clustered index will not adhere to any sort of ordering. This might be similar to collecting a list of names and phone numbers by having a random collection of people fill out a single petition. In database terms, this is a heap table. If you want to find a person in the list, then you start at the beginning, and scan through the table until you find the data that you're looking for.

Now think about a phone book. Each page has many records (listings), and all of the listings are in alphabetical order by last name (and then by first name). That is, the phone book uses a clustered index (if you will) set to the last name + first name. You can use a well known search algorithm to quickly find a name in a lot less time than starting at the beginning and scanning through all of the entries.

What happens if we need to insert "Flintstone, Fred" in between "Flintrock, Gerald" and "Flintstone, W."? We would have to bump all of the records down one spot, which makes some records fall off of the current page and onto another. In other words, this is probably not something that we would want to repeat over and over again if we have a lot of names to add.

What we could do instead is to assign an incremental number to each name/number that is added to the phone book, and always put new entries at the end of the book. This identifier is the Primary Key of the entry, and because the phone book is physically sorted by this key, that means that it also serves as our clustered index. (The takeaway here is that when you assign a Primary Key to a table that does not already have a clustered index, then a new clustered index will be created by default using the PK).

How do we find people in the book, then, without resorting to table scans? Well, we would need an index to be created containing every name, and list the Primary Key value for that name. In this way, we can look up the name in the index, and then search for the Primary Key to find the entry on the page in the book, and then we can get the phone number.

Likewise, we could also create an index of every phone number, and be able to find the entry in the very same way (by searching for the Primary Key) to see who's phone number that is.

Each index entry contains the clustered index key data, so we want to keep the clustered index values small. This is one reason why auto-incrementing integer (identity) fields are popular as primary keys.

It is commonly argued that you should use GUID (uniqueidentifier) values as primary keys (and therefore, clustered indexes by default) instead of identity fields. The problem with this is that first of all, a GUID is wider than a 32-bit integer, so more disk space is required. Secondly, SQL Server's newid() function, at least, does not produce sequential GUIDs, so if you have a lot of rows to insert, then the database server will be moving around a lot of records in order to keep the clustered index sorted.

UPDATE (10/20/2005): I just learned that in SQL Server 2005, there is a newsequentialid() function that overcomes the previously mentioned issue with the newid() function. Cool!

Is Google AdSense Worth It?

For the better part of a year now, I've polluted this blog with Google AdSense (the banner ads that you see at the top and sometimes at the side of this blog (when viewed in the browser, of course, since I don't use AdSense in the RSS feeds)).

I checked my "statement" today, and have earned a whopping $5.50 so far. Only $94.50 to go before they'll cut me a check!

Does anyone at all have success hosting Google AdSense on their blogs (without clicking on the ads themselves)? Or is it just a waste of screen real estate, since surfers are now used to just ignoring banners? The only one who seems to be making out here is Google themselves, since I have a lot of page impressions (which I think they get paid for), but very few click-throughs (which I then get a piece of).

Monday, September 26, 2005

Preventing Hurricanes

With the recent hurricanes here in 'Merica, the Discovery Network of channels (including the Science Channel) have been playing hurricane-related shows.

One show that I found fascinating was about how we can change weather.

For instance, over the midwest, they get super storms that produce large damaging hail. To help prevent this, they seed the clouds in two ways. First, silver iodide is dispursed into the updraft to give the water something to condense upon. Secondly, dry ice is dispursed above the clouds in order to promote snowfall within the cloud itself, which prevents the formation of hail.

This technique is particularly successful over land because the air is supersaturated with water. The government attempted the same techniques for hurricanes as part of Project Stormfury. However, this was not successful in altering the storms because hurricanes do not have a supersaturated air component, but rather, are continually provided moisture from evaporation of the body of water underneath.

The show went on to interview one scientist who claims that a hurricane can be interrupted by temporarily disrupting the evaporation of water in the storm's path, causing the storm to become disorganized and significantly weakened. They say that Benjamin Franklin realized that it would only take 1 teaspoon of olive oil to cover an entire lake with a film that was only 1-2 molecules thick, and such a film would affect the water's ability to evaporate (which is a cooling process).

This scientist was proposing that a film of something could be dispursed in the storm's path, and that film would only have to "survive" for maybe 6 hours or so--long enough for the storm to pass over it, cutting off the source of energy (evaporation).

I'm a little sceptical of this approach. First, because of the practicality of it all (perfectly dispursing a film of gunk over a wide enough area). Secondly, because evaporation is a cooling process, so if you stop evaporation, you are in essence making the body of water warmer. This might lead to more powerful storms (ignoring, of course, my previous rants about the effects of global warming on large-scale weather).

Being ever innovative™, I think that I've come up with a viable alternative. Disclaimer: I haven't seen this idea outlined before, so if you have invented this on your own, then my plagerism is not intentional.

Anyone who's gone snorkling or scuba diving knows how much colder the water is 20 feet down, let alone 100+ feet down. Why not deploy an array of buoys containing pumps to bring the cold water to the surface and then dispurse it?

This would not be a full-time operation (can you imagine the ecological consequences of keeping the Gulf of Mexico at a certain temperature?), but rather something that could be activated to hopefully disrupt a storm, and then deactivated until the next time it is needed.

The pumps could be powered by the wind, and backed up by Diesel engines or whatever would work best for the situation (that's an implementation detail determined as part of the Elaboration phase, whereas this blog post is only Big Sky Inception phase).

Friday, September 23, 2005

KATRINA WAS NOT FROM GLOBAL WARMING!

Why is it that when something happens with the weather that is perceived to be out of normal, that people immediately start blaming global warming?

Katrina was supposedly so powerful because global warming made the Gulf of Mexico warm (or, so people, like Robert Kennedy, Jr, are out there declaring).

Oh really?

Weather patterns change. Period.

Sometimes, they're cyclical, where you'll have years of one type of weather, and then it changes. But, with cyclical patterns, you'll eventually come back to the experience the same type of weather as before the change.

And sometimes, weather patterns change semi-permanently. Did you know that the Sahara Desert was once much wetter than today? I'm sure that those greedy ultra right-wingers are responsible for that sandbox drying up 5000 years ago, right???

I've said this before: The Earth has it's own agenda, and I believe that we only play a small part in changing it.

Still think that it's global warming that made Katrina so strong? Look at this table:

http://www.nhc.noaa.gov/pastint.shtml

It shows the strongest hurricanes at the top, and lists the years. Now, Katrina is going to come in third, I believe, once it's added to the table. Yes, it's strong, but no, it's not the strongest ever recorded. What made all of the storms in the 1800's and early 1900's so strong, if we didn't have "global warming" back then? What makes Katrina the result of global warming, but these other storms just random events?

Look at this chart:

http://en.wikipedia.org/wiki/Image:Vostok-ice-core-petit.png

It's measurement of data taken from ice core samples, and shows the amount of trapped CO2 in the ice (green) and dust in the ice (red) over time. The average temperature of the Earth is also approximated in blue. This shows that global warming (and subsequent cooling) is very much cyclical, and that for the past 25,000 years, we've been on the warming side of the trend.

The Earth will enter another cool period soon (within the next 10,000 years as interpolated from this chart). But it would have entered that with or without us. My point is that you cannot look at data that exists today and say that it's proof of the effects of global warming without considering that same data 150,000 years ago during the last warming cycle. Anyone have the Gulf of Mexico temperature data sheet for that time? I didn't think so.

UPDATE: I posted this a couple weeks ago, but bumped the date up because I basically just read the same thing today on CNN:

http://www.cnn.com/2005/TECH/science/
09/23/hurricane.cycle/index.html

Free to a Good Home

Psst. Want to know how you can get free copies of Visual Studio 2005 and SQL Server 2005?

Don't tell anyone, but they're just giving them away at the Launch Events this November! I'm talking full retail versions, not the crappy 120-day evals!

Sign up for the Launch Event near you, come see what all of the hoopla is about, and walk away with at least two of the best things that have come out of Redmond yet [certainly my opinion, but please form your own]!

http://www.microsoft.com/events/2005launchevents/default.mspx


(Regional readers: November 8 in Detroit, but like I said, keep it on the low-down. Can you imagine what would happen if too many people found out about how great these products are, and that they can get them for FREE [insert Evil® laugh here]??!?!)




Note: In case it didn't come through in the style of my writing (i.e., perhaps English is not your first language), this post is very much tongue-in-cheek. Everything is true (great product launch event, free software), but MS wants you to know about it, wants to give you free copies of its software, and wants you to spread the word to all of your peers. ;-)

NTFS, Windows Explorer, .NET, and Deep Paths

The NTFS folder tree is just a linked-list type of structure. Each node (folder) has a parent. To move a folder, all you need to do is change the pointer to the parent folder.

That's all well and good, but it seems that you can have really deep folder structures with little consequence to NTFS. Again, that's all well and good, but our friend Windows Explorer seems to have a problem representing, or rather accessing, deep folder structures due to a limit on how long a string path can be.

So, we came upon a problem today where a directory sync program was incorrectly configured, and as a result, created a really deep folder chain. For instance, it synchronized the folders from another machine (B -> A), but the next pass, it copied subfolders not into the same parent as previously, but into one of the subfolders that was previously created (B -> B). Let this run for 1000 passes, or so, and you get 1000 subdirectories. Blah!

How do you go about deleting these? Windows Explorer and the CMD shell was no help--the string path to the end of the chain was simply too long.

I found a manual method that worked, and surprisingly, did not require that much time.

Given:

Dir
--Dir2
----Dir3
------Dir4
--------Dir5
----------Dir6
------------Dir7
--------------Dir8
----------------...

Navigate as far into the tree as possible using Windows Explorer (i.e., maybe only to Dir6) and move that folder into the parent (Dir). This is just a parent pointer change to NTFS.

New directory tree might resemble:

Dir
--Dir2
----Dir3
------Dir4
--------Dir5
--Dir6
----Dir7
------Dir8
--------…

Keep repeating with the longest chain that remains (i.e., navigate into the new Dir 6 chain until you hit the path limit in Explorer, then copy that folder into the root).

When you have nothing but a bunch of smaller chains, you can then delete them all at the same time (i.e., delete everything inside of “Dir”).

BTW: It seems that the .NET Framework classes (System.IO namespace) simply use Windows Explorer, because they seemed to be subject to the very same limitations.

Indigo Roadshow

I attended one of the Indigo Roadshow events last night in Columbus, OH. I needed to see Indigo (Windows Communication Foundation) first hand, because I've been way too busy over the past year or so to explore the technology by myself. Even though my one-way drive time was longer than the presentation itself, I still got a lot of value out of it.

I particularly enjoy Microsoft Live Events like this because I find myself starting to think about how I could have used the technology in the creation of my previous projects, and how much easier the development would have been (because that's what software evolution is all about, right? Making it easier to build complex systems with less code).

So, what is WCF ("Indigo")? It's what you'll use starting in 2006 to have applications talk to each other (the communication layer in that whole "SOA" thing). But, most importantly, it works with very little additional coding involved--almost everything in last night's demos were done using attributes and config file entries (i.e., something, like reliability, that would [supposedly] take 100 lines of coding to implement using WSE was performed by simply adding one XML element to the application's config file). It's remoting, socket communications, and web services all rolled into one.

I like the new trend that I'm starting to see in MS products in that you no longer need a web server to host web services. Like SQL Server 2005, WCF offers the ability for your application to create a HTTP endpoint (using http.sys, so be careful if you're using IIS 5.1 on the same machine, because you won't be able to share port 80). This means that your app can host a web service without needing a web server.

The show was presented by Ami Vora and Payam Shodjai, both of Microsoft. A copy of David Pallmann's book Programming "INDIGO" Beta Edition (Microsoft Press) was handed out to each attendee, which appeared to be about 200 - 300 people (rough guess).

I also finally met Drew Robbins, the MS Developer Evangelist for my area. Great guy, but I'm envious of his job. I mean, besides going around talking up MS developer tools all day long, he actually gets paid to attend events like TechEd and PDC (where, I guess there was some dancing involved?)

Thursday, September 22, 2005

Evacuating a City: Do it Right!

I walked past CNN today where they were showing people evacuating Houston, TX. The Interstate highways leading out of town was packed, bumper to bumper for a reported 100 miles. People were running out of gas sitting in traffic.

But, then you look to the other side of the Interstate--the highway leading into Houston. You would see 1 or 2 cars every minute pass by the camera.

Am I the only one in America who thinks that when a major city evacuates, then all major roads out of town are to be opened up for outbound traffic? Make both sides of the Interstate into one way traffic leading away from the city. Don't force everyone to use the same roadway when there's an empty road only 50 feet away!

When evacuating a city, mandate that inbound traffic must use backroads, and keep the major infrastructure reserved for outbound traffic.

Hopefully, someone will realize this before it's too late.

Useful Device: Capo

I purchased a Capo last night for my guitar. I wasn't quite sure before the purchase exactly how it would change my playing, but I kept seeing that some tabs stated "Capo 1st fret", etc.

It became very apparent after using it for the first time exactly what it does, and the effect is awesome! I can change keys without changing the voicing of the chords and without barring (which I have problems with for whatever reason).

That is, if I place the Capo on the 3rd fret, and then play the Em chord relative to that Capo, then I'm actually playing Gm without needing to bar the 3rd fret with my finger.

It's only useful for wholesale key changes, so it doesn't solve all of my barring needs. But, I think it was an excellent investment of $15.

Wednesday, September 21, 2005

Dino Esposito on WWF

Using my blog as a personal bookmark for this post, which I intend to read later....

WinFX Funny

I read something amusing just now.

Steve Eichert states on his blog:

WCF [Windows Communications Foundation] is pronounced "Indigo".... The WCF is silent.


Which, I guess was a takeoff of something that Chris Anderson stated:

... and for clarification, yes, "WPF" [Windows Presentation Foundation] is pronounced "Avalon".... The WPF is silent.

Sunday, September 18, 2005

GEOS

My first introduction to the Graphical User Interface was "GEOS 2" for the Commodore 64 by Berkely Softworks. It's amazing to think about how much functionality they were able to push onto a 1MHz processor with 64Kb of RAM.

http://www.guidebookgallery.org/screenshots/geosc64

I mean, it's hard to get "Hello World" to compile in less than 64Kb with today's personal computing environments and programming languages.

Anyways, after "graduating" from the C-64 to the IBM/Intel platform, I stayed with GeoWorks as my preferred OS:

http://www.guidebookgallery.org/screenshots/gwe2

Back in those days, though, it was common to multi-boot into different operating systems. Or, rather, you usually had MS-DOS installed, and then started up different graphical shells (Windows 3.x included).

I found a way to put GeoWorks onto a bootable floppy so that I could take it to the computer lab at school. I was doing desktop publishing at that time for extra money, and couldn't stand anything MacIntosh-related (I still can't figure out the one-button mouse). So, I'd head to the PC lab that was in the Computer Center, go back to a corner machine right next to a laser printer (had to pay per sheet). If anyone came over (like a lab assistant), I simply hit the reset button.

Ah, good times. GeoWorks was actually a better OS (IMHO) than Windows 3.1. I'm sure that a lot of people would say that just about anything is better than Windows, but I'm not part of that FUD machine.

I love my Windows today, but I wonder how the world would have been different if there were follow-up OS's like GeosWarp, Geos98, GeosXP, Geos2003 Server, and finally Geos Vista.

My guess is this: A bunch of Linux people would say that monopolistic Berkeley Softworks is Evil, that Windows NT is such a better operating system (but too bad that the small company Microsoft went bankrupt), and why can't they install Geos without GeoMedia or GeoWebBrowser?

Saturday, September 17, 2005

Windows Workflow Foundation

Channel 9 has an introduction video to a new piece of WinFX that was announced at the PDC: Windows Workflow Foundation.

Finally! A general purpose workflow engine from Microsoft with an awesome graphical designer as well.

I'm still trying to grok what exactly the WWF entails, but my initial impression is that it's going to save me a lot of time by not having to code my own workflow logic (or at least not to the level that I'm currently having to do whenever I need workflow functionality in my apps).

Tuesday, September 13, 2005

New Orleans Funny

Perhaps my timing is a little off in blogging about this right now, but I was just reading an article on CNN.com where Jeff Koinange was reporting from the streets of New Orleans. In his report, he writes:

"Right now, the street is dry and resembles a disaster zone. There's garbage everywhere and it smells."

Umm, from what everyone who has been to New Orleans tells me, isn't this actually a sign of normalcy returning to the area. ;-)

Different Version of Vista

I was part of a discussion today where we discussed the rumored 7 different packaged versions of Windows Vista, like this is a scary monopolistic thing, or something else Evil®.

The way that I see the different versions of the OS is kind of like shopping for a car. Imagine if people bitched about how many model/trim combos there are!

Honda Accord
....Coupe
........LX
........EX
........LX V-6
........EX V-6 6MT
........EX-V6
....Sedan
........Value Package
........LX
........LX Special Edition
........EX
........LX V-6
........EX V-6 6MT
........EX V-6
....Hybrid

I see this as a way for MS to offer varying levels of the same OS, but offering different functionality for those who need (or want) it. For instance, if you don’t need (want) the packaged media player (for the commies Socialists in the EU), then buy a version that doesn’t offer it.

However, maybe they will only package a feature that you want (need) with media player, in which case, you’re stuck with it.

I ran into a similar situation when I bought my Windstar. We wanted the factory video, but it wasn’t offered in any of the lower trim packages, so we were stuck either getting the SEL or the Limited packages. Sure, we could have gotten a stripped down Windstar trim and then installed an aftermarket video solution, but we decided to go with the package from the factory.

Even though the video system is what we wanted, we also had to get things like adjustable pedals, self-sealing tires, flat-tire indicator, digital information center, and backup sensors (which I love, btw). There's really no way to easily uninstall these features simply because I didn't want them.

No one calls this anti-competitive in the automotive industry.

Friday, September 09, 2005

Active Sun WARNING

My favorite time of year is approaching: Autumn.

Why? Because of the increased likelihood to see Auroras (Northern Lights) in my location.

This week, sunspot number 798 has rotated into view, and is currently extremely active. On 9/7/2005, it belched out an X17-class flare (as I type this, we're experiencing elevated spaceweather conditions due to a glancing blow from the resulting CME). Over the course of the past day, there have been two separate X-Class flares, and a whole bunch of M-Class flares.

X-Class, M-Class... How big are these?

Well, think of fishing. An inactive sun is like catching a tiny fish (minnow or maybe a small bluegill). These are class A and B flares.

Class C flares are like catching a fish that's big enough to eat. Nothing that you would necessarily put on your wall, though.

Class M flares are significant, and can kick up auroras. These are like catching something like a Walleye to a Salmon, and you have to struggle to reel it in.

Class X flares are the big ones. These are powerful, and if Earth-directed, will almost always kick up auroras. For these fish, you're on a boat in the open sea. You have to be strapped in or else the fish might take you off of the boat with it.

The big Class X flares (X10 and bigger) are more like whaling than fishing. The one the other day is a like a dolphin or small orca Shamu at Sea World (Note: I was initially wrong about how big X17 is--this flare actually made the record books as the 4th largest since 1976). The biggest one that I've "witnessed" was like the size of that Sperm Whale that exploded last year in Taiwan.

There's always the possibility of a huge Blue Whale being ejected from the Sun. That would cause some damage here, though.

Suddenly, this is sounding more like a Douglas Adams novel than a blog post....

Thursday, September 08, 2005

Scobelizer Must Retire Now

Catchy title, eh?

But, seriously. Where does he go from here:

http://channel9.msdn.com/showpost.aspx?postid=111598

I think that interview could have just been Robert's career climax! Maybe it's time to change focus... Leave on a high note... Pull a Seinfeld.... (any more euphemisms that would apply here?)