Pages

August 24, 2012

an abundance of counselors

In abundance of counselors there is victory. (Proverbs 24:6)

As software developers we often have to choose between writing code to solve a problem or use an existing library that was written by someone else instead. When we are faced with this decision we have to be willing to sacrifice our own pride and honestly evaluate the options for the sake of the project. We know that we cannot possibly write everything ourselves since we do not have the time or expertise to do everything without help.

Are we as willing to accept outside help in our lives? We should be seeking godly counselors (whether in person or in books) with as much fervor as we seek good libraries. 

February 28, 2012

substitutionary_atonement.py

class Person(object):
    # for all have sinned and fall short of 
    # the glory of God (Romans 3:23)
    @property
    def righteous(self):        
        return False

class Law(object):
    # He will render to each one according to 
    # his works (Romans 2:6)
    def judge(self, mankind):
        unrighteous = filter(lambda x: not x.righteous, mankind)
        map(self.punish, unrighteous)

    # For the wages of sin is death (Romans 6:23)
    def punish(self, person):
        del person

# Be fruitful and multiply (Genesis 1:28)
mankind = [Person() for x in range(7)]

# And he declared to you his covenant, 
# which he commanded you to perform (Deuteronomy 4:13)
law = Law()

# And the Word became flesh and dwelt 
# among us (John 1:14)
JESUS = Person()

# He himself bore our sins in his body on 
# the tree, that we might die to sin and 
# live to righteousness. (1 Peter 2:24)
law.judge([JESUS for person in mankind])

February 27, 2012

fanatics

We are privileged to work in an ever-changing, ever-dynamic field. There is no end to the number of languages, frameworks, libraries, and tools that we can learn about and use. I believe the reason for this is we software developers tend to be fanatical about our craft and are constantly looking to improve ourselves. Are we as fanatical about improving our hearts and minds for Christ?

For where your treasure is, there will your heart be also. (Luke 12:34)

February 14, 2012

leaning on ebenezer

Then Samuel took a stone and set it up between Mizpah and Shen and called its name Ebenezer; for he said, “Till now the LORD has helped us.” (1 Samuel 7:12)

How often have you revisited your old code? Do you see the need for changes in technique, style, and expression in that old code? We should always feel that old code could be improved. If our old code cannot be improved then we have become stagnant and we have not improved either.

What about our relationship with God? Can we see growth in our characters? Are we becoming more like Christ? When we inspect our hearts, do we see improvement or do we see stagnation? More often than not we are resting on a previous encounter with God, comfortable with his providence during that time, but unwilling to move forward.

Do we accept complacency in ourselves when it comes to writing code? Of course not! We should also not accept complacency in our relationship with God. 

January 31, 2012

the bug is in your code

A novice developer has a hard time identifying errors in their code. When their code doesn't work as they hoped they give a cursory glance to their work and often times despair, saying that there must be a bug in the compiler or in the standard library. As time goes by, the novice developer gains experience learns that they have not been looking carefully at their own work to find the actual problem. There was no compiler or library bug. That assumption had led them to overlook their own mistake and prolonged their development time.

We often have the same attitude about sin in our lives. We see that there is a problem due to strife or dysfunction yet we refuse to look for the problem where it is most likely to be found. We refuse to admit that we are flawed and instead seek to prolong a sense of self-sufficiency by assuming the problem is not our fault. We should seek to change our perspective about ourselves just as we have changed our perspectives about our code. Believing that the bug is in your code is the first step toward fixing it.

January 30, 2012

hashing

What is the benefit of a hashing function? A hashing function provides you with a unique signature for an object that allows you to identify that object quickly without having to inspect the object itself.

[T]est the spirits to see whether they are from God (1 John 4:1)

We need to hash everything that we experience to determine if it is holy. How does this work in practice? By reading our Bibles (in this sense the Bible becomes our hashing function). We will be able to know whether anything is from God by being completely immersed in his word. Every time we consult scripture (by reading or recalling) we receive a hash that tells how to proceed.

Behold, I am sending you out as sheep in the midst of wolves, so be wise as serpents and innocent as doves. (Matthew 10:16)

How merciful God is to us! His word allows us to be both wise and innocent. We are wise in that we have a tool to recognize sin and temptation without the loss of innocence that comes with experiencing sin by giving into temptation.

January 27, 2012

build to the spec

We love specifications because specifications are a definitive set of requirements that we must meet. Nothing is worse than a shifting set of requirements that are not defined because this means that we must continually be re-implementing our solutions to match them.

The Bible is our spec - it is God's definitive set of requirements for our life and we must daily read it to understand how we must live. The world presents us with another, ever shifting set of requirements. Reject the fluctuating tasks of the world that tell you how to think, act, and feel. Reject them as you would a project that had no set requirements. Build to the spec - it's the only way to build something that will last.


Everyone then who hears these words of mine and does them will be like a wise man who built his house on the rock. And the rain fell, and the floods came, and the winds blew and beat on that house, but it did not fall, because it had been founded on the rock.
And everyone who hears these words of mine and does not do them will be like a foolish man who built his house on the sand. And the rain fell, and the floods came, and the winds blew and beat against that house, and it fell, and great was the fall of it. (Matthew 7:24-27)

January 26, 2012

testing our hearts


Let a righteous man strike me—it is a kindness;
let him rebuke me—it is oil for my head;
let my head not refuse it. (Psalm 141:5)

We are careful to make sure our code is error-free before we put it into production. We have many different ways of doing this: unit tests, compilers, continuous integration, code reviews - the list goes on. These quality control methods allow us to find and correct mistakes early before they ever create devastating runtime errors later on. Unfortunately, a novice developer is often stung by constructive comments in a code review or frustrated by compiler errors. But as they gain experience they begin to see that catching problems early is a good thing. 

Are we as careful with our own hearts?  Are we gaining the spiritual experience we need to see that catching problems in our hearts is a good thing as well? We should embrace God's providence in showing us our sin early through any means that he chooses. God may decide to build our character by having a personal confrontation where our sin is revealed by another person. He may also choose to convict us through a Bible verse. We never know what quality control method God may use to cleanse us of our sins but we must remember that these methods are sparing us from devastating consequences later on. Let us be as zealous about humbly accepting God's discipline as we are about testing our code.

Those whom I love, I reprove and discipline, so be zealous and repent. (Revelation 3:19)

January 24, 2012

two_masters.py

#!/usr/bin/python
# choose this day whom you will serve (Joshua 24:15)

class God(object):
    def serve(self):
        print 'serve God'

class Money(object):
    def serve(self):
        print 'serve Money'
       
class Andrew(Money, God):
    pass

if __name__ == "__main__":
    andrew = Andrew()
    andrew.serve()

fingerprints on the machine

The heavens declare the glory of God, and the sky above proclaims his handiwork. (Psalm 19:1)
What is the purpose of this blog? Can you really learn more about God from computer code? I believe that you can. All of his creation speaks to his glory - his handiwork is evident everywhere. I believe that the systematic order of computing is a perfect place to learn about God.

As programmers we are responsible for modeling real-world problems in code. We must consider the smallest detail and find ways in which it can be expressed. This gives us a unique perspective on life in that we are conditioned and trained to search things out and understand them completely. I believe that this kind of inspection opens us up to understanding God.

Sometimes a software concept can help us understand a theological concept (like how sin is similar to inheritance) and other times our daily routines can inspire us to be more obedient to God (like praying as often as we save our work). Since I believe, as David did, that God's handiwork is evident everywhere, I know that there are great truths to be discovered and powerful realizations to be made in searching for God in the patterns and practices of our craft. Our creator's fingerprints are on the machine.

natural as breathing

How often do you save your progress when you are writing code? When you are finished working for the day? You have probably been burned enough by accidental reboots and editor crashes that you save your work all the time. You probably don't realize the number of times you hit Ctrl+S or :w while you work. It has become so much a part of your workflow that you don't even notice anymore. Saving your work has become as natural as breathing.
Rejoice always, pray without ceasing, give thanks in all circumstances; for this is the will of God in Christ Jesus for you. (1 Thessalonians 5:16-18)
We often relegate prayer, rejoicing, and thanksgiving to specific times of the day when we feel like it. What if we prayed, rejoiced, and gave thanks as often as we saved our work? It might become as natural as breathing.

January 23, 2012

an inheritance of sin

Our base class is flawed. Each and every method is riddled with bugs and logic errors. Not crashing errors, just enough errors to ensure that things don't run properly. We all inherit from this base class in one way or another. Whether distantly or closely, we are all children of this base class. The class is named Adam.

When Adam chose to sin, he corrupted his implementation and all the natural things within him became corrupted as well. His words became prideful. His arms became violent. His eyes became lustful. His heart became fearful.  All his actions became corrupted by sin.

All these things are methods in the Adam class, and we inherit these methods. From the moment we are born, our words, arms, eyes, and hearts are just as sinful as Adam's. This is the natural order, the curse of sin that we are all born into.
class Andrew : Adam { }
All my methods are inherited from Adam and I am born without any overriden methods. This is the state of being completely sinful. Paul teaches that I am responsible for working out my own salvation (Philippians 2:12b). This means that, with the help of Jesus Christ, I must re-implement any sinful methods and provide holy implementations.
class Andrew : Adam 
{
    public override string Speak() { /* with humility */ }
    /* other methods to follow */ 
}
I cannot be content with any of my existing implementations - while they may work to a certain extent, they always be wrong in the end. Every method must be rewritten in accordance with God's word. This what it means to work out our own salvation - and it can only be done with God's help.