Agile vs. No Silver Bullet

I’ve been returning to my source materials on Agile software development/project management methods recently, just to stay fresh. As part of my study, I ran across a blog post (more of a petulant rant, actually) that cites (actually, mentions in passing, with no real justification) the classic Fred Brooks essay No Silver Bullet in support of the assertion that big-A Agile methods cannot possibly be better than other ways of getting software delivered. Besides suffering from the fallacy of appeal to authority (however meritorious Mr. Brooks’s authority in our field might be), it also falls a bit flat to cite NSB in an anti-Scrum screed. To wit:

Incremental development–grow, don’t build, software. I still remember the jolt I felt in 1958 when I first heard a friend talk about building a program, as opposed to writing one. In a flash he broadened my whole view of the software process. The metaphor shift was powerful, and accurate. Today we understand how like other building processes the construction of software is, and we freely use other elements of the metaphor, such as specifications, assembly of components, and scaffolding.

The building metaphor has outlived its usefulness. It is time to change again. If, as I believe, the conceptual structures we construct today are too complicated to be specified accurately in advance, and too complex to be built faultlessly, then we must take a radically different approach.

Let us turn nature and study complexity in living things, instead of just the dead works of man. Here we find constructs whose complexities thrill us with awe. The brain alone is intricate beyond mapping, powerful beyond imitation, rich in diversity, self-protecting, and selfrenewing. The secret is that it is grown, not built.

So it must be with our software-systems. Some years ago Harlan Mills proposed that any software system should be grown by incremental development. That is, the system should first be made to run, even if it does nothing useful except call the proper set of dummy subprograms. Then, bit by bit, it should be fleshed out, with the subprograms in turn being developed–into actions or calls to empty stubs in the level below.

I have seen most dramatic results since I began urging this technique on the project builders in my Software Engineering Laboratory class. Nothing in the past decade has so radically changed my own practice, or its effectiveness. The approach necessitates top-down design, for it is a top-down growing of the software. It allows easy backtracking. It lends itself to early prototypes. Each added function and new provision for more complex data or circumstances grows organically out of what is already there.

The morale effects are startling. Enthusiasm jumps when there is a running system, even a simple one. Efforts redouble when the first picture from a new graphics software system appears on the screen, even if it is only a rectangle. One always has, at every stage in the process, a working system. I find that teams can grow much more complex entities in four months than they can build.

(The above is, of course, excerpted from Brooks’s essay.)

Iterative development that delivers frequent releases of working software, and uses feedback to determine the direction of growth for the next increment? And a report of empirical (if decidedly anecdotal) support for the notion?

Sounds pretty Agile to me.

(The full essay is available in The Mythical Man-Month: Essays on Software Engineering, which I recommend to anyone who writes, builds, grows, or otherwise makes software.)

Share
Posted in Process, Quick Hits | Leave a comment

Yet Another Backbone.js Tutorial – Part 2 – Pre-Reqs & The Spec

Please checkout Part 1 where I explain the philosophy behind Backbone.js

It’s time to build our Backbone.js app, “Comment on the Movies”.  This tutorial will, ideally, give you something interesting to build.  Take a look at the finished app (so far) on Heroku & feel free to pull it from GitHub.  In addition, I’ve updated the code to use Backbone.js 0.5.3, Underscore 1.2.2, Mustache 0.3 & jQuery 1.7.1.  Let’s do this! Continue reading

Share
Posted in Javascript | Tagged , , , | 2 Comments

Traveling Salesman Attack! (Hadoop and Genetic Algorithms)

For one of my “coffee projects” (things I work on for about 20-30 minutes each morning to warm my brain up and stay amused), I wrote a genetic algorithm attack on the Traveling Salesman problem. Because I’m a Big Data geek, I parallelized it with Hadoop.

(Note: I actually gave a talk on this topic some time back, having implemented this same concept in Ruby using Hadoop Streaming. That implementation contained a number of flaws, some of which I’m attempting to rectify. Also, it’s not as though I’m the first guy to work this angle. I haven’t perused the latest Hadoop/GA work in the field yet, because I wanted to maximize my first-hand learning at this stage – but I’ll be looking to other sources for inspiration as I develop and generalize this code.)

This was just done for my own edification; I haven’t put enough effort into tuning this software or studying its properties for this to be considered a serious work of research (yet). I’m not a specialist or any kind of expert with genetic algorithms, beyond my recreational reading. That said, I had some success at building a gene representation and evolutionary mechanisms that drove a population of solutions for an NP-hard problem toward (mostly) monotonic improvement.

What follows is a brief description of my approach to the problem, with code attached. If you are an expert with GAs, I’d love to hear your feedback on what I could do better.

I haven’t spent any effort in this post describing the Traveling Salesman problem, genetic algorithms, or Hadoop/MapReduce. (It was plenty long already.)  If you’re interested in any of those topics but need to brush up on the basics, check out the preceding links.

More geekery below the fold…

Continue reading

Share
Posted in hadoop, Java, Just for Kicks | Tagged , , , | Leave a comment

Node Knockout 2011 Post Mortem

Node Knockout 2011 took place this past weekend.  I signed up with the hope of being a “One Man Army” & winning the solo contestant award.  I figured that NodeJs was so easy to use and so powerful (seriously, it’s freaking awesome) that it’d be child’s play.  I unfortunately bit more than I can chew however.

Jeff Atwood once blogged: “I don’t think it matters how you conduct the postmortem, as long as you do it“.  To that end, here’s my post mortem of the app I didn’t finish.  Ideally  other developers will learn from my successes and mistakes.  :)

Continue reading

Share
Posted in Nodejs, Post Mortem, Uncategorized | Tagged , , | Leave a comment

Quick Hits: Gotchas while Deploying a Sinatra App to Heroku

I figured it’d nice to deploy the tutorial Backbone.js app to Heroku.  The tutorial app that we’re building, “Comment on the movies”, has a simple Sinatra backend & Heroku welcomes Rails & Rack-based apps.  Here are the 2 gotchas that I needed to deal with in order to deploy to Heroku: Continue reading

Share
Posted in Heroku, Sinatra | Tagged , , | Leave a comment

Yet Another Backbone.js Tutorial – Part 1 – Backbone.js Philosophy

A couple of house keeping notes

It’s been a while since our last post.  Gabe’s been hard at work in Australia, hacking on a number of things.  Rebecca & Brad have large, awesome projects in the works.  Meanwhile  I’ve switched jobs a couple of times :) .  All the while, we’ve been coding like mad and learning a ton of interesting things.  While I can’t promise that we’ll “turn the posting faucet back on”, I can say that we’ll try to reduce the big draughts.  Now then, on to the show!

Backbone.js Philosophy (as I see it)

I’ve been getting pretty friendly with Backbone.js lately.  This 2-part post will teach you some backbone basics & show you how to create your own backbone.js app with multiple routes. Continue reading

Share
Posted in Javascript | Tagged , , , | 6 Comments

Quick Hits: UIActionSheet cancel button strange behaviour

I just got bit by this and fixed it thanks to this StackOverflow post.

http://stackoverflow.com/questions/1197746/uiactionsheet-cancel-button-strange-behaviour

Long story short, if your launch an action sheet in a view that lives in a UITabBarController, the “hit” box for the cancel button gets shifted in a VERY STUPID WAY!

The solution is to reference the view you’re displaying in by the UITabBarController like this:

[sheet showInView:self.parentViewController.tabBarController.view];

Freaking WOW! Thanks a heap, Apple!

*grumble grumble*

Share
Posted in iPhone, Quick Hits | Tagged , , | 2 Comments

Quick Hits: Becareful when returning inc’ed vars

I noticed this in some MonoTouch code that I wrote recently, but I think it makes sense across other languages as well.  Let’s say you write a method that returns an incremented variable like this:

private int MyAwesomeFunction(int pVar)
{
// coding magic
return pVar++;
}

…where pVar = 10, the returned value will NOT be 11!  The returned value will still be 10.  If you want to return an incremented value for pVar, do the following:

private int MyAwesomeFunction(int pVar)
{
// coding magic

return ++pVar; // or return pVar+1;
}

Just a case of postfix vs prefix.  In the previous example, the variable never gets incremented because the postfix operator would get evaluated after the line is processed, but that never happens because we’re returning the pVar.  By flipping to a prefix operator, we guarantee that we evaluate the opperator against the variable before we return it.

It’s also worth mentioning that being a little verbose here is also good.  Explicitly stating that you’re adding 1 to the variable (as displayed in the commented code) is the same number of characters and we eliminate the confusion over what’s getting returned.

Happy Coding!

Share
Posted in MonoTouch, Programming, Quick Hits | Tagged , | 1 Comment

The 5 stages of 3.3.1

Developers have been up in arms on the news broken by Daring Fireball and TechCrunch.  The reported change in the iPhone developer agreement definitely stops Flash developers from creating iPhone apps using the new tools available CS5, but the sword Apple used also cuts into the heart of the MonoTouch, Appcelerator, Unity 3D, Corona, & PhoneGap communities.  Being a member of the MonoTouch community, I’m directly affected by this reported change.  Easily said, I’ve gone through the 5 stages of grief over the news:

Continue reading

Share
Posted in MonoTouch | Tagged , , , | 6 Comments

Quick Hits: Localization strings in Monotouch

It’s pretty straight forward. Check out this post:

Internationalising my app

…and make sure the folders you use follow this format “[Language Abbreviation].lproj” as commenter #4 points out ;)

If you miss one of the major languages, your app will default to English.  As of this post, the iPhone OS supports the following languages:

English (U.S), English (UK), French (France), German, Traditional Chinese, Simplified Chinese, Dutch, Italian, Spanish, Portuguese (Brazil), Portuguese (Portugal), Danish, Swedish, Finnish, Norwegian, Korean, Japanese, Russian, Polish, Turkish, Ukrainian, Arabic, Thai, Czech, Greek, Hebrew, Indonesian, Malay, Romanian, Slovak, and Croatian

Share
Posted in MonoTouch | Tagged , | 1 Comment