When a lego addict grows up to be a programmer

The lego brick.

2x4brick_red

(ref)

So simple. Yet so incredibly powerful.

It has shape, structure, color, and strength. But best of all, it has dots. Yes, that’s right. Dots. Those dots are the key to the incredible power of the lego. With dots, two legos become one. And those combined legos can join yet again with another brick to form a new creation.

2_duplo_lego_bricks

(ref)

 And on and on the pattern goes:

lego-city

(ref)

When I was young I played with these simple but profound toys for weeks on end, without stopping. I was addicted. I could make anything.

Eventually I got into programming and now that’s what I do professionally. I love it.

There is a connection. Legos and programming are very much alike. But to me that connection was foggy for a long time. I struggled as a programmer to discover how I could re-enter my joy-filled world of legos again.

Then I met Haskell. It’s a functional programming language that takes category theory very seriously. One day I stumbled upon this blog post, which finally opened my eyes to the lego-land I had been longing for all these years. It’s all there. The brick. The structure. The dots. The endless possibilities but profound simplicity.

I hope you enjoy the read.

http://www.haskellforall.com/2012/08/the-category-design-pattern.html

Advertisements

Nature our friend

And Peter answered him, “Lord, if it is you, command me to come to you on the water.” He said, “Come.” So Peter got out of the boat and walked on the water and came to Jesus. (Matthew 14:28-29)

Peter wanted to be with Jesus. He loved Jesus. When he saw an opportunity to be with Jesus, he wanted to take advantage of it. In this case, being with Jesus meant disobeying the normal laws of physics. But Peter’s focus was not on the inescapable power of physical laws. His focus was on the inescapable power of Jesus’ friendship. So Jesus bent the laws of physics to make room for the longing of friendship. That is incredible. To think that all the powerful forces around us, which seem so cold and impersonal in themselves, are the mere toolbox of a great and personal God-man, Jesus. To think that there is a power behind the power; that crashing thunder and thundering earthquakes and quaking volcanoes and volcanic solar-flares and flaring super-novas—all these massive powers of nature are themselves powered by an intensely personal God who actually cares about us. And he is more than happy to subject their powers to his loving designs. He opens the sunrise to send a song into our hearts. He blows a cool breeze to refresh our tired bodies. He paints a rainbow to remind us of his promise. All of nature is our friend when God is our friend. When we set our faces to enjoy the smile of Jesus, who knows what will happen beneath our feet?

More than a calculator

Though He slay me, yet will I trust Him. Even so, I will defend my own ways before Him. He also shall be my salvation, for a hypocrite could not come before Him. (Job 13:15-16)

Job takes a very bold position before God and his friends. He defends himself. His friends find his self-justification reproachable, and repeatedly rebuke him for accusing God of injustice. But surprisingly the Bible makes it clear that Job was right! How can God commend him for this and condemn his friends instead? The answer lies in understanding the basic assumptions about God’s character that Job held in contrast to his friends. Job’s friends considered Job’s self-justification as equivalent to accusing God of injustice; and this is precisely because they considered Job’s sudden suffering as proof that Job had done wrong. But Job had a different view. He did not see his affliction as proof of some particular sin on his part, and he also did not see his self-justification as an accusation of God. He knew that God was not a cosmic balance or accountant. He knew God was not mindlessly blessing the righteous and cursing the wicked as their deeds immediately deserved. He saw God not as a calculator, but as a person, “merciful and gracious, slow to anger and abounding in steadfast love and faithfulness.” He knew God personally, and thus he knew that God was much more, much better, than a universal referee. Job loved God. They were close and intimate friends. So Job knew that God was not merely smashing him mercilessly because of his sin (though he knew he deserved it). He knew God was trying him, testing him, and ultimately blessing him. Thus he cries out to his Almighty friend, pleading for relief, reminding him of their close friendship, pouring out his heart honestly and painfully before his kind Lord. Though deeply wrestling with God’s harsh treatment, Job ultimately submits his life to God: “Though he slay me, yet will I trust Him.” He continues to wrestle knowing that “He also shall be my salvation” when all is said and done.

Useless

Perusing the Gospel Coalition’s website, my wife and I recently stumbled on a short series of videos called For the Life of the World: Letters to the Exiles (FLOW for short). They explore what it means to be “in the world but not of it” in light of the gospel. The first episode makes a beautiful and profound point: “all is gift.” Think about it. God needed nothing to be happy. He was totally satisfied in his own triune perfection, beauty, power, holiness. So why did he create us? The repeated, historical answer from theologian great and small is simple: God made the world because he wanted to give. His joy “spilled over” as it were into a selfless, creative act. And now we reach Genesis chapter 1. God had given so much to mankind. He gave them lands, gardens, kingship, marriage; and greatest of all God gave them himself. But there was that tree. “Funny thing about that tree; it wasn’t a gift” (as FLOW puts it). It’s as if the tree was a question from God: “Which do you want more, my child? Me or that one, last tree? Am I enough for you?” But we took it anyway. And the blessed world became a dark and evil place. But the story does not end there, because God was not done giving yet. God gave again. This time a gift infinitely greater and more expensive than the first. He gave himself again. He gave himself up to death. Do you see the insanity of this gift? God’s first gift was totally unnecessary! It was “ephemeral, useless” (FLOW). And to this “useless” world that had rebelled, God gave again, his very life and blood! The generosity of God toward us is breath-taking. It is past finding out. Let us ponder it over and over, and still we will never reach the bottom.

What do I do to you?

“What is man, that you make so much of him, and that you set your heart on him, visit him every morning and test him every moment? How long will you not look away from me, nor leave me alone till I swallow my spit? If I sin, what do I do to you, you watcher of mankind? Why have you made me your mark? Why have I become a burden to you?” (Job 7:17-20)

In his agony, Job was pressed close to some of the deepest questions of our human existence. Job realized that compared to the Almighty God, he was utterly nothing, even less than nothing. In effect he asks, “Why does God bother to keep me alive in this agony?” Perhaps it is because he has offended God, but then “what do I do to you, you watcher of mankind?” In other words, “how can my sins possibly affect you, the great Almighty?” This is a profound and troublesome question. If God is truly affected by our actions, though we are nothing compared to him, then surely God is a rather fickle and unstable being. But if God is not affected by what we do, then how can he be personally offended by our sin? And if he willingly torments us without being meaningfully offended, then surely he is not a good God, but rather cruel and evil. God does not leave us helpless against these questions. He tells us the answer but it is hard to believe. “Let us make man in our image” he said in Genesis 1:26. We have been made with a uniquely glorious purpose. God destined us for an unparalleled closeness to him, a closeness and joy that no other creature has ever or will ever enjoy. Yet “’you have rebelled against the LORD your God, you have scattered your favors to foreign gods under every spreading tree, and have not obeyed me,’ declares the LORD” (Jer 3:13). God bestowed on us a wondrous ability to please even him, but we have betrayed him! God shows us that his anger against us is not the result of dark cruelty, but of prefect justice. When we realize this, we are able, like Job, to repent and acknowledge our guilt before a holy God. And when we do, he “is faithful and just to forgive us our sins and cleanse us from all unrighteousness” (1 John 1:9).

Tunder and God

Last night my son woke up with a loud scream. I rushed into his room and found him simply standing there half-asleep. “What’s wrong, Aiden?” I asked several times. He finally responded with a quizzical look, “Tunder? Tunder? God?” Earlier that day a thunderstorm had bustled across our town, but it had long passed by this time. I can only conclude that Aiden had been dreaming about thunder, and somehow he remembered that God made thunder and it was significant to him. Being only 2 years old, his understanding of God is still extremely primitive, yet he is already beginning to develop a fear of God. Perhaps his fear is more like “terror” at this point in his life and less like reverence. But whatever fear it is, I pray it is real and lasting. God often uses terror of hell and judgment to bring men and women to the overwhelming joy of his bloody atonement for them. “This is the one to whom I will look: he who is humble and contrite in spirit and trembles at my word” (Isa 66:2). I beg you, dear Lord, that Aiden and I myself would fear your just and terrible wrath, by which we see most clearly your deep and incomprehensible love for us on the cross.

He Did Not Sin or Charge God with Wrong

In all this Job did not sin or charge God with wrong. (Job 1:22)

I have often pondered the meaning of the word “sin” and its cousins “transgression,” “iniquity,” “wickedness,” etc. In this small verse we discover the root and lifeblood of all sin and its kin: “charging God with wrong.” While it may be possible to interpret “or” in this case to relate two distinct concepts, it would be difficult to support such a position. I think it much more natural to consider “sin” and “charging God with wrong” as complementary terms, where the former is broad and the latter gives more helpful detail. Indeed, is this not the case with our sin? When we disobey the commands of God, are we not implying that God’s commands were wrong for us, at least in that moment? “You have forgotten me and cast me behind your back” (Eze 23:35) is God’s grieved and angry accusation to his whoring people. How little honor we give to our very own Creator! “You thought that I was one like yourself. But now I rebuke you and lay the charge before you” (Psalm 50:21). Yes, and this is the very poison of our fall, the seed that Eve took and ate from the Devil even before she ate the fruit of God. “You will not surely die” the Devil claimed, clearly implying that the Almighty had lied and to “charge God with wrong.” Adam’s first words after the fall reveal the same hideous spirit within him, blaming God even for his own disobedience. But is not our God sweet and kind, slow to anger and abounding in steadfast love and faithfulness? Oh God, let me not grieve your Holy Spirit! Make me like your servant Job, that I may not “sin or change God with wrong”!