Skip to main content

Posts

Showing posts from September, 2010

Coding Horror: Because Everyone Needs a Router

Coding Horror: Because Everyone Needs a Router : "Buffalo Nfiniti Wireless-N High Power Router ($80)" Jeff Atwood discusses routers and what he did to build a new one. He used the Buffalo Nfiniti Wireless-N and DD-WRT to replace his aging yet functional DGL-4500.

The SMAQ stack for big data - O'Reilly Radar

The SMAQ stack for big data - O'Reilly Radar : "'Big data' is data that becomes large enough that it cannot be processed using conventional methods. Creators of web search engines were among the first to confront this problem. Today, social networks, mobile phones, sensors and science contribute to petabytes of data created daily." What other types of large data sets can we use this approach on? The Oil & Gas industry deals with tons of data so maybe SMAQ can be used with it.

Use Linq and Reflection to Activate Interface and Execute a Method.

I created a simple ICommand interface similar to the one in System.Windows.Input: [csharp]interface ICommand { string Description { get; } bool CanExecute(object parameter); void Execute(); }[/csharp] In my project I created a bunch of classes that implement my ICommand interface and I wanted to find and execute them all.  I came up with two ways to do this, using a List<ICommand> and reflection. List<ICommand> This is very direct and easy but as I added new commands the list began to grow. Also I had to remember to add my commands to the list as I created them. [csharp] string separator = new string('=', 100); var commandsToExec = new List<ICommand> { new Commands.TestEntityConnectionStringBuilderCommand(), new Commands.BenchmarkingExampleCommand(), new Commands.FastTokenizerBenchmarkCommand(), new Commands.LinqToXmlTest01() }; foreach (var cmd in commandsToExec) if (cmd.CanExecute(null)) { Console.WriteLine(&quo