﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Alex commented on A challenge: Getting a list of products</title><description>SELECT TOP 10 * FROM product WHERE product_id NOT IN (SELECT product_id FROM product_tag WHERE tag_id IN ({tagList}))
  
  
You guys are Architecture Astronauts. 
  
http://www.joelonsoftware.com/articles/fog0000000018.html
  
http://www.joelonsoftware.com/items/2005/10/21.html
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment35</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment35</guid><pubDate>Wed, 16 Apr 2008 23:33:33 GMT</pubDate></item><item><title>alberto commented on A challenge: Getting a list of products</title><description>So, did I get the job? :D
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment34</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment34</guid><pubDate>Fri, 11 Apr 2008 19:31:35 GMT</pubDate></item><item><title>Michael Minutillo commented on A challenge: Getting a list of products</title><description>I had a quick go with LINQ to SQL. Given the way LINQ to SQL works does the Pipes and Filters Pattern begin to converge with the Specification Pattern in anyone elses mind?
  
  
http://wolfbyte-net.blogspot.com/2008/04/pipe-and-filters-fluent-apis-and-linq.html
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment33</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment33</guid><pubDate>Fri, 11 Apr 2008 08:48:37 GMT</pubDate></item><item><title>alberto commented on A challenge: Getting a list of products</title><description>Ayende, THEN I would refactor (in fact, if it were a face-to-face interview I would have asked you a few questions to get some insight in what you were expecting from me, but since this is not so fluent, I opted for KISS).
  
Anyway, I have posted my solution in my blog (it was a little longer and I can format it a little there ;))
  
  
http://sharpbites.blogspot.com/2008/04/ayendes-challenge.html
  
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment32</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment32</guid><pubDate>Wed, 09 Apr 2008 20:55:26 GMT</pubDate></item><item><title>Frans Bouma commented on A challenge: Getting a list of products</title><description>@alex: whoops! :X
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment31</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment31</guid><pubDate>Wed, 09 Apr 2008 20:28:36 GMT</pubDate></item><item><title>Alex Simkin commented on A challenge: Getting a list of products</title><description>Interesting that none paid attention to the first requirement:
  
  
"listing the first 10 products" 
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment30</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment30</guid><pubDate>Wed, 09 Apr 2008 20:27:52 GMT</pubDate></item><item><title>Frans Bouma commented on A challenge: Getting a list of products</title><description>I hope this all fits in the post
  
using System;
  
using System.Collections.Generic;
  
  
namespace Challenge
  
{
  
	public enum Aspect
  
	{
  
		Pg,
  
		ContainsMeat,
  
		// etc.
  
	}
  
  
	public class Product
  
	{
  
		public Product(HashSet&lt;Aspect&gt; initialAspects)
  
		{
  
			this.Aspects = new HashSet&lt;Aspect&gt;();
  
			foreach(Aspect a in initialAspects)
  
			{
  
				this.Aspects.Add(a);
  
			}
  
		}
  
  
		public string Name { get; set;}
  
		public decimal Price { get; set;}
  
		public HashSet&lt;Aspect&gt; Aspects { get; private set;}
  
	}
  
  
  
	public class ListProducts
  
	{
  
		public static void Main(string[] args)
  
		{
  
			List&lt;Product&gt; products = BuildProducts();
  
			List&lt;Func&lt;Product, bool&gt;&gt; predicates = ParseArguments(args);
  
			List&lt;Product&gt; filteredProducts = FilterProducts(products, predicates);
  
			ShowProducts(filteredProducts);
  
		}
  
  
		private static void ShowProducts(List&lt;Product&gt; toShow)
  
		{
  
			Console.WriteLine("Products found:");
  
			foreach(Product p in toShow)
  
			{
  
				Console.WriteLine("{0}\t\t${1}", p.Name, p.Price);
  
			}
  
		}
  
  
		private static List&lt;Product&gt; FilterProducts(List&lt;Product&gt; products, List&lt;Func&lt;Product, bool&gt;&gt; predicates)
  
		{
  
			List&lt;Product&gt; toReturn = new List&lt;Product&gt;();
  
  
			foreach(Product p in products)
  
			{
  
				bool acceptProduct = true;
  
				foreach(Func&lt;Product, bool&gt; predicate in predicates)
  
				{
  
					acceptProduct &amp;= predicate(p);
  
					if(!acceptProduct)
  
					{
  
						break;
  
					}
  
				}
  
				if(acceptProduct)
  
				{
  
					toReturn.Add(p);
  
				}
  
			}
  
  
			return toReturn;
  
		}
  
  
		private static List&lt;Func&lt;Product, bool&gt;&gt; ParseArguments(string[] args)
  
		{
  
			List&lt;Func&lt;Product, bool&gt;&gt; toReturn = new List&lt;Func&lt;Product, bool&gt;&gt;();
  
			foreach(string argument in args)
  
			{
  
				Func&lt;Product, bool&gt; toAdd = null;
  
				switch(argument)
  
				{
  
					case "-pg13":
  
						toAdd = p=&gt;!p.Aspects.Contains(Aspect.Pg);
  
						break;
  
					case "-vegetarian":
  
						toAdd = p=&gt;!p.Aspects.Contains(Aspect.ContainsMeat);
  
						break;
  
					default:
  
						throw new ArgumentException(string.Format("Unknown argument: {0}", argument));
  
				}
  
  
				toReturn.Add(toAdd);
  
			}
  
			return toReturn;
  
		}
  
  
		private static List&lt;Product&gt; BuildProducts()
  
		{
  
			List&lt;Product&gt; toReturn = new List&lt;Product&gt;();
  
			toReturn.Add(new Product(new HashSet&lt;Aspect&gt;()) { Name="Milk", Price=1.0M});
  
			toReturn.Add(new Product(new HashSet&lt;Aspect&gt;()) { Name="Bread", Price=1.3M});
  
			toReturn.Add(new Product(new HashSet&lt;Aspect&gt;() { Aspect.ContainsMeat}) { Name="Sausage", Price=2.5M});
  
			toReturn.Add(new Product(new HashSet&lt;Aspect&gt;() { Aspect.Pg}) { Name="Horror Movie", Price=5M});
  
  
			return toReturn;
  
		}
  
	}
  
}
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment29</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment29</guid><pubDate>Wed, 09 Apr 2008 18:33:02 GMT</pubDate></item><item><title>Ayende Rahien commented on A challenge: Getting a list of products</title><description>Frans,
  
Most people would implement this using ifs until the cow comes home.
  
Choosing an approach that fits the open close principal is what I was aiming at.
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment28</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment28</guid><pubDate>Wed, 09 Apr 2008 17:21:59 GMT</pubDate></item><item><title>Ayende Rahien commented on A challenge: Getting a list of products</title><description>Dimitar,
  
Very nice, and what I would strive for in these sort of situations
  
  
This is also pipe and filters, but your filter build a query, which fits my definition
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment27</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment27</guid><pubDate>Wed, 09 Apr 2008 17:20:49 GMT</pubDate></item><item><title>Frans Bouma commented on A challenge: Getting a list of products</title><description>"The actual code, sure.
  
The design, no."
  
- argument parsing. The biggest challenge. Argument parsing is error prone. 
  
- filtering a set using multiple predicates. erm... if that's hard, one hasn't passed 1st year of a CS course, IMHO. 
  
  
-&gt; parse every argument into a predicate. The argument parser then builds a predicate expression with these predicates, with solely AND operators. So this is very easy: you simply execute all predicates in the expression. if they all are true, you have a match. 
  
  
The predicates are simple classes. You simply pass in the object to filter on and you interpret the predicate with the object. This can be done for example by creating Func instances, like the pg age delimiter.
  
Func&lt;Product, bool&gt; f = p=&gt;(p.Aspects[Aspect.Pg] !=null) &amp;&amp; (bool)p.Aspects[Aspect.pg];
  
  
the predicate is then simply the Func. The predicate expression is then simply a list of Func&lt;Product, bool&gt; instances. A product is an instance of a Product class which has Aspects, which is a Dictionary&lt;Aspect, object&gt;, so you can store aspects of it inside the product. Otherwise you can't filter on it in a generic way and have to build custom code per type in the set. 
  
  
You then traverse the complete set from front to back, applying the predicate expression on all products. If the predicate expression returns true, it's a match, otherwise you move on to the next. 
  
  
The _code_ is actually more challenging than the design. The crucial thing the participant has to realize is that it has to traverse the set by applying a predicate expression. But that's basic database theory. 
  
  
So the challenge is actually: how to implement this? I therefore disagree that the code is 'simple' and the design isn't. THe design is straight forward, the code has some irritating aspects because you have to parse arguments. This always sucks 8)
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment26</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment26</guid><pubDate>Wed, 09 Apr 2008 17:05:23 GMT</pubDate></item><item><title>Dimitar E Dimitrov commented on A challenge: Getting a list of products</title><description>Applying some kind of Pipe processing seems nice from design point of view, but when it comes to reading and filtering data, which always comes from relational database I think it is better to let the database do the work, that it supposed to do – find the data, that you need the fastest way.
  
I don’t accept the argument, that you can’t always use database - even for a sample app with 100 records I would use Sqlite and still have feature a complete database at my disposal. 
  
Reading all data in memory and filtering with line of pipes isn't that feasible to me.
  
What is wrong doing to most obvious thing like:
  
  
public interface IDatabase {
  
	IList&lt;Product&gt; ListProducts(IList&lt;Filter&gt; filters);
  
}
  
  
If you want to take this further here a little more code in case my point isn't  that  clear:
  
  
public class Filter {
  
	public string CmdSwtich { get; private set;}
  
	public string DBColumn  { get; private set;}
  
	public virtual string GetCondition();
  
}
  
  
public class BooleanFilter : Filter {
  
	public override string GetCondition() { return DBColumn + "=1 "; }
  
}
  
  
public class Query {
  
	string query;
  
	public IList&lt;Filter&gt; Filters { get; private set;}
  
  
	public Query(string query, IList&lt;Filter&gt; filters) {
  
		this.query	= query;
  
		Filters		= filters;
  
	}
  
  
	public string GetSql() {
  
		if (Filters == null || Filters.Count == 0)
  
			return query;
  
		string result = query;
  
		result += " WHERE ";
  
		for(int i = 0; i &lt; Filters.Count; i++){
  
			result += Filters[i].GetCondition();
  
			if (i &lt; Filters.Count - 1) result += ", ";
  
		}
  
		return result;
  
	}
  
}
  
  
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment25</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment25</guid><pubDate>Wed, 09 Apr 2008 15:55:38 GMT</pubDate></item><item><title>Ralf Kretzschmar commented on A challenge: Getting a list of products</title><description>Full code, test, and testdata for the dos solution can be found on http://www.filedropper.com/ayendechallenge
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment24</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment24</guid><pubDate>Wed, 09 Apr 2008 13:50:40 GMT</pubDate></item><item><title>Alex Simkin commented on A challenge: Getting a list of products</title><description>So, did Ralf pass the test?
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment23</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment23</guid><pubDate>Wed, 09 Apr 2008 13:41:42 GMT</pubDate></item><item><title>Ayende Rahien commented on A challenge: Getting a list of products</title><description>The goggles, they do nothing! :-)
  
That is an unexpected solution, which is utterly unreadable to me, 
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment22</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment22</guid><pubDate>Wed, 09 Apr 2008 13:39:38 GMT</pubDate></item><item><title>Ralf Kretzschmar commented on A challenge: Getting a list of products</title><description>How about a solution using a windows command line batch? :-)
  
  
here is the code:
  
--------------------------------------------------------------------
  
@echo off
  
if "%echo%" neq "" echo %echo%
  
  
set prodGroupSearch=
  
set vegCodeSearch=
  
  
:nextArg
  
	if "%1"=="" goto :process
  
	set arg=%1
  
	if "%arg:~0,3%"=="-pg" set prodGroupSearch=%arg:~1,5%
  
	if "%arg%"=="-vegetarian" set vegCodeSearch=veg
  
	shift
  
	goto :nextArg
  
  
:process
  
	for /F "eol=# delims=;# tokens=1-4" %%i in (prods) do call :output "%%i" %%j %%k %%l
  
  
exit /b
  
  
  
:output
  
	set prod=%~1                                   .
  
	set prod=%prod:~0,15%
  
	set price=%2
  
	set prodGroup=%3
  
	set vegCode=%4
  
	set query=
  
	set val=
  
	if "%prodGroupSearch%" neq "" (set query=%prodGroupSearch%&amp; set val=%prodGroup%)
  
	if "%vegCodeSearch%" neq "" (set query=%query%%vegCodeSearch%&amp; set val=%val%%vegCode%)
  
	if "%val%" neq "%query%" goto :skip	
  
	echo %prod% %price%
  
:skip
  
	exit /b
  
----------------------------------------------------------------------------
  
  
  
The products file looks like this:
  
----------------------------------------------------------------------------
  
Milk;$1.0;pg13;veg#
  
Bread;$1.3;pg13;veg#
  
Sausage;$2.5;pg13;nonveg#
  
Horror Movie;$5.0;pg31;veg#
  
----------------------------------------------------------------------------
  
  
Btw: I did it TDD. Here are my tests
  
----------------------------------------------------------------------------
  
@echo off
  
call list_products.bat &gt; out.txt
  
fc out.txt case1.txt &gt; nul || @echo case1 failed
  
  
call list_products.bat -pg13 &gt; out.txt
  
fc out.txt case2.txt &gt; nul || @echo case2 failed
  
  
call list_products.bat  -vegetarian &gt;out.txt
  
fc out.txt case3.txt &gt; nul || @echo case3 failed
  
  
call list_products.bat -pg13 -vegetarian &gt;out.txt
  
fc out.txt case4.txt &gt; nul || @echo case4 failed
  
----------------------------------------------------------------------------
  
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment21</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment21</guid><pubDate>Wed, 09 Apr 2008 13:35:31 GMT</pubDate></item><item><title>alwin commented on A challenge: Getting a list of products</title><description>If it is small scale / demo purpose, i would use the Filter thing. But without the Linq and with the CanProcess as bool. Just 'yield' everything, and the processing order depends on the order in the registration list.
  
  
For larger scale where you need to make a db query, maybe a i would use a specification. I've used this in my last project after a tip from Ayende on the castle user list :)
  
  
Dictionary&lt;string, Action&lt;ProductSpecification&gt;&gt; specModifiers;
  
specModifiers.Add("vegetarian", spec =&gt; spec.Vegetarian = true);
  
  
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment20</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment20</guid><pubDate>Wed, 09 Apr 2008 11:34:03 GMT</pubDate></item><item><title>Ayende Rahien commented on A challenge: Getting a list of products</title><description>If we have 1000 parameters, we need a completely different approach
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment19</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment19</guid><pubDate>Wed, 09 Apr 2008 11:32:04 GMT</pubDate></item><item><title>Tuna Toksoz commented on A challenge: Getting a list of products</title><description>Well, I thought you would ask "what if we had 10000 parameters" if i wouldn't care about the complexity(even I cared, I was wrong and can still be wrong)
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment18</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment18</guid><pubDate>Wed, 09 Apr 2008 11:27:12 GMT</pubDate></item><item><title>Ayende Rahien commented on A challenge: Getting a list of products</title><description>Tuna,
  
Assume that there will be 100 filters (very high).
  
Using the CanExecute, Execute approach, you would have at most 200 iterations.
  
Since they only add filters, we don't care about that. 
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment17</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment17</guid><pubDate>Wed, 09 Apr 2008 11:16:06 GMT</pubDate></item><item><title>Tuna Toksoz commented on A challenge: Getting a list of products</title><description>Sorry, I was wrong in complexity of the case,
  
there will be a need for priority queue.
  
There will be n parameters and m filters. 
  
m*n will be required for iterating and finding the right filter. 
  
n parameter&amp;filter pair will be placed into priority queue, nlogn will be required. 
  
and then they will be popped.  O(mn) wasn't right
  
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment16</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment16</guid><pubDate>Wed, 09 Apr 2008 11:12:08 GMT</pubDate></item><item><title>Tuna Toksoz commented on A challenge: Getting a list of products</title><description>Needless to say, I would implement filters for paging , and so.
  
  
The problem would be the order of parameters, I mean if person first enters parameter for page, then types the vegetarian, it would be the problem. 
  
  
Well, I would change the interface to
  
  
public interface IFilter&lt;T&gt;
  
{
  
      int CanProcess(string parameter); //returns the order of filter, if it is Integer.Max, it will be processed in the end
  
      bool Process(IOrderedQueryable&lt;T&gt; queryable,string parameter);
  
}
  
  
and use something like priority queue. 
  
This would require double-iteration of filters, so it is O(m.n) where m is the number of filters and n is the number of parameters.
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment15</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment15</guid><pubDate>Wed, 09 Apr 2008 11:05:14 GMT</pubDate></item><item><title>Tuna Toksoz commented on A challenge: Getting a list of products</title><description>public interface IFilter&lt;T&gt;
  
{
  
     bool Process(IOrderedQueryable&lt;T&gt; q,string parameter);
  
} 
  
  
And I loop every item entered from the console. If the process method returns false, i would try this parameter with next filter, if it returns true, i will reiterate the filter list for the next parameter.
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment14</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment14</guid><pubDate>Wed, 09 Apr 2008 10:59:10 GMT</pubDate></item><item><title>Benny Thomas commented on A challenge: Getting a list of products</title><description>I would say you should handle the args as IEnumerable. 
  
  
Lets have a registerfase thats register all args we could handle first.
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment13</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment13</guid><pubDate>Wed, 09 Apr 2008 10:43:38 GMT</pubDate></item><item><title>Ayende Rahien commented on A challenge: Getting a list of products</title><description>alberto,
  
Now imagine that you have 15 of those, how would you scale the problem to handle this?
  
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment12</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment12</guid><pubDate>Wed, 09 Apr 2008 10:31:34 GMT</pubDate></item><item><title>Ayende Rahien commented on A challenge: Getting a list of products</title><description>Frans Bouma,
  
The actual code, sure.
  
The design, no.
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment11</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment11</guid><pubDate>Wed, 09 Apr 2008 10:30:02 GMT</pubDate></item><item><title>alberto commented on A challenge: Getting a list of products</title><description>Seems like a good candidate for LINQ.
  
  
Here's a first and dirty approach to it (excuse possibles mistakes in my syntax, these are my very first lines on LINQ and your textbox's intellisense is broken :)).
  
&lt;pre&gt;
  
IEnumerable&lt;Product&gt; FilterByPG13Compliance(IEnumerable&lt;Product&gt; products)
  
{
  
	var result = from product in products
  
		select where product.RequiredAge &lt;= 13;
  
	return result;
  
}
  
  
IEnumerable&lt;Product&gt; FilterByVegetarianFriendliness(IEnumerable&lt;Product&gt; products)
  
{
  
	var result = from product in products
  
		select where product.VegetarianFriendly
  
	return result;
  
}
  
  
  
//main
  
var result = from product in products select product;
  
int i;
  
for (i = 1; i &lt; args.Length; i++)
  
{
  
	switch(args[i])
  
	{
  
		case "-pg13":
  
			result = FilterByPG13Compliance(result);
  
			break;
  
		case "-vegetarian":
  
			result = FilterByVegetarianFriendliness(result);
  
			break;
  
		...
  
	}
  
}
  
  
foreach (Product p in result)
  
{
  
Console.WriteLine("{0}\t{1}",product.Name, product.Price);
  
}
  
&lt;/pre&gt;
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment10</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment10</guid><pubDate>Wed, 09 Apr 2008 09:13:55 GMT</pubDate></item><item><title>Frans Bouma commented on A challenge: Getting a list of products</title><description>isn't this 1st year CS course material?
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment9</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment9</guid><pubDate>Wed, 09 Apr 2008 07:48:13 GMT</pubDate></item><item><title>Paul Cowan commented on A challenge: Getting a list of products</title><description>So by vegetarian you mean everything that is not meat.
  
  
Surely you would just select everything that is vegetarian or are you looking for the candidate to only look at the requirements and not what the candidate can read between the lines.
  
  
I like the IEnumerable of operations approach as well or why stop there why not provide your own linq provider.
  
  
How many days does the test take?  I could maybe get a beta out in a week
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment8</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment8</guid><pubDate>Wed, 09 Apr 2008 07:06:12 GMT</pubDate></item><item><title>Evan commented on A challenge: Getting a list of products</title><description>A trickier version might be 30k products, against an average of 6 filters per query, and a hard response deadline of 30ms..
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment7</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment7</guid><pubDate>Wed, 09 Apr 2008 03:25:14 GMT</pubDate></item><item><title>Evan commented on A challenge: Getting a list of products</title><description>Given that the number of products in an average ecommerce site is very low, you can solve it in a number of ways and do "good enough".
  
  
Now, if you are amazon, it's going to be a bit trickier..
  
  
Did you have something large scale in mind, or just an average app with 50-100 products?
</description><link>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment6</link><guid>http://ayende.com/3260/a-challenge-getting-a-list-of-products#comment6</guid><pubDate>Wed, 09 Apr 2008 03:20:21 GMT</pubDate></item></channel></rss>