Using the Wuala API .net wrapper for quick in-folder search

An interesting question that came up to me was how to implement a quick, efficient in-folder search engine with the .net wrapper. Of course, by it’s nature this isn’t a given feature and because you’d have to enumerate through all the subfolders.

But the question tips of another aspect: LINQ in combination with the wrapper.

As the entire assembly is written with extendability in mind, let me say: Yes, you can easily use LINQ with the wrapper:

var allfiles = WualaFile.GetFileList(
"//wuala.com/Creative+Commons/Chaos+Computer+Club/Chaosradio+Express", true, false);

var files = allfiles.Items
            .Where(f => f.Name.Contains("09"))
            .OrderBy(f => f.Url);

foreach(var file in files)
{
   Console.WriteLine(""{0}"", file.Name);
}

Console.ReadKey();

If you want to build an in-folder search that also cares about subfolders though, recursively get the files from the folders, add them to a global index, run LINQ queries over it and export the Url of the result files back in. Easy as that.

Visual Studio 2008 Essentials

Despite all my bickering, Visual Studio 2008 is great. It was well worth the money to upgrade.

There are a few things missing from the Professional version, though. The lack of a powerful profiler for everyone still makes me shake my head but I’m using Red Gate’s ANTS profiler anyway, so who cares.

Let’s talk about some updates, add-ins and extras you should definetively try…

  • Visual Studio 2008 and .NET 3.5 Service Pack 1
    This service pack adds a plethora of new features, enhancements and bug fixes and should be installed right away. Data scaffolding, new WinForms controls, an entire new data modelling framework, countless WPF enhancements… you name it, it’s probably in the SP already.
  • PowerCommands for Visual Studio 2008
    This package contains numerous nifty functions that’ll improve your sourcecode and workflow. Remove unnecessary usings, open command prompts on the fly, way better undo… just read about the features on the homepage and try it, you won’t regret it.
  • AnkhSVN
    I don’t like SourceSafe. For it’s requirements it gives back very little. In comparison Subversion performs great: You don’t need a server or anything, just create a repository on your local disk, check in your files and start branching, merging and keeping book of your changes. And best of it all: It’s free. Now, that’s where AnkhSVN comes into play – it adds TortoiseSVN’s power into Visual Studio. Don’t know how I worked without this.

So, what’s missing on this list? Let me know 🙂 .

Wrapper Release

Gee. I didn’t get around to post this but the stable wrapper v. 0.0.1.0 has been released onto Wuala.

Changes include the latest adjustments to the API (doesn’t include the changes to the thumbnail method, as this came later) and a little cleanup/documentation in the sourcecode itself.

I think it’s a nice, easy-going wrapper to work with that doesn’t make a big deal out of every little event (as a matter of fact, it doesn’t throw any exceptions whatsoever $me thinks).

Since there isn’t much demand for fast-paced development and I’m kind of absorbed into FarCry 2 at the moment, I probably won’t bother working on the Wuala Browser Sample (the application that should succeed ToyBox at one point) for a while — that doesn’t mean I won’t play around with it, though.

Monodevelop no longer broken

Yeah, I don’t really know what’s different now. A fresh checkout from trunk, a quick compile and Monodevelop is back in action. It is actually the first version I’m using in a long time, I’ll try to get a little more into Mono and Gtk# now as Qyoto still seems to be a little in the future for everyday use across different platforms.

So, as a little test of some of the Mono namespaces I’ve built a quick and dirty (I really mean it!) program that writes a user-selectable number of feeds from Liferea’s liferea.db back into XML files (RSS2):

If there’s any interest I’ll polish the code to be less prone to errors and post the sources.

By the way: Weekend, yay.

Quick hint: Use SharpDevelop more often

There are quite a number of things that were stripped from Microsoft’s proud Visual Studio Express series. One of them being the resource editor in C++, another one being a buttload of templates for your project type. Like… let’s say… Windows service.

Now, while I dug myself through the documentation on how to write a service the more obvious and easier solution was ignored: Use SharpDevelop. It comes with a lot of handy templates… like Windows service. It can do a lot more though; the new beta version features support for XAML, respectively WPF, which is quite a nice addition.

So, best thing to do (if you don’t want to skim out the money for the full version of Visual Studio) is to use both IDEs side by side.