ASP.NET MVC Research Project

June 7, 2010 by Gustavo Sandrigo | No Comments | Filed in Project Log

Today I decided that I should get some hands on time with ASP.NET MVC to explore the new 2.0 versions.

There are several technologies that I wish to try out with this project that are not ASP.NET MVC related. As I work on this project I will document my process as well as the decisions I need to make to arrive at a working, deployed application within my organization.

Here is a quick rundown of things I will be trying out in no particular order.

  • Visual Studio 2010
  • ASP.NET MVC 2.0
  • Log4net
  • jQuery
  • RavenDB
  • MSTest
  • Mercurial
  • StructureMap

This list is certainly not complete, there are a number of things that are interesting to me an I will continue to add to this list as I make decisions about them.

I hope that you will join me in this journey as I explore what these technologies can offer and the advantages that they may bring to my particular scenario.

Tags: , , , , , ,

About configuration and databases

April 25, 2010 by Gustavo Sandrigo | No Comments | Filed in Software Design, Tool Box

I have spent a significant amount of work searching on Google, Bing and Yahoo for answers to the question “Where does configuration belong?”

At work we have a Configuration Service that provides the means to get configuration information that is stored in the database to all of our services and websites. This solution seems to be a slam dunk when you think about it. Databases are great for configuration because reading scales nicely with very little work and since we have a service in the middle we can cache the information for a long time.

The problem, or should I say MY problem with this type of solution is that I count the database as a dependency when it comes to my software. In fact I like my software to have the minimum configuration available at all times to make it possible to log and diagnose issues with the resources needed to run, including databases. Now in my case the dependency is very obvious, I have a Configuration Service, so without that my software will not run.

Maybe it is the fact that we don’t have the tools support in place to manage these settings. Managing settings is a very low level process at work. You actually need someone to create and run a T-SQL script to be able to change a setting. If someone want’s to know what settings are in effect for a piece of the system, they need to know SQL and which databases to connect to, and also which DB is being used as there are many instances of the configuration database and not all of them are active.

I you think that all this adds up to a big headache, then welcome to my world.

Personally I like the idea of configuration files, files that can be changed to suit the appropriate environment by an automated process.

I have found an article on a configuration system that runs like that. Here is the link

Matt has created the type of utility that I am naturally inclined to use. However the question remains, where does the configuration data belong.

My boss Greg, who has been in this game for a long time, says that configuration belongs in the database.

Am I just blind? What is it that I am not seeing?

Please let me know in the comments what you think.

Tags: ,

New year, new responsibilities

February 26, 2010 by Gustavo Sandrigo | No Comments | Filed in Uncategorized

It’s been a while since I posted something here. It was not because I had nothing to say but because things were moving at a high rate of speed and I needed to focus to make sure I did not break my neck.

You are probably wondering what I am talking about … well let’s see.

Since my last post there are a number of things that have happened. I was promoted at work and became the new Manager of Application Development. I finalized one of the biggest and most challenging systems I have ever built and also found out that my wife is expecting our second boy.

As you can see my friends it has been a roller coaster.

During these last months I have had the challenge of looking at software development from the other side;  a side that is not always nice and that reveals the nature of the work we do and how it affects the business side of things.

I will continue to post in this blog my experiences in this new role and as always I will also share anything that I find that I think may benefit you, my readers and my friends.


May 16, 2009 by Gustavo Sandrigo | No Comments | Filed in Uncategorized

Hi everyone, it’s been a while since I posted in my blog. I am sure at least one person out there noticed.

I intend to post regularly again, at least every other week.

So to that one reader who apparently checks this blog on Thursdays … I’m back, thanks for waiting.

Tags: ,

Structured Search Questions

May 16, 2009 by Gustavo Sandrigo | No Comments | Filed in Uncategorized

I have recently started a new job. My new company owns a couple dozen dating web sites.

One of the challenges we face is to come up with better ways to find your match. If you are a member of an online dating website, you know that having the right tools to find the people you are looking for and also if at all possible finding the people who may be looking for you makes all the difference in the world.

Now I have used Lucene.Net before to create a search engine, but I am not sure that it is the best option for this kind of job.

Here’s what the Lucene.Net website says:

Lucene.Net is a source code, class-per-class, API-per-API and algorithmic port of the Java Lucene search engine to the C# and .NET platform utilizing Microsoft .NET Framework.

And here’s what the Lucene website says:

Apache Lucene is a high-performance, full-featured text search engine library written entirely in Java. It is a technology suitable for nearly any application that requires full-text search, especially cross-platform.

The key phrase here is “text search engine” which means that is is better at Google type of searches than it is at structured searches.

Before we go on, let me clarify what do I mean when I say structured search?

Structured search is the type of search performed on structured data, it is the nature of the data what dictates the best algorithm for searching through it. Usually this type of search is best performed by using tree search algorithms which are a natural fit for this kind of problem.

Now that we have defined our problem, let’s discuss some possible solutions.

Back in college my math teacher had a very simple and interesting way of demonstrating bit arithmetic.

He used a set of perforated cards to show us how we could sort and search through that stack by using a set of holes as bits.

The reason I bring this up is that I believe we can represent each of the characteristics of our imaginary member as a sequence of bits. For example we can assign each bit in a byte a certain meaning making sure to always keep it down to a yes/no field.

Member 100 can be a smoker, has a beard, loves the outdoors and is a heterosexual male.

The representation of this data could be like this:

  1. smoker yes/no
  2. has beard yes/no
  3. likes the outdoors yes/no
  4. female yes/no
  5. male yes/no
  6. looking for a man yes/no
  7. looking for a woman yes/no
  8. Reserved for future use

Armed  with this map, lets represent member 100 in a byte.

Member 100: 11101010

So now we can represent 8 characteristics of an imaginary member in a binary string.

What this gives us is a way of fingerprinting each one of our users in a way that is easy to search for patterns and come up with a list of results from that.

In an upcoming article I will write about a type of database that uses this kind of fingerprinting and searching and is developed on open source tools. Until then feel free to comment on this system and any ideas you may have that would make this work in a better way.

Tags: , ,

What is the promise of cloud computing?

January 10, 2009 by Gustavo Sandrigo | No Comments | Filed in Capacity, Cloud Computing, New Technologies, Scalability
Cloud image

The cloud is the latest buzz word. Everything can live in the cloud; some even say that it is web 3.0, and as such it will change the way we do things.

The problem is that at this stage the cloud is too much like the real clouds, for lack of a better term cloudy.

What is the cloud good for? What is the killer app of the cloud?

Microsoft has recently released it own version of the cloud, Windows Azure. Amazon was first to the game with its web services and Google has something similar with Google Engine. And just like that, life as a developer has become as dark as a day with too many clouds ;)

Is it possible to define what  can live in a cloud without talking at the same time about one of these implementations? I am not sure that can be done at this point in time.

I think that the cloud brings some promises and changes to the table that may change some business models.

The promise of a self managed environment, the cloud does not require you to maintain it, no worries about down time, no worries about failed hard drives, no worries about VIPs or grumpy sysadmins.

Automatic scalability, your service or website will have enough iron to run on without you having to buy extra hardware, you just pay for the use.

Maximum availability and redundancy, if a server goes down on the cloud fabric, a new server will host your service without any perceived downtime. You also no longer need two of every kind of server, the cloud provides the redundancy. It is built in.

Automatically backed up systems and data, since the cloud promises no down time, your data is always replicated somewhere else in the cloud.

A friend of mine put it this way, IT is gone.

I don’t know that I agree completely with that statement, however I can see that IT for a production environment may become unnecessary.

In the coming weeks I will be posting articles on each one of these implementations. Meanwhile, what are your thoughts on this? What do you think is the killer app for the cloud?

Tags: , , , , , , , , ,

Can Pex be a part of TDD?

January 10, 2009 by Gustavo Sandrigo | No Comments | Filed in C#, Leadership, Tool Box

Pex Web Site

I read about this tool called Pex from Microsoft Research. This is the description from their website.

Right from the code editor, Pex finds interesting input-output values of your methods, which you can save as a small test suite with high code coverage. Pex performs a systematic analysis, hunting for boundary conditions, exceptions and assertion failures, which you can debug right away. Pex enables Parameterized Unit Testing, an extension of Unit Testing that reduces test maintenance costs.

Pex is a very clever tool. You add some extra attributes to your methods and invoke Pex from the VS code editor and “automagically” Pex generated snippets of C# code that call your method, and not only that but also a set of appropriate values that test all of your code paths within the method.

You probably do not need me to tell you that this is a cool tool. What prompts me to write this article is a set of questions that popped in my mind as I was reading the documentation.

Can Pex become a part of the TDD toolbox?

Where can it be most effective?

I will propose answers to these questions, but as always feel free to participate through the comments.

Read the rest of this entry »

Tags: , , ,