Posts
74
Comments
79
Trackbacks
0
October 2007 Entries
HAI WORLD (LOLCODE)
Apparently people will write compilers for anything...  Kudos to the author for exending the CLR for .NET...

LOLCODE Compiler

Yeah, it's hilarious and hip according to the author...  I also say he would be better off without the ALL CAPS coding style...

posted @ Monday, October 29, 2007 11:05 PM | Feedback (0)
danyet
Some of you reading this blog probably realize that I have been trying to learn Russian for some time now.  One of my favorite words that I want to share with you is "danyet" which would literally translate to "yesno" in English.


Russians use this word to contradict the last thing said.  Perhaps the best translations in English are "Not!" or "Yeah, right" (actually it's not a colloquial term in Russian as the English translations provided are).

Having recently re-read 1984, danyet seemed like a wonderful double-speak word to me...

Hope you enjoyed your Russian word for the day!

Jonathan
posted @ Monday, October 29, 2007 10:06 PM | Feedback (0)
Sex and Religion and Other Thoughts in 1984

I just finished listening to the audio version of George Orwell's dystopian book, 1984...  While I first read this in seventh grade (MANY years ago), I was fascinated by how many more things I caught this time.

1. It looks to me that Winston was safe until he was corrupted by Julia - which harkens back memories of the Garden of Eden story where Eve convinces Adam to eat an apple from the Tree of Knowledge.  (Remember that Winston's first secual episode with Julia is in the fields where Winston is reminded of a Golden Dream - very much like Eden). 

So, even in the atheist future described by Orwell, the State subsumes the position of religion in a sense to maintain its power.  Sexual knowledge is the real act of rebellion against the State, as it create bonds with someone other than the state and is enjoyable.

The Chestnut tree bar (with the appropriate music piped in) where the dissidents go repeatedly in the book to confess their betrayals (at least Winston, Aranson et al. went there) seem to be a back handed reference to the tree of knowledge.

2. On a personal note, having lived in London for a programming assignment  I recognized that Victory Square was Trafalgar Square!  The picture museum was the Oceania version of the National Portrait Gallery... Lord Nelson was replaced with Big Brother... And it was still crowded with people.  I wish someone had pointed this out to me when I first read this...

I don't know if any of you are re-reading the classics, but I would be interested to know if you got any new insights like these...

Jonathan

Tools   Print   Email   Del.icio.us   Digg   reddit
posted @ Saturday, October 27, 2007 3:34 PM | Feedback (0)
New Links

Comic for the day There's no escape from this room...

Music What's the matter with parents today

Did you get my memo re: Your Brains

More Music I Feel Fantastic! - Don't forget to take your steak-tastes-better-pill!

Still More Music! The Future Soon

Larry Craig has broken new ground

Mark Fiore's Weekly Political Cartoon

 

Enjoy!

posted @ Friday, October 26, 2007 6:17 PM | Feedback (0)
Reaction to "Why Atheists Are Not Very Bright"

I just finished reading Dinesh D'Souza's essay Why Atheists are Not Very Bright  which is also an excerpt from his book, What's So Great About Christianity. I am not an atheist, but I can certainly see atheism as a reasonable point of view.  Consequently I am responding to his piece.

Dinesh starts out parroting an argument from Kant that we cannot know everything about the world because we only come to know the world throught the filter of our senses.  According to D'Souza, this implies that (1) we cannot know everything about that world, (2) we should not have complete faith in religion and (3) that there exists a God that knows everything.

From the article - "The atheist foolishly presumes that reason is in principle capable of figuring out all that there is, while the theist at least knows that there is a reality greater than, and beyond, that which our senses and our minds can ever apprehend."

There are so many holes in this argument... where to begin?

A. Dinesh falsely assumes that through reason everything in the world can be known.

B.  Dinesh falsely assumes that there necesseraliy is a reality than our own which our senses and minds can ever apprehend...  How can he say this is true without any evidence?

C. From a practical view, religion has done less to increase man's understanding of the world and to improve our material well being than science.  (Interesting post that came out today nicely illustrates one side effect of this - Atheism correlates with wealth, theism with poverty.)  Religions have been hindering science from Galileo's time (when the Catholic Chrurch opposed the heliocentric view of the world in favor of a geocentric one) through the present (when fundamentalist theists oppose the teaching of evolution in science classes).   In the meantime, the opposite is not necessarily true...  No scientists are mandating that churches and synogogues relate alternative theories to the biblical versions of creation .

D. Just like the atheists he decries, he is denouncing scientific theory without any evidence to the contrary.  He invalidates his own view with his own argument...  Nice.

Jonathan

posted @ Thursday, October 25, 2007 7:32 PM | Feedback (0)
Another Enumeration Helper Function
improve my => 'code'

Before I posted a method that converts from one enumeration to another by value...  Here's one that does the conversion by string (by the enumeration name)... 

    public static class EnumHelper

    {

        public static int ConvertEnumToEnumIntByString<T, U>(U enumArg)

        {

            string [] arrNames = Enum.GetNames(typeof(T));

            int[] arrValues = (int[] ) Enum.GetValues(typeof(T));

            for (int counter = 0; counter < arrNames.Length; counter++)

            {

                if (arrNames[counter] == enumArg.ToString())

                {

                    return  arrValues[counter];               

                }

            }

            throw new ApplicationException("Enum conversion did not work.");

        }  

    }

         private void testNewConversion()

        {

            Enum1 testInput = Enum1.P1;

            Enum2 testOutput = (Enum2) EnumHelper.ConvertEnumToEnumIntByString

                < Enum2, Enum1> (testInput);

        }

 

Interested in your comments,
Jonathan

posted @ Tuesday, October 23, 2007 4:22 PM | Feedback (0)
Enumerating all of the namespaces and their respective classes in an assembly (dll).

improve my => 'code'

I wrote some code in a test project, and then had to list all of the namespaces I used in my project for a manager so they could conform to a standard for production... As I used more than 50 namespaces for my test project, I wanted to do this automatically... Also I wanted to show all of the classes contained in each namespace...  Anyway, I used the following code... Thought this might be useful to others...  (If someone reading this sees a good way to refactor this, it would be appreciated!)

      Dictionary<string, List<string>> colNamespaces = new Dictionary<string, List<string>>();

      Assembly assembly = Assembly.GetAssembly( Type.GetType("Test2.Facade.ConcreteFacade,Test2"));

      Type[] theTypes = assembly.GetTypes();

      foreach ( Type t in theTypes)

            {

            string theNameSpace = t.FullName.Substring(0,t.FullName.LastIndexOf("."));

            string theClass = t.FullName.Substring(t.FullName.LastIndexOf(".")+1);

            if (colNamespaces.ContainsKey(theNameSpace))

            {

                colNamespaces[theNameSpace].Add(theClass);

            }

            else

            {

                List<string> classes = new List<string>();

                classes.Add( theClass );

                colNamespaces[theNameSpace] = classes;

            }

        }

I hope you find this helpful -

Jonathan Starr 

posted @ Monday, October 22, 2007 1:27 PM | Feedback (0)
Reaction to Jeff Atwood's "Why Does Software Spoil?"


Jeff Atwood wrote an interesting article recently Why Does Software Spoil?  In the article, he notes that most software becomes bloated with extra features over time to the point of absurdity.

I think that one of the most interesting things about software (and computer hardware) sales is the way it differs from other products. The word "New" has always been one of the most powerful words in advertising, but it much more powerful in the software industry.  A company that is using MS Access 95 is considered antediluvian by today's standards...  But a company with a building constructed in 1995 is not derided at all.

In my mind, the extra premium on newness in software customers comes from the phenomenon of Moore's Law that is so widely known in the industry.  When processing speeds are doubling every 18 months or so (and storage capacity is doubling even more quickly), all old hardware becomes obsolete very quickly. 

So customers expect that new software will be developed for new hardware, and with richer feature sets (after all, what good is all of that extra processing power and storage without new features)....

I expect that when processing speed improvements plateau, customer expectations for software will change as well...

Interested in your comments,

Jonathan
Technorati Profile
posted @ Saturday, October 20, 2007 10:51 AM | Feedback (0)
Critique of Paul Graham's Essay "How to Do Philosophy"

I was just reading through Paul Graham's article on "How to Do Philosophy" (http://www.paulgraham.com/philosophy.html)

He mentions that philosophy has twisted in the wind for a while because so many smart people who realized that most articles lacked substance did not raise the alarm to others - mostly because it is very difficult to criticize works that are so hard to read.  Agreed...  But the greater reason is that there is no use in criticizing an essentially useless activity...

I studied math as an undergrad because I loved abstractions and patterns (Paul Graham got it half right when he said that math is a study of abstractions IMHO - abstractions without any patterns have little interest to mathematicians) - and I honestly could not understand any modern works of philosophy... I doubted my own intelligence when I tried.

So, it is refreshing to hear that so much philosophy is just drivel.

But Paul Graham's article finishes by encouraging us to write about useful but imprecise abstractions (after all the precise one's are in the domain of mathematics according to the article) to make philosophy a useful subject.  I would really like to know an example of this - generally, if I cannot create a concretized example of an abstraction in some way, I cannot make it useful... 

For example, when I studied OOP, it was not until I learned design patterns using these principles that I found OOP to be useful  (for those of you trolling my blog as a techie).

To take it further, in my opinion, the reason why differences in religion, and politics can be such a prodigious source for conflict is because people try to do exactly what Paul Graham suggests - but they come up with different results!  And because people have used logic or 'natural' thought to arrive at their conclusions only makes it harder for them to imagine others arriving at differing conclusions...

For those of us who are not politicians or religious leaders, perhaps even 'useful' philosophy is not a promising enterprise.

Peace,

Jonathan 

 

posted @ Thursday, October 18, 2007 6:51 PM | Feedback (0)
Converting One Enumeration to Another Enumeration

improve :my => 'code'

This came in handy for me, and I thought others might feel the same way... 

Say you have one enumeration used as arguments for a method, and you created a simplified enumeration to override the original method to create a method that is easier to consume...

Example:

 

 public enum XTypes{

   PFM = 0,

   STAT = 1,

   YIELD = 2,

   RANK = 3

}

and

public enum XTypesSimplified{

   PFM = 0,

   STAT = 1

}

You can use the following to convert one into another.

 

 public class EnumHelper

{  

public static T EnumToEnum<T, U>(U enumArg)

   {

    if (!typeof(T).IsEnum) throw new Exception("This method only takes enumerations.");  

    if (!typeof(U).IsEnum) throw new Exception("This method only takes enumerations.");

    try

      {

        return (T) Enum.ToObject(typeof(T), enumArg);  

      }

    catch  

      {

         throw new Exception ( string.Format ("Error converting enumeration {0} value {1} to enumeration {2} " ,  

         enumArg.ToString(),

         typeof(U).ToString(),

         typeof(T).ToString()) );

       }

   }

}

 

Here's an example of using the code...

XTypesSimplified xtypesSimplified = XTypesSimplified.PFM;

XTypes xtypes = EnumHelper.EnumToEnum<XTypes, XTypesSimplified>(xtypesSimplified);

   

Comments welcome!

Jonathan

posted @ Wednesday, October 17, 2007 6:54 PM | Feedback (4)
News
Jonathan Starr is a developer in Saint Louis, MO. He holds an MBA in Finance from Columbia Business School and earned his MCSD from Microsoft.


All statements in this blog are personal opinions and do not reflect the opinions of his employer.





Related Sites
Join My Community at MyBloglog!

Tag Cloud