Thursday, February 24, 2005

Boo Port of Spell Checking Code.

Well, I finally did it. Ported the code from Python to Boo. It wasn't just the code, but I had to port data I had stored in a shelve (I basically extracted the data from the files again, and then serialized it to a file -- a fake shelve).

Some interesting results from the tests (the numbers are for ten runs against each fxn):
SpellCheckText: 00:05:32.54 OR 332.54 seconds
SpellCheckTextUsingCache: 00:05:20.65 OR 320.65 seconds
OptimizedSpellCheckTextUsingCache: 00:01:02.44 OR 62.44 seconds
UglyOptimizedSpellCheckTextUsingCache: 00:01:02.56 OR 62.56 seconds

For the original fxn, one spell check of was 33.25 seconds long. For the cache, it was 32. The optimized was 6.25 as well as Ugly Optimized.

I should mention that these results are against the PORTs of Python to Boo. The python code had optimizations that were python specific. Boo being static and not dynamic will have different optimizations. So when I spend time on actual optimization -- that will be more fair. Although I confess to being surprised that Boo was between 3 and 2 times slower!

Heres the code:
I'm having stupid indentation problems w/ Blogger again.. so code is not up. :-(

Friday, February 18, 2005

Boo 0.5

Boo 0.5 has been released. Daniel Grunwald has also updated his BooBindings for SharpDevelop. Definitely worth a look.

Thursday, February 10, 2005

Reasons to Give

An article I wrote for my church newsletter:
Reasons to Give

Often people have many questions about why they should give to the church. I want to show in this article that we have many good reasons to give to the church. I decided to write this article when Pastor Richard mentioned that the giving at our church was about equal to the national average on giving, that we give about 3% of our annual income. I looked into the issue of giving a little more and found that another national statistic indicates that 15% of churchgoers tithe (gives 10%). If this applies to our church, then 15% of the families give half of what our church receives from giving (15% * .1 = 1.5% out of the 3%) and thus 85% of the families give only 1.5% of their annual income. These numbers are disturbing to me because they seem to indicate a possible misunderstanding of who God is.

Why does God need my money if He really made it all? Or why is God interested in my giving if He owns the cattle on a thousand hills? Isn’t the tithe from the Law of Moses, and since we are under grace, we give as lead?


The giving of tithes and offerings has historically been a way to publicly express dependence upon God, trust in God, support for His ministering servants, as well as gratefulness for His kindness in the past or for promised blessings. Throughout the Scriptures those who have sought the Lord have consistently been willing to honor Him with offerings and gifts.


The first recorded instance of giving a tithe in the Bible was in Genesis 14 (well before the giving of the Mosaic Law), where Abraham took hired men and rescued his nephew Lot. After being blessed by Melchizedek, priest-king of Salem, he gave him a tenth of his plunder from the battle. From the context, it is clear that Abraham tithed to acknowledge that God gave him victory. Another pre-Mosaic Law example is in Genesis 28:20-22, where Jacob promised to tithe if God would be with him and bless him.

Numbers 18:21-28 set up the tithe system of the law of Moses. It was set up as a provision for the Levites, who were not given land with the other Israelites but were to focus on serving the Lord.

David gave in thanks for God's mercy. David also desired to build a temple for God out of love for Him (see 2 Samuel 6 and 7 for both stories).

Some may say that “God loves a cheerful giver, and I can’t be cheerful giving that much!” There are two answers to that. First, we are commanded to be generous (see 1Ti 6:18, Paul is telling Timothy to “Command” the church body to be generous, the Greek meaning according to Strong’s.). The second answer ultimately is an answer to “How can I have a cheerful attitude?” Don’t accept being a grudging giver! Consider the following questions, and I expect you’ll find many reasons to be a cheerful giver. (You may want to attach these questions to your checkbook!)

Has God given you a victory or help in time of need? Honor Him by giving a thank offering. Has God given you mercy? Honor Him by giving a free-will offering. Has God given you joy eternal things? Honor Him by giving of temporal things. Has God given you temporal blessings? Honor Him with them! Has a pastor or missionary or ministry blessed you? Honor God with a gift of gratitude. Do you have regular and stable income? Honor God for His provision. Do you wish to help the needy? Give to the church that serves the Maker of the needy.

Have large and unexpected expenses devoured your income? Consider giving a full 10% of your income to the church. For in Malachi it says: "’Bring all the tithes into the storehouse, that there may be food in My house, and try Me now in this,’ says the LORD of hosts, ‘If I will not open for you the windows of heaven and pour out for you such blessing that there will not be room enough to receive it. And I will rebuke the devourer for your sakes, so that he will not destroy the fruit of your ground, nor shall the vine fail to bear fruit for you in the field,’ says the LORD of
hosts.”

In fact, this Scripture is particularly exciting because this is the only place where we are told to test God! If you prefer a somewhat comparable New Testament passage of God promising provision and blessing, how about Mt 6:31-33? “Therefore do not worry, saying, ‘What shall we eat?' or ‘What shall we drink?' or ‘What shall we wear?' For after all these things the Gentiles seek. For your heavenly Father knows that you need all these things. But seek first the kingdom of God and His righteousness, and all these things shall be added to you.”

The matter of giving of our increase is very dear to our God.

First, it shows that our trust is in the Gift Giver, not the gift. It shows that our treasure is in heaven, not in our bank account or possessions.

Second, Jesus says in Mt 6:24 that we cannot serve both God and money, since we will either hate God or money. Giving of the tithe and offerings is not just an act of trust in God's provision; it is a statement that God is your master.

Third, God is concerned about supporting those who labor on His behalf full time. If a pastor has to seek income through other means to support his family while being a pastor, can he effectively and fervently be focused on his flock? If his flock gives in sparse amounts, his focus and energy is likewise going to be limited to more sparse amounts because of distractions. Consider 1Ti5:17-18. "The elders who direct the affairs of the church well are worthy of double honor, especially those whose work is preaching and teaching. For the Scripture says, ‘Do not muzzle the ox while it is treading out the grain,’ and ‘The worker deserves his wages.’" Clearly, in the New Testament God is just as concerned about the provision of those who serve Him (pastors and missionaries and ministries) as in the Old Testament (e.g. the Levites and Priests).

Fourth, 2Co 9 tells us "You will be made rich in every way so that you can be generous on every occasion, and through us your generosity will result in thanksgiving to God." We are told that because of the giving that men will praise God for the obedience and generosity of the giver. They will in turn bless the giver by praying for them. But we are warned as well - for with a blessing comes responsibility, "Remember this: Whoever sows sparingly will also reap sparingly, and whoever sows generously will also reap generously."

Fifth, it proves our love. When we give to the church, and ministries, we are entrusting them with providing for the needs of the less fortunate. 1Jn 3:17 says: "But whoever has this world's goods, and sees his brother in need, and shuts up his heart from him, how does the love of God abide in him?"

Please allow me to show the power and potential of giving.

First, notice the New Testament church as reported in Acts 4. "Now the multitude of those who believed were of one heart and one soul; neither did anyone say that any of the things he possessed was his own, but they had all things in common. And with great power the apostles gave witness to the resurrection of the Lord Jesus. And great grace was upon them all. Nor was there anyone among them who lacked; for all who were possessors of lands or houses sold them, and brought the proceeds of the things that were sold, and laid them at the apostles' feet; and they distributed to
each as anyone had need." Described in here is something that socialism failed to achieve through force and without God. They didn't allow for human corruption in their plans, nor for God's grace to overcome it. And also, notice that the people in the church cared for each other so much that they sacrificed their worldly possessions for them. This kind of church is an amazing testimony to a lost and hurting world.

Second, consider some basic numbers. There are 38 million born-again voting age believers in the United States of America, where the country's average salary is $37,000. Consider if these believers gave a tenth of their salary to the church or to ministries. So an annual total giving of 38 x 10^6 x $3,700 = $140.6 Billion. For the sake of argument, consider $60 Billion is spent by churches in the U.S. (e.g. approximately $1.2 Billion per state), and the remaining $80 Billion is used for missionary and aid endeavors. In this scenario, the U.S. churches would be able to spend around $470 Million dollars on missionary and aid endeavors for EACH country of the world PER YEAR. With this money, missionaries would not have to spend large amounts of time fundraising, but focus on reaching the lost. Likewise, rural areas of the U.S. that often do not have a Bible teaching church could see such churches. Homeless shelters, and battered women shelters, and abortion alternative clinics would be able to help and share the Gospel without distraction. Churches could provide free counseling to help save troubled marriages. These are examples of looking at what such giving would be at the macroscopic scale. The U.S. churches cannot approach these levels without first giving consistently at the local church level, and the local church cannot do this without consistent giving from the individual believer.

Lastly, consider if our church of 100 families, making an average of $37,000 (although Cedar Rapid’s average salary is higher than this), gave 10%. Our church would have $370,000 for ministering – this number is more than double our current church budget! Imagine having another Pastor Richard, or Pastor John. Our church could send out its own missionaries, as well as send ministers to the community at large. Aid could be given to persecuted brothers and sisters in other countries. Imagine if our church, like the church in Acts, was always able to distribute as there was need. I believe such a church would greatly glorify our Lord.

Boo

I mentioned that Guido had said that Boo was like Python 3000. Here's the actual email text:

 
This PEP reminded me of the "boo" language (http://boo.codehaus.org/),
a new scripting language for the CLI strongly inspired by Python
(especially the Python 3000 variant :-).

It has string interpolation like this
(http://boo.codehaus.org/String+Interpolation):

print("Now is ${date.Now}.")
print("Tomorrow will be ${date.Now + 1d}")

They require use of {...} after the $, and you don't need to escape
the $ if not followed by {.

Just another design variant (of course they may change it all tomorrow
:-).

--Guido van Rossum (home page: http://www.python.org/~guido/)

Sunday, February 06, 2005

Lessons learned

A while back, I wrote down some lessons I've learned along the way.. or insights into the right focus and priorities (these relate to biblical living)...:

  1. Focusing on the fruit of the Spirit is the wrong focus. One should focus on walking with the Spirit, heeding His promtings and the fruit of the Spirit will follow.
  2. Perhaps one aspect of grace can be described as love: overlooking wrongs, sins, ideosyncracies; and rather build up and encourage the offending person. It removes any offenses we may have done in response and gives the other the opportunity to in a better manner.
  3. Love encourages knowing a person as they are. Pride restricts a person to the image we have of them, reducing them as a human and hampers our ability to know them as they truly are. Since we are made to have relationships with God and others, pride is abhorrent and a perversion to God because it prevents us from being as we are created to be.

CherryPy - a pythonic, object-oriented web development frameworkboo

CherryPy - a pythonic, object-oriented web development framework

I like this web framework. And it, metakit, and ika (game engine w/ python scripting) are what keeps me thinking about python... even though I'm slowly moving towards boo. I like (w/o having used it much) the framework; more than asp.net (at least asp.net w/ IIS and VS.Net having occasional integration issues). It'd be cool to have a port of the code in python .. which would be interesting...