David Sinclair's blog

I'm an introvert, and I'm okay

I read an article that really resonated with me a while back, that was written a few years ago. It was entitled "Caring for Your Introvert", written by Jonathan Rauch in The Atlantic.

In the article, he clearly defines what an introvert is, and how we are perceived by extroverts. Yes, I am most definitely an introvert. But that doesn't mean I'm antisocial or unpleasant. It just means that I and other introverts are energized by being alone, instead of by interacting with other people.

Leave an extrovert alone for two minutes and he will reach for his cell phone. In contrast, after an hour or two of being socially "on," we introverts need to turn off and recharge.

So very true. I enjoy spending time with friends and attending conferences and such, but tend to hang back and observe rather than directly interact, and even so I feel drained afterwards, exhausted by the social interactions.

People who don't know me or other introverts well might be concerned that I'm suffering in some way, perhaps feeling left out... but it's really the way I prefer things.

We tend to think before talking, whereas extroverts tend to think by talking, which is why their meetings never last less than six hours.

Amusing, but not much of an exaggeration. Which is one reason why I prefer to communicate with clients and others via email, rather than phone conversations. I want to think through my response in peace and quiet, without meaningless niceties filling in the dead air.

So if you're an extrovert and you see a quiet person, don't be concerned. We're just fine, thanks.

Nice video of Portland, Oregon

My wife and I moved from New Zealand to Portland, Oregon back in 2001. It's a great city, with a nice friendly "small town" feel but the amenities of a big city. This brief video show a lot of the great things to see and do around Portland:

iPhone Open Source: detect tap outside a button like table's Delete

This blog post has been replaced by a newer edition.

Please see blog posts on DejalView.

Sorry customers, another development blog post. :)

For a new iPhone app I'm working on (shh), I have a button that I wanted to behave like the Delete button in a table view. You know, when you tap the delete toggle to the left of a cell, a red Delete button appears. And tapping anywhere other than that button will hide it without doing anything else:

Table Delete button
(Contacts app)

I couldn't see any obvious way to do it, so asked on the iPhone Developer forums, and got a helpful reply suggesting a UIWindow subclass, overriding -sendEvent:.

I tried implementing that, but what I really wanted was to override -hitTest:withEvent:, since I wanted to block taps on views other than a specific button, and the documentation says one should always invoke the superclass of -sendEvent:.

Then I noticed that -hitTest:withEvent: is actually defined in UIView, and further experimenting with the table Delete feature showed that it appears to be implemented UITableView, since the cancel tap behavior only occurs in the table, not the navigation bar or toolbar. Besides, implementing in a UIView subclass is more focal, so a better choice.

So here is my UIView subclass to do this. It uses a delegate approach, with a protocol to declare the method:


@class DSView;

@protocol DSViewDelegate
@optional

- (UIView *)view:(DSView *)view hitTest:(CGPoint)point
withEvent:(UIEvent *)event hitView:(UIView *)hitView;

@end

And the actual subclass interface; as conventional, the delegate is not retained:


@interface DSView : UIView
{
id DS_viewDelegate;
}

@property (nonatomic, assign) id viewDelegate;

@end

With the implementation just overriding the hit test method. It simply invokes the superclass then gives the delegate a chance to change it (or perform some other action) if it implements the delegate protocol method:


#import "DSView.h"

@implementation DSView

@synthesize viewDelegate = DS_viewDelegate;

/*
hitTest:withEvent:

Overrides this method to add support for the -view:hitTest:withEvent:hitView view delegate behavior.

Written by DJS 2009-09.
*/

- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event;
{
UIView *hitView = [super hitTest:point withEvent:event];

if ([self.viewDelegate respondsToSelector:
@selector(view:hitTest:withEvent:hitView:)])
return [self.viewDelegate view:self hitTest:point
withEvent:event hitView:hitView];
else
return hitView;
}

@end

To use this, simply change a container UIView to DSView in the view hierarchy, then set the delegate property to your view controller (via code or IB):

self.view.viewDelegate = self;

Then implement the -view:hitTest:withEvent:hitView: delegate method in your view controller, e.g. as follows — this will cause a tap on some special control to go through as normal, but tapping anywhere else in the view will hide the special control, without passing the tap on to whatever was actually tapped:


- (UIView *)view:(DSView *)view hitTest:(CGPoint)point
withEvent:(UIEvent *)event hitView:(UIView *)hitView;
{
if (hitView == someSpecialControl)
return hitView;

someSpecialControl.hidden = YES;

return nil;
}

I hope this is useful to someone else too.

You can get the code from my Dejal Open Source Subversion repository via this Terminal command:


svn checkout http://dejal.svn.beanstalkapp.com/open/DSView

Or browse the source directly on the web.

If you haven't seen it already, check out DSActivityView, too.

DSActivityView updated

This blog post has been replaced by a newer edition.

Please see blog posts on DejalActivityView.

DSActivityViewI've committed a minor update to the DSActivityView open source project for iPhone. See the DSActivityView introductory post for more information, including a video demo.

This update adds a showNetworkActivityIndicator boolean property. It is NO by default, but if set to YES the network activity indicator in the status bar will be displayed, and automatically hidden when the DSActivityView is removed.

You can toggle this property as needed while the activity view is in use. For example, you might have the network activity indicator appear while fetching some data from the internet, then disable it while parsing it (while the activity view is still visible).

Of course, you can easily show and hide the network activity indicator yourself, but this tweak saves having to remember to disable both it and the DSActivityView.

You can set this property via:


[DSActivityView activityViewForView:self.view].showNetworkActivityIndicator = YES;

or to toggle it on an already-visible activity view:


[DSActivityView currentActivityView].showNetworkActivityIndicator = YES;

You can get the project from my Dejal Open Source Subversion repository via this Terminal command:


svn checkout http://dejal.svn.beanstalkapp.com/open/DSActivityView

Or browse the source directly on the web.

Narrator 2.0.5 released

I'm pleased to report that we now have a solution for the Snow Leopard incompatibility of Narrator, the fun app to read out stories and interviews in multiple voices.

The issue was a bug in Snow Leopard, which prevented Narrator from open its own documents. The bug stumped Apple's Developr Technical Support engineers, and definitely seems to be a bug in the operating system itself, not in my code. But the DTS engineers finally came up with a workaround for the bug, which this update implements. Narrator can once again open its documents, and so now appears to be fully compatible with Snow Leopard.

My apologies for any inconvenience this bug may have caused.

Download Narrator 2.0.5 now!

And remember, you can still get Narrator and 11 other useful apps for just $49.95 from TheMacBundles for another few days.

Last chance for TheMacBundles!

TheMacBundles promotion is almost over! Last chance to get Dejal Narrator and 11 other great apps for just $49.95.

Narrator utilizes speech synthesis to read out the contents of a text document, using different voices for different parts. You have a range of "actors" that can portray any number of "characters", so various passages of your document are spoken with differing voices, pitches, inflections, etc. You can have it read out a play or story with appropriate voices. The words are highlighted on-screen, and there are also a couple of silent read-along options for stage directions, or for you to read out your own parts. A full license is included in the bundle, not some cut-down version.

You can see more of it on the Narrator page, or download it now to give it a try.

Note that at present Narrator has an issue on Mac OS X 10.6 (Snow Leopard): everything works okay, except that it can't open saved Narrator documents. It can open other kinds, though. I'm still waiting for help from Apple to fix this, but will release a free update to fix this as soon as possible. Of course, if you're still on Leopard, you won't be affected.

This bundle also includes 11 other fine apps, for only $49.95. A bargain!

The included apps are:

  • CrossOver Games
  • DVDRemaster Pro
  • Entourage Email Archive X
  • EastPrint
  • ImageFramer
  • Money
  • Neutrino
  • Scribbles
  • Speed Download
  • Super Flexible File Synchronizer

Plus bonuses:

  • Mac DVDRipper Pro
  • Narrator

12 apps for just $49.95 — a saving of over 85%!

Visit TheMacBundles.com to learn more, or to take advantage of this great deal before it expires. Don't delay!

Simon, Time Out, Caboodle & BlogAssist releases for Snow Leopard

Snow LeopardAnnouncing maintenance updates for Dejal Simon, my essential server monitoring tool, Time Out, my break reminder tool, Caboodle, my lean clean snippet machine, and BlogAssist, my handy HTML markup assistant.

Each update includes improvements for Snow Leopard (Mac OS X 10.6) compatibility. I'm not aware of any remaining compatibility issues with these products — please let me know ASAP if you do find anything.

Note: Narrator is still partially incompatible with Snow Leopard. It all works, except it can't open documents saved in its native format (but can still open other kinds of documents). I have a Developer Technical Support incident request in with Apple's engineers to help me solve this, but I'm sure they're swamped with queries at present, so who knows how long they'll take to come up with a solution. The last word I have is that it seems to be a bug in Snow Leopard... so we might have to wait for 10.6.2 or later, but I'm hoping that a workaround can be found. [Edit: 10.6.1 doesn't fix it, either.] I'll do a free update as soon as a fix is available. Sorry for any inconvenience in the meantime!

In addition to Snow Leopard compatibility, Simon also includes some other changes:

  • Updated the iPhone Report Template to improve the behavior of the back button and other aspects.
  • Added a hidden preference to output debug information from the E-mail plug-in. It can be activated by entering "defaults write com.dejal.simon2 EmailDebugMode YES" in Terminal.
  • Also added a hidden E-mail plug-in preference to use the recipient's SMTP server instead of the sender's, via "defaults write com.dejal.simon2 EmailUseRecipientServer YES".
  • Added Japanese localization, thanks to Koichi Matsumoto.

Download now:

Narrator and 11 other apps in TheMacBundles

I'm pleased to announce that Dejal Narrator, my fun app to read out stories and interviews in multiple voices, is included as a bonus in the fourth TheMacBundles collection.

Narrator utilizes speech synthesis to read out the contents of a text document, using different voices for different parts. You have a range of "actors" that can portray any number of "characters", so various passages of your document are spoken with differing voices, pitches, inflections, etc. You can have it read out a play or story with appropriate voices. The words are highlighted on-screen, and there are also a couple of silent read-along options for stage directions, or for you to read out your own parts. A full license is included in the bundle, not some cut-down version.

You can see more of it on the Narrator page, or download it now to give it a try.

Note that at present Narrator has an issue on Mac OS X 10.6 (Snow Leopard): everything works okay, except that it can't open saved Narrator documents. It can open other kinds, though. I'm waiting for help from Apple to fix this, but will release a free update to fix this as soon as possible. Of course, if you're still on Leopard, you won't be affected.

This bundle also includes 11 other fine apps, for only $49.95. A bargain!

The included apps are:

  • CrossOver Games
  • DVDRemaster Pro
  • Entourage Email Archive X
  • EastPrint
  • ImageFramer
  • Money
  • Neutrino
  • Scribbles
  • Speed Download
  • Super Flexible File Synchronizer

Plus bonuses:

  • Mac DVDRipper Pro
  • Narrator

12 apps for just $49.95 — a saving of over 85%!

Visit TheMacBundles.com to learn more, or to take advantage of this great deal.

Dejal apps on Snow Leopard

Snow LeopardGood news: most Dejal apps work fine on Snow Leopard (Mac OS X 10.6).

One issue that you may find with Caboodle and BlogAssist is that the Services menu has been enhanced, and the items for those apps might be disabled by default. You can re-enable them via the Keyboard Shortcuts page of the Keyboard system preferences.

However, it's not all good news. Narrator seems to be broken on Snowy. Opening a document fails, whether it was saved on Leopard or Snow Leopard. The document opens, but no content is loaded. It still opens version 1 documents fine, but not version 2's, which is rather a problem.

I've spent several hours last night and this morning trying to figure out what the problem is, without any luck so far. I'll keep on it, but just wanted to warn anyone using Narrator.

Help cure cancer with the Pan-Mass Challenge software bundles

Once again, Seth Dillingham is offering bundles as a fund-raiser for the Pan-Mass Challenge, which supports cancer research and treatment. A very worthy cause.

Unlike typical software bundles, where hundreds or thousands of people might get a fixed collection of apps at a discount, this one is a bit different: you can use his Bundle Builder site to make your personal ideal bundle of iPhone and/or Mac apps, and offer your own price for it.

I am happy to participate in this effort again this year. A Standard license is available for Dejal Simon, my essential server monitoring tool, along with licenses for Dejal Caboodle, my lean clean snippet machine, Dejal Narrator, my fun app to speak stories in multiple voices, and Dejal BlogAssist, my handy HTML markup tool. Plus hundreds of other great products from other developers.

Go ahead, take a look, and put together your ideal bundle of apps, and help fight cancer!

Narrator 2.0.4 released

Narrator, my fun text-to-speech tool to read out stories or interviews in multiple voices, has now been updated to version 2.0.4.

It includes:

  • Fixed an issue with the Preferences window, where edits might not be saved when quitting with the window still open (specifically when an edit is still active).
  • Fixed an issue that could prevent finding licenses in very rare circumstances.
  • Updated the built-in Kagi purchasing tool to the latest version, which fixes some issues with Leopard.

Download Narrator 2.0.4 now!

Portland Japanese Garden

My wife and I are big fans of the Portland Japanese Garden, five distinct Japanese garden styles over 5.5 acres in the hills overlooking downtown Portland, Oregon. My wife even volunteers there once a week as a gardener.

Here's a short piece from the Travel Channel describing the garden:

If you're in Portland or visit, the Japanese Garden is a must-see.

Last chance for the Mac Bundle Box!

[Mac Bundle Box]

The Mac Bundle Box promotion is almost over! Last chance to get Simon Standard and 11 other apps for just $49.00!

This great bundle expires in just a couple of days, so if you've been thinking about it, wait no more!

The bundle includes a Standard license for my Simon, the essential website and server monitoring tool. Use it to watch your own sites for failures, or others' sites for changes, and get notified via Twitter, email, sounds, speech, or other means.

Simon Standard retails for $59.95. This is the first time it has ever been included in a bundle. If you're at all interested in Simon, you'll save $10 and get 11 apps for free by buying this bundle... if you hurry!

Other apps in the bundle include:

  • Freeway (normally $79.99)
  • Keynote Themes (normally $39.00)
  • DEVONthink (normally $49.95)
  • myNotes (normally $24.95)
  • iCash (normally $60.00)
  • DaisyDisk (normally $19.95)
  • Web2Delight (normally $19.95)
  • Chronicle (normally $19.95)
  • xHub (normally $24.95)
  • Stomp (normally $29.95)
  • Exces (normally $30.00)

Visit the Mac Bundle Box site now to take advantage of this great deal. Don't delay!

Announcing DSActivityView: open source for iPhone developers

This blog post has been replaced by a newer edition.

Please see blog posts on DejalActivityView.

DSActivityViewI recently wrote a reusable class for a couple of iPhone apps I'm currently working on, called DSActivityView. I decided to release it as open source. Read on for details.

Firstly, I should say that this work was inspired in part by Matt Gallagher's excellent article, Showing a "Loading..." message over the iPhone keyboard. My code only uses the -keyboardView method from his article, but he deserves credit and thanks for that and many other helpful articles. If you're not reading his blog, Cocoa with Love, you're doing yourself a disservice.

Back to my class. Actually, there are three classes: DSActivityView, DSBezelActivityView, and DSKeyboardActivityView. They provide three styles of activity view, and could easily be extended to support more.

DSActivityView

DSActivityViewThis does a simple horizontal-style loading view, intended for situations where you have a blank view while loading data. It can be displayed very easily — for the default "Loading..." label text, simply use:

[DSActivityView activityViewForView:self.view];

The activity view is automatically added as a subview of the specified view (e.g. the current content view). No need to save the result to an ivar. It automatically supports rotation to any orientation, too.

You can specify a custom label via:

[DSActivityView activityViewForView:self.view withLabel:@"Processing..."];

Or specify a custom width, e.g. so you can change the label while it is being displayed without upsetting the geometry, via:

[DSActivityView activityViewForView:self.view withLabel:@"Connecting..." width:100];

Then when you're done with it, simply invoke this to get rid of it:

[DSActivityView removeView];

DSBezelActivityView

DSBezelActivityViewThis is a subclass of DSActivityView, which displays an animated round-rect-enclosed variation: it animates into view by zooming from full-screen, with a gray background fading in to cover the passed view, and animates out by zooming to half size and fading out the background (see below for a movie showing it in action). It is ideal for situations where you have content visible already, but want to do a network operation to validate or send data, or some other time-consuming activity.

Display it via:

[DSBezelActivityView activityViewForView:self.view];

The [DSBezelActivityView activityViewForView:withLabel:] and [DSBezelActivityView activityViewForView:withLabel:width:] variations are also available. To remove with animation, call:

[DSBezelActivityView removeViewAnimated:YES];

DSKeyboardActivityView

DSKeyboardActivityViewThis is a subclass of DSBezelActivityView, which displays over the keyboard, somewhat like the OS 2 Text app used to do. It is useful to simply prevent further typing while validating a field or sending data (though you might also want to disable the field, to prevent pasteboard operations on it). No need to specify a view to use for this, since it uses the keyboard:

[DSKeyboardActivityView activityView];

Plus a [DSKeyboardActivityView activityViewWithLabel:] variation for custom text. Remove it the same as for the bezel style:

[DSKeyboardActivityView removeViewAnimated:YES];

Demo

I've included a demo project that builds an app to show the various options: the three styles, default or custom label text, covering just the content view or whole window, etc. It requires iPhone OS 3. Here's a movie showing the demo app running:

You can get the project from my Dejal Open Source Subversion repository via this Terminal command:

svn checkout http://dejal.svn.beanstalkapp.com/open/DSActivityView

Or browse the source directly on the web.

You can also download a snapshot, though it may not remain up-to-date; using Subversion is the recommended approach.

Follow @dejalopen on Twitter for automated Subversion commit message updates. You may also like to follow @dejaldevdiary for my behind-the-scenes development diary, and @dejal for general Dejal and personal tweets. Finally, there's also a RSS feed for the repository.

I hope these classes are useful. You are welcome to use them in any project, commercial or otherwise. I just ask that you give me credit; see the DSActivityView header for the easy and free licensing terms. If you do use this code in any form, please tell me (or comment here).

If you make improvements, e.g. to add other activity styles or fix bugs, please send them to me so I can share them with the community. Thanks.

Enjoy!

Update: see also an update to optionally support the network indicator, and an update for iOS 4.

Mac Bundle Box 5 now available!

[Mac Bundle Box]

The fifth Mac Bundle Box, a collection of 12 great apps, is now available!

$458.59 worth of software for the low price of just $49.00! An amazing deal. Plus 10% of each sale will be donated to Charity: Water, a very worthy cause.

The bundle includes my own Simon, the essential website and server monitoring tool. Use it to watch your own sites for failures, or others' sites for changes, and get notified via Twitter, email, sounds, speech, or other means. The bundle includes a Standard license, which retails for $59.95 and enables up to 20 tests. If you need more, you can upgrade to the Enterprise license for much less than the normal standalone price. So you can get 12 amazing apps for less than the normal price of a Simon Standard license! It's a no-brainer.

Other apps in the bundle include:

  • Freeway (normally $79.99)
  • Keynote Themes (normally $39.00)
  • DEVONthink (normally $49.95)
  • myNotes (normally $24.95)
  • iCash (normally $60.00)
  • DaisyDisk (normally $19.95)
  • Web2Delight (normally $19.95)
  • Chronicle (normally $19.95)
  • xHub (normally $24.95)
  • Stomp (normally $29.95)
  • Exces (normally $30.00)

Buy Simon Standard from the Mac Bundle Box, save $10, and get all these other apps for free! :)

Visit the Mac Bundle Box site to take advantage of this great deal, while it lasts!

Anatomy of a feature

Brent Simmons wrote today about the anatomy of a feature, an article that really resonated with me.

It's tempting to think that adding a feature like this is just about adding the functionality — but there's a bunch more to it than that.

I get a lot of feature requests for my apps, which are certainly very welcome. But I think a lot of people don't quite realize how much work even the most trivial-sounding feature enhancement can be.

Brent gives a very clear and accurate picture of the process many developers, myself included, go through when considering and implementing such changes. Every aspect of them needs to be carefully analyzed and refined. Perhaps someone asks for a specific feature, but I can tell that what they really want is something different — they just came up with what sounded to them like an easy compromise, when the ideal solution might in fact be easier, as well as better for the overall app. Happens all the time.

But as I said, I do really value feature requests (and bug reports). I want my apps to work well and be as helpful as possible to my customers. For that reason, I keep track of such requests for each app, and also keep a running tally of "votes" for each feature (which sometimes requires some interpretation when different people have different takes on something). When lots of people are asking for the same thing, it rises to the top of my list, and I make it a priority for the next release. But only if I can do it in a way that is consistent with the design goals of the app. That's the tricky part.

Good thing I enjoy planning; I spend much more time analyzing and planning features than actually writing them.

Follow @dejaldevdiary for David's Dev Diary

Just thought I'd mention for any Mac or iPhone developers who read my blog, or customers who are interested in a behind-the-scenes look at my development process:

I recently joined the club and created a David's Dev Diary account on Twitter. It is a separate place for me to post a potentially boring diary of my development work. It is focused purely on the technical aspects that I normally wouldn't bother mentioning on my main Twitter account, @dejal.

Follow @dejaldevdiary on Twitter for all the highly exciting technical details (and maybe a hint or two about what's coming up... e.g. I'm currently working on a secret new iPhone app).

For a list of other developers writing diaries, check out the Dev Diaries website.

Pan-Mass Challenge software auction

[PMC Software Auction]

Seth Dillingham is hosting a Pan-Mass Challenge software auction once again this year, as a fundraising project for a Massachusetts cancer care charity.

He wants to collect hundreds of software products, which will be auctioned via his site soon.

This is a very worthy cause. I've participated the last couple of years, and am happy to participate again this year. I am donating at least 10 Standard licenses for Dejal Simon, at least 10 licenses for Dejal Caboodle, at least 10 licenses for Dejal Narrator plus at least 10 licenses for Dejal BlogAssist (about $1,140 total value). I encourage other Mac developers to join in, too.

For more information, visit the PMC Software Charity Fundraiser site.

Impressive a cappella rendition of Toto's Africa

Very well done; this choral ensemble (Perpetuum Jazzile) performs the Toto song "Africa", a cappella, complete with human-produced rain and thunder sound effects:

(via @tamarcita)

The Mac Bundles is almost over!

Last chance to get Caboodle and eight other apps for just $49.95!

This great bundle expires in just a couple of days, so if you've been thinking about it, wait no more!

Click here for more information.

Syndicate content