Wednesday, October 08 2008 - Blog
Have you ever had two objects, of different types, and wished that C# could just be smart enough to realize that objA.FirstName should be assigned to objB.FirstName? For me this comes up quite a bit when working with WCF services. I don't want a service to directly expose my internal business object type, because that type might change on a different schedule than that of my data contract. So I often end up with objects that have identical property names, usually the service being a subset of the internal class, but obviously of different types. How can I handle assigning objDC from objInternal without writing a line of code (or generating a line of code) for every single property? Enter AssignFrom ... with this code, you'll get something as simple as objDC.AssignFrom(objInternal);
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.Diagnostics;
namespace TestCSharp
{
public static class ObjectExtensions
{
public static T AssignFrom<T>(this T obj, object from)
{
Type toType = obj.GetType();
Type fromType = from.GetType();
var toInfo = toType.GetProperties();
var fromInfo = fromType.GetProperties();
foreach (var fromProp in fromInfo)
{
bool assigned = false;
foreach (var toProp in toInfo)
{
if (toProp.CanWrite && fromProp.CanRead &&
toProp.PropertyType.Equals(fromProp.PropertyType) &&
toProp.Name.Equals(fromProp.Name) &&
toProp.GetIndexParameters().Count() == 0 &&
fromProp.GetIndexParameters().Count() == 0)
{
toProp.SetValue(obj, fromProp.GetValue(from, null), null);
assigned = true;
}
}
Debug.Assert(assigned,
string.Format(
"Property {0} was not populated to the To object.",
fromProp.Name));
}
return obj;
}
}
}
Thursday, September 25 2008 - Blog
With many thanks to Sanket for posting this information originally, I wanted to post these links here so that the next time I can save my self the Google search and just hit this post. These links are for the EN language, but there's a link at the bottom to the full list for all languages.
Windows 2003 Server 32 bit
http://go.microsoft.com/fwlink/?LinkId=81468
Windows 2003 Server 64 bit
http://go.microsoft.com/fwlink/?LinkId=81459
Vista 64 bit
http://go.microsoft.com/fwlink/?LinkId=81423
Vista 32 bit
http://go.microsoft.com/fwlink/?LinkId=81432
Windows XP 32 bit
http://go.microsoft.com/fwlink/?LinkId=81450
Windows XP 64 bit
http://go.microsoft.com/fwlink/?LinkId=81441
For a complete list of all the downloads in all the languages, you can use this link -
http://msdn.microsoft.com/en-us/library/aa578652.aspx
Wednesday, September 24 2008 - Blog
Laptop
What makes a great laptop for a mobile office? Well I can give some guidelines, and assume I'm talking to a group of developers, but in the end that is up to you. Some things you need to remember:
- Extensibility - Does your laptop have an expansion bay which can be used to swap in new hard disks, optical disks and/or batteries?
- USB Ports - I've yet to meet a laptop with "too many" USB ports. Mine has 4, and I run out quite regularly.
- Big screen - This is a desktop replacement machine, don't go for light, go for powerful and comfortable to type on and while you're at it, get a good resolution screen because you've got the real estate to do it with.
- Express Card - Express card slots are where are new plug-in peripherals that aren't USB are being developed for. Make sure you've got one of these.
- PCMCIA - If you can still have a PCMCIA port, great because there are a ton of legacy laptop gizmos which can use this port.
- Firewire - While not as big in the Windows world, a lot of the video cameras in this world only talk Firewire. Usually labeled IEEE 1394, you want to make sure you've got one of these.
- Multi-Core - Non negotiable it must be at least 2 cores, preferably 4 core once Intel gets their mobile quad core CPUs available.
- Memory - Max out your memory, there is just no reason not to.
- Video - If you're getting it yourself, max out the video card. You likely will not win this argument with corporate IT though unless you happen to have a job that has intensive graphics like a designer.
Now that is not the end all be all of laptop features. Remember things that are important to your job, my father works with devices that require a parallel port to communicate with on a regular basis and that is becoming increasingly rare these days, so that is a feature he has to shop for specifically. Get the pointing device that least drives you crazy, whatever that is. Personally I love the "nib" style pointer, but I recognize that doesn't work for everyone. The Dell Latitude D-820 which Sogeti provides me is an excellent device, and happens to have both nib and touch pad. The only thing I'd change about my unit is that I'd prefer if it had a Bluetooth transceiver built into it.
Mouse
Everyone has opinions about pointing devices, but I love the Microsoft Wireless Presenter Mouse 8000. This is a gorgeous Bluetooth mouse with built in presenter controls, media controls, laser pointer, etc. None of this gets in the way of the operation of the four buttons or tilting scroll wheel (so you can scroll horizontally). It runs on 2 AAA batteries, but will last months on those even with daily use. I've had one for nearly 2 years, love the protective case it comes with, and have just bought my second one so I can have a backup in case the current one dies. (The media controls, and presenter controls, are on the bottom of the mouse, it flips over and disables the top buttons when in presenter mode).
Sometimes though I'm an idiot, I grab my laptop and run to a meeting only to discover my presenter mouse is back on my desk. Rather than suffer with even a nib, which is still inferior to a mouse, I now get to reach for my PCMCIA port and pull out the MoGo Mouse that was part of the MVP Award gift pack for 2009. One photo won't do this ingenious little gizmo justice, so go check out MoGoMouse.com and check it out.
Storage
There is no such thing as enough storage. Period. Full Stop. I carry over a terrabyte of storage in my backpack, and have occasionally still wanted for more (for short periods) when I've been bad and not rolled off temporary data that I should have. My portable storage plan takes two parts, the first is a hard drive expansion slot for my Dell's MediaBay slot. This is proprietary, but there are third party trays you can get which will slide in and let you put in your own hard disk. I use this disk for all my virtual machines. Worthy of note, you can also boot to this disk, so if you've got a Dell from work with lots of OS/Domain restrictions, you could install another OS on the other drive so you could re-purpose the hardware when you're not at work or if you need to run another Operating System for work reasons.
For everything else I use Western Digital Passport drives. These units can be acquired in large capacities, mine are 250gb, and I carry a pair of them. They store my ISO library of software, my baseline VPC images (the Dell HD has the working copies), a home music library backup when I want more than I keep on my hard disk, etc.
Cables & Hubs
There are other things you'll need besides this, the first of which is cables. Almost nothing I carry has its default cables with them unless those cables are proprietary (which is a mark against a device). I carry a large number of ZipLinq cables though. These wonderful self-retracting cables allow me to avoid the backpack becoming a jumble of cables, and yet connect to all sorts of things. I carry multiple USB-to-USBmini cables, USBa-to-USBb, headphone extender, 1/8"-to-1/8", Firewire, and generic USB extender cables. All inside just one of my bags, with my hard drives and of course... a USB hub.
Monday, September 22 2008 - Blog
Content is king! Just ask anyone who is serious about the web and they will tell you, unless they're in the midst of getting you to sign away your content at the moment. As a consultant or other person on the go, you should be ready to capture content at a moment's notice. Now, I do a ton of community work, so I probably take this to extremes, but you should consider these options.
Video Capture
Video Camera
A picture is worth a thousand words, but a video is king. Be it user groups, scrums, product demos or anything else having a video camera close at hand can solve a ton of problems. I carry a nice cheap video camera in my backpack which I picked up during a Black Friday sale. My unit is a Panasonic PV-GS85, which has a great built in LED light which can help with close up camera work in dark rooms. The model is not important, they key here is that having some sort of video capture really helps. There are three levels of video cameras these days. Flash, Tape, and Hard Disk.
Mine is a tape unit, that records to Mini-DV. This means I can record a lot, about 1.5 hours per tape, but it means I've got to rip the tape back to digital files at 1:1 speed when I'm done, which means 1.5 hours of recording is 1.5 hours of ripping.
Flash units store less, but also store as digital files so they transfer to a computer much faster. These can also be very small sometimes, which is nice. They can also be cheaper than tape.
Hard disk units are more expensive, and about the same size as tape units but they also transfer to your computer faster because, again, they are storing files to that hard disk.
On all of these, when you get a unit realize you're not trying to film a movie, O.K. quality will likely be fine. Good enough, is by definition, good enough.
Mono-pod
Video cameras are great, but shaky video isn't. I carry a mono pod in my backpack that I can whip out whenever I need to stabilize a video. These gizmos are handy, but remember that mono means 1, that's 1 leg, which means no walking away. For walking away you'll need...
Large Tripod
I bought a "large" tripod at my local camera shop. It stays in the car, to big for the backpack, but it is still relatively nearby if I need to record a longer session. Usually I know this on my way in and will carry it with me. I've made a habit of recording our company meetings for Sogeti so that they can be shared on our SharePoint portal. This has worked great for me.
Small Tripod
But sometimes you want to walk away, and haven't got time to get the large tripod. For this, we use the wonderful QSX 1001 tripod. This tripod packs up into a 2 inch diameter, 7 inch long tube. It rides in the water bottle pocket of my backpack, and is always ready to be pulled out. Now, even fully extended this only rises to a height of about 12 inches, but resting on a table this is perfect for interviews.
Web Camera
Sometimes the full camera isn't what you need, instead its time to participate in a Live Meeting session or other Webcast and you just need a web camera. I carry a Microsoft LifeCam NX-6000 for this. I'm a fan of this unit, but it's drivers are enough to drive me crazy. The drivers install a service (MSCAMSVC.exe) which can start consuming tons of CPU cycles even when the camera is disconnected. I now keep the service disabled until I plug in the camera. What I really need is a better Web Cam at some point that lacks these problems. This unit is workable, just realize you're going to have to seize control of that service of your box will seriously suffer.
Audio Capture & Playback
Sometimes you don't need video, and audio alone will be plenty. Sometimes you just want to listen to some tunes while you're cruising along to your code. Here are my tools for this.
MP3 Player
We all need tunes, and we want them on the go. While I own Zunes and iPods, as Alton Brown says, I hate unitaskers. The Creative Zen V Plus, I've used for years and remains the staple generic MP3 player in my work backpack because it not only plays WMAs, MP3s, and Audible audiobooks, it also has a built in recorder. Now, this isn't super high quality audio, but if you've got a morning Scrum that you need to record, or if you need to write yourself a verbal note, then this is the unit for you.
Audio Recorder
If podcasting is your goal, then the Zen V Plus won't be up to the quality you want. You need a good quality recorder which can capture audio in multiple different ways. For my purposes, this is the Zoom H4. This unit can record with its two built in microphones, it can accept two direct inputs from guitars or other instruments, or it can take two XLR microphones and provide them up to 48V of phantom power. Best of all, it just plugs into your computer for retrieval of the information, and stores to common SD memory sticks. It also comes with its wall socket adapter, or can run portably with 2 AA batteries. I use this for my podcasting efforts, and have been very happy with it so far.
Listening
When you're done capturing, you're gonna want to listen to all that wonderful content. I've raved in the past about the Logitech Freepulse headphones, and I'd still recommend them. The customer power scheme still bothers me though.
Image Capture
There are more than cameras to image capture...
Cameras
No cameras are in my backpack, at the current time the camera in my phone has always been enough for what I've needed. When I vacation I might add my wife's camera, but otherwise camera phones are the key here.
Scanners
The technology most locking down the modern mobile office is fax. There are a bunch of service options for this, but those services don't also help with the problem of being handed a piece of paper that you want digitized into OneNote or other computer note taking software. For this, I carry the Pentax DS Mobile 600 which is a wonderful, USB powered, color scanner. This unit will rip through your pages of hand written notes and digitize them for your digital consumption. Fair warning, at the current time there are only 32 bit drivers for this unit.
Monday, September 22 2008 - Blog
So you need only flip back about a year ago on this blog to find that I am clearly a fan of pushing people to contribute to their community, and their world, in a positive way. I was a huge proponent of the We Are Microsoft event last January that has since morphed into the GiveCamp initiative nationwide. I've been thrilled to watch that effort franchise itself around the United States, and am sure that it will reach further will. GiveCamp's are based on the idea of using our skills, as developers, to impact a local charity in a positive way. This is an incredibly high touch, high impact donation of skills that many charities simply lack. But at its heart, it is about giving back. So what can we do between GiveCamps? How can we impact our community and our world in a tangible way without picking up and doing three years of field work around world?
Well the truth of the matter is that in between we need to work closely with those people who are on the ground around the world and know where impact can be created. Kiva.org is an organization that lets us do exactly that. They are a micro-financing group who helps bring small loans to people throughout the world. While a $50 dollars might buy you a new video game for your XBox 360, it will also help fund two different loans to entrepreneurs around the world.
What is Micro-Financing?
Micro-Financing is about helping lend money directly to entrepreneurs around the world which can make a real impact to their local economy. It is based on the principals of capitalism, and can be explained much better by sites such as WikiPedia or Kiva themselves.
How does Kiva help?
Simple, they work with partner organizations on the ground to make known to you the needs of these entrepreneurs. They provide a way you can work with others to finance such a loan. They handle collecting those funds and returning them to you.
GiveCamp @ Kiva.org
I've created what Kiva calls a Lending Team for GiveCamp on Kiva's website. Through this team we can contribute to these entrepreneurs as well as track our impact over time. This is a long term effort, but even $25 can really help change the lives of those involved. Go to Kiva.org, create an account, join the team, and look for someone in need of a loan that you would be willing to back. I've already got a handful of loans out there. A word of advice though, join our Lending team first, before you fund a loan, because it will only be counted towards the team if it is made after you join.
Absolutely no skin in this game...
I want to be very clear, there is ZERO personal profit motivation for me in this. Teams are merely a community building effort and there is nothing about making a loan as part of the GiveCamp team that in any way accrues to the personal benefit of myself, or anyone else.
Friday, September 19 2008 - Blog
Phones
AT&T Tilt
I've carried an AT&T Tilt for nearly a year now as my primary personal phone. I truly love this phone, Windows Mobile 6, GPS, WiFi, full keyboard, 3 mega-pixel camera, and high speed networking is fabulous. I've been with AT&T for several years now. I was an AT&T Wireless customer, then I was a Cingular customer, now I'm an AT&T customer again so I've got a really good deal on a tethering plan for this unit as well which makes it Option 3 in my always connected plan.
T-Mobile Dash
I've just begun to carry a T-Mobile Dash as my work phone. It is replacing the 8700g (below) which I've carried for the last 2 years. While it doesn't have all the bells and whistles of the Tilt, it is running Windows Mobile, and so I can keep my mobile helpers on it as well.
Blackberry 8700g
My Blackberry that I've carried for many years is great for all the reasons that BBerries are great, and horrible for several other reasons. First and foremost, the thing refuses to power of nearly any scheme other than a true Blackberry charger. In my opinion, if I can't charge you off of a USB connection without special software installed, I'm not interested and that was the deal breaker for this otherwise great phone.
Sprint Wireless Card
I carry a Sprint Wireless Card as my primary mobile connectivity option (Option 2) in my backpack. I have nothing but gushing things to say about Sprint's network. As you can see from above, I commonly have had a chance to work with every network except Verizon for data, and Sprint is far and away the king. This wonderful ExpressCard slot item just works, and that is what I want from my technology.
Wireless Router
So about now someone has to be asking ... seriously? You carry a router? Heck yes! My Linksys Compact Wireless Router has solved a ton of problems for me in the past, and takes up so little space I often forget I've got it until I get desperate. When I land at a hotel room for a conference, I'll pay for internet for my room and then share it out via this little baby. It has also saved the day when visiting clients without wireless capability (NOTE : Ask about this folks, often they don't have it for good reason) or when I'm on personal trips to family. It has also saved the day at the first We Are Microsoft event when we overloaded the wireless capabilities of the sites router. I plugged in and took Team Sogeti and several other teams onto this unit to clear up some spots. Get one, you won't regret it.
Network Cable
Eons ago, when .NET was young and I was trying to learn it, I attended a ton of MSDN events. Inevitably you got a little bag of swag, and in one of those bags I got this little gem, a self-winding network cable. It lives in my backpack, comes out when the client doesn't have wireless and has saved the day many times.
Friday, September 19 2008 - Blog
Backpack
For several years now I've used a Targus backpack to haul around my portable office. A good bag, one that you can trust and has space for what you want to carry is absolutely key. For me, as you will see below, this means I want a lot of space, with large cavernous storage areas. I find my use of other bags (see the next section) helps organize these large spaces without the waste of the designers trying to guess what I want to carry and what shape it will be. For instance, even my favorite CityGear Chicago bag comes with a cell-phone pouch, how useless is this? Cells change shape so often I swear we'll have a boomerang shaped one yet. Let me worry about organization, the backpack is about portability and accessibility. Some small amount of small pockets are great for high access items like pens, pencils, etc but I'll organize the rest, thanks.
Small Bags
Ziploc Bags
I love me some Zip-Lock Bags, these little creations are absolutely fantastic for organizing the internals of your backpack. Now, don't go overboard and turn into Monk or something, but these bags are great for organizing. I've had best luck with the Freezer bag variety because the plastic is tougher. Also, here's a hint : Punch small holes with a pencil in the sides of your bag. This will let things pack small easier as air can escape, and we're not looking to hold liquids in these anyway.
Other Bags
There are endless other bags you might be able to use. Go to your favorite online mega-retailer and search on Zipper Pouch or Zipper Bag and you'll find them. I prefer bags which are more than two sides gusseted together so that I can fit larger items into them. At Tech-Ed 2007 I was given a couple of these wonderful bags (pictured right) which originally were printed with a Windows Mobile logo which has mostly peeled off the non-pictured side. These slightly padded bags have been carrying my portable hard disks and video camera ever since, and I'd love to have more of them (4-6 more would do if anyone has a stack of these in their office, email me).
Friday, September 19 2008 - Blog
One of the things that I have had to do as a consultant is get used to moving from location to location. Even if I'm at a client for many months, I'll often be moved around their facility because I'm not permanently moving in. This has meant that I've developed quite the interesting bit of tooling to help me keep a portable office. So there are a few different areas of concern:
- Organization
- Network Connectivity
- Content Capture & Playback
- Computing Resources
- Fallback Plans
- Personal Comfort
This is a run down of what I carry, and what I think of it. My bag is not perfect, as you'll be able to see from my reviews, but it works for my needs. What works for you will likely be different, but there will likely be overlaps and this list should prompt some ideas.
I'll update this post with links to each of the posts as I get them up over the next week.
Thursday, September 18 2008 - Blog
So I assume many of those who read my blog are aware of Dallas TechFest and either attended, or thought about attending, last year. We're starting planning for this coming year, and so its time to find out what you, our patrons, would like to see more of at Dallas TechFest 2009? What went great? What needed more attention? What was a waste of time?
Leave me a comment, and tell me what you would like to see.
Tuesday, July 01 2008 - Blog
I'm thrilled to report that I've been awarded a Microsoft Most Valuable Professional award once again in 2008, though this time I am a Connected Systems MVP, instead of a BizTalk MVP. The difference is nearly inconsequential, as I will still be working with the same team, but over the last year I've begun to focus more and more on things outside of purely BizTalk. I'd like to take a moment to thank Microsoft for the award, this program is absolutely fabulous and I couldn't be happier than to be associated with it. More corporations should examine the MVP program and think about how they can connect with their community the way Microsoft does.