DaedTech

Stories about Software

By

Solve Small Problems

Editorial Note: I originally wrote this post for the Infragistics blog.  Go check out the original at their site.  While you’re there, go check out their developer tools and controls.

It’s fun to think of great moments in the history of science, particularly the ones that have a memorable anecdote attached to them.  In the 3rd century BC, a naked Archimedes ran down a city street, screaming Eureka, because he had discovered, in a flash, how to measure the volume of irregular solids.  In the 1600s, a fateful apple bonks Issac Newton on the head, causing him to spit out the Theory of Gravity.  In the early 1900s, another physicist is sitting around, contemplating the universe, when out pops E=MC^2.

Newton Getting Bonked with an Apple

These stories all share two common threads: they’re extremely compelling and entirely apocryphal.  As such, they make for great Disney movies, but not such great documentaries.  Point being, we as humans like stories of “eureka moments” and lightning bolt inspiration much better than tales of preparation, steady work, and getting it right on attempt number 2,944, following 2,943 failed attempts.

But it goes beyond just appreciating the former type of story.  We actually manufacture them.  Perhaps the most famous sort of example was Steve Jobs’ legendarily coy, “oh yeah, there’s one more thing” that preceded the unveiling of some new product or service.  Jobs and Apple were masters of “rabbit from the hat” marketing where they’d reveal some product kept heretofore under wraps as though it were a state secret.  All that is done to create the magic of the grand reveal — the illusion that a solution to some problem just *poof* appeared out of thin air.

Unrealistic Expectations

With all of this cultural momentum behind the idea, it’s easy for us to internalize it.  It’s easy for us to look at these folk stories of scientific and product advancement and to assume that not having ideas or pieces of software fall from us, fully formed and intact, constitutes failure.  What’s wrong with us?  Why can’t we just write that endpoint in one shot, taking into account security, proper API design, backward compatibility, etc?  We’re professionals, right?  How can we be failing at this?

You might think that the worst outcome here is the ‘failure’ and the surrounding feelings of insecurity.  But I would argue that this isn’t the case at all.  Just as the popular stories of those historical scientists are not realistic, and just as Apple didn’t wave a magic wand and wink an iPod Nano into existence, no programmer thinks everything through, codes it up, and gets it all right and bulletproof from the beginning.  It simply doesn’t happen.

Read More

By

The Role of Log Files in Experiments

Editorial Note: I originally wrote this post for the LogEntries blog.  Head over to check out the original at their site.  LogEntries provides a service that allows you to centralize, monitor, and search your log files, so if you’re interested in logging and related topics, there is a lot to check out.

You have heard, no doubt, of the Lean Startup.  If you need a refresher to place the name, it’s a book, but it’s also a business trend with such momentum as to have a website advertising it as a “movement.”  And, frankly, that advertisement is hardly a stretch.  The title and the terms coined in it are on everyone’s lips in the tech industry these days because people at companies of all shapes and sizes want to capture some of that startup magic.

For instance, it’s pretty likely that you’ve heard a process described as “lean,” and it’s a veritable certainty that you’ve heard the term “minimum viable product” tossed around at some point or another.  You may even have heard these terms used correctly.  I say this because the use of these terms has become so ubiquitous among the book’s readers that non-readers adopt them as well and map their own situational contexts onto them.  Definitions drift.  “Minimum viable product” has come to mean “beta” or “prototype” and “lean” is a hipper, newer version of “agile” that has something to do with Toyota, or something.

But if you peel back a layer from breathless use of buzzwords, you’ll find genuine, serious substance underneath.  To summarize the Lean Startup in a ridiculously short sound byte, I would offer, “apply the scientific method to your business.”  And that’s an extremely powerful concept.

You’ll note that there’s nothing in my description about startups, per se, and that’s intentional.  As Eric Ries argues in the book, there’s nothing to say that the same approach can’t be leveraged within large, established businesses.  He even gives a number of examples of exactly that application.  Make no mistake; the Lean Startup approach has lessons for you no matter what your business and no matter how well-established.

Business, Science, and Software

For me, and for most reading, our business is the business of software.  The question thus becomes, “how can we apply the scientific method to building software?”

To do that, let’s consider the scientific method a bit more formally.  Here is what it involves, quoted from the linked page.

Read More

By

How to Get a Raise

I’ve been slipping a little in my quest to answer reader questions of late, so I thought I’d course correct.  The question revolved around the notion of how to get a raise.  Actually, that was the question in its entirety.

How do I get a raise?

A deceptively simple question that one.  So much so, in fact, that I’m going to be kind of roundabout in my response.

Paying the Iron Price for Cable

Assuming that you’re one of the millions of people that pay for cable television, you fork over your $100 per month and get the full rainbow of channels.  You probably don’t think a whole lot about the $100 that you’re spending each month because it’s the closest a recurring cost can come to being a sunk cost.  You’re used to cable and you’re used to your wallet being $100 lighter, so continuing to have cable for $100 per month is not a decision that you consciously make.  In fact, to do something different would be the conscious decision.

Bearing this in mind, do you ever think to yourself, “you know, I love how they’ve finally stopped killing off erstwhile protagonists on Game of Thrones, so I think I’ll call the cable company up and offer to pay $103 per month, starting in the next fiscal year?”  Of course you don’t — that’s ridiculous.

But, let’s consider a slightly modified version of that scenario.  Let’s say that the cable company called you and said, “we’re raising the price of your Premium Thingamajig Package to $103 a month, so if you want to continue to see what Sansa, Arya and the gang are up to, you’re going to have to pay up.”  You probably go on to Facebook, post a cathartic rant, and then pay the extra money.  Because, while that’s inconvenient, what would be more inconvenient is to have to spend time figuring out how to compensate and vary your routine.  You could go with Dish or AT&T or whatever, but that’s probably too much effort to expend over a 3% increase.  If it were a 10% or 15% increase, on the other hand, it might be time to comparison shop.

ArmchairQuarterback

Employment as a Zero Sum Game

As you’ve no doubt surmised, I offered this silly parallel to help you empathize with your employer’s position.  You’re the cable company in their lives — non-critical, largely taken for granted, and prominent enough to be missed as long as the price isn’t too high.  And, like your relationship with your cable company, your relationship with your employer is, talk of family and work-life balance notwithstanding, a zero sum game.  The more money you have, the less they have, and vice-versa.

Read More

By

Calculating the ROI of NDepend

Editorial note: I originally wrote this post for the NDepend blog.  Head over to their site and check out the original.  While you’re there, take a look at the other posts and the offering to be had.

Years ago, I discovered NDepend and downloaded it for a trial.  At the time, I found myself working in a .NET shop where a lot of developers worked in the same large WPF codebase.  Code reviews were mandated, debates were frequent and impassioned, and global variables were everywhere, to the dismay of only some of us.  There was an entrenched majority that favored (or at least didn’t mind) a highly procedural style of writing object-oriented software, and nobody seemed able to put their fingers on why most feature development there had slowed to a crawl.

ScaryComputer

I was new to the group and had to pick my battles, particularly with people that had been there a long time.  Developers who favored automated testing and craftsmanship principles were in the minority there and had a history of leaving out of frustration, so I knew it’d be a challenge, and I went looking for help.  Among other things, I found NDepend and, after installing a trial, I recognized the power of the tool.

I recognized that it could help me as an objective, unbiased partner in making my arguments, but I also recognized that the way I approached code and architecture would never be the same.  The ability to visualize architecture in real time, the ability to treat code as queryable data, the metrics, the statistics, the well thought-out code warnings… it was a game-changer for me.  I just needed to convince my manager to let me spend a few hundred dollars to convert my trial version into a paid version.

It turned out this wasn’t hard, at least for me.  I had the good fortune of working for a company that appropriated a tools and learning budget for each individual developer, meaning all I had to do was declare that I wanted some of my total spend to go toward NDepend.  I did it without blinking.  But it might be that you aren’t as lucky.  Maybe you find yourself in a similar position to mine back then, but wanting to convince your manager that this powerful tool is indispensable because you don’t have a discretionary tools budget.

ROI: The Language of Management

I think I can help you here.  After all, I did leverage my experience running an IT department into a Plurlasight course about how to lobby your managers for practices and tools.  And the key to making a business case for anything, NDepend included, is to talk in terms of profits and losses, rather than in terms of, “it’s awesome, and it has all these graphs, and it shows me these rules, and CQLinq is the coolest thing ever, and…”  You get the idea.  NDepend’s coolness factor isn’t going to convince your manager to buy it for you.

Read More

By

Chess TDD 60: Wrapping Initial Development

There is a bit of symmetry to this episode that may interest only me.  It is the 600th post to be published on the blog, and it is the 60th post in the ChessTDD series.  I wouldn’t have thought the series accounted for 10% of my posts, but, there it is.  Believe it or not, this post is about wrapping initial development on the project.  In other words, I have no more functionality cards to implement.  From here on in, it’s going to be constructing test scenarios and addressing any shortcomings that they reveal.  (Not ideal, but it’s hard to get user feedback in a one person show with no prod environment)

I also, after some time away have a bit more clarity on what I want to do with this going forward, so you’ll hear some mention of this as I narrate the videos.  I’m looking to wrap the youtube series itself and then to use that as the centerpiece and starting point of a video-product that I have in mind.  Stay tuned for updates down the line.

What I accomplish in this clip:

  • Get re-situated after a hiatus and clean up/reorganize old cards.
  • A few odds and ends, and laying the groundwork for the broader acceptance testing.

Here are some lessons to take away:

  • An interesting definition of done when it comes to software work goes beyond completeness and even shipping.  You can say that something is done when it has demonstrably added value somehow (it has sold or helped product revenue or something)
  • Writing unit tests is a great way to turn hypotheses that you have about the code base into productive regression test suite.  It’s also a great way to confirm or refut your understanding of the code.
  • It bears repeating over and over, but avoid programming by coincidence.  If you don’t understand why a change to your code had the effect that it had, stop what you’re doing and develop that understanding.  You cannot afford to have magic and mystery in your code.
  • There shouldn’t be any line of code in your code base that you can delete without a test turning red.  This isn’t about TDD or about code coverage — it’s about the more general idea that you should be able to justify and express the necessity of every line of code in the code base.  If removing code doesn’t break anything, then remove the code!