Posts

Showing posts from February, 2008

On Programming: Lateral vs. Vertical Thinking

This is an issue that I personally deal with almost every day: How developers approach a programming problem from the standpoint of THINKING. I bring this up because recently a co-developer asked for my help with overriding a base class property in an RSS library, and it turned out that the version of the library he was using was, more or less, defunct. Yet this individual doggedly continued to try various ways to override a base class property of type Image that returned a string, and wanted to try to coerce this in some way (programmatically) to return a different type without having to disturb the base class library. This was ostensibly because the base type was already baked into a production application that used it, and he now wanted to be able to modify it without changing the base class library. Sound familiar? We, as programmers ("Developers", if you prefer) -- are paid to THINK. The way we think has, in great part, a deterministic influence on what we produce -- how

No Country for Old Text Ads...

I don't know why this never sank in. I think it went in one brain cell and out the other. Last year, around November, Google changed the clicking behavior of their text ads for Adsense. It used to be that you could click on the title, link, or the description portion and it would click through. Now you can only click on the title portion. The net effect of this, according to the pundits, is that clickthrough rates for text ads went down up to 60% . Clickthrough rates go down, revenue goes down. However, image ads remain 100% clickable. The solution? Change your setup to serve only image ads. Now that the quality of google's image ads has generally improved, it should not be an issue. If you are using their new Custom Channels, you can actually do this without having to change any of your ad code that's in your pages. As a general rule, it's a good idea to watch your CTR and eCPM figures carefully after making such a change - it doesn't work the same for every imple

ASP.NET "App_Data": Writing files vs Application Restarts

Most ASP.NET developers know that if you create a new file , modify any file in the application root or the /bin folder, or modify web.config, this will trigger an application restart. InProc Session, Application and Cache state go bye-bye. This is a major cause of "WTF" type newsgroup and forum posts by n00b developers who don't yet fully understand the ASP.NET runtime model and its rather complicated set of behaviors - which are by design. However, there is a special folder, APP_DATA, that is designed not to respond to this filesystemwatcher behavior. In a WebSite application this folder is created by default. It is normally used for SQL Server MDF database files using the UserInstance SQLEXPRESS hosting mechanism, or for XML files. The good thing to know is that this works the same way (filesystemwatcher events are ignored by the ASP.NET runtime) for Web Application Projects . The only difference is that with a WAP you need to create the folder manually (except with VS

Recession? Inflation? No Country for Old Muni Bond Insurers.

"There is an inverse relationship between reliance on the state and self-reliance." -- William F. Buckley, Jr. (who died today at 82) Gasoline prices, which for months lagged the big run-up in the price of oil, are suddenly rising fast. Some experts say they could hit $4 a gallon by spring. Diesel is hitting new records daily and oil closed at an all-time high on Tuesday of $100.88 a barrel. I may have been a year early in my predictions, but my views have not changed. I drive to work in a Toyota Corolla that gets 37MPG. But that's not what I'm worried about. "The effect of high oil prices today could be the difference between having a recession and not having a recession," says Kenneth Rogoff, a Harvard University economist. Wrong, Mr. Rogoff. The effect of high oil prices today could be the difference between the recession we are already in, and a depression of mind-boggling proportions. It's not just oil prices, or real estate down the toilet - its

Silverlight 2.0: Cross-Domain Access Redux

Scott Guthrie has been publishing some "pre release" very cool blog posts about the upcoming Silverlight 2.0 release. One of the most interesting features is that cross-domain access will be allowed (think JSONp and Crockford's JSONRequest or other cool ideas). Here's a short quote: Cross Domain Network Access Silverlight 2 applications can always call back to their "origin" server when making network calls (meaning they can call URLs on the same domain that the application was downloaded from). Silverlight 2 applications can also optionally make cross-domain network calls (meaning they can call URLs on different domains from where the application was downloaded from) when the remote web server has an XML policy file in place that indicates that clients are allowed to make these cross-domain calls. Silverlight 2 defines an XML policy file format that allows server administrators to precisely control what access a client should have. Silverlight 2 also honors

Holy Sh*t, Batman! Windows Vista Service Pack 1 Installed!

Image
I don't necessarily agree with everything I say.   - Marshall McLuhan Jeesh! After months of having Windows Update not working because I volunteered to be a Beta Tester for Service Pack 1, I got an email from the MotherShip yesterday congratulating me for my participation, with links to the RTM real deal. You have to be very careful with this because on Microsoft Connect there are a whole bunch of links and what you want is the file that looks like this: 6001.18000.080118-1840_x86fre_Client_en-us-FRMCFRE_EN_DVD.iso make sure the .18000. build number is in there - that's the RTM. In FTM, you should see: "Windows Vista SP1 Client for X86 and X64 English and German" So I burned the sucker to a DVD and ran the Setup.exe off of it from within Windows Vista. Batman! The Upgrade option was enabled! Holy Jamoca, could this be the start of something good? You cannot "undo" an RC Vista Service Pack whose "View Available Updates" entry is gone by trying t

Portable Virtual Machine as Development Environment

The man who doesn't read good books has no advantage over the man who can't read them. --Mark Twain We do a lot of stuff with Virtualization at work. Most all of this is done with VMWare Workstation. But the free VMWare Player makes all this stuff really quite portable. I made a VM of Windows Server 2008, activated it. Then I installed SQL Server 2005. This VM compressed down to less than 2 Gigs - small enough to fit on one of those cool 2GB USB sticks - along with a copy of the free Player. Need a development environment? Just unzip the little doozy into a folder, start the player, load the little puppy and off you go! Great for testing installations, doing stress testing that would normally require two or more machines (but all on one "real" machine) and so on. Next, I added Visual Studio 2008 Team System. Now it's too big to fit on on small USB stick (about 2.8 GB) but I just burned it to a DVD instead. I even modified the logon screen message to remind me wh

FileSystemWatcher Events and incomplete file errors

This is a question that has popped up numerous times, and I myself have had to deal with it: You get a FileSystemWatcher event that a new file was created in a folder you are monitoring. So you try to process the file, but problems arise because the process that has written the file isn't finished writing it yet. One way to handle this is to have the process that is writing the file send a second small text file consisting of something like the name of the file just written and the datetime that it was completed. You would get an event that this new file had been written, and your code logic would tell you what to do at this point. Of course, this assumes that you have sufficient control over the file - writing process to make this change. One newsgroup poster commented, "We're running a windows service which contains several filesystemwatchers. Sometimes we hit spikes of 20-50.000 files in a matter of seconds and each file can potentially take some time to process. The

Firefox 3.0 (Minefield): Pretty Slick

Don't worry about people stealing an idea. If it's original, you will have to ram it down their throats. - Howard Aiken You can download the Firefox 3.0 Beta 3 nightly builds here . Frankly, I"m pretty impressed with this so far. It seems to load faster than the previous version, and it certainly does pass the Acid 2 test with flying colors (as does Internet Explorer 8.0, which is still in closed BETA). I predict that Firefox 3.0 will enable the Firefox browser to capture an even greater percentage of the overall browser market. I intend to install it on my Open SUSE Linux VM with MONO on it that I use for experimentation. It's not about religion here - it's about a browser that performs well, doesn't blow up in your face on a site that serves FLV video or Silverlight, and generally doesn't cause you problems. The Windows Installer for this is only about 6.72MB, installs in about 20 seconds, automatically imports all Internet Explorer settings and bookmar

MicroHoo: Done Deal?

Microsoft has turned up the heat bigtime on the Yahoo deal. It looks to me like a direct "Take it to the shareholders" ploy, and if this succeeds (as it likely will) then this is going to be a "done deal". There are some internal Microsoft shakeups which have been reported in recent hours that make this deal ever more likely. Microsoft  announced the departure of several executives Thursday, among them a Silicon Valley veteran recruited to help fix its unprofitable Web business and one in charge of marketing Windows Vista, and the promotion of more than a dozen others across the company. Microsoft Senior Vice President Pieter Knook will head a new Internet Services division that Vodafone Group Plc announced Tuesday. In this new role, Knook will direct the development and delivery of Vodafone's consumer Internet business. Yahoo is reportedly talking with News Corp. about a possible deal that could save it from Microsoft's $44.6 billion takeover bid. But

Visual Studio 2008 Hotfix Rollup

Wisdom cannot and must not be sold for money -- Plato This Hotfix rollup addresses a number of issues and is a good example of how Scott Guthrie and his crew are able to nimbly respond to various issues and push out easy-to-install updates that fix various bugs and issues. This is in keeping with their stated goal of more frequently releasing public patches that roll-up bug-fixes of commonly reported problems. Scott explains more on his blog . The collection of fixes addresses issues with the HTML Editor source view performance, Design View performance, HTML editing, Javascript editing, web site build performance when there are a large number of assemblies in the /bin folder, and more. After successful installation, if you select the Help->About menu item, there is an entry that says Hotfix for Microsoft Visual Studio Team System 2008 Team Suite – ENU (KB946581). I noticed a definite improvement in Solution load time and more responsiveness in the IDE in general after installin

Compete.com vs Quantcast.com vs Alexa.com vs ...

" There are three kinds of lies: lies, damned lies and statistics." --Disraeli In a recent post, I ended up getting into some off -topic comment flaming with a reader who it turns out (IMHO) really wanted to play the "my site is more popular than your site" game. Really, this kind of "mental masturbation" is sort of childish. But, it did make me think, and I thank him for that. In the traffic measurement game, there are some upstarts (like Quantcast, Compete and others) that don't seem too different from Alexa. Based on the evidence I've looked at from some of the pundits, there isn't much indication to suggest that Compete or Quantcast are better than Alexa. And we all know that Alexa's data has flaws. If you analyze on toolbar installs, these new services certainly have less data. They come up with "ISP relationships", "Panels" and other inventions to show that they can compete, but I don't necessarily buy it. App

Congratulations! You're getting a Liberal for President.

Now that Romney has dropped out, you basically are going to have three choices - either Obama or Clinton on the Democrat side (both Liberals), or McCain on the Republican side (also a Liberal). Sigh. I suppose I could just move to Canada, where they have a three party system and nobody can garner enough of the power to be able to accomplish anything. Conservative commentator Ann Coulter last week said she would support Sen. Hillary Clinton over McCain. She said, "If he's our candidate, then Hillary is going to be our girl, because she's more conservative than he is... I think she would be stronger on the war on terrorism." Yikes! Ann Coulter said THAT? But of course, Hillary is losing. The day she admitted she'd written herself a check for $5 million, Obama's people were crowing that they'd just raised $3 million. His staff is happy -- they're all getting paid. (BTW, where in hell did she get the $5 Million?) Regardless of what happens in November, you

Entityize and ASCIIfy your XML text strings

2 is not equal to 3, not even for very large values of 2 -- Grabel's Law I have a custom search facility that I use on a couple of different web sites where the search queries are stored in a database table in order to compute count statistics and also to generate a standard xml sitemap for the search engines to nibble on. Problem is, I don't know what users are going to enter as search terms. From a purely search standpoint, I really don't care; if they enter gobbledegook Unicode glop and get back no search results, fie on them, right? However, I need to clean this stuff before I store it in the database since when I pull it out to generate my custom sitemap, I'm going to end up with illegal XML characters in the sitemap document. That means google, ask.com, live.com and yahoo are all going to choke on it and I might as well not even have a sitemap if that happens. So I put a couple of static cleanup methods into global.asax which conveniently allows them to be cal