<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Programming contest at EggHeadCafe...</title><link>http://blogs.msdn.com/ericgu/archive/2004/12/01/273087.aspx</link><description>EggHeadCafe is running a programming contest . The Swedish Chef is a character from the old Muppet Show that was broadcast in the 1970s. The Chef speaks his own language (an amalgam of Swedish, English, and who knows what else), and your task is to design</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Programming contest at EggHeadCafe...</title><link>http://blogs.msdn.com/ericgu/archive/2004/12/01/273087.aspx#273121</link><pubDate>Wed, 01 Dec 2004 17:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:273121</guid><dc:creator>jond</dc:creator><description>google has a Swedish Chef language tranlation page: &lt;a target="_new" href="http://www.google.com/intl/xx-bork/"&gt;http://www.google.com/intl/xx-bork/&lt;/a&gt;</description></item><item><title>re: Programming contest at EggHeadCafe...</title><link>http://blogs.msdn.com/ericgu/archive/2004/12/01/273087.aspx#273133</link><pubDate>Wed, 01 Dec 2004 18:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:273133</guid><dc:creator>Rob Windsor</dc:creator><description>With enough beer in me I sound like the Swedish Chef. It's a very straightforward solution but no one has ever called it elegant.&lt;br&gt;&lt;br&gt;Rob</description></item><item><title>re: Programming contest at EggHeadCafe...</title><link>http://blogs.msdn.com/ericgu/archive/2004/12/01/273087.aspx#273172</link><pubDate>Wed, 01 Dec 2004 18:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:273172</guid><dc:creator>Sean Chase</dc:creator><description>Mine is elegant because it leverages the power of SOA. Just kidding, it's a nasty hack that I thought you might find amusing. :-)&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;using System;&lt;br&gt;using System.Net;&lt;br&gt;using System.Text;&lt;br&gt;using System.IO;&lt;br&gt;&lt;br&gt;class Chef&lt;br&gt;{&lt;br&gt;    public static string Convert(string text)&lt;br&gt;    {&lt;br&gt;        WebRequest request = HttpWebRequest.Create(&amp;quot;&lt;a target="_new" href="http://rinkworks.com/dialect/dialectt.cgi&amp;quot;"&gt;http://rinkworks.com/dialect/dialectt.cgi&amp;quot;&lt;/a&gt;);&lt;br&gt;        request.Method = &amp;quot;POST&amp;quot;;&lt;br&gt;        string postData=&amp;quot;dialect=bork&amp;amp;text=&amp;quot; + text;&lt;br&gt;        ASCIIEncoding encoding = new ASCIIEncoding();&lt;br&gt;        byte[] bytes = encoding.GetBytes(postData);&lt;br&gt;        request.ContentType=&amp;quot;application/x-www-form-urlencoded&amp;quot;;&lt;br&gt;        request.ContentLength = postData.Length;&lt;br&gt;        Stream requestStream = request.GetRequestStream();&lt;br&gt;        requestStream.Write(bytes, 0, bytes.Length);&lt;br&gt;        requestStream.Close();&lt;br&gt;&lt;br&gt;        HttpWebResponse objResponse = (HttpWebResponse) request.GetResponse();&lt;br&gt;        string result = String.Empty;&lt;br&gt;        using (StreamReader sr = new StreamReader(objResponse.GetResponseStream()))&lt;br&gt;        {&lt;br&gt;            result = sr.ReadToEnd();&lt;br&gt;            sr.Close();&lt;br&gt;        }&lt;br&gt;        &lt;br&gt;        int start = result.IndexOf(&amp;quot;&amp;lt;/h2&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;p&amp;gt;&amp;quot;) + &amp;quot;&amp;lt;/h2&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;p&amp;gt;&amp;quot;.Length;&lt;br&gt;        int end = result.IndexOf(&amp;quot;&amp;lt;p&amp;gt;&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&amp;quot;, start);&lt;br&gt;&lt;br&gt;        return result.Substring(start, end - start);&lt;br&gt;    }&lt;br&gt;}&lt;br&gt;&lt;br&gt;&lt;br&gt;class App&lt;br&gt;{&lt;br&gt;	[STAThread]&lt;br&gt;	static void Main(string[] args)&lt;br&gt;	{&lt;br&gt;        string value = Chef.Convert(&amp;quot;This is the greatest hack ever!&amp;quot;);&lt;br&gt;        Console.WriteLine(value);&lt;br&gt;	}&lt;br&gt;}</description></item><item><title>Swedish Chef Translation Contest</title><link>http://blogs.msdn.com/ericgu/archive/2004/12/01/273087.aspx#273195</link><pubDate>Wed, 01 Dec 2004 22:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:273195</guid><dc:creator>TheChaseMan's Frenetic SoapBox</dc:creator><description /></item><item><title>re: Programming contest at EggHeadCafe...</title><link>http://blogs.msdn.com/ericgu/archive/2004/12/01/273087.aspx#273239</link><pubDate>Wed, 01 Dec 2004 20:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:273239</guid><dc:creator>Henrik Stuart</dc:creator><description>The specification for the language conversion is annoying in its ambiguousness. Taking just one example, the word &amp;quot;the&amp;quot;, fits several rules, &amp;quot;5. If there is an e at the end of the word, replace it by e-a.&amp;quot;, and &amp;quot;7. Replace all occurrences of the by zee.&amp;quot;. So while their example shows that &amp;quot;Do you know the way to San Jose?&amp;quot; translates into &amp;quot;Du yuoo knoo zee vey tu Sun Juse-a? Bork bork bork!&amp;quot; then &amp;quot;zee&amp;quot; should rather have been &amp;quot;zee-a&amp;quot;, if we presume all fitting rules are to be applied. I am sure it shouldn't be too difficult to find other ambiguities if one is fluent in English.&lt;br&gt;&lt;br&gt;Furthermore, a slight oversight, most likely, is the fact that they say that all paragraphs or sentences should end with &amp;quot;Bork bork bork.&amp;quot; and yet in their examples they write &amp;quot;Bork bork bork!&amp;quot;.&lt;br&gt;&lt;br&gt;While I do enjoy occasional programming contests, this one seems to have been specified without giving much thought to the actual specification. It rather feels like some of the software projects at work, really.&lt;br&gt;&lt;br&gt;Otherwise a solution could elegantly be made using the visitor pattern or the poorly named pattern for those who read the conversations articles by Hyslop and Sutter in the C/C++ User Journal.&lt;br&gt;&lt;br&gt;Thanks for the heads-up though, but the hurt of &amp;quot;thees&amp;quot; ambiguousness is too much for my fragile compiler implementor heart. :)</description></item><item><title>re: Programming contest at EggHeadCafe...</title><link>http://blogs.msdn.com/ericgu/archive/2004/12/01/273087.aspx#273293</link><pubDate>Wed, 01 Dec 2004 21:34:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:273293</guid><dc:creator>Sheeshers</dc:creator><description>The ambiguities are galore. With multiple rules applying to the same set of characters, what is the sequence in which we apply them? &lt;br&gt;&lt;br&gt;I really invested some serious time before I came to the conclusion that I would have to make some real heavy assumptions on the sequencing of the rules, the priorities in case of ties (such as the rules that apply to the character 'e') etc. &lt;br&gt;&lt;br&gt;I wasn't trying to do it for the money obviously, but it seemed challenging until I got down to organizing the rule set.&lt;br&gt;&lt;br&gt;C'mon guys...define it correctly. Another thing is .. the winner is the first solution that is &amp;quot;correct&amp;quot; .. okay how does one know correct simply by looking at that ambiguous example that itself can have multiple translations.</description></item><item><title>re: Programming contest at EggHeadCafe...</title><link>http://blogs.msdn.com/ericgu/archive/2004/12/01/273087.aspx#273364</link><pubDate>Wed, 01 Dec 2004 23:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:273364</guid><dc:creator>daveg</dc:creator><description>I feel the same about the rules.&lt;br&gt;And provide some decent examples - like paragraphs.  The examples they provide don't even exercise a lot of their rules.</description></item><item><title>re: Programming contest at EggHeadCafe...</title><link>http://blogs.msdn.com/ericgu/archive/2004/12/01/273087.aspx#273475</link><pubDate>Thu, 02 Dec 2004 03:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:273475</guid><dc:creator>Peter Bromberg</dc:creator><description>I'm glad to see some interest in our concept. The key here is not to sweat the small stuff. What we're looking for is elegance of code, quality OOP oriented principals, and innovation.&lt;br&gt;&lt;br&gt;Obviously, a hack to somebody's elses webservice won't cut it...&lt;br&gt;&lt;br&gt;Thanks, Eric for the mention.&lt;br&gt;peter</description></item><item><title>Geek Notes 2004-12-07</title><link>http://blogs.msdn.com/ericgu/archive/2004/12/01/273087.aspx#277657</link><pubDate>Tue, 07 Dec 2004 19:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:277657</guid><dc:creator>Geek Noise</dc:creator><description /></item><item><title>Re:</title><link>http://blogs.msdn.com/ericgu/archive/2004/12/01/273087.aspx#333647</link><pubDate>Tue, 28 Dec 2004 12:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:333647</guid><dc:creator>RebelGeekz </dc:creator><description>[&lt;a target="_new" href="http://itpeixun.51.net/"&gt;http://itpeixun.51.net/&lt;/a&gt;][&lt;a target="_new" href="http://aissl.51.net/"&gt;http://aissl.51.net/&lt;/a&gt;][&lt;a target="_new" href="http://kukuxz003.freewebpage.org/"&gt;http://kukuxz003.freewebpage.org/&lt;/a&gt;][&lt;a target="_new" href="http://kukuxz001.51.net/"&gt;http://kukuxz001.51.net/&lt;/a&gt;][&lt;a target="_new" href="http://kukuxz003.51.net/"&gt;http://kukuxz003.51.net/&lt;/a&gt;][&lt;a target="_new" href="http://kukuxz005.51.net/"&gt;http://kukuxz005.51.net/&lt;/a&gt;][&lt;a target="_new" href="http://kukuxz002.51.net/"&gt;http://kukuxz002.51.net/&lt;/a&gt;][&lt;a target="_new" href="http://kukuxz004.freewebpage.org/"&gt;http://kukuxz004.freewebpage.org/&lt;/a&gt;][&lt;a target="_new" href="http://kukuxz007.51.net/"&gt;http://kukuxz007.51.net/&lt;/a&gt;][&lt;a target="_new" href="http://kukuxz001.freewebpage.org/"&gt;http://kukuxz001.freewebpage.org/&lt;/a&gt;][&lt;a target="_new" href="http://kukuxz006.51.net/"&gt;http://kukuxz006.51.net/&lt;/a&gt;][&lt;a target="_new" href="http://kukuxz002.freewebpage.org/"&gt;http://kukuxz002.freewebpage.org/&lt;/a&gt;][&lt;a target="_new" href="http://kukuxz004.51.net/"&gt;http://kukuxz004.51.net/&lt;/a&gt;][&lt;a target="_new" href="http://kukuxz008.51.net/"&gt;http://kukuxz008.51.net/&lt;/a&gt;][&lt;a target="_new" href="http://kukuxz009.51.net/"&gt;http://kukuxz009.51.net/&lt;/a&gt;][&lt;a target="_new" href="http://kukuxz005.freewebpage.org/"&gt;http://kukuxz005.freewebpage.org/&lt;/a&gt;][&lt;a target="_new" href="http://kukuxz006.freewebpage.org/"&gt;http://kukuxz006.freewebpage.org/&lt;/a&gt;][&lt;a target="_new" href="http://kukuxz007.freewebpage.org/"&gt;http://kukuxz007.freewebpage.org/&lt;/a&gt;][&lt;a target="_new" href="http://kukuxz009.freewebpage.org/"&gt;http://kukuxz009.freewebpage.org/&lt;/a&gt;]</description></item><item><title> Eric Gunnerson s C Compendium Programming contest at EggHeadCafe | Cast Iron Cookware</title><link>http://blogs.msdn.com/ericgu/archive/2004/12/01/273087.aspx#9641998</link><pubDate>Tue, 26 May 2009 22:46:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9641998</guid><dc:creator> Eric Gunnerson s C Compendium Programming contest at EggHeadCafe | Cast Iron Cookware</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://castironbakeware.info/story.php?title=eric-gunnerson-s-c-compendium-programming-contest-at-eggheadcafe"&gt;http://castironbakeware.info/story.php?title=eric-gunnerson-s-c-compendium-programming-contest-at-eggheadcafe&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> Eric Gunnerson s C Compendium Programming contest at EggHeadCafe | Paid Surveys</title><link>http://blogs.msdn.com/ericgu/archive/2004/12/01/273087.aspx#9653977</link><pubDate>Fri, 29 May 2009 19:21:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9653977</guid><dc:creator> Eric Gunnerson s C Compendium Programming contest at EggHeadCafe | Paid Surveys</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://paidsurveyshub.info/story.php?title=eric-gunnerson-s-c-compendium-programming-contest-at-eggheadcafe"&gt;http://paidsurveyshub.info/story.php?title=eric-gunnerson-s-c-compendium-programming-contest-at-eggheadcafe&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>