Category: Refactoring

  • Being Fleshed Out – Emergent Design

    Being Fleshed Out – Emergent Design

    In our latest adventure at work, we’re racing headlong and headfirst down the road of “emergent design” in Agile software development. We’re learning how to “fail fast and fail often” the hard way, and it’s been a challenge to determine whether we’re failing “correctly” — if there really is such a thing!

    Traditionally, software was developed in some form of “waterfall process” in which a relatively firm set of requirements were defined by sales or marketing, which then flowed down to engineering who then designed, developed, and tested the product. The product was usually well-defined, designed, developed, waterfalland tested with long-term considerations in mind, and wasn’t released (usually) until sales/marketing had received the product or feature they wanted. Then the entire process would start over with the next set of marketing requirements flowing down from on “high” again.

    Unfortunately, the problem with the waterfall process is that it’s often slow, cumbersome, filled with latency/bottlenecks, and the products can become quickly outdated and often difficult to maintain over time. Sometimes the market is simply changing faster than the company can keep up with, and the product has become irrelevant before it’s even released. In certain markets, the product has become outdated even before the requirements are finished being written! Most software products are like any other perishable product: they have a certain shelf-life of a few years (or months!) and then they’ve lost their usefulness. In the worst cases, it’s like trying to bake a batch of cookies in which the ingredients expire before they’re done being mixed!

    One of the more popular alternatives to the waterfall process is emergent design, in which the software development life-cycle is greatly shortened but sped up, and the product rapidly “emerges” in a series of small steps instead of one big release. In the end, the same product may be made available, but the user-base sees the product or feature evolve in a series of frequent steps with more functionality being added every few weeks instead of several months — or longer.

    From Wikipedia (the final authority of all that is known on the Internet), “With emergent design, a development organization starts delivering functionality and lets the design emerge. Development will take a piece of functionality A and implement it using best practices and proper test coverage and then move on to delivering functionality B. Once B is built, or while it is being built, the organization will look at what A and B have in common and refactor out the commonality, allowing the design to emerge. This process continues as the organization continually delivers functionality. At the end of an agile release cycle, development is left with the smallest set of the design needed, as opposed to the design that could have been anticipated in advance. The end result is a simpler design with a smaller code base, which is more easily understood and maintained and naturally has less room for defects.”

    While I’m still getting used to working in the emergent design world, I can see its benefits — and it’s drawbacks. The product/features receive frequent feedback from the user-base and the software changes to meet their needs and/or demands accordingly. Emergent design gets a larger user-base involved in shaping the product earlier and more often rather than at the beginning and end of the process. However, while emergent design does solve some problems, it also causes some that could be avoided with the moreRaw-cookie-dough traditional waterfall process, namely in the design phase. Going back to the cookies example, sometimes emergent design feels like you’re trying to bake a batch of cookies in which there’s no written recipe (just general guidelines) and the batter is being mixed by trial and error! Not only that, but the recipe is being continually refined based upon your kids’ taste-buds at any given moment!

    I hate having to do a job twice – especially jobs that I’ve put a lot of time and effort and heart into. I was taught that if you have to do something twice, then you didn’t do it right the first time. I dislike writing “disposable” code, functionality that I know will likely be thrown away in a few months or even weeks! It’s one thing to write code in such a way as to prepare for new features you know will be coming soon, but quite another to write code that you know will be deleted or never even seen by the users!

    Needless to say, that’s become a big part of my job over the last year or so – continually reworking and refactoring roughly the same code over and over again. A tweak here, a tweak there, with sometimes an ugly gutting of all the innards and practically starting over. While I understand and mostly agree with the new process, sometimes emergent design goes against every common-sense software-development bone in my body! Before we code up something, how about we slow down for a minute and make a good design that will last longer? Instead of swinging from one extreme (waterfall) to the other (emergent), can’t we come up with a happy medium somewhere in between?

    In both worlds, the user-stories/requirements change and the software has to be modified accordingly. Customer A likes this feature but Customer B doesn’t, so we try to find a way to make both happy. In emergent design, the process is sped up and both customers end up getting a portion of what they really want. They may want a Cadillac, but they have to settle for a 10-speed, then a Kia, and then a Lexus (if they’re lucky). The software doesn’t necessarily become better and better as much as different and more inline with what the customers want (or can somewhat agree to), though that often changes over time too. I’ve been working on this project from Line 1 on Day One and while it’s continually changing, it’s not always evolving in a certain defined direction as much as being more “fleshed out” as time goes on.

    Maybe that’s the way it is with us – maybe we’re not always improving in any tangible, particular ways as much as being stretched, deepened, thickened, and being more fleshed out. Circumstances outside our control change and we have to respond accordingly. People are constantly coming and going, feeling, responding, changing, and affecting us (for good or bad). Maybe we who are being molded and shaped by the Divine Potter don’t always become better and better in the way we think we should be as much as different and more inline with what He requires of us at that particular point in time, though that often changes too.

    Maybe it’s more important to be walking with God along this long, winding, and bumpy road — wherever He may be leading us — than it is to get to what we think should be our position or destination as quickly and directly as we can. We like all those shortcuts to make things faster and easier on ourselves more than how the long, difficult journey will prove our character and faith — but He doesn’t. I think He is much more concerned with how we’re responding to Him and those around us at any given moment and seeing us draw closer to Him with every step along the way. I think He’s more concerned with how we emerge from our circumstances and how we conform to Him than anything else.

    windingpath

    Maybe God is more concerned with our character and how it’s being shaped day-in and day-out than how quickly and easily we get Home, because that’s already been assured once we become part of His Family. He expects us to get battered, bruised, and calloused along the way, doesn’t He? After all, those blisters prove we’ve been walking a long way for a long time, don’t they? He expects us to live fully and take risks just like the men the shrewd master entrusted his talents to (Matthew 25:14-30). He’s already promised to bring us Home and be with us all along the way on this Journey, but He hasn’t said much about the ardors of the Journey itself!

    Though our lives and our walk may indeed resemble software being written by “emergent design”, we can trust that the Potter knows exactly what He’s doing and that He’s shaping all of us precisely how He wants us to be not only at any given moment, but the final product of our lives.

    Now to Him who is able to keep you from stumbling, and to present you faultless before the presence of His glory with exceeding joy, to God our Savior, Who alone is wise, be glory and majesty, dominion and power, both now and forever. Amen. — Jude 24-25

  • Life is Short… Walk with God

    Life is Short… Walk with God

    ashley-madisonAshley Madison — the scandal that just won’t go away. Though the Ashley Madison hack/scandal is already a few months old, the repercussions continue to be felt throughout the corporate and religious world. The most recent update is that Gawker has released the photos that Josh Duggar used in his profile. The hackers have even published a site to allow anyone to search the database; evidently 30+ million users is rather tedious to dig through.

    The latest Christian leader to be affected is R.C. Sproul, Jr, who has been suspended for the next year for accessing (though not joining) the site. I can’t help but observe that the media-hounds continue to be rather gleeful about digging up dirt on corporate, conservative, and Christian leaders (the three big “C”s) on their hit-list. Notice that the same media doesn’t seem very interested in exposing nonprofits, liberals, or atheist leaders, but that’s another story. Their objective, diligent search for the truth is rather biased just given who they’re choosing to focus on: their political adversaries (i.e., enemies).

    Have you ever noticed how the truth always manages to come out? It doesn’t matter how carefully something is hidden, the truth is always, always, ALWAYS eventually uncovered? Somehow the truth always manages to wiggle, squirm, or erupt to the surface sooner or later. There’s always that one witness that comes forward years after the fact, those secret papers are found, or those lost tapes are recovered that reveal the truth about what really happened. There’s even those infamous death-bed confessions at the last possible moment.

    Why, it’s almost as if there’s a spiritual-law at work with regards to exposing the truth, along with the law of “sowing and reaping” (whatever you sow, you will reap more of later). Perhaps it’s because there is such a law as Jesus mentions in Luke 12:2-3:

    “But there is nothing covered up that will not be revealed, and hidden that will not be known. “Accordingly, whatever you have said in the dark will be heard in the light, and what you have whispered in the inner rooms will be proclaimed upon the housetops.”

    The Bible says that whatever is hidden will be revealed. Now, the truth may take awhile and might come out in an entirely unexpected way, imagesbut the God of the universe reigns and exposes secrets, lies, and cover-ups for what they usually are: sin. He hears everything, sees everything, and knows everything — even the tiniest thoughts of your heart. Recall David’s sin with Bathsheba and the subsequent cover-up in which her husband was murdered; he would’ve gotten away with it if God hadn’t told Nathan the Prophet who marched into the throne-room and stuck his finger in the king’s face!

    Like most Christian parents, I regularly pray for my children — for their character, their health and well-being, and their relationship with God. Something I also pray for is that their sins will be uncovered and brought to light, so  we can work through them. Now, I could snoop, harass, or interrogate them, but kids are clever and are just as good as hiding things as we are. It’s much better just to simply pray and leave it up to God to bring them to light in His own way and in His own timing.

    Mistakes and sins that are buried, ignored, or glossed over are rarely learned from, but they never really go away, do they? Sometimes it may take years for them to be brought to the surface, but be assured that sooner or later sin must be dealt with, either in this life or the next! When we fall into sin and royally screw up, we have a choice: we can bring our sins to light ourselves, confess them to God — and those we’ve wronged — and finally put them to rest, or we can let the Master do it for us in His own time and in His own way. However, the problem with delaying those inevitable consequences often becomes much, much worse!

    You cannot hide your sin and you cannot hide from its consequences and repercussions, which often have a way of compounding themselves over time. Make no mistake — God is not mocked (Galatians 6:7). Compounded consequences are much, much worse than compounded interest and often accumulate at faster rates! Because of David’s sin, the “sword” never left his house (2 Samuel 12:10), and his children, grandchildren, and subsequent generations felt the consequences of his tryst and the attempted cover-up.

    Not only can we be assured that our sins will someday be revealed in all their filth and shamefulness, but we won’t know how, when, or with who that will happen if we don’t deal with them speedily (and preferably on our own terms!). Whatever you did may be scandalous, but it doesn’t have to turn into a scandal unless you try to bury it. Some people think they can somehow bury the truth deep, deep down and escape the consequences — which they may succeed in for awhile — but it won’t lie buried forever. The truth never really dies; it just patiently waits there in the dirt. Meanwhile, it’s also always there inside you, festering and gnawing at the back of your mind like the raven from Edgar Allen Poe’s poem.

    winding

    What would the impact of the Ashley Madison scandal had been on R.C. Sproul, Jr. have been if he had confessed his sin a year ago when he had visited the site — before the scandal broke? Would he still have been suspended? Perhaps, but maybe not for a year because the incident would not have been made public. Whatever is hidden will be revealed, and the truth always comes out one way or another.

    Ashley Madison’s tagline is “Life is short…Have an affair.” How about we each have our own personal tagline that’s infinitely better (and with infinitely fewer repercussions!):

    “Life is short…Walk with God.”

    Confess your sins early — even those humiliating, shameful ones. Take your lumps before they become mountains that will crush you. Keep short accounts between you and God, and you and those you love. Settle those accounts before the interest has compounded into an unfathomable sum. Though our sins have been forgiven, we often cannot escape their consequences in this life.

    Walk with God. Be strong and courageous. Live with integrity. Do your best to live without regrets. Take the narrow, difficult road. Pursue God and the stuff that lasts such as peace, joy, and love. Sow to the Spirit instead of the flesh and always guard your heart.

    You’ll never be sorry.

    “But the fruit of the Spirit is love, joy, peace, long-suffering, kindness, goodness, faithfulness, gentleness, self-control. Against such there is no law.” — Galatians 5:22-23

  • Iteration Retros – The Airing of Grievances

    Iteration Retros – The Airing of Grievances

    One of the better team practices in software development is to hold retrospectives after every development cycle (iteration, sprint, release, etc.). Iteration retros give the team an opportunity to review the user-stories (requirements) that were completed and discuss ways of improving the next development cycle so the same mistakes aren’t repeated.

    The usual format is to review the iteration and then have the team discuss what went right, what went wrong, and what we could do better. When iterations go well, the meetings are relatively low-key, complimentary, and productive. However, when iterations go poorly — or are downright disastrous — the retros turn into more like Frank Costanza’s infamous “Airing of Grievances” on Festivus: “I’ve got a LOT of problems with you people, and now you’re gonna hear about it!!”

    frank-costanzaAt first, we used to just chime in whenever we wanted during the retro, but that often got out of hand because the more outspoken members of the team would drown the quieter ones out (like me). Now we pass around the microphone — a magic-marker — so that everyone gets a chance to give their perspective and opinion with minimal interruption. While the retros have improved, it might help for some of our team members to take the cap off the marker before their grievances are aired (including myself)!

    Some of the typical questions in these retros are: “What went well?” “What didn’t?” “What absolutely sucked?” “How did it blow up and why?” “What can we do better?” “How can we work better as a team?” The purpose of these questions isn’t to criticize or lay blame, but to learn from our mistakes and make the next iteration better — and improve the team.

    Along with improving communication, another change to the retros over the last year was a dramatic reduction in the length of the meeting. Our iterations used to last 5-6 weeks and the retro took between 6-8 hours, since we would also plan the next iteration after the retro. While it was nice to get a break from the normal routine, meetings that last that long don’t make for a very fun (or productive) day. A year ago, we changed over to two-week iterations and now the retros have been chopped down to 3-hours, including planning the next one.

    In several of those meetings (particularly when they lasted 6-8 hours), it made me consider about how rarely I’ve had similar meetings with my own family, the most important “team” in my life! If retros are good practice for iterations, releases, and other big projects at work, shouldn’t they be just as important for our marriages and families (if not more so)?

    In an Agile development environment, we are trained to embrace change and adapt rapidly to changing variables and requirements. Everything is always shifting, changing, and being reprioritized — just like in our families. For whatever reason, we tend to be slower to embrace change in our personal lives than in our professional ones, even though the various demands of marriage and parenting are constantly shifting and changing too, and stress-levels are often running just as high as they do at work — or higher!

    How often do we take a timeout to check-in with everyone on our “home team” and let them really speak their minds (even the toddlers)? Sure, there’s weekends and vacations and fun times togther, but there was rarely a time specifically set aside for reflection as a family for the sole purpose of improving the team and growing together. How often do we admit to blowing it in front of our loved ones and really ask for forgiveness? How many families and marriages could be saved by holding such retros on a regular basis? Who knows? Maybe mine could have been…

    While family devotions can be awkward and difficult (if not downright impossible), maybe having regular family “retros” every two weeks wouldn’t be as tough, though they may need to be dressed up a bit or repackaged to mitigate the “wailing and gnashing of teeth” from the teenagers. Such family retros would give everyone an opportunity to confess their screw-ups and really foster communication with one another in a productive way, in a time that’s been specifically set aside for doing so instead of the typical spur-of-the-moment ones.

    James 5:16 says, “Confess your trespasses to one another and pray for one another, that you may be healed. The effective, fervent prayer of a righteous man avails much.” Confessing our sins to others is never easy, particularly parents to their kids, but it’s a great opportunity to model asking for forgiveness and forgiving those who are closest to us. Kids remember just about everything (except the dishes, trash, etc.), especially when we fathers confess that we blew it and need their forgiveness. Forgiveness must be modeled, not simply assumed or taken for granted. Grace, faith, and love must be modeled over and over to cultivate a home based upon those three fundamental elements.

    Maybe hold a family night-out a local pizza-joint that you don’t usually go to and make that the retro “meeting” place. Maybe every two weeks, the entire family takes time out from the crazy schedule, gathers around a table, and gets to constructively air their grievances for a little while, and then discusses how to make things better.

    Maybe reviewing the highs and lows of the last two weeks would work wonders in our homes. Maybe asking those tough-but-necessary questions would really help us grow closer, questions such as: “What bugs you?” “How can we improve living together?” “How can we respond better in a particular situation?” “How can we do better with money?” “How can we do better with chores, errands, and other stuff?” “How can we become better parents, friends, and partners?” “What is one way we can make our family stronger, closer, more forgiving, and more loving?” “What is our plan for improvement over the next two weeks?”

    serenitynow

    Frank Costanza would’ve loved those bi-weekly family retros. (George and his mother, probably not so much!) Maybe if he had been able to speak his mind more than once a year right before Christmas, he wouldn’t have lost it and screamed “Serenity NOW!!” so often! And we ALL know where “Serenity Now!” leads to: “Insanity Later!”

    “Let your speech always be with grace, seasoned with salt, that you may know how you ought to answer each one.” — Colossians 4:6

  • Being Thankful for Unanswered Prayers??

    Being Thankful for Unanswered Prayers??

    Something that’s been on my mind quite a bit lately is the matter of unanswered prayers. Most of us spend so much time and energy on how badly we want our prayers to be answered that we don’t think about all those prayers He chooses to leave “unanswered” — which are all-too-often forgotten over the course of our lives.

    I suppose it all began a few weeks ago when I stumbled upon a couple songs that my old roommate in college used to play in our apartment. Much of it was the 70’s/80’s rock music like from Queen and such, but there was one song in particular in his playlist called “Unanswered Prayers” by Garth Brooks that I remember rather vividly. I think what made it really stand out to me was that my roommate didn’t seem to be particularly religious  at the time, and he certainly wasn’t much into Country music, especially in the early 90’s!

    Anyway, there’s a surprising amount of depth to that old Garth Brooks’ song, particularly the central verse of the chorus which says, “That just because He may not answer doesn’t mean He don’t care… Some of God’s greatest gifts are unanswered prayers.”

    If you haven’t heard the song in awhile or have never heard it before, it’s worth a listen to (live: https://www.youtube.com/watch?v=Il4qOQGUGbo — full: https://www.youtube.com/watch?v=hKqZjgIfxe0). The lyrics are:

    Just the other night at a hometown football game011-_XL
    My wife and I ran into my old high school flame
    And as I introduced them, the past came back to me
    And I couldn’t help but think of the way things used to be

    She was the one that I’d wanted for all times
    And each night I’d spend prayin’
    That God would make her mine
    And if He’d only grant me this wish I wished back then
    I’d never ask for anything again

    Sometimes I thank God for unanswered prayers
    Remember when you’re talkin’ to the man upstairs
    That just because He doesn’t answer doesn’t mean He don’t care
    Some of God’s greatest gifts are unanswered prayers

    She wasn’t quite the angel that I remembered in my dreams
    And I could tell that time had changed me
    In her eyes too it seemed
    We tried to talk about the old days
    There wasn’t much we could recall
    I guess the Lord knows what He’s doin’ after all

    And as she walked away and I looked at my wife
    And then and there I thanked the good Lord
    For the gifts in my life

    Sometimes I thank God for unanswered prayers
    Remember when you’re talkin’ to the man upstairs
    That just because He may not answer doesn’t mean He don’t care
    Some of God’s greatest gifts are unanswered prayers

    It probably won’t be until we’re in Heaven that we find out just how many of our prayers God purposely didn’t answer — and often for our own benefit! Over the last few years, it’s been rather comical about how the prayers that He HAS answered for me haven’t turned out nearly the way I had hoped or expected they would. Though I’ve been a Christian for more than twenty years, in many ways my “real” prayer life didn’t begin until a few years ago. I have a list of my most important prayers, and I’ve been keeping track oprayer2-620x499f how He answers (and doesn’t answer) them for awhile now. And He has indeed answered many of them…

    Usually my reaction when He does choose to answer those prayers in His own way is, “Thank you, Lord, but that really wasn’t what I meant!” or “Really, God? Is this really the best plan? Say, what about this other one?” Another gem that comes to mind is: “Oh, Lord — I just gotta see how You’re going to use THIS one for good, because I really don’t think it can happen!”

    While some of us keep a prayer-journal concerning our answered prayers, what happens to all those “unanswered” ones? We seem to usually forget about those, don’t we? What about when He chooses NOT to answer certain prayers, even the really important prayers that might redirect the entire course of our lives? It’s one thing to be thankful for God choosing not to answer a prayer about a high school crush/flame (or an adult crush, for that matter) as in the song above, but what about those really big important prayers?

    What about when you’ve been praying your heart out and fasting until you can’t remember what food tastes like and God still doesn’t answer you? What about when God chooses not to heal your marriage or your spouse in the hospital? What about when He chooses to not heal one of your parents, or even your child who is suffering terribly? What about when He allows a precious life to be taken long before it should be? What about when He allows someone innocent and helpless to be horribly, cruelly hurt? How are we supposed to react when not only the cheese falls off our crackers, but the entire train of our lives completely derails and careens down that mountain?

    To be honest, I don’t really know how to answer those very difficult questions, except that God is good and that He has His reasons for answering — and not answering — those prayers. God is all-powerful, all-knowing, omniscient, omnipresent, and completely sovereign. There is nothing He doesn’t know and nothing He doesn’t see, hear, and feel.

    He knows our innermost thoughts, our hearts, and even the innermost thoughts of our hearts — and those of everyone around us. He knows how certain people will react in certain situations and allows things to occur that we often won’t understand — but He does. He knows the future because He has ordained and determined it. He is everywhere at every moment for all time — He was, is, and always will be. He is the All-in-All.

    There is nothing too difficult for Him. There is nothing He cannot fix, change, or even undo, despite how impossible it may seem to us. It would be nothing for Him to heal our broken marriages, screwed-up families, dysfunctional homes, our broken nation, this suffering world, or even this entire fallen universe! He is the God who parted the seas and then rained manna and quail down on millions of people in the desert day after day for forty years! He could simply think it and that is what it would instantly be!

    How are we supposed to respond when God falls silent? How are we supposed to hold onto that tiny mustard seed of faith when He seems nowhere to be found? How do we continue to trust Him though He doesn’t seem to be meeting our needs? Indeed, how now shall we live when He chooses not to answer our prayers even though we desperately want Him to?

    I’ve come to believe that 1 Thessalonians 5:16-18 holds much of those answers: “Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you.”

    images

    Wait a minute — “always” and “in everything”?! Lord, do You really expect us to give thanks in literally everything? Even when You’re silent and the Prayer Store seems to be closed for the summer? Give thanks even in the bad times? Even in the heart-wrenching, curled-up-on-the-floor, sobbing-into-the-carpet times? Are You sure we’re supposed to give thanks in literally EVERYTHING?

    I’m afraid so. He really does mean, “In everything, give thanks — everything!” Not just the good stuff, but the bad stuff as well — even the really, really bad stuff (no examples needed!). We are to give thanks for not only all the answered prayers (quirks and all), but all those unanswered prayers too. I may have my little prayer-journal, but He has the entire archive of my life from the instant I became a living soul until the moment I die and then beyond into Eternity — and everyone else’s too!

    In everything, we should give thanks — though we may not even remotely be able to see why, and though we think there is NO possible way He can ever use this thing for good. But He can. And He will. Through His Word, we know that He — and only He — can somehow use everything for good all the time.

    Thank you, Lord. I trust You. I will worship You for these — and many, many other — unanswered prayers. I will love You though it really, really hurts sometimes. I will love You though I’ve been terribly disappointed in so many ways recently. 

  • The Cell – Refactored!

    The Cell – Refactored!

    TheCell_bookNow available on the Kindle!

    In keeping with the theme of “Being Refactored”, my latest novel is available for download at http://www.amazon.com/dp/B014XN066M!

    “The Cell – Into the Underground” is a heavy revision of my third novel, “The Cell – Twilight’s Last Gleaming”, which was published in 2010 during the height of the Great Recession. In 2014-2015, “The Sons of Liberty Trilogy” was released, which was based upon many of the basic settings and details introduced in the original edition of “The Cell”.

    Since the political aspects of the original story were detailed in the trilogy (particularly the independence of Alaska), those plotlines have been removed so this edition of the “The Cell” is cleaner and far less political. 

    The synopsis for the book is:

    Years after the financial crash of 2008, America stumbles from crisis to crisis and continues to slog through the mire of the Second Great Recession.

    National healthcare is finally a reality, but has brought with it unintended consequences for the sick, the unwanted, and the growing ranks of the elderly. Political assassinations and bombings have become all too common in the nation’s capital. Elected officials rarely leave the safety of the Green Zone that surrounds the Capitol Complex.

    With the passage of the Tolerance in Religion and Media Acts (TIRMA), churches have been forced to register and submit to content monitors, surrendering their rights to assemble and speak freely. The tea-parties and talk-radio — the last voices of opposition to the ever-expanding powers of Washington D.C. — have been all but silenced from the political process.

    The Spirit of America has been broken. For the first time in history, people are leaving her fair shores for better opportunities in other lands. And though the candles of many churches in America have been extinguished, tiny flames of faith flicker and begin to grow.

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

  • Refactoring and Being Refactored

    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)

  • Sunday: a Day of Rest?!?!

    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!

  • New Beginnings and a New (old) Blog

    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!