Posts

Showing posts from June, 2005

When do I need to implement a finalizer or IDisposable?

Recently another developer was experimenting with structs we are using to serialize a class for eventual mapping into an XmlDocument to transmit to a vendor. I noticed he had derived from IDisposable but had not implemented any Dispose pattern for the struct. I queried him on it, "What is the rationale for implementing IDisposable on a struct (a value type)?" (I just love to challenge other developers, even when I haven't a clue what the hell I'm talking about). Fact of the matter is, this is one of the most esoteric areas of working with the .NET Framework, and if you search around, you will find a lot of people simply parroting what they have seen elsewhere, which of course leads you on a wild goose chase to nowhere pretty fast. The Nitty-Gritty: Finalizers only need to be implemented when you hold onto resources that need cleaning up. Example: FileStream holds onto a native file handle and implements a finalizer to release the handle when the FileStream is garba

Sql Server Resources - SQL Server 2005

SQL Server 2005 is coming shortly (November 7, to be exact). Are you ready? I was reading up in my Feedreader on some new resources and one that came up was Gert Drapers, SQL Server guru extraordinaire. I've already UnBlogged about Gert based on what I learned from his Tech-Ed 2004 presentation here (boy I liked San Diego and that super geeky W Hotel). Turns out that Mr. Drapers has a web site where he features lots more resources . Good reading. You can also check out a recent interview with Drapers from PASS here . There are experts, and then there are gurus. The gurus are the guys that you hike through the mountains for 20 years just to ask them the meaning of life. Gert Drapers is one. BTW, If you do and he tells you that "Life is a fountain", umm.... don't mention my name.

Visual Studio.NET 2005: Got a Bug? Get Crackin' !!!

You are getting into the "home stretch" for Visual Studio.NET 2005 Release on Nov. 7. So, if you think you found a bug, go to the product feedback center and put it in! I've submitted a number of them since the site was started, and I can tell you from personal experience that the kind folks in Redmond are VERY INTERESTED and you will get quick feedback - plus access to published / submitted workarounds if they apply. This is going to be a nerdalicious release, help make it the best it can be. Weird Science: It only takes one brain cell to recognize a Hollywood celebrity, according to a study into how the human mind recalls a familiar face. Scientists have shown that the faces of stars such as Halle Berry, Jennifer Aniston and Brad Pitt can each stimulate a nerve cell in the brain which seems to recognize that face alone. Of course, to recognize things like your Significant other, or Mother in Law, much more complex interactions of thousands of brain cells is required. F

The day I set Hi-Tor on fire

Image
Recently the Significant Other came in one Sunday morning and asked, What are the two most memorable things that happened to you when you were a kid? It didnt take me long to remember. . . When I was still quite young, the family moved north from New York City to Rockland County, on the west side of the Hudson River, just north of New Jersey. At that time, Rockland was "the country" -- it was nowhere near as built-up as it is now. We had some friends in Spring Valley that had a farm, and I used to go riding there. Our first place in Rockland County was in Garnerville a small town about 10 minutes west of Haverstraw, known in older times for its brickyards. Stony Point is a few miles north, famous for the Battle of Stony Point during the Revolutionary War, and home of the late composer John Cage. Further north is Bear Mountain, where there is pretty good skiing in winter and a popular ski-jump competition. Even further north is the famous West Point military academy camp

SQL SERVER 2005 June CTP Install Tricks Department

Contrary to what you read in the Readme file, you DO NOT have to uninstall Visual Studio.Net 2005 Beta 2 in order to install SQL Server 2005 JUNE CTP. Just use the Buld Uninstall wizard ( "sqlbuw.exe") from the Tools subfolder to remove your previous beta. Then UNINSTALL .NET Framework 2.0, and Install the .NET Framework 2.0 from the \Redist\2.0 subfolder. Then the regular Setup.exe from the JUNE 2005 CTP for SQL Server 2005 Enterprise will work perfectly!

Podcasting For Dummies 101

OK so podcasting is supposed to be the next big thing, right? This is about 95% of it: <enclosure url="http://yourserver.com/download/coolvideo.wmv" length="131" type="video/x-ms-wmv" /> the enclosure element in the RSS item has 3 parts; URL, Length, and type (MIME type). That's it! Your feedReader simply looks for an enclosure element, parses it, perhaps checking it against a hashtable of stuff that's already been downloaded (so you don't download it over and over) and you pretty much got it. You decide where you want to save it, and with what player you want to play it, and how to display the play feature ("play" button, whatever). You could even render a Windows Media object player tag with the URL to the resource if you wanted to be really cool. Now you watch. This is only a couple months old. Some dood from Maladaptive Pathetic or whatever will give it a newer, even different buzzword name, and start giving seminars and s

Note to Self: Windows 64-Bit Dual Boot, ChkDsk.exe and Strategy

I run a dual boot machine at my home office, Windows 2003 Server 64-Bit on the big drive, and Windows XP Pro 32-bit on the smaller second drive. I have it set up to dual boot and it provides me with a lot of flexibility - not to mention a fail-safe way to boot into an alternate OS if I ever have a problem. This past evening I decided to run Chkdsk. I usually do this about once a month, it's a good practice. It's a new machine and I hadn't run it before. To run chkdsk.exe properly you must set it to run on the next boot, since that's the only way it can get exclusive access to the media and be able to fix any problems it finds. While rebooting I decided to hit the DEL key and check my BIOS. I hit the key to "Load Optimized Defaults", saved and let the box reboot. It came up in Windows XP. That's not what it is supposed to do. Tried again--- Windows XP. Hmmm. Bottom Line, I spent a half an hour fiddling around with boot.ini, copied my backups of NTLDR etc.

When in doubt, Refactor (or, the Blind Man and the Matzo)

Have you ever "inherited" code written by someone else, usually somebody who doesn't even work there anymore, and been told to "Make it do X"? And you look at this code and it is UGLY! It's so ugly it could scare the chrome off a bumper! Not only that, you can't even figure out what the hell it does! This code is like the blind man and the matzo. (Joe takes his Passover lunch to the park. A blind man comes up and sits down on the bench besids him. Joe, feeling neighborly, hands the blind man a sheet of matzo. The blind man handles the matzo carefully for a minute, then looks up and says, "Who wrote this CRAP?") Well you have three choices, usually: 1) Add more spaghetti code to it, attempting to make it do "X", which it was probably never designed for. 2) Refactor. 3) Quit and go work someplace else, with no guarantee that you won't be jumping from the frying pan into the fire... What is Refactoring? Refactoring is a disciplined

Outlook 2003 Junque Email Filter Update

As spam fiilters go, it's pretty good; http://www.microsoft.com/downloads/details.aspx?familyid=4b63c14d-f613-4a4d-a24d-e19c18882244&displaylang=en

Tech-Ed Orlando MVP Session

Just got back from the Peabody Hotel where I met up with MVP luminaries such as Daniel Cazzulino , Ingo Rammer, Victor Garcia Aprea , DonXML , Billy Hollis and members of the various Microsoft developer evangelist teams. Sean O'Driscoll gave a nice presentation, there will be a new MVP logo out on June 14, and I had a chance for a nice chat with our C# MVP lead, Rafael Munoz. Daniel and Victor are busy working on the PAG (Platform Architecture Guidance) group, putting out some amazing new things. DonXML, I and Cory Smith were having a fun discussion about Visual Basic. Don said whenever he has to write code in VB.NET, the first thing he does is remove any references to the Visual Basic namespaces, and that his VB.NET code looks like C#. I found that particularly amusing.

The "Value Proposition" and Web Marketing

I first started marketing on the web in 1996 when the multilevel marketing long distance reseller company that I founded needed an efficient way to communicate information to our representatives (and to the public) about "what was happening". At the time, we had produced 8,000 reps marketing long distance services, some of them making over $20,000 a month, and if the service provider that invested in my company hadn't mismanaged their finances and gone upside-down, it would most likely still be around today. (Hey, i did all the database programming in FoxPro 2.6, which, at the time, in all it's 16-bit glory, was the greatest thing since sliced bread!). So, by Internet standards, I could be regarded as an "old-timer". But the marketing proposition techniques I learned and used then haven't changed at all. Oh, the landscape has changed, to be sure. But not "what turns people on" -- because that's human nature. I've never failed at a w