How To Fix NetNewsWire “Domain: POSIX Type: error code: 32″ Errors

February 24th, 2005

If you are finding that NetNewsWire doesn’t update your feeds like it should be and when you open /Applications/Utilities/Console you see a bunch of lines like:

2005-02-24 15:54:24.679 NetNewsWire Lite[371] HTTP download error — Domain: POSIX Type: error code: 32 — URL: http://feedster.com/links.php?url=http://www.intencha.com/adrian/&type=rss

and you’re using Privoxy try changing the proxy settings from using localhost to using 127.0.0.1.  Doing so will also fix a problem where Internet Exploreron OS X can’t connect to any sites despite the fact that Safari can connect successfully.

Now I might go try the NetNewsWire 2.0 beta again since I think this was the problem that was causing me to not see a huge bunch of new items that I should have seen.

On Smart Tags And Producer Rights

February 20th, 2005

Iain Robertson and Robert Scoble have commented on Google’s new smart tags feature and while I agree with most of what they said I have to disagree on their views of producers rights.

Iain said:

Admittedly, the main people complaining will be those whose content has been altered, i.e. the producer of a given piece of work, who might find that some people are tracing new and interesting links away from their site. Fair enough that they complain, too — I know the idea of J. Random Company “hijacking” content in my site irritates me somewhat. To that end, I’d hope that Google would use the MSSmartTagsPreventParsing meta-tag, and/or a common tag standard can be agreed upon to allow content creators to opt out of the “service.”

But what if I as a user want those extra links and the content producer doesn’t?  The user should be able to override.  Content producers (forthwith referred to as you)  are allowed to send whatever they want down the line, that’s the control they get, users are allowed to manipulate, render and use that content as they see fit (but not distribute it to others).  Think of it like a newspaper.  Personally I don’t often read newspapers but I find them very useful when I need to light a campfire or line the bottom of a bird cage.  I’m sure the content producers aren’t very happy about that but they don’t get a say.  Sometimes I even use newspapers to create paper-maché sculptures out of them.  Some people cut out articles and put them in a scrap book along with content from other newspapers.

Why is it that it’s so wrong to do that with digital content?  Why can’t I write a script that combines all my favorite web pages into one big scrapbook page if it’s for my own usage?  Why can’t I get take advantage of the power my computer provides me and augment content with links to extra information?  Why can’t I do what I want with my computer?

You provided your content in the format you wanted and that content was provided according to your business model - not mine.  It was your choice to publish that content in the first place and your choice to publish in that format.  Why didn’t you use the things under your control to affect how people used your content?  If you didn’t want me to manipulate it electronically why did you provide it in electronic form?  Why did you provide it in HTML which was expressly created to allow different renderings to be created and to allow manipulation by users.  Why do you believe you should be able to extend your control to my computer?

Most importantly, why should I trust you to have control of my computer?  The track record of content producers making smart choices about how to use their control over user’s property is shocking.  Go out and grab a copy of the Dodgeball DVD and you’ll find that the content producer has decided to abuse your intelligence and waste your time using the non-skippable section of the DVD.  Try the Shrek 2 DVD, it has mandatory ads at the start!  This isn’t a free DVD which is paid for by advertising, this is a DVD I paid for that forces me to watch ads before I can watch the movie I paid to be able to watch.  Even if it were advertising sponsored - it’s not my fault if your business model doesn’t work, you still don’t have the right to take over control of my property.

When I pay a painter to paint my house, I expect him to paint it in the color I choose and not to paint a big ad for his other services on the side of my house.  When I buy a newspaper I expect to be able to use it to line my birdcage.  When I buy an apple I expect to be able to eat it when and how I want - I don’t want the shop forcing me to use their particular brand of knife to cut it.  When I pay a movie studio to watch their movie I expect to watch their movie, I don’t expect to make me watch a whole bunch of ads.

You get to provide the content in any means you see fit (including not providing it), I get to purchase the content in any medium available that I see fit (including not buying it), I get to use your content however I like and you don’t get a say in it.  Note that’s I get to, John down the road has to go buy his own copy if he wants to use it too, that’s okay but when he does buy it he gets to use it however he sees fit.

As a content producer myself I’m appalled at the grab for power being made here.  I have a couple of musicals I’ve written that I want to have some control over their production - I want to see that my artistic intent is upheld and I want to see that I get the credit I deserve for it.  I don’t publish those musicals on the internet, I don’t make them publicly available and those who are interested in using them will buy access to the content on clearly specified terms that both sides agree to - with one musical that means it just isn’t available at this stage.  I will use a contract to specify those terms and to enforce them, I will not tie strings to the director’s arms and make them my puppet so that I can ensure I get my way.  Similarly, the purchaser of my musical will be allowed to produce it how they see fit, they can hold the rehearsals whenever they want, they can read the script whenever they want and they can fund it however they want.

It’s such a simple system, I make my goods available on whatever terms I feel is right and potential customers decide whether they think it’s a good deal and suits their purposes.  I don’t get to complain that my customers are making apple pie instead of eating my apples raw if it wasn’t a condition of sale, I don’t get to complain that my business model doesn’t work and expect my customers to give up their rights to make it work - I have to change my business model.

There is a very important point that should be stressed.  When I mention terms of sale I mean clear terms that are presented up front, that don’t change, that are signed and agreed to by both sides before any transaction starts.  I don’t mean EULAs, I don’t mean acceptable use policies hidden on a website somewhere and I don’t mean things that are covered up by dishonest marketing.  This isn’t about technicalities and legalities, it’s about being honest, open and having a dialogue with potential customers instead of just trying to screw them over all the time.

Remember, producers have the right to produce whatever content they want, however they want or not publish it at all.  Users have the right to buy that content whenever, whereever and however it’s available and use it for whatever they want and can manage within the terms of sale or not buy it at all.

Evangelists and Koolaid

February 17th, 2005

A fair while back I commented on a job opening at Microsoft, noting that my blog would probably work against me in that particular case due to it being so critical of Microsoft.  Robert Scoble noted that Microsoft don’t want to hire evangelists that just drink the company Kool-aid and have no credibility.  He’s right of course but slightly missed my original reasoning.  It’s not so much that I’ve made some negative comments about Microsoft - more that I pretty much have never said anything positive about Microsoft on my blog.  I was supportive in my "Missing The Point" entry about Microsoft’s new interoperability initiative and did defend beta releases which were relevant to Microsoft at the time, but that’s about it.  See for yourself.

Not that I intend to be anti-microsoft, I don’t play around with new Microsoft technology all that often (and my experiments with the latest SQL Server betas were less than successful - though that’s probably just my lack of knowledge).  I’ve taken to watching Microsoft more lately - that’s why I subscribed to Robert Scoble’s blog in the first place and I’m slowly building the list of Microsoft related news sources I scan for information.  Still, I’m not seeing anything that particularly excites me. Much of that is because Microsoft has made such a mess of the Longhorn release - an event that just happens to be unfolding over the time period that I’ve been watching closely.  I’m sure Longhorn will be a great release for any number of reasons, but at the moment the public perception that I’m getting at least is of a child lost in the woods.  I’m sure they’ve got plenty of smart people to straighten that out though.

I’m a developer so .Net should be of interest to me, but I just don’t see anything hugely beneficial in it (.Net and Java are happily pinching ideas from each other so they remain roughly on par and Java is significantly more popular at the moment, plus I already know it well).  Worse than that though, Visual Studio.Net has proven to be the single most infuriating experience I’ve ever had with technology.  Sure I didn’t know what I was doing but I’ve been more clueless about many other things and not been driven that insane by them.

I’m just not passionate about Microsoft technologies at the moment and that would make me a bad evangelist.  The comments I’ve made on my blog just reflect that.  Having said that, if someone wants to buy me a tablet PC, at the very least I’ll be excited about the money I’ll make hocking it on eBay…

(Okay, that was a little cheeky…)

PS: The delay in revisiting this topic was caused by NetNewsWire enforcing a boycott of Scoble’s blog - for some reason it just stopped downloading updates and I didn’t notice.  How do you not notice half a million entries a day going missing?

How To Simulate Key Events In Swing JUnit Tests

February 17th, 2005

Gianugo Rabellino has been playing with unit testing in Swing - an area that I’ve spent a lot of time complaining about in the past.  In his particular case he’s trying to send key events to Swing components programmatically so that his JUnit tests can run automatically.  As Gianugo discovered you can’t just create a KeyEvent and send it to Component.dispatchEvent() because it gets rerouted to the focus manager.

Gianugo’s solution was to display the component on screen in a JFrame and make sure it has focus.  However, we can go one better - we can simulate the component having focus.

The interactions between Component.dispatchEvent() and the FocusManager are somewhat odd.  Component.dispatchEvent() sends the request to the FocusManager without actually checking if it has focus or not.  The FocusManager picks the component that has focus and sends the event to it’s Component.dispatchEvent() method.  It’s an infinite loop except that the Swing team so helpfully created a package private (read: totally hidden and inaccessible) variable in KeyEvent called focusManagerIsDispatching which tells the Component.dispatchEvent() method not to redirect the event over to the FocusManager but to actually process it like the JavaDoc suggests it will.

 

So, to make key strokes work with Swing components in JUnit tests we just have to set that variable to true using reflection before we pass the event into Component.dispatchEvent().  The code winds up looking something like (excusing any typos or misremembered method names - I haven’t bothered to compile this):

public void simulateKey(KeyEvent e, Component c) {
   Field f = KeyEvent.class.getField("focusManagerIsDispatching");
   f.setAccessible(true);
   f.set(e, Boolean.TRUE);
   c.dispatchEvent(e);
}

If that’s not quite right, check the code for KeyEvent and Component.dispatchEvent to make sure the variable names are right and check the JavaDoc for java.lang.reflect.Field in case I’ve misremembered a method in there somewhere.  The concept is definitely sound though.

Book List

February 12th, 2005

I’ve set up a blog to keep track of the books I want to read.  This year I want to do a lot more reading, particularly on technical subjects but also just stuff in general.  The most recent entries are syndicated into this blog over on the right hand side of the main page and RSS junkies can grab the feed.