SyntaxHighlighter

Tuesday, December 18, 2007

Watch Your Memory Spaces when Implementing C++/CLI

So for the past 4-5 days I've been trying to figure out why my CLI will not run in one of my CPP files. I figured since it was just a POD(Plain Old DataType) it should behave as expected... not the case... basically the POD is being allocated in seperate memory space than the applications memory space and thus being joined up using the semantics of what's known as a SharedPtr (shared pointer) In my quest to beat or figure out the compiler I was not able to get CLI to play nice inside of a shared pointer class. I tried every which way under the sun that I could possible think of to get it to work... IJW (/clr, /clr:pure, /clr:safe) I even tried using the old and new style gcroot and auto_gcroot wrappers around System::Runtime::InteropServices:Marshal class... still no dice. Every time I went to call a member on the managed type I got a memory corruption runtime error. I searched around and no one I could find had a solid answer so the only thing left to do was pull the logic in to the program memory space and then once the managed work was done I could then Marshal the data to the native world and pass it in the back door of the seperate memory space via a custom accessor I created and voila... it worked! I would love to show some of the code for how I did this but unfortunately it would be against company policy. However, I think the key take away here is that when you're trying to expose functionality that you've invested in years ago to a now modern managed world of applications you really need to have a sense of both worlds as you write your managed functionality. I on the other hand am learning native as I work with it so there is always little surprises popping up as I code. : )

-Develop with Passion
(Jean-Paul S. Boodhoo)

Monday, December 17, 2007

Moving back to Web Development in ASP.NET

So it's been a little while since I posted about the progress I've been making at WAMU.
Things have been going really well, I moved the entire C++ code base over to 2005 which was a lot of fun... "Not". And since the rollover I've been adding perf improvements and refactoring some sections of the code base in CLI, throughout the process I've learned more about pointers, STL, containers, memory space, loadlibrary, getprocess, etc... more than I ever wanted to know. ;)
However I've learned what it takes to write native code and how much I appreciate managed code. The company has been going through a rough patch with having to layoff some people which have caused some of our developer contractors to leave there positions. So I'm back on the internal intranet site for now as the lead. I will most likely re-structure all the work that has been done in a way that makes more since for new people that will be coming on board next year. The intranet site is not that complex which will make it easy for me to restructure it and incorporate a build process using Nant of course as well as adding some acceptance unit test with MBUnit. If there is time I will try to setup CCNet on a machine just for me so that I can monitor stuff that other contractors are doing. Whew! I have a lot of work ahead of me and not much time to do it in... so wish me luck as I enter back in to the world of ASP.NET/AJAX and best of all novice code. ;)

Thursday, December 6, 2007

New VS.NET Settings!!!!


VS.NET 2005 Settings provided by Scott Hanselman...
Download these awesome settings here!
-Thanks Scott

Monday, November 19, 2007

WPF For The Holidays















Well it's almost Thanksgiving... and as I sit and think about what I was doing over the last holiday break it hits me. I was working on building a Drill Team Competition Judging Application in Windows Presentation Foundation... This time one year ago it was in beta, and I can honestly say that the technology and my knowledge on it has come a long way. I've since finished the application above which now needs to be re factored into MVP. However, I've turned my attention to a new application also for Drill Teams... but more of a Team Management software package than anything else. So for the last few weeks I've had a craving to work on WPF again... much like the craving I get for turkey during the turkey holiday. ; ) So I went poking around Google last night in search of new WPF videos or training to purchase and found some free videos that has already began to change the way I think about all the cool features in WPF. For those of you looking to learn about things like Data binding, Styles, Templates, Documents, 3D, Media, etc. Then you need to do what I'm planning on doing this holiday when I'm sitting around pretending to visit with my family. WPF BootCamp, it's a series of videos that start from the basics and works it's way up to advanced topics. And what's even better is the presenters... folks like Bea Costa (Data binding Genius), Kevin Moore, Dr. Sneath, Celso Gomes(Blend God) and more. Each video is a good length about 45min minimum so the talks are very good an in depth. I haven't seen them all but I certainly will watch each one at least 5 times each to make sure I get the material. ;)

-Enjoy the Boot Camp-

Saturday, November 10, 2007

Code Camp pushed back

It kinda sucks, but the code camp got pushed back and to January and I'm honestly really bummed about it. However I am going to be doing a few things in the mean time to fill the void.

1) Nerd Dinner
2) "Free" in person MSDN event
3) And possibly buy a few of the new tutorials at innerworkings.

Thursday, October 25, 2007

My First Ever Code Camp!!!





Finally a code camp in the seattle area... usually they hold these in places I can't visit like Canada, Oregon, California, etc. Now finally there will be a code camp at the old Nintendo building now Digipen in Redmond. It will surely be a lot of fun and I hope to learn a great deal... especially with the following break out sessions.

Sessions


Using SubSonic

There are a lot of ActiveRecord implementations out there. Come check out SubSonic a lightweight offering on CodePlex.Track: ASP.NETSpeaker: Chris Kinsman
Castle - The DVD Extras

Many people have already heard of the Castle Project [http://castleproject.org] and some of the major subcomponents: Monorail, ActiveRecord, Windsor. Whether you use these things or not, Castle has build up a compelling array of supporting components and libraries that are relatively easy to use from your application - even if you're not using the rest of Castle: Dynamic Proxy, an NVelocity fork, Scheduler, FlexBridge, and other things not directly associated with Castle. In addition, a lot of the Code is so well written, you just feel smarter after having read it. Let's take a look at some of these things, how you can leverage them, and what the code looks like.Track: ASP.NETSpeaker: Chris Bilson


Dependency Injection with ObjectBuilder 2.0

What is dependency injection? When should I use it (and when not)? This talk will answer those questions and more, plus show off some of the design changes made to ObjectBuilder 2.0 (and sample containers that drove and validated the design).Track: Core .NETSpeaker: Brad Wilson


Rethinking Unit Testing: xUnit.net

The release of NUnit 2.0 was 5 years ago. This version of NUnit was more than just a warmed over port of other frameworks, pioneering the use of aspects to describe tests in .NET. Unit testing began to really catch on in .NET. Five years later, most developers are doing unit testing, and many of them cut their teeth on NUnit. With many unit tests under their belt, Jim Newkirk (the primary NUnit 2.0 author) and Brad Wilson -- with feedback from many friends and co-workers -- have released a new unit testing framework for .NET, xUnit.net. In this talk, Brad will discuss the history of xUnit.net, including their motivations and decisions, as well as show the new framework both for test writers and for those who wish to extend the framework for their own uses.Track: Agile PracticesSpeaker: Brad Wilson


Pex – Automated White Box Unit Testing

Parameterized unit testing is becoming a mainstream feature of most unit test frameworks; MbUnit RowTest (and more), VSTS data tests, xUnit.net Theories, etc... Unfortunately, it is still the responsibility of the developer to figure out relevant parameter values to exercise the code. With Pex, this is no longer true. Pex is a unit test framework addin that can generate relevant parameter values for parameterized unit tests. Pex uses an automated white box analysis (i.e. it monitors the code execution at runtime) to systematically explore every branches in the code. In this talk, Peli will give an overview of the technology behind Pex (with juicy low-level .NET profiling goodness), then quickly jump to exiting live demos.Track: Core .NETSpeaker: Peli
Windows Live DevelopmentIn this session, we'll take a look at the Windows Live development platform, which enables 3rd party applications to integrate with Live ID, Contacts, Spaces, Messenger, Alerts, Silverlight Streaming, Virtual Earth, and Expo.Track: ASP.NETSpeaker: Ed Kaim


Reflector and Friends: An overview of Lutz Roeder's .Net Reflector and its add-ins

Do you use Reflector on a daily basis? How about it's addins? Ever want to write your own addin? If so, you will probably find this session of some use and maybe even have something to add. This will be an introduction and overview of Lutz Roeder's .Net Reflector tool and some of the addins the community has developed for it along with a look at developing additional addins of your own. There are two sections to this talk: an introduction and overview of the tools (length depends on the experience of the attendees) and a look at developing Reflector addins or extending existing ones.Track: Core .NETSpeaker: Jason Haley


Black Belt DSA, building Duplex Agents

The Disconnected Service Agent in the Smart Client Software Factory allows you to queue up web service calls to a remote server when disconnected. These calls are played back once the connection returns. This is great for simple message exchange patterns that instantly return a response. However, it does not help you in the case of a long-running operation in which the response is to be returned out-of-band. Come to this session and see how we can tweak the DSA to allow it receive an asynchronous response. We'll utilize a WCF Duplex channel to provide an agent that will make a call and go about it's merry way until it receives a call back from the server. This functionality is beneficial beyond offline scenarios, I'll show you how you can also use this technique to faciliate exchange patterns with multiple responses. For example requesting a large result set of data that is returned in a chunked fashion over multiple successive calls. If you are develeoping with SCSF / CAB, don't miss this session.Track: WCF and WFSpeaker: Glenn Block


Session state injection your way with WCSF

The StateValue mechanism in Web Client Software Factory provides a nice clean way of injecting values to and from ASP.NET's session state. One of it's big advantages is it provides for testability, allowing the values to be substituted in a unit test. Another big advantage is that it allows a declarative way for values from ASP.NET Session's state to be plugged in. But what happens if you aren't relying on ASP.NET Session and have a custom or third-party mechanism? Are you "up the creek without a paddle"? Actually no. Come to this session and I'll show you to "Have it your way" and make our Session State strategy bow to submission.Track: ASP.NETSpeaker: Glenn Block


Data Enhancements in Visual Studio 2008

Visual Studio 2008 offers a number of features that make it easier to build both 2-tier and n-tier data applications. This session will cover the following: • Using the new TableAdapterManager to manage updating of related table. No more having to write the code make sure child rows are deleted before parent rows. Now, it’s automatic. • Using ADO.NET Synchronization Services to maintain a local copy of data that doesn’t change often, such as lookup tables, and then synching that data with the server version. • Automatically separate DataSet code from TableAdapter code. Today, you must do this by hand if you want to use the DataSet Designer and build an n-tier application. Or you can have VS 2008 do it for you. • LINQ to SQL classes and the Object Relational Designer. The LINQ to SQL classes provide a way to map a database model to an object model. You can write the code yourself, or you can use the Object Relation Designer and drag and drop tables and stored procedures from the Server Explorer. Track: Core .NETSpeaker: Robert Green


Windows Application Enhancements in Visual Studio 2008

Visual Studio 2008 includes some cool and exciting new features for building Windows client applications. In this session, we will explore two of them: • Client Application Services provide a way for you to add remote login, roles and profiles to client applications. Today, you can log into a Web site such as Amazon and the Web site knows who you are and what your preferences are. They are stored on the server and you are who you are regardless of what computer you use. Client application services gives you the ability to add this same functionality to a Windows application. You will write a service to authenticate users and to determine what roles they have. You can then call that service from any client. You can also write a service to manage settings. So you can store user settings on the server rather than only locally. • Windows Forms and Windows Presentation Foundation Interoperability. WPF is the revolution in user interface we have all been waiting for. Over time, it will increasingly be the way you build client applications. In the meantime, what do you do with all your Windows Forms and user controls? You will want to use them in your WPF applications. And what if you build a neat WPF control? You will want to use it in your Windows Form applications. With Visual Studio 2008, you can and we’ll see how. Track: Core .NETSpeaker: Robert Green


An Introduction to Windows Communication Foundation

This session will provide an introduction to Windows Communication Foundation. It will answer a number of questions such as: What is WCF? Why was it invented? How does it compare to Web services or .NET Remoting? How is it better than those? What is a service? How do I create one? How do I host one? How do I call one from my applications? What do I need to do to make sure clients and services can communicate? Once we answer these types of questions, you will be able to start creating your own WCF services and have a much better understanding of how to work with this promising new technology. Track: WCF and WFSpeaker: Robert Green

For more info head over to the site.

Seya There!!!

Tuesday, October 23, 2007

Modifiability: Or is there Design in Agility






This is a question that often comes up in Software Engineering. As I follow the blogs and discussion I often run into some wonderful information... and sometimes it's life changing. I happen to catch the following video which I encourage all developers to watch which is narrated by none other than Martin Fowler.
The discussion covers quite a few aspects of software design including things like how to make design decisions, TDD (Test Driven Development), BDD (Behavior Driven Development), encapsulation, and more. The panelists for the discussion are so very gifted and talented at what they do, they are all brilliant in there own way and conveniently enough work at thoughtworks.

Rather than go into each one of these guys web site... I'd rather just point you to InfoQ
which is where there web sites, articles, and videos can be found. If you can... check out each one of them, they all cover so many topics and you will certainly learn a lot. I have... ; )