Geeking Out

This has probably done the rounds before, but I couldn’t resist posting about these cool geek rings (via MikeHall). As somebody who has made a few geek t-shirts themselves I think this is great. Also on the topic of geek-ness Mitch Denny has proposed a Geekfest, so if your current culture is “en-AU” and you live on the east coast then check it out.

Comments

David Realnameunknown
What happens if you punch someone and you ctrl+alt+delete? Can you shut them down with the Task Mangager?
11/10/2004 1:53:00 PM
David Realnameunknown
‘Mangager’?
You know what I meant.
11/10/2004 1:55:00 PM

»

Garbage Collector Deathmatch - 'There can be only one'

I was talking to “Biztalk” Bill Chesnut today about Garbage Collection. I was vaguely aware that there were actually 2 garbage collectors in .NET 1.x, one optimized for workstations and another for servers (mscorwks.dll and mscorsvr.dll respectively). It seems that in .NET 2.0 mscorsvr.dll has been absorbed into mscorwks.dll which has doubled in size, and it is/will be possible to select which version of GC you want via app.config. Server GC partitions the managed heap out into a number of sections (1 for each CPU), and when a collection is initiated the garbage collector gets one thread per CPU. Server GC suspends CLR threads during GC, while workstation GC performs GC in parallel with CLR threads. Presumably this is so that smart-client applications don’t “lock” while GC is happening.

K. Scott Allen has some interesting info on this also with respect to some .NET framework 1.0 settings that SOUND like they do what is coming in framework 2.0, but actually don’t.

Update: in the comments William Luu points to these two very applicable posts from Chris Lyon [1,2] (and sorry to Chris for spelling his fairly straightforward second name wrong).

»

Compact Framework Book

I recently bought Paul Yao & David Durant’s Compact Framework Programming Book (which is also available on-line) to help me ramp up to writing something for my smartphone. It looks like a very comprehensive book (my wife likened it to a phonebook in size), and if it is like most of the other titles from the Addison-Wesley “Developer” series it should be good. The only thing I don’t like about it thus far - their advocacy of hungarian notation (something I am not such a fan of). »

this.IsMCSD.NET = true;

I passed  exam 70-320 today with a score of 904. This was the last exam I needed to get my MCSD.NET. In almost a carbon-copy of what happened in my 70-300 exam I forgot the exam was scheduled today because of a number of things going on, and only realized when I arrived at work. I had done a couple of days worth of study a month or so ago when I originally booked the exam. I finished the exam in about 1 hour.

Comments

Jason Row
Congrats!
8/09/2004 2:25:00 AM
Greg Low
Outstanding Joseph! Well done.
8/09/2004 11:43:00 AM

»

SmartPhone, Crazy File Copying, and a relaxing walk in the zen garden

I got an i-mate Smartphone2 (running Windows Smartphone 2003 OS) on the week-end. Thus far I am very pleased with it. It took me about 20 minutes to have “hello world” running on it using VS 2005 beta 1 (in spite of a few crazy VS problems I have been having, see below). I have used Dominic’s before a couple of times and was pretty happy with the “feel“ of it. Now I just need to think of some cool smartphone apps to write.

OK, now for some crazy dangerous file copying - My “play” laptop has had every beta version of whidbey installed on it, not to mention tons of other developer betas of different things. I am resigned to the fact that it will need to be re-built soon, as I am encountering many strange problems (like sn.exe not working). One problem that was particularly annoying was that in a number of cases compiling assemblies of certain sorts was failing under framework 2.0. This manifested it’s self in many forms from XML Serialization problems (not the usual kind), failure to compile executables, and inability to view VS 2005 help (once again, not in the “usual” way). In each instance I got a strange error message that “c:<some long path here depending on the thing I am doing>\CSCNN.tmp is not a valid Win32 resource”. It turned out there was an old version of msvcr80.dll hanging around in a sub-directory of the C:\WINDOWS\WinSxS\ folder. Since my machine was/is probably going to be rebuilt soon anyway (especially if I keep doing things like this regularly) I copied the versions from the latest 2.0 framework folder I had, which fixed my problem. Next time I might try the safer option, and try the “repair” first in VS 2005. Either way I think I will be rebuilding my machine fairly soon.

Recently I’ve also been trying to improve my CSS skills. I found the CSS Zen Garden a great resource for design ideas, as well as cool CSS tricks.

Comments

Dave
Use the css Zen Garden Navigator to browse all of the great designs:

http://csszengarden.coret.org/
27/09/2004 8:10:00 AM

»

Web Services Link Interface

Some useful webservices links: Yasser Shohoud’s WebServices book is on-line: http://www.learnxmlws.com/book/ Christian Weyer’s WS-ContractFirst has a new version: http://weblogs.asp.net/cweyer/archive/2004/08/30/222725.aspx Clemens Vasters WS-Addressing Tip: http://staff.newtelligence.net/clemensv/PermaLink.aspx?guid=7ba96e03-1ec5-4a22-9042-57b96b6fa725 (if it can trick Clemens it can trick you too). »

Life is Strange

I was browsing in my local technical book-store today (not that strange) and came across Mike Gunderloy’s book Coder to Developer (still, not that strange). I opened a page at random (circa P.149 I believe) and there was a list of code generation tools. M3rlin, the XML-ized templating code generator I wrote and put on GotDotNet was in the list, with a short paragraph on it. That felt quite strange.

Comments

Davie
That is strange!
Congratulations! that’s great to get mentioned like that.

Davie
24/08/2004 12:46:00 AM
Greg Low
Way cool Joseph!
24/08/2004 2:57:00 PM

»

Jim Hugunin has a weblog

IronPython and Jython author Jim Hugunin has a weblog: http://weblogs.asp.net/hugunin/ back in my VB6/ASP days I yearned for Python. It’s great to see it alive and well on my favourite run-time. »

HowTo: Control which version of the framework your .NET office add-ins run under

I noticed that the office add-in I wrote recently in .NET was running under framework 2.0. That started me thinking - how do I control which version of the framework these run under? Libraries don’t get much of a say as to which version they get loaded by, they just get the framework version that the hosting application is running in. The normal way to govern this for a .NET app would be via the application configuration file, but when the host is not a .NET application what governs which framework version it runs under? It turns out that you CAN go and create an application configuration file for a COM application that can be used to control which framework version is used. Without an application configuration file, the latest compatible runtime version installed on the computer is loaded by default. I created a new text file named “WINWORD.EXE.CONFIG” in the same directory as the winword.exe image and put the following elements in and viola - I can control which framework version word will use to load it’s add-ins. This should work for any COM exe that loads .NET code via inter-op. You can use the “requiredRuntime“ element instead of the “supportedRuntime“ element if you want to run under framework 1.0 (as described here - notice in the MSDN they get the xml document declarations wrong!).

<?xml version=1.0 encoding=utf-8 ?>
<
configuration>

<
startup>

<
supportedRuntime version=v1.1.4322/>

</
startup>
</
configuration>



Update:It seems the MSDN has corrected it’s XML document declaration. For those interested I think it was missing a leading ‘?’.

Comments

David Thielen
Hi;

But what if your add-in needs .NET 1.1 and then my add-in which needs .NET 2.0 is installed. I then overwrite your config file.

??? - thanks - dave
[email protected]
6/01/2005 4:38:00 PM
DevelopersDex discussion of this topic
17/01/2005 4:18:00 AM

»

Amazed by .NET & COM Iter-Op

A non-programming friend of mine recently needed a fairly simple office add-in written. Rather than responding with the more usual “write it your [dam] self” answer I took a more understanding approach (OK, so promises of money may also have been involved) and wrote it for him. I had done some .NET & COM inter-op, and it seemed to work OK in the past (despite some of the bad things I have since heard about it - maybe I was just lucky). I decided to try and write it in .NET just to “see if it would work”, fully expecting to have to break out the VB6 disks at some point and write it in that, or switch to VBA. I quickly found this article http://support.microsoft.com/default.aspx?scid=kb;en-us;302901 and followed the steps outlined. That simple demo worked. I wrote some code, and that worked too. I needed to get a hold of the word application object, so I added a reference to word, and cast the generic application object (who was being passed in as an object from a method signature in the Extensibility dll) to a “word” application (from the word COM dll) - that worked. Several times I said to myself “now this is probably not going to work” and each time I was pleasantly proven wrong. This is using vanilla VS 2003. No VSTO or anything like that, and it all just worked. Apart from one hiccup when multiple word documents were open I had no problems. Total time spent was a couple of hours, and no need to resort to nasty VB6 or VBA. It runs in Word 2000 up to Word 2003. I have not tried (nor do I care to try) Word 97. Yay .NET COM inter-op.
 
My experience is something of a contrast to Geoff’s http://dotnetjunkies.com/WebLog/Fredd/archive/2004/08/12/21793.aspx

In other news long-time ‘blogging hold-out Adrian has finally gotten himself a weblog. His Java/Linux tendencies made it hard to convince him to become a “.NET Junkie”. Here is a CSS trick form him on getting MSDN code samples to display properly in Firefox browsers. http://aydsblog.blogspot.com/2004/08/firefox-msdn-garbled-code.html

Comments

JosephCooney
HowTo: Control which version of the framework your office add-ins run under
15/08/2004 2:10:00 AM

»