TJ Singleton

Software Engineer, Baptist Preacher

Becoming a Mother

Naomi said unto her two daughters in law, Go, return each to her mother’s house. Orpah kissed her mother in law; but Ruth clave unto her. Ruth said, Intreat me not to leave thee, or to return from following after thee: for whither thou goest, I will go; and where thou lodgest, I will lodge: thy people shall be my people, and thy God my God: Where thou diest, will I die, and there will I be buried: the Lord do so to me, and more also, if ought but death part thee and me.

Ruth 1:8-17 (excerpts)

It’s disappointing that most of what we know of about Naomi is after the tragedy of loosing her husband and two sons. Too often I think we fixate on her declaration to “Call me not Naomi, call me Mara: for the Almighty hath dealt very bitterly with me.” (1:20) Yet, her very name speaks of sweetness and pleasantness. A sweet, loving woman she must surely have been to have become a mother to Ruth, greater than Ruth’s own.

Look at it from Ruth’s perspective. Her husband has died. Who is it that Ruth goes to for comfort? Who is it that Ruth seeks to emulate? Who is it that Ruth clings to? Naomi tells Ruth to return to her mother. Ruth tells Naomi that she is already there.

A mother is not simply the construct created by birth. A mother is a role that can be carried out by those who like, Naomi and Ruth, bloodlines are even in opposition. One a Jewess. The other a Moabitess. Their lineage could not have been further separated. Nevertheless, Ruth found a mother in Naomi.

As Christians, we need more women like Naomi. Women, full of sweetness, that will adopt the Ruths and teach them the ways of the Lord. Women, who like Naomi, cause others to emulate her godly ways.

Dear Christian woman, won’t you be a Naomi?

The End of Fear

The Lord is my light and my salvation; whom shall I fear? the Lord is the strength of my life; of whom shall I be afraid? When the wicked, even mine enemies and my foes, came upon me to eat up my flesh, they stumbled and fell. Though an host should encamp against me, my heart shall not fear: though war should rise against me, in this will I be confident.

Psalm 27:1-3

The psalmist confidently proclaims that he is fearless. He declares that he has no anxiety, unease, or worry. He doesn’t just say this once, he repeats himself again and again. He is making sure we understand that he is not the least nervous or alarmed.

Why should he be afraid? It’s David, King of Israel. It’s David, the man after God’s heart. However, we noticed that all is not sunshine and daisies in his life. His enemies are against him. He’s surrounded, overwhelmed, and cornered. In such a time of trouble, why wouldn’t David be afraid?

Fear, worry, and doubt are the opposites of faith. David isn’t afraid because of his trust in the Lord. He is confident that his life is in the Lord’s hand. He is sure of the strength, power, and mercy of God. David knew the Lord. No situation, No circumstances, No foe could trouble David. His fate was secure in God’s hands.

What are you afraid of? What has you made you to fret? What is it keeping you awake at night trembling? Is the Lord not your light and salvation? Is he not the strength of your life? Whom shall you fear? The fear of the Lord is the end of fear.

You Better Recognize!

Let your conversation be without covetousness; and be content with such things as ye have: for he hath said, I will never leave thee, nor forsake thee.

Hebrews 13:5

It’s 1 am. Emily is asleep. The wind lightly blows against the house. The compressor on the fridge grumbles along. Outside of this, there is silence. You might think that I’m alone. You’d be wrong.

Nothing can separate me from the Lord. His presence thrills my soul. No matter how dark this night gets, it can’t cut me off from Him. We find revealed here a truth nearly too wonderful to comprehend. The Lord won’t leave us. He won’t forsake us. We are never alone. The psalmist said, “If I ascend up into heaven, thou art there: if I make my bed in hell, behold, thou art there.” (Ps 139:8) There is no where the psalmist could go and escape the omnipresent one.

What battles are you struggling through? What situation has you neck deep treading water trying to keep afloat? Dear Christian, recognize that you are in the presence of God. Recognize that he hasn’t left you. Recognize and enjoy it. After all, if you have him, what else do you need?

Why Ruby Class Methods Resist Refactoring

This is a well written post that looks a why choosing to use a class method may not make sense. It’s coincidental that this morning I read this. Last night I was rewriting a job. After my tests were green and I was ready to refactor I noticed that I could simply inline the method into the class perform. I refrained, perfering the simple class instead.

I thought also about the 24th RubyTapas on incidental change. If you start out with a class method and decide to refactor to an object, then there is more change involved than refactoring an existing instance method.

Why Ruby Class Methods Resist Refactoring

Message-Oriented Programming

I’m linking because this post stirred up my thoughts on what it really means to be Object-Oriented. OO is about messaging. It’s about the conversation between objects. Object-Oriented programming is Message-Oriented programming.

Message-Oriented Programming

An Authlogic Trick for Speeding Up Your Test Suite

Here is a quick tip for speeding up your test suite if you use Authlogic. In production we use it’s BCrypt provider, but it’s designed to be slow. That’s when it comes to preventing an attacker from trying to compromise you user’s passwords, but slow is not a word we want to hear when it comes to tests. Authlogic makes it really easy to swap out the provider.

We just have to provide a module the responds to encrypt and matches?. Here is what I use:

module SpecCryptoProvider
  def self.encrypt(*tokens)

  def self.matches?(crypted, *tokens)
    encrypt(*tokens) == crypted

Then to swap it in we just have to assign it like:

User.crypto_provider = SpecCryptoProvider

I keep the module in spec/support and load it in my spec helper. You can adjust to your testing framework of choice. I hope that this tip will make your tests just a little faster. It shaves a solid minute off our rspec run at Crunched.