def rotate90(image):
width = getWidth(image)
height = getHeight(image)
newPic = makeEmptyPicture(height, width)
for x in range(0, width):
for y in range(0, height):
pixel = getPixel(image,x,y)
color = getColor(pixel)
#switch x and y values for the new image,
#but flip on the x-axis to keep the
#image from flipping.
newPixel = getPixel(newPic, height - y-1, x)
setColor(newPixel, color)
return newPic
Monday, November 23, 2009
The Elegance of Python
Just finishing up a class at UAB that teaches an introduction to computer programming using media computation in Python. Although Python certainly is strange, I have to say that this simple Rotate 90% function using a framework called JES in Jython is somewhat beautiful and elegant in how little code it takes to generate. This would be much more messy in .NET.
Friday, August 21, 2009
On the Origin and Nature of Government
Governments, in their natural and healthy state, exist to provide military security to a group of individuals. As time progresses, however, and this security is sufficiently reached, it is the tendency of government to insist security in other means: economic and social safety. It is here that the concept of government begins to break down, for at this point government exists apart from its natural function. The military security it is meant to provide exists so that the individuals may freely live to collect resources. When the government extends its security into not only assuring the ability to gather resources, but actually going and gathering the resources for the individuals themselves, government has become the very thing it was defending against—a threat to an individual's liberty. Thus, the people, in whatever form, eventually either rise up and override the government until it has again reached its natural state, or an opposing collective of individuals or other government remove said government from power. Of course, there is always the chance that a worse form of government can override the previous one, but the overindulgence of this government will be such that it will fall fate to the same pattern as the previous government. On and on this cycle repeats until the people themselves restore a sound government from within. And yet, given sufficient time, this government too will erode its natural purpose. It is therefore reasonable to assume there exists a cycle—a limited lifespan of government just as is found in nature. It is not only the right of the people but the duty of the people to resolve their government to restore it to its original purpose.
Thursday, June 4, 2009
The Natural Tendency of Government
It is often believed that ancient man tended to gravitate towards monarchies. There were kings for many ages, and even before them there were tribal leaders. What is often neglected, however, is the fact that this tendency has not changed. Nations in crisis or that have faced recent collapse tend to invertently hover towards a central leader. Why is this? One must look at the main purpose of government--no, it is not to give us stuff we can't get ourselves. Government is a social contract between man and an organization, much like a business. Government is the bodyguard hired by a group of consenting men that pays out a little bit of freedom in exchange for security that they would otherwise have to manage themselves. And where does man naturally tend to devote his security? Into an individual. For man was created of God to rely upon God. Heaven itself is a monarchy, with absolute security and justice and order in the hands of one Being. When man rebelled against his Creator and drifted away from him, that innate biological and spiritual desire for a single holder of security did not go away. Rather, man placed it in the only place he believed he could--in man. It is much easier for man to blindly follow one leader rather than a group, for as the numbers of a group claiming rule increase, the complexity increases and the natural tendency of man to believe the greater the numbers, the greater corruption takes precedence. He follows his beloved leader, whom he idolizes to an unhealthy level. He worships him as he would worship God, but only because he does not truly follow God. In this man he devotes all his life. This is why men are often ready to die by the sword for their beloved king. This is the tendency of government.
Thursday, May 21, 2009
A Re-Assessment of Day Four of Genesis
I've been rather perplexed as to a recent question about Genesis 1. Basically, the skeptics' argument goes like this:
1.) Why would God create Earth before the Sun?(Earth = Day 1; Sun = Day 4)
2.) Why would God create the plants before the sunlight?(Plants = Day 3; Sun = Day 4)
The basic independent variable in this is the Sun. The problem seems to be that day 4 should actually be day one.
I set out on some reading of Genesis 1, and discovered what I believe has been a misinterpretation by most Biblical students.
Look at Day 1: "And God said Let there be light and there was light." (Genesis 1.3).
The presence of light indicates that some light source existed to light the earth. It is normally assumed that this light is radiation light from the universe or light from God Himself. However, when you look closely at the Hebrew word for light in this verse, you will see this definition: From 'owr; illumination or (concrete) luminary (in every sense, including lightning, happiness, etc.) -- bright, clear, + day, light (-ning), morning, sun. (http://biblelexicon.org/genesis/1-3.htm).
So light, in this sense, is not light as an element or particles, but a literal light. The word can literally mean "sun" or "morning". This suggests that the sun has been, in fact, created on Day 1.
But here is where the basic rebuttal comes from the traditional consensus on Genesis 1: God didn't create the sun until day 4. To understand why I believe this is incorrect, let's look at Day 3 of creation.
Day 3 describes the creation of plants. Here is where we would seem to run into another problem if we took the traditional view of light in Genesis 1. The Bible says that "God said Let the earth bring forth grass the herb yielding seed and the fruit tree yielding fruit after his kind whose seed is in itself upon the earth and it was so" (http://biblelexicon.org/genesis/1-11.htm). Now, any student who has had basic elementary science knows that plants cannot grow without the Sun. So if we are following the traditional interpretation of light, the whole creation story would, lest there be some sort of detail we are unaware, collapse.
However, let's turn over to day 4. A reassessment should solve our two problems: plants before the sun, and the sun before Earth. Day 4 says that "God said Let there be lights in the firmament of the heaven to divide the day from the night and let them be for signs and for seasons and for days and years. And let them be for lights in the firmament of the heaven to give light upon the earth and it was so. And God made two great lights the greater light to rule the day and the lesser light to rule the night he made the stars also. And God set them in the firmament of the heaven to give light upon the earth. And to rule over the day and over the night and to divide the light from the darkness and God saw that it was good."
Here is where we must again carefully look at the word light. To my surprise, when I looked up the word light in verse 14: "God said Let there be lights in the firmament of the heaven to divide the day from the night and let them be for signs and for seasons and for days and years." I did not find the same word that is used for light in verse 3 of Genesis 1. "Light" on Day 4 is different than "light" from Day 1. Unfortunately, thanks to a poorly descriptive and cluttered language such as English, we do not distinguish between the two.
Day 4's light means this: "Or maor {maw-ore'}; also (in plural) feminine mpowrah {meh-o-raw'}; or morah {meh-o-raw'}; from 'owr; properly, a luminous body or luminary, i.e. (abstractly) light (as an element): figuratively, brightness, i.e.cheerfulness; specifically, a chandelier -- bright, light." Here, light is an "element" and refers to intensity such as "brightness" or "bright." Light here is not so much an object like the sun as it is an intensity.
Knowing this, we can clearly see that the Bible intended to distinguish the two types of light in Genesis 1. Here's where it all comes together. If we believe that day 1 was the creation of the sun, day 2 was the creation of the atmosphere, and day 3 the plants, day four makes perfect sense. Early Earth, as I've read in Halley's Bible Handbook, must have had a misty atmosphere. This atmosphere was likely loaded with CO2. With the creation of plants, however, free oxygen would have been produced. The absence of such high doses of C02 would have freed up the atmosphere so that the sun would have been able to peer through to the earth. Thus, it makes perfect sense that day four is not the creation of the sun and stars, but the revealing of the sun and stars on Earth's atmosphere. I believe the Bible is revealing, "OK, we have oxygen, now we can build life."
Incredibly, this is exactly what science concludes as well. This reassessment, I believe, resolves an issue that has for too long been ignored or unknown to most Christians. This solution(though I must acknowledge is the solution of others and not my own) represents a Genesis and science even more in concert than we previously thought.
1.) Why would God create Earth before the Sun?(Earth = Day 1; Sun = Day 4)
2.) Why would God create the plants before the sunlight?(Plants = Day 3; Sun = Day 4)
The basic independent variable in this is the Sun. The problem seems to be that day 4 should actually be day one.
I set out on some reading of Genesis 1, and discovered what I believe has been a misinterpretation by most Biblical students.
Look at Day 1: "And God said Let there be light and there was light." (Genesis 1.3).
The presence of light indicates that some light source existed to light the earth. It is normally assumed that this light is radiation light from the universe or light from God Himself. However, when you look closely at the Hebrew word for light in this verse, you will see this definition: From 'owr; illumination or (concrete) luminary (in every sense, including lightning, happiness, etc.) -- bright, clear, + day, light (-ning), morning, sun. (http://biblelexicon.org/genesis/1-3.htm).
So light, in this sense, is not light as an element or particles, but a literal light. The word can literally mean "sun" or "morning". This suggests that the sun has been, in fact, created on Day 1.
But here is where the basic rebuttal comes from the traditional consensus on Genesis 1: God didn't create the sun until day 4. To understand why I believe this is incorrect, let's look at Day 3 of creation.
Day 3 describes the creation of plants. Here is where we would seem to run into another problem if we took the traditional view of light in Genesis 1. The Bible says that "God said Let the earth bring forth grass the herb yielding seed and the fruit tree yielding fruit after his kind whose seed is in itself upon the earth and it was so" (http://biblelexicon.org/genesis/1-11.htm). Now, any student who has had basic elementary science knows that plants cannot grow without the Sun. So if we are following the traditional interpretation of light, the whole creation story would, lest there be some sort of detail we are unaware, collapse.
However, let's turn over to day 4. A reassessment should solve our two problems: plants before the sun, and the sun before Earth. Day 4 says that "God said Let there be lights in the firmament of the heaven to divide the day from the night and let them be for signs and for seasons and for days and years. And let them be for lights in the firmament of the heaven to give light upon the earth and it was so. And God made two great lights the greater light to rule the day and the lesser light to rule the night he made the stars also. And God set them in the firmament of the heaven to give light upon the earth. And to rule over the day and over the night and to divide the light from the darkness and God saw that it was good."
Here is where we must again carefully look at the word light. To my surprise, when I looked up the word light in verse 14: "God said Let there be lights in the firmament of the heaven to divide the day from the night and let them be for signs and for seasons and for days and years." I did not find the same word that is used for light in verse 3 of Genesis 1. "Light" on Day 4 is different than "light" from Day 1. Unfortunately, thanks to a poorly descriptive and cluttered language such as English, we do not distinguish between the two.
Day 4's light means this: "Or maor {maw-ore'}; also (in plural) feminine mpowrah {meh-o-raw'}; or morah {meh-o-raw'}; from 'owr; properly, a luminous body or luminary, i.e. (abstractly) light (as an element): figuratively, brightness, i.e.cheerfulness; specifically, a chandelier -- bright, light." Here, light is an "element" and refers to intensity such as "brightness" or "bright." Light here is not so much an object like the sun as it is an intensity.
Knowing this, we can clearly see that the Bible intended to distinguish the two types of light in Genesis 1. Here's where it all comes together. If we believe that day 1 was the creation of the sun, day 2 was the creation of the atmosphere, and day 3 the plants, day four makes perfect sense. Early Earth, as I've read in Halley's Bible Handbook, must have had a misty atmosphere. This atmosphere was likely loaded with CO2. With the creation of plants, however, free oxygen would have been produced. The absence of such high doses of C02 would have freed up the atmosphere so that the sun would have been able to peer through to the earth. Thus, it makes perfect sense that day four is not the creation of the sun and stars, but the revealing of the sun and stars on Earth's atmosphere. I believe the Bible is revealing, "OK, we have oxygen, now we can build life."
Incredibly, this is exactly what science concludes as well. This reassessment, I believe, resolves an issue that has for too long been ignored or unknown to most Christians. This solution(though I must acknowledge is the solution of others and not my own) represents a Genesis and science even more in concert than we previously thought.
Friday, May 8, 2009
Resetting an Identity Seed Using Stored Procedure
Ferlin found this; I thought it was interesting and potentially useful. Apparently in MSSQL 2005, you can delete all the rows in a database with an identity column, but that identity seed does not reset once you enter new records--it simply resumes with the last record before the delete. This handy little stored procedure will allow you to reset the identity seed of a table:
DBCC CHECKIDENT(@TableName, RESEED, 0)
DBCC CHECKIDENT(@TableName, RESEED, 0)
Wednesday, March 4, 2009
The Birth of Corporatism
Even worse than government taking over the private industry is the government contaminating and mingling in it. At least with a big bureaucracy, one can tell “this is the government” and “this is the private industry.” But with modern corporatism, this is no longer the case. Government and business are merging into somewhat of a symbiotic host/client relationship. That is perhaps the most cruel thing that can happen to its people—they cannot tell where government ends and where business begins, for it is all business. Their tax dollars are spread so vehemently and obscurely that it is nearly impossible to correctly pinpoint exactly what is being wasted and what is not.
Monday, March 2, 2009
It is interesting that society always seems to be turning in on itself. One generation will do the opposite of its parents. Whereas college used to be a place where the Christians were turned into “logical and rational humanists,” now it is the lost who are influenced by the faith of Christ's followers all around them. Let us pray and practice that it should remain this way.
Subscribe to:
Posts (Atom)