July 2003 - Posts
[Note: A nice guy emailed to thank me for the following, which I posted to my .NET list in May but forgot to put on the blog, so I'm posting it now; hopefully it will be useful to someone else.]
If you're using v1.1 of the Framework and encounter an SEHException and
have no idea what's causing it, check to see if you called
Application.EnableVisualStyles(). Apparently that is the source for a
number of problems that appear as SEHExceptions.
My problem in particular was happening when I tried to show a form with
ShowDialog(). If I used Show() instead, no problems. All of my other
forms had no problems with ShowDialog, yet this one would crash the app.
After a bit of Googling, it appears that this error can come up almost
anywhere, so keep this in mind as it's almost always the solution.
Interestingly, using a manifest file to get the same results does NOT
cause the app to crash. Go figure.
It startles me whenever I see add-ins, IDEs or people touting code libraries and code reuse. Is anyone still copying and pasting code? I have a couple standard comment headers and whatnot that I store in the VS.NET toolbar for reuse, but no code. With all of the template-based code generators available now, I can't imagine why anyone would do this. If something is reusable, wrap it up in a class and throw it in an assembly.
On a related note, I get the heebie-jeebies when people mention pulling code from old apps to reuse in a new app, even if it was their own code. The great thing about being in this profession is that you learn every day. Any time anyone mentions pulling old code, I suggest pulling the ideas and leave the code where it is. The hard part isn't writing the code, it's the concept behind it. Take what you've learned and write something new and wonderful.
Conceptual reuse, that's where it's at.
Apparently not all NICs have unique MACs. This is news to me.
Thread in microsoft..csharp
There is a little-known context menu option in Task Manager that helps kill applications more quickly than "End Task". Right-click on the application in the Applications tab and select "Go To Process". This brings to you the correct process on the Processes tab, at which point you can right-click and select "End Process" or "End Process Tree". This kills the process immediately w/o the wait that's associated with the "End Task" option. (I believe "End Task" respectfully asks to process to end itself and if it doesn't respond after some time, it then prompts you to kill it.)
This is unnecessary when there is only one instance of the application you want to kill; however, sometimes you may have several instances of an application (IE, for example) and you don't know which process is associated with the application you want to kill.
I usually don't go to Tower because they don't tend to carry the music I like, their prices are way out of line, and the suburban pseudo-punk kids that work there rub me the wrong way. There is one on my block, a two minute walk from my apartment, so sometimes it's worth checking on something if I have a couple free minutes.
I've picked up music there three times in the past month or two and each time I was overcharged on a CD. (I refuse to pay $17.99 for a CD, so it's pretty easy to tell when I've been had.) I hadn't paid attention until I noticed the first time, now I check every time. I just wonder how much I've been overcharged all these years...
Moral of the story: Check your receipt.
"At the end of the day, we cut our server farm in half to a site that is twice as fast, and twice as easy to debug, maintain, and build upon. We saved the business hundreds of thousands of dollars, and will continue to be able to do so because we can offer extremely fast development cycles."
Match.com Post Mortem [via Scoble]
If Windows was open source, someone would fix the problem in IE where it "forgets" the View|Status Bar setting. This has been a bug since, what, Windows 98?
I'm the last person that thinks Windows should be open source. I do, however, get annoyed that time after time during Windows beta programs people file bugs to fix things like the above, but they usually aren't addressed. Sure, fixing that bug won't bring in more sales, but I think that's the point: Things need to be done that aren't related to ROI and it seems like resources aren't allocated to things that don't make business sense.
There are annoyances like this littered throughout the OS that everyone that's used it for a while just takes for granted and forgets about. Create a folder, then name it ".net is the coolest thing ever" and press Enter. Windows tells you "You must type a filename", then reverts the folder name back to "New Folder". I must enter a filename? I thought I just entered a folder name. What did I do wrong? Not only that, I must try again since it discarded what I entered.
Why toss out what I just entered?
Why not tell me I can't have a folder name starting with a period?
Why are you telling me about a filename? I'm trying to rename a folder!
Windows has been around for over a decade and things like this still exist.
[13 July Note: I'm not literally asking why, but rather playing the role of 98% of the Windows users outside of blogland.]
In case you missed the big event, here's the PowerPoint deck:
The Gettysburg Powerpoint Presentation [via SBC DotNet Weblog]
I've spent some time the past day or two working with adding/removing AppDomains/Assemblies at runtime and found the following resources especially helpful. This topic in particular needs special attention because of the nature of inter-AppDomain communication and its implications.
AppDomains and Dynamic Loading [MSDN]
The following are from Suzanne Cook's Weblog:
Debugging Assembly Loading Failures
Assembly.CodeBase vs. Assembly.Location