A Message For You

Thursday, January 1, 2009

This year’s silly, obfuscated, console mode C# program is brought to you by LINQ.

using System.Linq;
using Electricity = System.Collections.Generic.IEnumerable<char>;
using here = System.Collections.Generic.Dictionary<int, char>;
namespace Message{static class __{

static Electricity Transform(this here collection)
{  return new
    int[] { 
     16, 22, 28, 
      28, 7, 0, 20, 
       9, 11, 0, 7, 
        9,22,13,5 }
         .Select(i =>
          collection[i]);} 
static void Main() {
    System.Console.WriteLine(
    @"                       ._
                             !~
                             yuuue
                             |_w-|
                             | _r|
                             |_ -|
        ________ .$$. ______ | - | _____________
                .#$H$. __    |-  | ....__
          _.--' $$$$$$    ` -[__n]        `--a:f-
                $$$$$$    -.
           -.    `:/'    _.))        .--.
                  ||   .'.-'     _..-.. _.-.
           ._.-.  ''  /  (     .'      `.
         -'     `.   .    `. -'p
                  `. .      `--..
                      `.
        "
  .Distinct().Select((c, i) => new { c, i })
  .ToDictionary(ci => ci.i, ci => ci.c)
  .Transform().Aggregate("", (s, c) => s += c));  
}}} // ascii_based_on_art_By_Andreas_Freise www.ascii-art.de //

 

Peace!


Comments
Stephen Patten Thursday, January 1, 2009
Happy new year! to you too Scott...
Martin S. Thursday, January 1, 2009
Lovely stuff man! Have a fabulous new 2009!

Greetings from Sweden
Simone Busoli Friday, January 2, 2009
If you replace s += c with s + c you will avoid creating an additional string each time Aggregate calls your lambda.
scott Friday, January 2, 2009
@Simone: optimizing an obfuscated program. I love it!! Thanks for the tip.
Simone Busoli Friday, January 2, 2009
;) that was a joke, actually.
scott Friday, January 2, 2009
:)
Comments are now closed.
by K. Scott Allen K.Scott Allen
My Pluralsight Courses
The Podcast!