grack.com

The Mozilla Firefox 0.8 release has been so popular that it’s making a number of the main download sites for the browser and extensions, such as  ftp.mozilla.org and mozdev.org, extremely slow.  As the Mozilla community grows, there’s going to be an ever-increasing need to have a solid infrastructure in place to support the increasing amount of traffic. 

I’m impressed with the number of people that have started using this browser - people who I would have never expected to switch have done so.  You never hear the words “this site doesn’t work in Firefox”.

What make the evangelism so easy is the number of free browser extensions.  These extensions can be anything from developer-specific tools to custom applications for e-commerce.  I highly recommend you make use of the these three essential items:

  • Google Bar: identical in function to the offical IE version, this Google Bar offers easy searching and result-hit hiliting. 
  • Flash click to view: a plugin that replaces all flash content with a clickable box that starts the animation.  Eliminates all of those annoying driving cars, flying airplanes and other intrusive ads.
  • Adblock: a plugin that blocks ads based on patterns. 

Overall, I’m very impressed with the polish of this 0.8 release.  It’s solid, fast and so far beyond IE in terms of standards compliance.  Given this, it’s not a stretch of the imagination to justify why CIO.com published an article that places Mozilla Firefox in the tier 1, “best of breed” open source category.  

With future IE upgrades being tied to future OS upgrades - remembering that they’re already a couple of years behind the times in terms of standards - it’s a good time to switch.

Read full post

I’ve been a big fan of unit testing for a while (ever since the first releases of JUnit) but I haven’t been up-to-date with the latest technology.  To be perfectly honest, I hadn’t expected anything else to appear after unit testing was first popularized.  That’s why I was surprised to come across an off-hand reference to “Mock Objects” a few days back.  Basically, Mock Objects are a true way to test an object “in a box” - ie: completely separate from the rest of your system.

What do I mean by this?  Traditionally, when writing unit tests, you need to create a context for the object - in other words, an environment for the object to live within.  Since many applications go through a lot of work to set up this environment, it can be difficult (and may require adding messy code) to create one solely for the purposes of a unit test.

Mock objects solve this problem by masquerading third-party objects within your system.  You’re testing objects within a true black box.  Any object that your testee calls can be replaced with an exact duplicate that looks like the object expected by the testee.  There’s one essential difference - this object returns the specific values that you’ve previously determined to be useful for testing.

As an example, let’s say you’re testing an implementation of a database-backed object.  Normally, the object interacts with some database class (in .NET, it might be an IDataAdapter object).  Before mock objects, you’d have to create some sort of test database that can be used during the unit tests and populate it with some sort of test data.  Now, you simply need to create a “mock” of an IDatabase object and tell it what to return for given functions.  When your testee calls the method you’ve indicated to the mock object, the mock object will return the value you’ve specified!  No database required - and no “backdoor coding”.

That’s not all.  In a test, you generally have inputs and outputs.  As an example, a network monitoring system may send an email if one of your systems goes down.  You could write code in your object to check a “_doingTest” boolean flag and ignore the mail-sending routines - but that’s one more place where a bug could be introduced!  To solve this, we now turn to the second part of Mock Objects - the “Expectation”.

Expectations are just that - you expect that your object will do something.  Using the previous database example, I might expect that after it makes the first call, it uses the value returned from the call to make a second one.  It’s the flip-side of white box testing - given these inputs, I expect these outputs.

If you’re interested in Mock Objects, check out the Mock Objects wiki.  You’ll find some links to various Java Mock Object implementations.  One caveat - I haven’t looked at any of these implementations, so I can’t make any recommendations.

If you’re a .NET programmer, take a look at NMock.  There’s barely any documentation, but there are a couple of examples that illustrate how the system works.  Check out the Weather example in their CVS repository for a head-start.

Happy testing!

Read full post

I’ve had trouble with a lot of the stereo anaglyphs that NASA’s been publishing.  Most of them seem to have a stereo separation that is completely incompatible with my brain.  I finally found a few images that actually work with my red/blue glasses (from this page):

The trick is to tilt your head just right.  If you find that you’re seeing a lot of shimmering, trying relaxing your eyes and focussing on infinity - it’ll be easier to find the correct head angle that way.  Oh yeah - move the mouse pointer off too.

Read full post

… fantasies have to be unrealistic. Because the moment, the second you get what you seek, you don’t, you can’t want it anymore. In order to continue to exist, desire must have it’s objects perpetually absent. It’s not the it that you want; it’s the fantasy of it. So desire supports crazy fantasies. This is what Pascal means when he says that we are only truly happy when daydreaming about future happiness. Or why we say the hunt is sweeter than the kill, or be careful what you wish for. Not because you’ll get it, because you’re doomed not to want it once you do.

So the lesson of Leccan is, living by your wants will never make you happy. What it means to be fully human is to strive to live by ideas and ideals, and not to measure your life by what you’ve attained in terms of your desires, but those small moments of integrity, compassion, rationality, even self sacrifice. Because in the end, the only way that we can measure the significance of our own lives, is by valuing the lives of others.

-- David Gale, Life of David Gale

Read full post

Just to keep those reading the front-page news up to date, 0.9 is in development and should be out once we’ve finishing implementing and polished up some of the neat new features that will be in this release:

  • Josh’s awesome new ListView control - including, but not limited to:
    • quickfiltering
    • custom and multi-line headers
    • column reordering
    • generally nicer look than before
  • Project loading/saving (also courtesy of Josh)
  • Ashwin’s back/forward navigation code
  • A new toolbar (hasn’t been started yet, but needs to go into 0.9)

There are two known bugs that I’m hoping to get fixed for 0.9 as well:

  • Profiling on SMP systems may be buggy
  • Profiling an application that spawns another .NET application kills the profiler

Once these are done, we’ll ship 0.9 and start on the long slog to 1.0. The last remaining project goal for 1.0 is the profiler run snapshot capability. It’s certainly one of the bigger items in the roadmap, but one of the most important to take nprof to the base level of most commercial profilers.

After 1.0 is out the door, we’ll be looking for goals for the 2.0 release! Feel free to drop by the developer’s list and place your input.

Read full post