Lambert on Development

My thoughts on software development

Lambert on Development RSS Feed
 
 
 
 

A feature greater than the sum of its bugs

Douglas Adams, muse to software developers everywhere, had this to say about bugs:

“Just as a slow series of clicks when speeded up will lose the definition of each individual click and gradually take on the quality of a sustained and rising tone, so a series of individual impressions here took on the quality of a sustained emotion[.]“

Ok, yeah – the quote is really from “Life, the Universe, and Everything“, and he wasn’t talking about bugs, but he could have been.

Big Bug III…!!!
Image by Denis Collette…!!! via Flickr

If you look at bugs one at a time, you can miss some important “big picture” stuff.  It’s possible to spot product design issues, usability issues, architecture issues, and more by looking at patterns across multiple bugs.  Instead of just taking the bug at face value, consider whether there are other factors that caused this bug (and others like it) to show up.  Unless you’re writing mission support modules for NASA, it doesn’t make sense to do a full five-why’s breakdown on each bug, but keep your eyes open for signs like this:

  • You find yourself going back to the same area of code over and over.
  • User complaints cluster around a few screens (or functions) in your application.
  • You recognize a similar pattern in source code that keeps popping up.

When you see patterns like this, you can certainly keep on fixing the bugs one at a time, but it’s pretty hard to make progress this way.  Instead, consider a larger bug fix, or even an actual feature (there’s really no difference, IMO) that cuts across individual bugs and fixes the foundational problem that’s spawning them.

  • Maybe you need to redesign a screen.  If users are having a hard time figuring out part of your application, you’re not going to be able to fix your users.  Bite the bullet and figure out what you need to change in your application so that it makes sense.
  • Refactor ugly code.  This should be a no-brainer.  Spaghetti code can hide a multitude of sins, and the bugs are just going to keep coming until you deal with the problem.
  • Address architectural issues.  Sometimes, your problems run really deep, and big changes are needed to fix them.  This can be a tough sell, but if you can show a pattern of costly bug fixes over time, all of which share an architectural root cause, you’ve got the ammunition to push for a fix that will make them go away.

If you eliminate the sources of these clustered bugs, you not only get rid of the current bugs, you wipe out a whole swarm of future bugs before they’ve had a chance to show their ugly little faces.  Don’t believe for a second that you can do this one bug at a time.

Enhanced by Zemanta

Post to Twitter Tweet This Post

Yikes!

I’ll just grab a cup of coffee, ok?

Post to Twitter Tweet This Post

Almost a great idea

Here’s an example of a good idea gone wrong.  I saw a link for a web site that exists solely to advance openness in government.  How cool is that?

U.S.

Image via Wikipedia

I clicked around for a bit, eventually reaching a place where I was supposed to be able to submit an idea for government, where it would (presumably) be viewed and discussed among my peers.  When I clicked the button to enter my idea, I was prompted to log in with OpenID (again, very cool).  I logged in and clicked the button again, and was rewarded with the following barfage:

500 Servlet Exception

[show] java.lang.NullPointerException

java.lang.NullPointerException
	at _jsp._jsp._includes._build_0header__jsp._jspService(jsp/includes/build_header.jsp:37)
	at com.caucho.jsp.JavaPage.service(JavaPage.java:61)
	at com.caucho.jsp.Page.pageservice(Page.java:578)
	at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:195)
	at com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:97)
	at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:266)
	at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:494)
	at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:358)
	at com.caucho.jsp.PageContextImpl.include(PageContextImpl.java:1008)
	at _jsp._jsp._includes._autoselect_0header__jsp._jspService(jsp/includes/autoselect_header.jsp:23)
	at com.caucho.jsp.JavaPage.service(JavaPage.java:61)....

Close, guys. Very close!

Please don’t do this to your customers, okay?

Reblog this post [with Zemanta]

Post to Twitter Tweet This Post

Is your Enterprise too big to fail?

We have met the enemy, and it is Complexity.

About a year ago, the media was flooded with debate about financial institutions that were deemed “too big to fail” by industry analysts, financial experts, and government representatives.  A failure by one of these institutions, these experts told us, would have catastrophic effects on our economy, and it was therefore incumbent upon us as a nation to keep these firms solvent.

And if you believe this, I’ve got some great beachfront property in Kansas I’d like to talk to you about.

What dependencies?
How, exactly, are all these financial firms connected?  Obviously, a full exploration of this is out-of-scope here, but the single biggest problem child in the financial meltdown was the web of financial derivatives, which financial institutions applied as a sort of insurance policy, but which, in the end, turned out to be anything but that.  The idea behind these derivatives was to aggregate a bunch of debt obligations together and resell them, and financial firms believed this would act, among other things, as a sort of reinsurance guarding against risk in any of the individual debt obligations.  As these things were packaged and repackaged, though, the cumulative effect was to create a virtual ponzi scheme of obligations linking all of these firms together in a frighteningly incestuous fashion.

“Too big to fail,” you see, resulted directly from “too complicated to understand.”  The real nightmare scenario for these experts wasn’t the failure of a single institution, no matter how big it was — it was the domino effect where the failure of one institution would cause a chain reaction of failures across all the top financial firms.  Here’s the killer, though: these experts couldn’t tell you which dominoes, exactly, would start a chain reaction, which mean that (1) these experts understood that there were horribly complicated inter-dependencies among these financial firms, and (2) they didn’t understand these dependencies well enough to understand what would happen when one failed.

The problems with this scenario go on and on.  Very few people have any real grasp on the actual implementation of complex financial instruments within a single organization, let alone the contractual obligations that link firms to firms.  This includes the executives running these companies, who, in true empty-suit fashion, blindly accepted whatever horse-hockey they were fed by their underlings because there wasn’t a chance in hell that they understood all the details of the operations under their control.  This isn’t to say that these executives aren’t bright guys — nothing could be further from the truth.  In fact, the complexity of these operations is so staggering that no one person could ever hope to grasp the whole picture at once.

At this point, you might be wondering what this has to do with software development.  Fair enough.  The connection is the common problem: complexity.

Software developers are no strangers to complexity.  Despite an onslaught of tools, techniques, frameworks, and design patterns which all claim to make Enterprise software development “easy”, our applications invariably end up complicated as hell by the time they’re installed.  I opened a Visual Studio solution the other day that had 43 projects in it.  What’s worse, this solution clearly followed patterns that have been demonstrated by Microsoft, so there’s a clear argument to be made here that this behemoth is crafted according to industry best practices.

Dominoes line
Image via Wikipedia

A developer who’s immersed in such a solution can have a ghost of a chance of understanding what’s happening among those 43 projects, but just barely, and only if he’s really good and really focused on this solution.  This is functionally equivalent to a Financial Analyst who understands in great detail how an individual financial derivative is constructed.  Like the financial example, though, there’s no way that business leaders could ever hope to fathom the complexity of software like this, and they’re the ones who are making decisions about it.

This has to end.  The status quo is one where our leader don’t understand the things they’re making decisions about.  How is it any wonder that they all behave like pointy-haired bosses?

It turns out that I’m not the only one that believes this.  Roger Sessions is a well-known architect and author who’s been promoting simplicity since the dawn of the Doppio Macchiato.  Recently, he’s been supporting his book, Simple Architectures for Complex Enterprises, with some excellent blogging and a white paper, which can be found on the book’s companion site.

Honestly, some of Roger’s material isn’t easy to swallow.  Software designers by nature are a pretty self-assured bunch, and usually, that’s well-justified, as they’re also a pretty bright crowd.  We’d all like to believe that the designs we’ve crafted are perfectly extensible and scalable.  Furthermore, we’re reluctant to admit that anything is too complicated for us to grok.

It’s not easy for business leaders to grasp this stuff, either.  Since they’re already oblivious to the complexity of these systems, it’s a pretty big leap of faith for them to accept that complexity is the problem, and furthermore, that there can actually be a solution.

Adding to this whole mess is the predisposition of nearly all the individual role players to keep right on doing what they’ve always done.  Our understanding of capitalism and efficient markets suggests that groups of people will collectively find efficiency and balance, but when the individuals involved don’t really understand how their actions affect outcomes, you start to see some pretty odd collective behavior.  Dan Ariely has done some remarkable work exploring this paradox in his book, Predictably Irrational.

All this suggests that it’s going to take a pretty phenomenal level of commitment to change the status quo.  Let’s start by admitting we’ve got a problem.  I believe that Complexity is the #1 problem facing Enterprise software development today, and it needs to be confronted and mastered.

Are you with me?

Reblog this post [with Zemanta]

Post to Twitter Tweet This Post

Tilting the web — really?

Here’s a gem for you, courtesy of Engadget:

Firefox 3.6 will support accelerometers, make the internet seasick (video).

Right.  I can’t wait to write CSS for this.  Are you kidding me??

If you look at the picture of this browser, you can see that the frame of the browser window stays locked in place on the screen, and sure enough – as the screen is tilted, the rendering within the browser is tilted to compensate.

Mozilla Firefox

Image via Wikipedia

Can this really be considered a feature people want or need on their devices?  Here’s the bottom line, Firefox:  You’re running on a rectangular device, no matter how it’s tilted.  There are only two reasonable layouts on a rectangular device:  portrait and landscape.  For everything in the middle, I’m going to go out on a limb here and stipulate that if someone is holding a device at an angle, it’s probably because the viewer is at an angle, and thus, wants to turn the device to match their aspect.

Let’s also not forget that a screen rendered at non-square angles is going to introduce all sorts of fun graphical artifacts as you re-render at a constantly-changing angle.  Remember that our fonts and graphics are optimized for a rectangular pixel layout, and anything other than square is going to require interpolated rendering of everything on the screen (which, being a mobile device, by the way, is probably of lower resolution than our desktops.  Take a look at this image:

Engadget tilted on screen

Engadget tilted on screen

Ignore, if you’re able, the weird optical illusion that makes the rest of your screen now look like it’s tilted to the right.  This image, in fact, shows the mobile version of Engadget’s home page tilted about fifteen degrees to the left.  Note that while this is certainly still readable, the fonts show significant pixelation — they’re blurry and jagged.

You can also see that the screen is cut off on four corners.  This is because the size of the canvas that will fit perfectly inscribed within the fixed physical screen changes as the angle of tilt changes.  I’m sure there’s a geometric formula that can be used to figure this out, and it would be more or less complicated depending on whether you hold the aspect ratio of the canvas constant (which could work right up to the point where you switch from portrait to landscape).  In any event, the size is going to change, and that means that you either change the size of the HTML canvas, reflowing text, images, etc., or you do still more interpolation and rendering to account for the smaller canvas size you’re painting.  Either way, I think the user loses.

Can you just picture the bugs that are going to come in once people start using this?

  • Your app blinks when I tilt the screen.
  • When I tilt my screen, I can see everything just fine, but when I tilt it back, the left side of the text is cut off.
  • When I tilt on FireFox, your app works fine, but when I tilt on Chrome, it doesn’t work at all.
  • I got a migraine because of your app.
  • What’s with the screen swimming around??

Can anyone, anywhere really come up with a scenario where I, as a user of a mobile device, am going to hold my device at an angle and hope that my software can figure out how to render a pixelated, ugly version of the app I’m using at an angle that now, no longer matches the angle of my screen, and (dare I add) keyboard?

On behalf of all web developers everywhere on Earth, Firefox, I implore you:

Stop the madness!!

Reblog this post [with Zemanta]

Post to Twitter Tweet This Post

Similar Posts

Google Reader

Blogroll

Blog Directories

 
Programming Blogs - Blog Catalog Blog Directory
 
Computers Blogs - Blog Top Sites
 
Banner
 
Lambert on Development - Blogged

Recent Posts

Popular Posts

Support this Site

Featured Articles

Lijit Search

Lijit Search