The Stochastic Game

Ramblings of General Geekery

Posts with tag 'trick'

    The extension method trick

    If you’ve been writing C# code lately you should be pretty familiar with extension methods: it’s a nice compiler feature added to C# 3.0 which lets you “attach” methods to an existing type. So for instance, if you define the following extension method: static class ConsoleExtensions { public static void WriteReversed(this TextWriter writer, string message) { writer.WriteLine(new string(message.Reverse().ToArray())); } } You can write:

    Formatting mongo output

    If you’re working with MongoDB’s mongo command line tool and you often see yourself reading through this: > db.contactInfos.find({"source":ObjectId("4e39da93058cfe28a039b546")}) { "_id" : ObjectId("4e6e9a9f058cfe01dc1bcded"), "source" :ObjectId("4e39da93 058cfe28a039b546"), "sourceId" : "754731", "sourceUserName" : "loudej", "ful lName" : "Louis DeJardin", "description" : "A software guy on the ASP.NET te am and author of Spark", "avatarUrl" : " 161371928/DSC01367_normal.jpg", "websiteUrl" : "", "location" : "Kenmore, WA", "friendCount" : 97, "followerCount" : 1428 } { "_id" : ObjectId("4e6e9a9f058cfe01dc1bcdf3"), "source" : ObjectId("4e39da9 3058cfe28a039b546"), "sourceId" : "16925866", "sourceUserName" : "sebastienr os", "fullName" : "Sébastien Ros", "description" : "", "avatarUrl" : "http:/ /a1.

    Spam your friends with Yahoo! Pipes

    You know how it goes: you’re an internet hipster with blogs and Twitter feeds and all that kind of new age stuff, but only other internet hipsters read them. Your friends (at least the ones that are not internet hipsters) only stick to Facebook. So how can you bring your stuff to them? At first, it seems easy: Facebook can pull “stories” from various websites and services. Go to your profile, and under the status update box, click “Options” and then “Settings”.

    Visual Studio Tips & Tricks

    Stephen Walther recently blogged about tricks that every developer should know about Visual Studio. Most of those he mentioned I use on a daily basis, so I highly recommend them. It actually surprises me how many other programmers don’t know about those features. Somehow, most programmers know Visual Studio as much as they know Microsoft Word: there’s a big space in the middle to type your text, and then maybe they know a couple of menus and shortcuts and that’s it.

    XAML markup is for real men

    The Visual Studio designer for WPF is quite lame as it stands now, and although it will get a lot better when Visual Studio 2008 SP1 is released, if you're a WPF developer, you really need to know how to read and write XAML by hand, much like web developers and designers know how to read and write HTML and CSS by hand. Since you're not a wussy, what you actually want is for Visual Studio to always show a full view of the XAML markup when you open a XAML document.

    Regain control over build configurations in Visual Studio Express

    I do almost all my development at home with Visual Studio Express. These products are wonderful and free. Well... granted, if they were not free, they would also be less wonderful too, probably. But they're still great pieces of software, and I'm pretty sure they played a critical part in building the vibrant .NET community we have now. I wish Microsoft would also release a free "Express" version of Office, but I guess I can keep on dreaming for a while longer.