grack.com

The nprof 0.8 alpha release is now available. Changes in this version are:

  • Basic ASP.NET profiling - note: ASP.NET must be running as SYSTEM!
  • Profile run message display
  • Detection and graceful handling of failed profiling runs
  • New icons for application and successful project run
  • Drag-and-drop of executables to the project tree (Josh)

To profile your ASP.NET application:

  1. Ensure that ASP.NET is configured to run as the SYSTEM account in machine.config
  2. Create a new project, select ASP.NET as the project type
  3. Select “Start project run” from the project menu
  4. Load your site’s page from a browser
  5. Ensure that the profiler has connected to aspnet_wp.exe in the messages list
  6. Perform your tasks to profile
  7. Click the “Stop Run” button in nprof

Screenshots:

Read full post

The nprof 0.8a alpha release is now available. This fixes two bugs in the 0.8 release:

  • nprof wouldn’t close completely when clicking on the close box
  • ASP.NET profiling wouldn’t work if you didn’t have an Environment key for your W3SVC or IISADMIN services

NOTE: I recommend setting up ASP.NET to run under the SYSTEM account for profiling only. Once you’ve finished profiling, you should set it back to use the “machine” user. As before, these XML attributes are available in your machine.config file.

Read full post

The nprof 0.8b alpha release is now available. This release should fix the ASP.NET profiling problems that have come up during the 0.8 release cycle.

Read full post

Twice this week I’ve seen a situation where a popular blogger has been pestered by his readers to change the content of his blogs.

Last week, Chris Sells (of MSDN fame) posted an article entitled “Bush: Get Your Own Dream!” with his views on space exploration and foreign oil dependence.  There were two particularly asinine comments made:

Unsubscribed. Just lost a ton of respect for Sells. “nuff said”

and

… I just ask that you please post all longhorn stuff on MSDN, so I can remain informed without having to swallow your political views.

It’s amazing that someone could have so much difficulty seeing through a blogger’s political views to the tech content that they’d give up such a valuable source of information.  Losing any one of my RSS feeds could be closing so many doors in the future.  How many interesting links would I miss?

On Asa Dotzler’s Mozilla blog, he’s been covering the Mars exploration with near up-to-the-second updates from NASA.  He’s had some trouble with people complaining about too much NASA and too little Mozilla.  Last I checked, wasn’t it Asa’s spoutlet?

Thankfully the blog authors are sticking to their guns.  Asa sums the situation up nicely:

There have been a number of comments here at adot’s notblog (and even more in email) suggesting, and even demanding, that I stop blogging about Mars and the Mars rovers. To the folks making demands, piss off. To those who have politely asked that I either blog more about Mozilla, less about Mars, or implement categories to keep the two separate, I appreciate the feedback and here’s my plan:

I’m going to continue to post about whats on my mind and what I feel like writing about at that particular moment. This is my personal weblog and I don’t feel any obligation to keep it focused on topics related to my “professional” (Mozilla) responsibilities.

Chris Sells also put it well:

Just so folks know, I feel no responsibility whatsoever to keep my postings on sellsbrothers.com to a specific topic. If I want to post my political views, I’ll do so. If that bothers you, I suggest you unsubscribe now as complaints about the subject matter for my posts will fall on deaf ears.

My hat goes off to Chris and Asa.

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

… 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

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

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