Sunday, April 21, 2019

Bugs!


On June 4 1996, the European Space Agency launched a brand new rocket. It was the first launch of a new generation of spacecraft: the Ariane 5. They had spent $8-billion developing the Ariane 5. It didn’t carry people, but it did carry a half-billion dollars worth of satellites into space.

Everything went as planned during the count down, all systems were working flawlessly. As the rocket lifted off in a beautiful cloud of white smoke, the mission control crew were excited. Beautiful colors followed the spacecraft as it streamed into the sky.

Then 36 seconds into the flight, everything went wrong. The space craft suddenly went completely unstable, started turning violently turned toward earth. The mission control was forced to push the self-destruct button. Immediately the rocket exploded into a huge ball of fire.

Silence reigned in the control room. Everyone sat dazed, numb, staring at their screens or into the sky as the huge ball of fire grew cold, and pieces of their spaceship fell to earth.

In the days that followed as they analyzed what happened, it became clear what went wrong. They lost their spaceship because of . . . a computer programming bug. The software had not been properly tested. And at a critical moment the program crashed and everything went out of control.

The Need of Testing

Testing is essential. 1 Peter 1:6-7 says:

“In this you greatly rejoice, though now for a little while, if need be, you have been grieved by various trials, that the genuineness of your faith, being much more precious than gold that perishes, though it is tested by fire, may be found to praise, honor, and glory at the revelation of Jesus Christ.” (NKJV)

Writing computer programs and software is one of my favorite things to do. But for a number of years, I kind of dreaded testing. It was boring, it was tedious. In some ways I didn’t see much of a point. (If I wrote it right in the first place, testing was a waste of time. On the other hand, how could I possibly find all the bugs by testing anyway? That would take forever!)

But I’ve learned that testing can be fun if it’s done right, and like that passage from 1 Peter 1 says: I don’t need to be grieved by the various tests—In the end, even if the code is tested with fire—if it passes the tests, that is a wonderful thing.

On that morning in June of 1996, the software responsible for keeping the Ariane 5 rocket stable and pointed toward its destination in space crashed. Immediately the backup computer took over, but it was running the some program and crashed because of the same bug.

Without a program to keep it on course, the rocket immediately twisted out of control, and started breaking under the stress. The engineers were forced to blow up their rocket to keep it from coming down and possibly killing people on the ground.

This is one of the more catastrophic results of a software bug.
But bugs are common. The more bugs a program has, the worse it runs and the more problems it can cause. But bug-free software can do amazing things.

Bugs

On September 9, 1947, computer scientist Grace Hopper reported the world’s first computer bug.

She was working on the Harvard Mark II—one of those massive early computers that took up a huge room—and had the computing power of a 1980s pocket calculator.

It was full of circuits, relays, tubes, and moving parts. In Hopper’s case, the bug in the program was literally a bug: The program kept giving errors. When they opened the computer’s hardware, they found a bug—a moth!

The moth had gotten trapped in one of the relays and caused it to stop working. And taking that moth out was the first instance of “debugging”—getting the bugs out of a computer program.

And the name stuck.

The Bible speaks about us debugging our lives and hearts.

Hebrews 12:1-2 says: “Therefore we also, since we are surrounded by so great a cloud of witnesses, let us lay aside every weight, and the sin which so easily ensnares us, and let us run with endurance the race that is set before us, looking unto Jesus, the author and finisher of our faith.” (NKJV)

That laying aside of the weights and sins in our lives is a kind debugging: taking the bugs out of our hearts and characters.

Test

One of the great goals of programmers is to write bug-free programs. And bugs are a problem that plagues software development. How do you know the program is going to do what you want it to do in every situation?

And the ultimate test that the software gets put through when it is put into real use:
  • The testing that happens when it is the code that 200 lives depend on to enable their plane to land safely.
  • The testing that happens when the stock market or health care system is turned over to computers.
  • The testing that happened when the European Space Agency launched their rocket that went out of control.

The whole world will be tested this way in the near future.  Revelation 3:10 says:

“Because you have kept My command to persevere, I also will keep you from the hour of trial which shall come upon the whole world, to test those who dwell on the earth.” (NKJV)

In that day, most will fail as catastrophically as that Ariane rocket. But none of us have to fail. And that is one of the reasons God tests us today: to help us get the bugs out of our lives so we can stand in that great and final test.

Test First

How do you avoid failures and bugs with software? You test the code as you write it. Instead of one big fiery test at the end that ends catastrophically, you write dozens or even hundreds of little tests.

In fact one of the best programming practices is to write these tests first. When you want the computer to do a calculation, you write a test to show that it does it correctly. Then before you write the code to make it do it, you run the test.

What happens if run a test to see if your program does something correctly before you’ve written the code to make it do it? It fails the test of course. But this proves you have a good test. (If it passed the test before you wrote any code to make it do it, you’d know your test was flawed right?)

Then once your code has failed the test, you fix it. You add the instructions to make it pass the test and then run the test again. Often it fails a second time, and you keep refining until this little test passes.

Then you write another little test—and a failure of this test shows there’s more work to do in the program. You write that additional code, or refine the code you wrote, until the test passes. This is called “Test First Programming”.

The interesting thing is that God works like this with us too. We think we’re doing pretty good passing our daily tests—and then God gives us a new test that shows that we still have bugs.
  • We think we’re patient, and find ourselves getting angry.
  • Or we think we’re unselfish, and the test shows we’re selfish.
  • Or we think we’re Sabbathkeepers, and the test shows we’re not.

Think about the disciples just before the crucifixion. They all felt pretty good about themselves. Look what Peter said:

“Though all men shall be offended because of thee, yet will I never be offended.” (Matthew 26:33, KJV)

Jesus remonstrated with Peter and told him:

“Assuredly, I say to you that this night, before the rooster crows, you will deny Me three times.” (Matthew 26:34, NKJV)

Did telling him that work? Did this reform Peter? Did that get this bug out of his character? What was Peter’s response?

“Peter said to Him, "Even if I have to die with You, I will not deny You!" And so said all the disciples. ” (Matthew 26:35, NKJV)

So how did the Lord refine Peter—how did He get this bug out of his character? He started with a test. And Peter failed the test. The test showed Peter there was a bug in his soul. And when Peter could see he had failed the test, he opened his heart to receive correction, forgiveness, grace, and power to become a new man in Christ.

“Beloved, think it not strange concerning the fiery trial which is to try you, as though some strange thing happened unto you: But rejoice, inasmuch as ye are partakers of Christ's sufferings; that, when his glory shall be revealed, ye may be glad also with exceeding joy.” (1 Peter 4:12-13, KJV)

 “That the trial of your faith, being much more precious than of gold that perisheth, though it be tried with fire, might be found unto praise and honour and glory at the appearing of Jesus Christ: Whom having not seen, ye love; in whom, though now ye see him not, yet believing, ye rejoice with joy unspeakable and full of glory: Receiving the end of your faith, even the salvation of your souls. ” (1 Peter 1:7-9, KJV)

Final Test

All computer code that is used is eventually tested. The question is—when is it going to be tested? How is it going to be tested?

The choice a programmer has is—Will the testing happen in a safe, controlled environment? Or is it going to happen out in the world—on the road—in the air—when lives are at stake?

And our characters will be tested too. Our characters can be tested and debugged now in these days of probation under grace. Or they can be subjected to the final test, unfinished and unprepared.

Now when it comes to programming, I can tell you from experience what is more fun: It is more fun to write code, than it is to test it. It’s more fun to just write the code, figure it’s good and send it out.

At least it’s more fun to a point: And that is when your code that you had pinned your hopes on—and your reputation—comes crashing down and does something unexpected. And people are hurt, companies go out of business, reputations are ruined, and people are angry and upset. That’s no fun at all.

 “Now no chastening seems to be joyful for the present, but painful; nevertheless, afterward it yields the peaceable fruit of righteousness to those who have been trained by it. ” (Hebrews 12:11, NKJV)

And Ellen White wrote in Faith I Live By, p. 119:

“It requires the testing time to reveal the pure gold of love and faith in the character. When trials and perplexities come upon the church, then the steadfast zeal and warm affections of Christ's true followers are developed.”

So try and appreciate the tests you have this week. They are God’s method of debugging our characters. And the promise is: “When He has tested me, I shall come forth as gold.” (Job 23:10, NKJV)

Thursday, December 26, 2013

Why All These Crazy Feelings If I Shouldn’t Do Anything About Them Now?

17910214_m

Since most people marry in their 20s, why do young teenagers begin to have strong feelings for the opposite sex? Why is a 13-year-old fully capable of getting pregnant and bringing a baby into the world, if she must wait until she’s 20 in order to do so?

Why all these crazy feelings if I shouldn’t do anything about them now?

I was thinking about this recently and God shared something very cool with me.

On the day of your wedding you pledge yourself, forsaking all others, to keep yourself only to your husband or wife, as long as you both shall live. All thoughts of others, all interest in others is to be strictly controlled. Once you’re married to the man of your choice, you cannot have a boyfriend too. After your wedding you can’t have a wife and a string of girlfriends.

So how are you supposed to learn how to do that—trial and error after you’re married doesn’t work out so well?!

And that’s the really cool things God showed me: That’s what these teenage romantic feelings are for. There is a reason He designed them to come early! There’s something

Saturday, February 2, 2013

When Was the Earth Itself Created?

The Bible says:

“In the beginning God created the heaven and the earth. And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of God moved upon the face of the waters. And God said, Let there be light: and there was light.” Genesis 1:1-3:

When you read this, you see some interesting things pre-existing the light God created light on day 1 of creation. There was an earth that was “without form and void” and there was water that the “Spirit of God moved upon”.

How long was the earth without form and void? How long did this water exist? Some suggest this could have been millions of years, explaining the supposed geologic age of

The Sabbath A Perpetual Sign—Part 4

By Joseph Bates (adapted)

The Spirit of God directed Moses to write that God “blessed the seventh day” of creation, “and sanctified it, because that in it he had rested (Hebrew: shabath) from all his work”. This shows that the Sabbath has existed from that very day.
(Genesis 2:2-3). See also Exodus 5:5, 16:30, 23:12, 31:16-17, 34: 21 for uses of shabath.

The Bible is just as clear that the “Sabbath” was created on the seventh day, as it is that “man” was created on the sixth day.

Wouldn’t it be absurd to try and prove that Adam was not created in the beginning, but that He came into existence at Sinai? And yet that is just as logical as trying to

Saturday, December 31, 2011

The Sabbath A Perpetual Sign—Part 3

By Joseph Bates (adapted)

If the Sabbath was not instituted in Eden, why would Moses mention it in his account of the creation of the world? Why not appropriately reserve mentioning it for two or three-thousand years in his history, until the time when manna fell in the wilderness? (See Exodus 16:23.) Then he could state that this was the institution of the seventh-day Sabbath.

I answer (and for the very best of reasons), that he didn't do that, because the Sabbath wasn’t instituted when the manna fell!

Let’s look at that text: “And it came to pass, that on the sixth day they gathered twice

Thursday, December 29, 2011

God’s Covenants With Man—Part 4

Part 1Part 2Part 3Part 4

Under the Law

Then what of the Old Covenant? Does it serve any purpose at all today?

The Old Covenant stands as a warning to us—showing us the folly of trying to live under the law—something that the New Testament spends much time teaching us:

“Tell me, ye that desire to be under the law, do ye not hear the law?” Galatians 4:21.

Under the Old Covenant, Israel was dependent on the law to declare that they were

Sunday, December 4, 2011

God’s Covenants With Man—Part 3

Part 1Part 2Part 3 Part 4

Ratified Covenant

Paul makes an important point about covenants in Galatians 3:15:

“Brethren, I speak after the manner of men; Though it be but a man’s covenant, yet if it be confirmed, no man disannulleth, or addeth thereto.”

Before a covenant is ratified, you can make changes to it. You can add things to it, and you can take them away from it again. Up until the point it is ratified. Once the blood has been shed in ratification of the covenant you cannot disannul any part of it, or add anything to it.

Since the Old Covenant was ratified in Exodus 24:8, nothing could be added to it or