Re: [Rhythmbox-devel] flac audio format support

At 6:53p -0400 on Wed, 13 Aug 2008, Eric Casteleijn wrote:
> Kevin Hunter <hunteke earlham edu> writes:
>> [pseudocode]
>> Or something like that.  A thought.
> Basically (if I may jump in here, as a complete Rhythmbox n00b, 
> but an experienced developer,) because defensive coding is bad:

You make some good points, but I disagree with your premise that
defensive programming is bad.  Defensive programming is a mindset, not a
recipe.  In this case, the mindset (in my mind) is to protect the
developers from FAQs by new/innocent/ignorant users.

> [ What about unexpected reasons for play failure? ]

*This* particular question is something that can be addressed, I
believe, so I suggest to address it directly for the user.  If there is
another reason that Rhythmbox cannot play the file, then *that* reason
should be given to the user.

> The best thing is to let the original error bubble up as near as 
> possible to the end user, before catching and interpreting it.

By this I take it you think it's exceedingly difficult to pin down the
exact reason an error occurs?  I agree with you for unknown errors and
unexpected conditions, but I disagree that for *certain* errors we can't
know with confidence.  Certain tests can be /very/ specific, and if we
can properly identify the issue, solve it early.  If we can't, then do
as you suggest and bubble up to the end user.  We won't ever get 100%
error coverage, nor probably even 50%.  But we can strive to solve the
common cases that we /can/ solve.  I believe this *particular* case is

> Pragmatically though, sometimes failing silently is better than 
> throwing lots of errors (i.e. when importing a directory with 
> possibly thousands of files the player won't be able to play.) 
> The choice there is to bail out on the first error, or silently 
> continue, and maybe log the problems to the console or a log file.

I 100% agree with you here.  Context is everything.  Context, context,
context.  I find it a damned frustating user experience when an
application errors out with a popup dialog box to which I *must*
respond.  Sometimes, clicking "Ok" just results in another immediate
popup.  Ugh.  Your example with errors importing thousands of files is a
good one.

> Maybe this is less than ideal, but we live in a less than 
> Panglossian world, and if people run a system that has no way to 
> a interpret a certain type of file, it is unrealistic to expect a 
> player like Rhythmbox to solve this problem.

Eh, what this says to me is that the infrastructure is not there ...
yet.  This is open source!  It'll get there or it won't.  We're here to
help guide the way as a team of developers, idea people, end-users, etc.
 In that, if we can't do something that is a big enough problem, the
response should not be "It can't be done, get over it."  Rather it
should be "How can we make this work?"

> unless players become huge monolithic software that come with 
> their own codecs, which would be even worse:

:-) No one wants that!  (Err, with exceptions for certain other
Operating Systems and associated cultures.  ;-) )

I plead Rhythmbox code naivety, so it turns out both of us are noobs to
the Rhythmbox code.  ("Hey friend!" :-) )  At some point this discussion
will have to die without some actual evidence.  Which... reading further
in my Inbox, Jonathan seems to have provided.  Thanks Jonathan!


P.S. Definitely didn't know "Panglossian."  :-)  Learn something new
everyday ...

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]