JosephCooney

Putting the 'Junk' in DotNetJunkies

<July 2008>
SuMoTuWeThFrSa
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789


Navigation

My GotDotNet Samples

Subscriptions

News

I've moved my weblog to jcooney.net. Come and visit me there.


Still a dotnet junky, nolonger hosted on DotNetJunkies
I've moved my weblog to my own site jcooney.net and will try and resume posting stuff more regularly (albeit to a probably non-existant audience). Thanks for hosting my blog DotNetJunkies. Those SqlParameter exceptions just got to be too much to bear, and seeing ads for Crystal Reports beside my own work just felt wrong wrong WRONG. I've switched off comments here to prevent spam.

posted Tuesday, February 01, 2005 7:07 PM by JosephCooney

CodeCamp Oz

My readify co-hort Mitch Denny (with some assistance from others in the Australian .NET community like Greg Lowe and Andrew Coates) is organizing a Code Camp for the 23rd and 24th of April in Wagga Wagga. Should be a great get-together for the Australian .NET developer community in a simmilar vein to other code camps that have been held. If you have a topic you'd like to speak on don't forget to get in touch with Mitch.

posted Sunday, January 30, 2005 8:17 PM by JosephCooney

HIS Grab-bag
Some random HIS stuff (mostly so I don't forget them)

Calling PL/1 from HIS: (or "it's define your own wrapper time") http://support.microsoft.com/?id=183179

SNA Base service causes explorer to hang when viewing list of network connections: If I have no network connectivity and try to get a list of my network connections (so, for example if I wanted to dial up) explorer locks. This seems to be caused by the SNA Base service (which was still set at a status of "starting" half an hour after booting up, and which had written a large number of errors to the event log). I set the SNA Base service to manual startup, restarted and I was able to get a list of my network connections.

posted Monday, January 17, 2005 11:26 AM by JosephCooney

Something funny from the Java world
Jarwars - Episode III - Revenge of the <T>
As master yoda says "tiger leads to generics, generics leads to autoboxing, autoboxing leads to NPE!"

posted Friday, January 14, 2005 9:22 AM by JosephCooney

CodeDom Provider for Managed C++
One of the great things about working with people smarter than you is that you find out about your mistakes quickly. Today I was giving a demo presentation to some of my Readify.Net cohorts on the classes in the System.CodeDom namespace. In my presentation I mentioned that managed C++ does not have a CodeDom implementation. After the presentation one of my colleagues approached me quietly and said "you know what Joseph, I think managed C++ DOES have a CodeDom implementation" and he is absolutely right. Although it was omitted in Visual C++ 2002, as of Visual C++ 2003 it does. You can read all about it here. To all those I may have misled with this falsehood I deeply apologize.

posted Monday, January 10, 2005 7:58 PM by JosephCooney

Google store, Oracle DBAs and leading teams

My third-favorite technology company Google has an-online store. Love those “I'm feeling lucky” boxer shorts and shirts. Somebody I would love to get a blog is Donald Burleson the Redneck Oracle DBA. From the list of books he's written it looks like he and his crew have some serious Oracle skills. The only other Oracle DBA I know is Chris - certainly not a redneck, who has a band called ScuzzyBus. I'm proud to say I had a small part to play in him choosing a geek name for his band.

I recently finished reading Leading a Software Development Team by Richard Whitehead. In 40 “question focused” chapters Richard covers topics like “How do I draw up a project plan?”, “How should I reward good work?” and “When should I let someone do a thing their own way, and when should I make them do it my way?”. The book covers a great deal of material so it can only really cover the basics of each topic, but it does so well. It is clearly written (something I realize is not easy after reading my previous sentence a few times....), and advocates a pragmatic and principled approach to team management. In particular some of the most interesting chapters cover the problems that occur when somebody very technical goes from doing technical things (like writing code) to doing more “human focused” things (like managing others), and the emotions the newly promoted manager goes through. Recommended.

posted Thursday, November 25, 2004 7:27 PM by JosephCooney

You know you're getting screwed by a vendor when

  • You pay a six-figure amount for some "custom" COM objects that sit on top of their system.
  • You get an API that looks basicly like this: public object[] DoStuff(string operationName, object[] args)
  • You get "properties with exciting and unexpected side effects" in the COM API you paid through the nose for. Think "read a property and a whole bunch of other stuff gets reset". Now think how exciting this would be to debug, when adding a watch changes state.

And yet they defend their design in spite of it's obvious flaws and claim that the developers just "don't get it". I think I've come to expect a certain level of intellectual honesty when it comes to software development, and it's very disappointing when you don't see it.

posted Wednesday, November 24, 2004 6:36 PM by JosephCooney

Sun.Clue.Dispose();
It seems that Sun (TM)'s Crack Legal Team (TM) have served Ted Neward (TM) with a Cease-and-desist letter regarding his mis-use (TM) of the Java (TM) trademark on his small Java(TM) developer community site(TM). Wow. This would be like the ASP.NET team suing Fritz Onion.

posted Tuesday, November 23, 2004 8:34 PM by JosephCooney

Is your bug a smoker, or non-smoker?

In the spirit of the daily wtf I wanted to share this little gem with you all. Once upon a time I knew a programmer who was doing some maintenance work on a “classic” ASP issue tracking system his company had written. All of the developers who originally “wrote” [1] the system were long gone. The system apparently had a complicated UI, was quite confusing to use, and had a number of other qirks. Because it sort-of worked management were reluctant to scrap it for something better, and said programmer was charged from time to time with making enhancements to it, and fixing bugs. In spite of the “classic” ASP spagetti code he managed to craft some new features on to it, and fix some bugs, but unfortunately many times when changes were deployed they caused probelms and had to be rolled back. When I asked him (OK, it was a him) about this he explained how the code had morphed and atrophied over time. Because nobody had really understood how things worked, and becuase the thing seemed so fragile things were never removed. As an example he showed me the “Issue” table which had a number of fairly non-sensical fields for an issue tracking system, including one bit field called “smoker” (or something similar - I can't remember the exact name). Apparently the system's database had been “refactored” from a patient care system database and the “smoker/non-smoker” field had never been removed, so to this day in the crufty issue tracking system each issue sill had a field for recording this.

[1] perhaps “wrote” is too kind a word for what they did...

posted Wednesday, November 17, 2004 8:31 PM by JosephCooney

Web Grab-bag

Some interesting links from around the web:

CSS Astronaut Eric Meyer has created a CSS + XHTML + JavaScript slideshow system called S5. I checked it in IE6 and Firefox 0.9 (OK, so I'm behind the times) and it worked well.

Fritz Onion and others share info on doing ASP.NET development without web projects.

Ernie Booth has written a short article on some of the internals of Comega, which I have also been looking into recently.

Also I've been chatting via MSN messenger with a .NET developer and computer science student called Li Bo from China for a couple of months now. Li originally contacted me because he had downloaded some code I wrote on GotDotNet. He was writing a code generator as part of a university project (wow, I wish I had done cool stuff like that at university). A couple of months later this is the finished product - Rapidtier - a template-based code generator written in .NET. It comes with a fairly fully-featured IDE (something I never quite got around to doing in any of my tools), and some decent templates. I went from RapidTier newbie to running my first 100% generated multi-tier winforms app (with basic master-detail drill-down and CRUD capabilites on all the tables) in about 5 minutes. It generates code, solution/project files and stored procedures. Li has done some nice work with the UI, and making the code generation run quite fast. If you have any questions about RapidTier or want to discuss code-generation stuff get in touch with Li.

One last link before I go: Scott Hanselman points to the interesting ASP.NET application running the Bungie website and the amazing facilities it offers for tracking your performance in HALO 2 (when played via XBox Live) including perspectives on how you were killed in every game instance and RSS feeds of all your games. What are they gathering all this data for? Making recruitment easier?

posted Wednesday, November 10, 2004 7:31 PM by JosephCooney

SmartCassini - a managed web server for SmartPhone 2003
After talking about doing this a great deal, I finally spent a couple of evenings porting the Cassini code to my smartphone. Here is a screen-shot of it serving up a directory listing in the emulator, in pocket IE.

I think I spent more time just “finding my way around” in SmartPhone development than actually porting the cassini code, but it has been a fun experience. I will post the code on GotDotNet when I get around to it. On the topic of GotDotNet I noticed that the download count for my 5 samples has gone over the 10K mark. I was somewhat disappointed to see that some of my samples have been marked down to 3 stars (from 4 - 5). I wish people would leave some sort of comment explaining WHY they didn't like something (so I can explain to them how wrong they are ;-) - who says I can't take criticism well ). Dominic is back from Redmond. It sounds like he had a great time there. Unfortunately I haven't been able to get him to break all those NDAs and “spill the beans” on what he was working on.

Update:If you need to host webservices on the compact framework you should also have a look at this on the MSDN.

posted Tuesday, November 09, 2004 9:28 PM by JosephCooney

Code Camp, Books for a month off-line and other ramblings

Thursday evening seems to be “the night for blogging” for me, so here goes:

I saw this cool programming challenge over on Aaron Skonnard's blog (from day 1 of Code Camp that Pluralsight are running).

 Programming challenge: at the end of the day, we held a contest that required students to write code to chase a technology trail. It was a race. They were to start by sending a specific HTTP message to a specific endpoint (it required a special header so you had to write WebRequest code). The HTTP response contained the name of a private queue on the network that they subsequently had to read a message from. The message contained a WSDL document from which they had to generate a WS proxy class. Invoking the WS proxy returned the address to a .NET remoting endpoint, for which they already had an interface assembly. The .NET Remoting call returned a secret, identifying the winner. It took the winner about 20-25 mins. It required them to use every communication technique that we discussed in detail today. Hard? Easy?

In other news from this week Darren Neimke has joined Readify. I haven't really blogged about it yet ('cause I try not to blog about work stuff) but I joined Readify 2 months ago and have been very happy here. Last time Darren and I worked for the same company it didn't last very long - hopefully this time will be different.

At the end of this month I will be traveling to Japan and Italy (my spiritual home, which consumes about 14 billion espressos annually, and where you can get a decent doppio on the train) and won't be on-line much. Does anybody have any book suggestions for an extended period off-line? I'm keen to “travel light“ 1-2 books, and no 1000-page monsters. Code-intensive books make me want to code, and that will probably just lead to frustration. Does anybody have any good ideas?

 

posted Thursday, November 04, 2004 5:52 PM by JosephCooney

Interesting HST tip from Draco.NET source
I noticed an interesting “hooking stuff together” technique in the Draco.NET source for integrating with crufty old (but often extremely useful) command line utilities. The Process class has a StandardOutput property that can return a streamreader for reading standard output from. Much better than the VisualBasic Shell function. 

posted Thursday, October 28, 2004 8:09 PM by JosephCooney

All about mobility

I went to the local .NET users group here in Canberra (after missing a few too many meetings at my local group) and saw a presentation on mobile development from Smart Client Program Manager Jonathan Wells. Jonathan looked like he was in the twilight-zone, and said that he had given the talk in 8 different cities since Monday (yikes), but his talk was surprisingly lucid. I've been keen to write something for my SmartPhone, and have just started working on a Compact Framework project so I'm certainly interested in the topic.

One thing that came up was obfuscation of source code to reduce the code size (for deployment to devices). I had heard Jeffrey Richter mention this on DotNetRocks once, and wanted to know if Jonathan had any thoughts on if this was a good idea or not. He gave the classic performance question smackdown - “measure it and see for yourself”, so I did. In my pseudo-scientific test I randomly chose the following assemblies from the CF and obfuscated them with the community edition of Dotfuscator that comes with VS.NET 2003 (Note: Dotfuscator Professional which I did not use bosts “Comprehensive support for the .NET Compact Framework“ whatever that means). Here are the size differences between the “regular” assemblies and the obfuscated ones.

Assembly Size (before obfuscation) Size (obfuscated) Difference
Microsoft.VisualBasic.dll 136 128 6%
System.Data.Sqlclient.dll 145 128 12%
System.Data.SqlServerCe.dll 121 109 10%
System.Drawing.dll 38 31 18%
System.Net.IrDA.dll 11 10 9%
System.SR.dll 91 92 (1%)
System.Web.Services.dll 94 83 12%
System.Windows.Forms.dll 137 116 15%
System.Xml.dll 197 173 12%

Dotfuscator also has a “library” mode where exposed APIs are not obfuscated. Here is the size difference using this library setting for the same random sample:

Assembly Size (before obfuscation) Size (obfuscated) Difference
Microsoft.VisualBasic.dll 136 132 3%
System.Data.Sqlclient.dll 145 133 8%
System.Data.SqlServerCe.dll 121 115 5%
System.Drawing.dll 38 39 (3%)
System.Net.IrDA.dll 11 11 0%
System.SR.dll 91 92 (1%)
System.Web.Services.dll 94 89 5%
System.Windows.Forms.dll 137 134 2%
System.Xml.dll 197 185 6%

Note that in a couple of cases the size of the assembly actually increased, which seems very odd. Assuming that this random sample is representative of the size savings that could be achieved across the whole Compact Framework (roughly 4 -5%), think of the missing functionality that could have been added in the 100~ish K extra space they would have had. That's about the size of System.Web.Services.dll in the Compact Framework. Like so many other things, some of this missing functionality is fixed in whidbey. Apart from the Compact Framework team (who apparently had a very strict size requirement and tons of functionality to try and cram in) I don't know if obfuscation for size reduction makes a great deal of sense given that the gains are not that great. Also I don't know how obfuscation like this affects run-time performance.

As well as a good presentation from Jonathan I got a DVD with all the presentations from the Mobile DevCon from this year, and a bunch of other freebies. Love those freebies.

posted Thursday, October 21, 2004 9:38 PM by JosephCooney

Coding rule of thumb
If you find yourself putting #regions inside a method (or if you're a VB.NET programmer - wishing that you could do such a thing) you might want to think about making that a separate method.

posted Wednesday, October 20, 2004 9:09 PM by JosephCooney

Note to self: don't be so stupid

Dear self - next time you notice an instance of svchost.exe is using a huge amount of memory run tasklist /svc from the command line and find out WHAT is eating all the memory, rather than just re-booting your machine and wondering what it was.

Thanks

 

posted Monday, October 18, 2004 5:53 PM by JosephCooney

Pragmatism Reloaded

I've been doing a fair bit of travelling lately. In an effort to “travel light” I've cut down on the number and size of technical books I'm carrying with me. This trip I've taken only “The Pragmatic Programmer” with me. I find so many technical books don't seem worth reading once, yet this one I've read a number of times. It seems to have the great quality that you can pick it up and find something that is seems to speak to you directly about the things you're having to deal with RIGHT NOW.

Also I've started listening to opera while flying - I always feel a burst of adrenalin when the wheels of the plane hit the ground (something to do with the thought that "if things go wrong this could be the last moment of my life", probably no different to walking across the street but the danger seems more apparent). Having some prima donna singing her lungs out at that moment only serves to intensify the rush.

posted Sunday, October 17, 2004 8:35 PM by JosephCooney

OneNote, extensibility and Wikis
I've started using OneNote (an addition to Office2003) to replace the plethora of text files marked “todo”, “notes” and “stuff” that accumulate in various places on my system. I like the free-form content editing, it reminds me a lot of wikis! Then I started thinking “he wouldn't it be cool if you could use OneNote to publish to your wiki” (it appears I am not alone in wondering this either). Looking into it further I was disappointed that out-of-the-box there was almost no way to interract with OneNote - no automation API, no imbedded scripting language, no plug-in framework, opaque binary file format. Fortunately the service pack provides some extensibility points (although I am yet to see how extensive they are). Anyone else think rich client publising to wikis seems like a good idea, or know of any software to do it?

posted Monday, October 11, 2004 7:17 PM by JosephCooney

OMG Cω is Awesome! You should check it out

I wrote a short article here showing some of the very interesting language features I found in Comega, a language created by Microsoft Research. If code like this (especially lines 18-22 and 26-27)

producing output like that shown below sounds interesting to you then you should have a look.

  

Update: Jayson has a nice overview of Cw (back when it was called Xen) here.

posted Wednesday, October 06, 2004 10:33 PM by JosephCooney

Web Syncronicity
The web has a nice way of bringing things around full circle (or my brain notices co-incidences and attaches “meaning” to them). I played around late last week writing some custom attributes. I was interested in doing some method interception, and also maybe subscribing to some events on the decorated class. It seems that writing a custom attribute that actually DOES something by its self (rather than just being a piece of meta-data that can be queried reflectively by some other bit of code) is somewhat hard. If you inherit from ProxyAttribute and are applied to a ContextBoundObject object you can “do stuff” but apart from that it seems like you're out of luck. Even passing the current instance as a constructor argument to your attribute (so you could hook in to events and the like) doesn't work either (if anybody knows different please let me know). Somewhat disheartened I fired up IronPython to have a very belated play around with that. IronPython is cool, and I certainly plan to figure out how to add a “python interactive console” to winforms apps. Next thing I did (somewhat out of the blue) was check Jon Lam's site IUnknown.com. I had been talking to somebody about the IUnknown COM interface a couple of days before and it had reminded me of Jon's site - what do you think I found there? Some code on method interception written in Python.

posted Monday, September 27, 2004 7:50 AM by JosephCooney




Powered by Dot Net Junkies, by Telligent Systems