Archive for July, 2007|Monthly archive page

Odd and Even

This is a well-known programming fact, but since it came up today and I had to double check the C# syntax:

If you have many iterations in a loop, and you want to know if the current number is odd or even, the easiest and most natural way to tell is probably the modulus operator. However, that requires division. Computers are faster at addition and multiplication than they are at subtraction and division. Bitwise operations are also faster and easier for the computer than division. Therefore, a bitwise AND to 1 is the faster and more efficient way to tell if a number is odd or even. C# example:

for (int i = 0; i < 100; i++)
{
     result = String.Format(“{0} is even”, i);
     if ((i & 1)==1)
     {
          result =
String.Format(“{0} is odd”, i);
     }
     Console.WriteLine(result);
}

Addictions: A Banquet in the Grave, Chapter 7

If the root of our problem is false worship, then the answer is knowing and worshipping the Lord.

Continue reading

Faith, Hope, and Love, Col 1:4-6

Many times, faith, hope, and love appear as a triad in a context in the New Testament, such as in 1 Cor 13 (“And now these three remain: faith, hope and love. But the greatest of these is love”). Colossians 1:4-6a is another place:
4because we have heard.
of your faith in Christ Jesus
and of the love you have for all the saints—
5the faith and love that spring
from the hope
that is stored up for you in heaven
and that you have already heard about
in the word of truth,
the gospel 6that has come to you.