Refactoring and Being Refactored

Before I go too far down the road with this blog, some basic terminology and concepts should probably be explained.

First offrefactorMenu, what is meant by “refactoring”? From Refactor.com: refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. Its heart is a series of small behavior-preserving transformations.

Refactoring code isn’t the same as rewriting it, though eventually every line may be changed over time, with many added or better yet, removed. Every line of code in a system is a liability, a potential bug waiting to happen, so good code should be simple, clean, and clear. Whenever code starts to “stink” or becomes “spaghetti-ish”, it’s due for refactoring — especially if you were the developer who wrote it in the first place!

Refactoring is typically done in a series of many tiny steps — a property renamed here, a method signature simplified there. Good software development practices utilize unit tests or behavioral tests that automatically run whenever the code changes.a14e95a146b14a47300d8a9df5bdf4fb75d75c1e_large The process starts from a “green” condition in which all the tests pass before refactoring begins. If the tests break (the dreaded “red” condition) from refactoring, the code is modified until all the tests pass again. Sounds simple right? Usually it is, but sometimes it isn’t, especially in more complex systems involving thousands of tests and hundreds of classes. Sometimes tests are added or hardened to make sure the software is really doing what it should be doing.

Refactoring isn’t simply something that can be done whenever a good developer feels like it — it’s a necessity. Refactoring is something that MUST be done to keep the code-base maintainable and extensible. If there’s a feature or chunk of code that’s overly complicated, fragile, or that everyone’s simply terrified of touching, that’s a good indication that it should be refactored. It’s a discipline, an art, the craft of a master. You can always tell code that’s been refactored because it’s clear, concise, readable, and elegant. Good code to a developer is just like a good book is to librarian.

So what does that have to do with life or anything outside the “exciting” world of software development? Quite a lot, actually! God’s work in our lives looks remarkably similar to the refactoring process. When we become saved, He puts His Spirit inside us, and then sets about sanctifying — or refactoring — us.

Picture God looking over the “code” that comprises us on the inside and He sees something that stinks, a big ole mess of spaghetti-goo deep inside our souls. So being the Perfect Architect of our souls that He is, He sets out to fix it — and fix it right. He wants our code (our heart, character, soul) to be clean, clear, concise, and very readable.

How does He do that? How does He go about “refactoring” us? He allows or even orchestrates change and trials to come into our lives and then goes about the refactoring process. tornado_storm_on_highway-otherSometimes, He’ll add a test here or tweak something there and suddenly everything in our lives turns “red” and blows up, and we abruptly find ourselves facing trials and suffering. From our perspective, the world is falling apart and we’ll never get back to that wonderful “green” condition.

But is that really happening, or is it just God refactoring us? What if it’s just Him changing us little by little from the inside out, even though our outward appearance remains unchanged? A poor habit fixed here, a bad attitude corrected there. At times, He may even rip things up to make deep, significant changes.

Sometimes His refactoring of us can take quite a while, particularly when we’re stubborn, impatient, and stiff-necked. We won’t always see Him working and sometimes it feels like He isn’t doing much of anything at all. But He is! Time is one of those tools He uses best to mold, shape, and refactor us. He frequently uses time to soften what needs to be softened, harden what needs to be hardened, and knock those dozens of rough edges off. As the only one who can see the End from the Beginning, He knows precisely how to use time as His refactoring instrument.

So what are we to do while God’s refactoring us? Yield to Him. Follow Him. Walk with Him. Be faithful and hold fast to Him and His Word, potters_wheel_clay_sculpt_221395and let Him keep
doing whatever it is that He’s doing. He is the Potter and we are the clay (Isaiah 64:8). How are we to even know what the Divine Potter might be shaping us into?

Though it may be terribly painful and heartbreaking, raging against those failing tests or fighting against those difficult trials won’t make the refactoring process go any easier or faster — they’re just doing what He intends them to do. He means to build us up, not tear us down; to strengthen us, not weaken us; to purify us, not sully us. He means to refactor us into vessels that please Him.

Behold what manner of love the Father has bestowed on us, that we should be called children of God! Beloved, now we are children of God; and it has not yet been revealed what we shall be, but we know that when He is revealed, we shall be like Him, for we shall see Him as He is. And everyone who has this hope in Him purifies himself, just as He is pure. (1 John 3:1a,2-3)

Posted in Christian-life, New Beginnings, Refactoring, Software | Tagged , , , , , , | Leave a comment

Sunday: a Day of Rest?!?!

It’s Sunday morning, and though I should have slept in at least to my normal time, I awoke at 3am and wasn’t able to get back to sleep. Most mornings, one of the cats (Romeo) starts howling for breakfast around 5:30 and won’t be placated until he’s fed. He’s adorable but quite insistent on eating at that specific time. Ugh…cats!!

Usually I can get back to sleep without much trouble, but today it got me thinking about whether or not Sunday is really a “day of rest” for most Christians. That’s what 3 hours of sleep tends to do — make the mind wander all over the place and question reality a little. Most weeks Sunday feels like just another weekend day to have fun together, knock items off the to-do list, or catch up on those never-ending errands. How many of us really REST — as in stop running around, stop the normal routine, stop trying to catch-up, disconnect from everything, and connect with God and our families?

For Christian parents with young children — especially single parents — most Sundays are anything but restful! Sometimes Sundays are the worst day of the week for overwhelmed parents! When our children were very little, we stopped attending church for a time because we were just plain worn out by the end of the week and Sunday had become just another day to check something off the unwritten “Good Christian” list rather than be a day of rest. We bathed, dressed, fed, and corralled the children all the way to church but were too harried and frayed by that time to worship (or even stay awake half the time). Throw in lunch after church and other stuff, and it would be late Sunday afternoon before we’d be back home and slow down. Then few hours later, it would be time to prepare for Monday morning and another busy week. No wonder so many people are worn down and stressed out!

Who’s idea was the Sabbath anyway? Wasn’t it God’s from the very beginning? Wouldn’t the Creator know better what we really need than we do? Did God really need to rest after creating everything? Was He tired and needed a break? Probably not, but He rested on the Sabbath as an example to us. He knew everything He created needed to rest so He rested Himself to set the pattern for us:

Exodus 20:11 For in six days the Lord made the heavens and the earth, the sea, and all that is in them, and rested the seventh day. Therefore the Lord blessed the Sabbath day and hallowed it.

And later when He gave the Law to Moses and the Israelites, taking one day off to rest wasn’t a suggestion but a commandment, and is even one of the Ten Commandments. He takes it so seriously that violating the Sabbath was punishable by death! (Exodus 31:15). God’s original purpose of the Sabbath was for mankind to REST, as in STOP DOING STUFF and stop running around. Don’t leave the house. Don’t pass “GO” and certainly don’t collect $200.

Exodus 16: 27 Now it happened that some of the people went out on the seventh day to gather, but they found none. 28 And the Lord said to Moses, “How long do you refuse to keep My commandments and My laws? 29 See! For the Lord has given you the Sabbath; therefore He gives you on the sixth day bread for two days. Let every man remain in his place; let no man go out of his place on the seventh day.” 30 So the people rested on the seventh day.

I spent two weeks in Israel volunteering on an IDF supply-base earlier this summer. It was my third trip there and their observance of the Sabbath (Shabbat in Hebrew) always throws me for a loop that first weekend. Shabbat begins on Friday at sundown and goes until just after sundown on Saturday. Practically eYomKippurTelAvivverything shuts down (including many of the elevators), though not nearly as dramatically as on Yom Kippur, when literally the entire nation comes to a screeching halt. Every store is closed, all freeways are empty, and everything stops for 24 hours. Most do not cook on Shabbat and it’s spent with friends and family at the beach, parks, picnics, synagogue, etc. It is spent resting, reconnecting, and recharging. And it’s mandatory.

Americans on the other hand, have a very hard time slowing down. We tend to try to out-do everyone else, even with our vacations and weekends. Weekends tend to be for adventures and hobbies and catching up on everything we didn’t get done from the week before. We seldom seem to really rest — we always have to be doing SOMETHING as opposed to doing NOTHING. Doing nothing is harder for us than it might seem at times and can be difficult to stop unless we’re absolutely forced to. Especially when there’s a ton to do and things to get caught up on (the laundry and those errands aren’t going to do themselves, after all!), it’s so easy to steal some rest time from Sunday just to get caught up a little on Monday thru Saturday.

May I suggest that we stop stealing time from Sunday (or whatever day of the week we set aside for rest) and actually REST as our Creator intended? We are blessed with not merely 2 but 7.5 glorious weeks of vacation — 1 day a week — from God Himself to rest, recharge, and reconnect with Him and our loved ones. How about we actually observe and respect it as He commanded?

Pssst — it’s okay to sleep in one day a week AND take a long nap AND go to bed early. And if that means skipping church from time-to-time or better yet, going on Saturday night instead so we can sleep in on Sunday morning, how about we do it? I know, I know — heresy!! But seriously, how about we force ourselves to stop running around just one day a week and be still? God set aside one day a week, every week of the year, for us to rest and slow down. We just have to accept that gift and give ourselves a break for a change!

Posted in Christian-life, Refactoring, Rest | Tagged , , , , , , | Leave a comment

New Beginnings and a New (old) Blog

Welcome to the “Being Refactored” blog, which was formerly known as the “Fiction and Software” blog for Chris Hambleton (that’s me!). I’ve been meaning to change things up a bit for awhile and today was the day!

Though I’ve had this blog since 2007, I’ve never really done much with it except post new book releases, miscellaneous tips about writing, and information about some of the software I’ve written, namely BookBlitzer (may it rest in peace) and iWriterPro. If I may say so, the old blog was quite dry and boring, and was a great sleeping-aid.

p1010445

Since this year has been filled with big endings and new starts in my personal life, I’ve been combing through a lot of my offline (and online) clutter and this blog was on the list. After all the shakeups recently, I figure it’s time to try out blogging — REAL blogging — for a change.

To get started, my name is Chris Hambleton and I’ve lived near Denver, Colorado since 2000. I’m employed as a software developer and am currently working on my 20th book, “Fountains of the Deep”. Between the two, I spend a lot of time at the keyboard…waaaay too much time at the keyboard. Therefore, most of my hobbies and other activities are purposely offline, namely travelling, hiking, running, volunteering, music, and literally devouring good fiction books.

I’m recently divorced (hence the big personal shakeups) and am the proud father of two teenage girls who are growing up much too fast. I deeply love the Lord and seek to honor Him with my walk, work, writing, and personal life.

The new and improved title of this blog is “Being Refactored” because it’s exactly what’s happening to me at this point in my life: being refactored. Being remade. Becoming a new person by being molded and shaped by the Potter.

My hope is that this blog can be a blessing to you and that I can pass on some of the wisdom and insights I’ve learned (the hard way) from the last few years of this rocky road called “Life.” It’s been bumpy and will probably get bumpier — but it’ll be a heckuva ride!

Posted in New Beginnings, Personal, Refactoring, Writing | Tagged , , , , | 2 Comments

The Sons of Liberty Trilogy is Now Available!

The Sons of Liberty Trilogy

The Sons of Liberty Trilogy

Now available on the Kindle!

My latest novel is ready for download at http://www.amazon.com/dp/B00ZNTCJPC!

The trilogy consist of three books (in order): “The Convention”, “The Green Zone”, and “The Declaration”.

The idea for the trilogy was introduced in my third book back in 2010 called “The Cell – Twilight’s Last Gleaming.” The events in the trilogy take place several years before “The Cell” and set the stage for the America portrayed in it.

The synopsis for the entire trilogy is:

After six years of a failed presidency, the United States of America teeters on the brink of another collapse – not another economic collapse, but a collapse of confidence in leadership. The healthcare system is in ruins, the borders are undefended against terrorists, the national debt is spiraling out of control, and the political system has grown increasingly disconnected from the American people.

When the federal government shuts down over another budget conflict, a group called the Sons of Liberty issues an ultimatum to the Capitol to get their act together – or else. If the House, the Senate, and the President cannot resolve their differences and rein in the out-of-control spending and bureaucracy, violent action will be taken. After the first shot is fired between Homeland Security and the Sons of Liberty, the powder-keg brewing at the capital explodes.

As the conflict between Washington and the rest of the country begins to spiral out of control, a group of state legislators sets out to hold a Convention of States in hopes of pulling the nation back from a civil war..

The trilogy is also available for the Nook and in paperback format.

Posted in Uncategorized | Leave a comment

The Declaration is Available!

The Declaration

The Declaration

Now available on the Kindle!

My latest novel is ready for download at http://www.amazon.com/dp/B00ZNTD2P8!

“The Declaration” is the last book in “The Sons of Liberty Trilogy.” The trilogy consists of three books (in order): “The Convention”, “The Green Zone”, and “The Declaration”.

The idea for this trilogy was introduced in my third book back in 2010 called “The Cell – Twilight’s Last Gleaming.” The events in the trilogy take place several years before “The Cell” and set the stage for the America portrayed in it. Consequently, “The Cell” will be revised and re-released later this year to reflect several of the significant changes in this trilogy.

The synopsis for the book is:

The Sons of Liberty have been defeated. The Capitol is once again secure. The Ultimatum against the entrenched corruption in the Capitol has been cast aside. The effort to reform Washington, D.C. and reclaim liberty has been crushed.

In the hallowed halls of the Capitol Hill, the Senate Majority Leader dusts off a comprehensive gun-control bill and prepares to resurrect it. The Keep Our Streets Safe Act would permanently secure the country and ensure that dangerous groups like the Sons of Liberty would never rise again.

And in the White House, the senior adviser to the first female President begins planning her reelection and continues the fundamental transformation of the United States of America.

The book is also available on the Nook and in paperback format.

Posted in Uncategorized | Leave a comment

The Green Zone is Now Available!

The Green Zone

The Green Zone

Now available on the Kindle!

My latest novel (“The Green Zone”) is ready for download at Amazon.com! The book has also been released to the Nook and in paperback format just in time for Christmas!

“The Green Zone” and is the second book in “The Sons of Liberty Trilogy.” The trilogy consists of three books (in order): “The Convention”, “The Green Zone”, and “The Declaration”.

The synopsis for the book is:

The Article V movement has been crushed and the Convention of States that it spawned has been dissolved. The organizers of the movement have been rounded up by Homeland Security or driven underground. Any chance for a peaceful redress of grievances from the federal government is over.

As any hope for political reforms of the Washington leviathan fade, the Sons of Liberty take matters into their own hands and renew their Ultimatum. If the terms of the Ultimatum to rein in the tyranny are not enacted by ballot, then they will be by bullet. With an isolated, out-of-touch president coasting through his seventh year in office, the Sons of Liberty set out to make his last few years in office the worst in American history.

But as the Sons of Liberty begin removing the tyrants from office, another group begins sweeping through the capital, and before long Washington falls under siege. Can Washington, D.C. survive as all-out war breaks out on her streets?

“The Declaration” (Book 3) will be released in the first half of 2016.

Posted in Uncategorized | Leave a comment

Introducing Kindle Singles!

Kindle Singles are a new line of books which are excerpts, portions, and condensed versions of the other available full-length titles.

Available Kindle Singles!


Job and the Ice Age

America at the Crossroads

Abraham and the Great Pyramid

Nearing the Tribulation

Who is Barack Obama?

Barack Obama vs The Founders

America Divided

Who are Americans?

Restoring the Republic

Israel Regathered

Islam vs Israel

The Russian Invasion

All Singles are priced at $0.99 on Amazon!

Posted in Uncategorized | Leave a comment

“The Convention” is now available!

The Convention

The Convention

Now available on the Kindle!

My latest novel is ready for download at http://www.amazon.com/dp/B00MJOVLD0!

The book is called “The Convention” and is the first book in “The Sons of Liberty Trilogy.” The trilogy will consist of three books (in order): “The Convention”, “The Green Zone”, and “The Declaration”.

The idea for new trilogy was introduced in my third book back in 2010 called “The Cell – Twilight’s Last Gleaming.” The events in the trilogy take place several years before “The Cell” and set the stage for the America portrayed in it.

The synopsis for the book is:

After six years of a failed presidency, the United States of America teeters on the brink of another collapse – not another economic collapse, but a collapse of confidence in leadership. The healthcare system is in ruins, the borders are undefended against terrorists, the national debt is spiraling out of control, and the political system has grown increasingly disconnected from the American people.

When the federal government shuts down over another budget conflict, a group called the Sons of Liberty issues an ultimatum to the Capitol to get their act together – or else. If the House, the Senate, and the President cannot resolve their differences and rein in the out-of-control spending and bureaucracy, violent action will be taken. After the first shot is fired between Homeland Security and the Sons of Liberty, the powder-keg brewing at the capital explodes.

As the conflict between Washington and the rest of the country begins to spiral out of control, a group of state legislators sets out to hold a Convention of States in hopes of pulling the nation back from a civil war..

The book will be released to the Nook and in paperback format later this Fall.

Posted in Uncategorized | Leave a comment

Introducing “The Sons of Liberty Trilogy”!

Coming soon to a Kindle/Nook/iPad near you!

After entering the latter stages of editing the draft of “The Green Zone”, I realized that the manuscript was rather large (130,000+ words) and decided that it would be better as a trilogy. After going back and forth for a few days, I took the plunge and split the manuscript up.

The new trilogy will consist of three books (in order): “The Convention”, “The Green Zone”, and “The Declaration”.

The idea for new trilogy was introduced in my third book back in 2010 called “The Cell – Twilight’s Last Gleaming.” The events in the new trilogy take place several years before “The Cell” and set the stage for the America portrayed in it.

The overall synopsis for “The Sons of Liberty Trilogy” is:

After six years of a failed presidency, the United States of America teeters on the brink of another collapse – not another economic collapse, but a collapse of confidence in leadership. The healthcare system is in ruins, the borders are undefended against terrorists, the deficits and national debt are spiraling out of control, and the political system has grown increasingly unstable.

When the federal government shuts down over another budget conflict, a group called the Sons of Liberty issues an ultimatum to the Capitol to get their act together – or else. If the House, the Senate, and White House can’t resolve their differences and rein in the out-of-control bureaucracy, violent action will be taken. After the first shot is fired between Homeland Security and the Sons of Liberty, the capital erupts in violence.

As Washington, D.C. descends into chaos, a group of state legislators set out to hold a Convention of States in hopes of pulling the nation back from a rising civil war.

The first book (“The Convention”) is slated to be available on the Nook, Kindle, and iPad late in the Summer of 2014.

Posted in Uncategorized | Leave a comment

“Out of the Whirlwind” is now available!

Out of the Whirlwind

Out of the Whirlwind

Now available on the Kindle!

My latest novel is ready for download! The book is called “Out of the Whirlwind”, an expanded account of the story of Job.

The synopsis for the book is:

History demonstrates that man learns nothing from history. The Flood has ended and has left behind an empty, new world eager to be replenished. After the Great Scattering at Babel, the tribes of Noah’s three sons have been forced to migrate to every corner of the earth. Yet the old struggles, the old disputes, and the old questions remain.

Fifty years after Babel, the fledgling clan of Joktan has settled in the fertile grasslands of Uz to the west of Shinar and slowly begins to take root, but some of his sons are impatient to acquire honor, and lands of their own – and gold. With endless fields and pastures to fill their days, their future looks rather bleak. And then they meet a trader who tells of mines and rivers glittering with gold.

After learning that two of his brothers have forsaken their clan for the fabled mines of the South, a young boy named Job chases after them in what will begin the greatest adventure of his life. And during his adventures and trials, Job will discover the answer to the question that has plagued mankind since the Beginning.

The book will be released to the Nook and in paperback format later this Spring.

Posted in Uncategorized | 2 Comments