Here at CCP we have a open devblog where the developers blog about our product. Usually it's about game related things, but occasionally there are posts there of interest to software developers, such as software development practices at ccp and all you wanted to know about defects but were afraid to ask .
The QueueUserWorkItem is a function I've used a lot to queue up things that should execute async calls. And I've always called it like so:
ThreadPool.QueueUserWorkItem ( DoIt, someStateVariable) ;
And things have been fine and dandy. Of course I thought that the QueueUserWorkItem method would return void since it's an Async call. Well Actually it's not async since it does some work queuing up the call, which could fail, and of course if it fail it should throw a Exception.
But it turns out that is not the case. Using the only real bcl documentation, it turns out it calls out to a extern method that returns a bool, and returns that bool as a result Code if whether the queuing was successful or not! And the MSDN documentation confirms this:
true if the method is successfully queued; otherwise, false.
So each time I have been queuing stuff up, I've been blindly assuming that the queuing was successful. Rather I should have been either checking the result and re-queue, or throw a custom exception if it returns false.
Why the method does not throw a exception when it fails, like everything else, is a mystery to me.
Anybody know why ?
My work insisted to send me to TechEd in Barcelona, so I'll be there from Monday till Friday. So if you're there and want to meet up for a beer, be in contact.
Wow, it's been long since I've posted something up here, mostly because I've been changing jobs. My new employeer CCP Games is a independent games developer here in Iceland, responsible for the MMO EVE-Online. Although I'm not going to write much about that, you can excpect some future posts about the technologies I'm playing with now, such as WCF, Ibatis and more.
Here are some tools that I have found helpful for developing and debugging web-services:
Web Service Studio
A excellent soap client, If you are creating/consuming web services and want to play with them without creating a client, this is a great tool. I use this one all day long.
Lunch this little app and it registers itself as the default HTTP proxy, allowing you to look into all HTTP traffic. This tool allows you to view the header and the HTTP data as text, hex, images or XML. Also the option of replaying HTTP requests is really useful.
If you work with XML, you should be using this tool. Whether for schema design, XML file viewing, creating your own WSDLs or trying out different Xpaths, this is the tool.
We all know that the proxies generated by visual studio's Add Web Reference are not as good as they could be. And also that the [WebService] attribute encourages RPC like design of your services. This tool enables contract first based design and acts as a code generator from wsdl, generating proxies that are far more useful than the vs net ones(public properties, collections, serialize classes, et.c.)
Here are also some tools I have been meaning to try out, but haven't found the time to do so.
I downloaded this tool some while ago, and it seems to work like fiddler in that it acts as a proxy, allowing you to view your ws calls, and also validates them for basic profile support. It also acts as a client allowing you to generate requests from wsdl.
WSI-BP test tools
Of course we all should test our services for Basic Profile compliance, this might be obsolete if SoapScope does this well (I think it uses these tools internally)
This tool from McAfee allows you to inspect your services for security, both for WS-Security and injection attach (SQL injection, cross site scripting and xpath injections)
Are there any other tools out there I should be aware of ? What are you guys using ?
Since yesterday was the last of my summer vacation and I had nothing better to do, I decided to give the biztalk exam (74-135) a try. So I registered, showed up, took the exam and passed with a score of 850! With out studying specifically for it (actually went out drinking night before ;) Some questions were in my opinion confusing in how they were laid out and also there was a question on HWS! The exam tests a broad range of biztalk areas, from messaging, orchestrations, BAM, BAS, operations, installing, and custom development.
For some stupid reason I can't use this exam as an elective fore my MCAD (I'm only missing the elective there) but I can use a exam on biztalk 2002 there! That's just stupid that it does not count toward any certification !
At the Tech Ed 2005 Europe Architecture pre-con Beat Schegler and Arvindra Sehmi talked about a methodology framework that MCS have been working on called Motion which is supposed to be:
"The Motion Methodology uses the concept of Business Capabilities to model a business. A Capability describes the what, not the how. A Capabilities Model abstracts structural information (capabilities and connections) separately from dynamic information (processes)"
Motion decomposes the whole business into capabilities on many levels of granularity ( level 1-3), where level 1 represents core business capabilities (eg. Warehousing), level 2 represents capability groups (eg. Manage Products/Orders) and level 3 represent the business capabilities (order products, track etc. ). Each business capability then has 80 attributes which describe it, such as who owns it, input and outputs, best practices and exceptions.
On top of this we then layer our business processes. which manage and orchestrate messages going between these business capabilities.
The Framework is supposed to come with a complete set of deliverables templates and tasks and a unique "go in, go up, go out" approach to modeling these business capabilities and processes, FAQs, case studies and the while shebang.
When goggling around for this, I've not been able to come up with anything so far. Are there any news on this, when this will be released and to whom ? Will it be publicly available like MSF or only to partners ?
I can see the tooling for this going hand in hand with DSL tools in the future.
Appendix C (Using BizTalk Native Adapters) From BizTalk Server 2004 Unleashed
is finally released, go get a pdfcopy of it here
Working on the setup of the BizTalk deployment we are doing in Dublin right now, I found out that to use the concept of a logical host, with physical server supporting it, you need to have the enterprise edition of BizTalk.
The concept of a stateless host instance is, in my opinion, one of the great strengths of BizTalk and it's a shame Microsoft if only making it available to the ones who can afford the enterprise edition. In Dublin we are deploying a 2 host instance BizTalk group, running on the enterprise edition, so I doesn't directly hurt our deployment now, but it might discourage other from start using BizTalk.
For those looking for ideas for the VS-Add-inn contest
Don't know if VS add-ins would allow you to do this but I'd really like to see a add-inn that would do this. Each time you write:
ObjectThatIsIDisposable o = new ObjectThatIsIDisposable();
it would wrap it up in a using clause, rewriting it, so it would look like:
using (ObjectThatIsIDisposable o = new ObjectThatIsIDisposable())
<And place the cursor here>
I just love the using synthetic sugar !
Also, I'd really like to see a add-in that would allow me close all files currently open in VS, without closing the solution.
More Posts Next page »