Faith in Javascript

WARNING:  If you understand the following, then you are at least as much of a nerd as I am. But fear not, oh geeky one! I have discovered how to discuss theology in computer languages! What follows is a JavaScript devotional on the subject of faith:
<html>
    <head>
        <script language="javascript"><!--

            function processfaith(object){

                var f = self.present.faith;
                var e = self.present.experience;
                var t = object.trustworthiness;
                t = object.ability + object.character;

                while(e){
                    if(f<t && e>f){
                        f=f+(e-f);
                    }
                    else if(f<t && e<f){
                        f=f-(f-e);
                    }
                }
            }
        // -->
        </script>
    </head>
    <body>
        <a href="javascript:processfaith(God);">Increase your faith in God here.</a><br />
        <a href="javascript:processfaith(self);">Decrease your faith in self here.</a>
    </body>
</html>
Nerds! If you have successfully parsed the faith equation, leave a comment to stand for all ages as a monument to your abounding nerdity.


About this entry



Login with Facebook

2 comments:

  1. jeffturpin Mon Apr 14, 11:21:00 PM EDT

    I haven't taken Java or studied it's syntax, but I do get the gist of what it says (minus some of the object oriented stuff - haven't taken that yet either).

    Var f, e, and t are all variables that are declared and will be used in the actual program processing.

    If faith is less than trustworthiness and experience is greater than faith then faith equal faith plus the sum of the experience minus faith..... and so on.

    The href's are hyperlinks that refer to their respective selection clauses (if then else statements).

    If you had done this in COBOL, SQL, or PL/SQL, I could have dominated :)

     
  2. jeffrhodes Thu May 15, 04:22:00 PM EDT

    Wow, you guys are nerds. :)