The Power of the Proof of Concept

Feb
17
2008

If you were to go through my Visual Studio "Projects" directory or my personal development web server, you'll find about 2/3 of the directories are named SomethingPOC or SomethingExperiment. The former has become my convention over the last year or so and stands for Proof of Concept.

I spend a good portion of each day with one or more of these projects open. That's because I consider the use of the Proof of Concept to be integral to software development. Whether the official methodology of the project encourages them, is indifferent or actively discourages them (and I've worked in all of those environments), I will insist on using them.

First, a quick explanation of what exactly I mean by a POC. Basically, it's the simplest possible program that will answer a question that you have about the tasks in front of you.

Say, for instance, that you wanted to retrieve an RSS feed and store the individual entries into a SQL Server database. I'd probably do a quick POC to connect to the database and insert a record. Then I'd do one for fetching an RSS feed. I might also do one that checks a feed for new items vs one's seen before.

In other words, each POC tests out one concept and proves that you can do what was a question mark in your project approach. If you end up with more than one method in a POC, you're probably doing too much and it should be broken down into more than one POC.

I deliberately name the projects and classes with names that can NOT work in the final project. This helps to hedge against the inclination to do a quick copy and paste into your real project. This is important because POC's should be quick and loose. They don't have error handling, don't do validation (unless that's what you're proving) and generally don't follow many of the rules of good software development. That's a good thing.

That freedom means you can quickly explore the problem and work through some possible solutions in a "sandbox" without worrying about whether you're doing it "right". However, it's also a good thing that you throw the POC away or only use it as a reference.

If you do lots of POC's, name them to encourage disposable coding and then move on to do your "real" development, you'll find that you have often left those crappy early mistakes in the POC, have already run into and overcome many of the typical problems you run into in new solutions.

Once you're into your "real" development, lots of people abandon POC's. However, I keep using them throughout the project (even into the bugfixing and testing phases). Every time I'm asking myself a question about whether an idea will work, rather than trying the experimental code in the permanent code.

Over time, this ends up being a constant cycle. You ask yourself a question that can only be answered with code, do a POC to come up with an answer and then move back to the full project to implement it. If you aren't used to this kind of cycle, I'd recommend giving it a shot. I won't work without it.

HTML as Page Layout Language

Dec
28
2007

Off and on over the last 6-8 months, I've been working on a project that needs PDF as its final output format. The plan has been to use DocBook and the toolchain attached to it. However, that's been more frustrating than it first looked when it comes to integrating into the whole system I'm designing.

Then, earlier today, someone posted a link to this YouTube video, which demo's the functionality of the Prince engine. That revealed a system for really nice page layout using HTML and CSS (with CSS3 handling the page breaks and other stuff like it was designed to, making Prince the only implementation of CSS3 out there that works as far as I know).

Given how my project is web-based, being able to just keep it all HTML from end to end and still get really nice PDF's out the other end would be a huge benefit. And, given how this project will be commercial and how much time I've already spent trying to do all of the conversions back and forth, even the steep pricetag for a server license will likely be a net bargain.

Fortunately, the version that puts a little logo in the top, right corner of the PDF (only for display, not printing) is free for development/personal use. So, I messed around with that a bit tonight and got a feel for it. There are versions for pretty much all of the platforms (Windows, Mac, Linux, BSD, etc.) and integration with code for automatic generation is fairly easy.

Really basic conversion using C# only took 3 lines of code. I just grabbed the normal Windows version, also downloaded the DLL and added that DLL to a basic console app.

Then, these 3 lines work to dump out a PDF of the page in question. I just threw together a quick HTML document to test with a few H1, paragraphs, etc.

IPrince pr = new Prince(@"C:\Program Files\Prince\Engine\bin\prince.exe");
pr.AddStyleSheet(@"C:\Program Files\Prince\Engine\style\xhtml.css");
pr.Convert("demo.html", "demo.pdf");

Pretty easy startup as far as I'm concerned. The video is worth watching, despite being somewhat irritating to watch. Like many presentations to a room full of geeks, there's quite a bit of not seeing the forest for the trees. Lots of people shooting it down by saying, "this is would be REALLY great if it supported my one pet feature" kind of stuff. They got a bit hung up on those little nit-picking details and I wonder how much of their presentation ended up left out as a result.

Based on what I've seen so far, I definitely think it's worth tinkering with a bit more and doing the math on that license fee as part of my project budget.

Software Development and Alchemy

Dec
17
2007

Photo: Stian Martinsen

In several conversations recently with other software developers (yep, those are just as exciting as your wildest dreams) and their frustrations with the process, as implemented in modern corporate America, the same analogy kept popping into my head.

More and more, I feel like the things that businesses are after in their software development are similar to medieval alchemy. For 2500 years, the entire field that eventually became chemistry was obsessed with 3 basic questions:

  1. How can we change lead (or other metals) into gold?
  2. How can we create an elixir that will cure all diseases and prolong life indefinitely?
  3. Can we discover a universal solvent?

All of these strike us as goals that weren't even attainable. Yet, the underlying desires often did get met when the focus shifted to what eventually became modern chemistry. By dropping the focus on the single, universal solution and just figuring out how to treat individual diseases or how to dissolve individual compounds or just fundamentally understand chemistry, many advances did happen.

Many/most of the diseases that the alchemists sought to cure or treat are under control today. There's very little in the world of chemistry that we can't tear apart and we can do things like convert coal or corn into one of the most sought after substances on earth: liquid fuel for transportation.

One of the consulting firms I worked with had a project manager that was constantly pushing the developers to find and use "automagical" tools to build our solutions. What he was after was the kind of IDE or tool that, with a few clicks, would just spit out a nearly complete solution.

That would, of course, result in the sales force being able to sell expensive solutions that could be fulfilled in minutes instead of days and weeks. It didn't matter how often I pointed out that, as a consulting company, if our clients' solutions were so simple that a few clicks and config options could solve them, they wouldn't bother coming to us: they'd just buy the software themselves.

This same person wasn't very excited about things like loosely-coupled systems and/or Service Oriented Architecture unless they also came with wizards that let you choose 4 or 5 options and they'd just spit out a fully-realized application. Yet, those approaches keep working for me as a way of looking for patterns in companies' problems and solving them quickly and completely.

Instead of looking for the tool that spits out C#, PHP, ColdFusion and Ruby, I'm looking for repeating problems like managing queues of objects to be processed. Once you have an approach to that general problem, a good developer can probably implement it in whatever language they're most comfortable with.

That's due, in large part, to the fact that the bulk of the work as a software developer is NOT in typing in the text of the programming language in question. Douglas Crockford said in one of his Yahoo video lectures something along the lines of: a developer could probably type up all of their code for an entire year in a day or 2.

Yet, many of these automagical tools really only seem to automate the stuff related to typing code, not for solving problems. And, like I said a couple of days ago, if you're in the consulting game or just looking to stay employed as a developer, the money and jobs are where the problems are.

That's why, when I hear someone looking for that quick and easy tool that will "just" take care of it this afternoon, I tend to interpret it as, "Can't we just change this lead into gold instead of getting real gold?"

Where There's Muck, There's Brass

Dec
09
2007

When I was growing up and working on a turkey farm, and we kids would complain that the barn smelled particularly ripe, my dad would take a deep breath of that foul air and exclaim, "Smells like money to me."  And, growing up in an extended family of farmers and in rural Minnesota, I actually heard that particular statement several times a week.

Then, this week, I read a great essay on the same principle by Joel Spolsky: Where There's Muck, There's Brass, which introduced me to that great phrase. Both point to a truth in life that often, the best money is to be made doing things that people really need or want to have done, but find the task distasteful in some way. If there's a nasty, dirty, boring job, there's probably some good money in it.

It's a principle that a lot of people don't seem to grasp, particularly in its mirror view. That's where people find it hard to understand why it's so hard to make a living doing things that everyone loves to do. When a task is the kind of thing that people will do on their own and desperately PAY someone to let them do it, making a living at that task is going to be very difficult.

There's a long line of people doing exactly that for things like: stand-up comedy (dragging their friends to 3-drink minimum shows for no pay), writers submitting collections of literary short stories to publishers, rooms full of aspiring actors paying agents to get them auditions along with hundreds of others for a commercial advertising herpes medication, etc.

That's also why, like Joel says, most of the stable, paying jobs in software development aren't building fluffy social applications. Rather, they're building down-n-dirty business applications. That's where I've focused my consulting.

Instead of chasing after startup promises and thrills, I am tackling tough, gritty, messy problems for businesses and enjoying solving them.

That doesn't mean I'm not messing with the other stuff in my "spare" time. I've got several perpetual projects that I'm working on software-wise as well as puttering a bit on a novel, a podcast that I really want to get back into doing, etc.

The thing is, that I focus my business and income earning on tackling the problems that the market is clearly looking to pay for as my "day job" and do the stuff like podcasting on my own funding and own time rather than trying to squeeze blood from a stone.

There's absolutely no likelihood that I would make anywhere close to my software developer salary as an author of fiction with anything other than the Next Great American Novel. The odds are pretty close to lottery odds, in fact.

Basically, if you're out to make a good living and enjoy doing it, find the kind of work that has a bit of muck in it that you don't consider muck and you'll find a nice shiny pile of brass.

DLL's In The Mirror

Oct
17
2007

A while back, I mentioned how .NET Reflector can save your hide if you, say, compile a .NET DLL and then accidentally lose the associated source code and need to retrieve that new method you added. Then, today, I solved another messy problem by using Reflector and I thought the solution might be of use to others as well.

Here's the basic scenario where this problem exists. I had a DLL from production that I needed to modify. I went to the SVN repository to get the source, built it and tried running the application locally, only to run into all kinds of problems, even without making any changes.

I swapped out the production DLL and things worked OK (or at least *more* OK than the one I was building). Theoretically, the latest version of the SVN trunk should have been what was used to build the DLL that I grabbed from production.
Read the rest of this entry »

« Older Entries  

J Wynia

For better or worse, I'm the guy who runs things here. I'm a web consultant, software developer, writer and geek from Minneapolis, MN. This site is a fairly wide cross-section of the things I'm interested in and enjoy writing about.

Oh, and if you happen to be looking for hosting for your Subversion repositories or just web hosting in general, take a look at Dreamhost. It's what I use for Subversion and your signup helps me out.

Latest Microposts

jwynia: @geniodiabolico I'm using Mosso for my hosting going forward. I've still got sites on a dedicated server, but it's Mosso from here on out.
jwynia: is eating way too much of the salsa he made for lunch. It's so much better when it's fresh instead of from a jar.
jwynia: @MNHeadhunter I've seen the Recruiters/Geeks passing in the night and missing each other quite a bit. Seems strange.
jwynia: @Cavorter let me know what kind of Windows server setup you need. I might be able to help you out.
jwynia: is back from the rained out Saints game.
Follow Microposts on Twitter | Subscribe to Microposts

My Attendance At the Gym

Feeds and Links


www.flickr.com
This is a Flickr badge showing public photos from J Wynia. Make your own badge here.

Search


Pages

Archives

© 2007 J Wynia. All original content is licensed under the terms of the Creative Commons Attribution license unless otherwise noted. Content from other sources is licensed under its original terms.