Client-side Ads

Appily will show ads in the final version (maybe even sooner to test various approaches). Frankly, I dislike inline ads like Pownce displays because mixing ads with messages from friends is just plain icky. Maybe others feel differently but I think the most boring approach, AIM, is the best way.

While the format is likely to be old-fashion, content will be very different. More on this later. I would like to talk to interested ad networks to discuss ways to integrate new types of ads.

Comment Gardening

Whether comment support is essential for blogs or not, I think blog comments can be improved on. Simple list of comments is just too flat and boring. And best comments tend to be buried in a pile of me toos, silly jokes, and troll craps.

I think post writer should be able to highlight comments they like so they stand out. Post writer should also be able to exile comments they don't like to a secondary unindexed comment page where comments from unverified commenters can go as well.

I also think post readers should also be able to 'favorite' comments, digg-in-a-bucket like.

Just dumping ideas to reduce brain fart before starting work. ;-p

AIR b2

I am happy to see AIR b2 released but the tailwind it caused some minor migration head scratching. Change list in AIR release notes was helpful so don't miss that. The main problems I had were:

  1. Getting adt to work again because code signing is now required. Solution: generate a self-signed cert (see below).
  2. Embedded WebKit browser wasn't firing event handlers injected dynamically using innerHTML. Solution: hook them using DOM methods. JQuery comes in handy for this.

A common hassle is routing hyperlinks in DHTML to default browser. I haven't found a way to do this automatically so I am marking all external links with 'xlink' CSS style and injecting click event handler that block default behavior and route href to air.navigateToURL, messy but easy with jQuery.

Generate self-signed cert:

adt -certificate -cn Foo [-ou org_unit][-o org_name][-c country] ("1024-RSA"|"2048-RSA") {pfx_file_name} {password}

Sign AIR file using the cert:

adt -package -certificate foo.pfx -password 123456 … 
 

Running out of AIR

As an AIR developer, I am in the position to feel it's problems more than it's capabilities. AIR's lack of extensibility is not an issue because that can be dealt with early enough to be a non-issue. Currently, my deepest concern lies with memory management: how do I keep memory consumption under control?
I am aware of all the potential sources of memory leaks (why are'nt event listeners using weak references by default? why does GC have to be so dumb that it'll dump ongoing HTTP request when nothing is holding a reference to URLLoader? Isn't an activity a reasonable reference?) so I've tried to deal with them proactively but, lacking sufficient tools, I haven't been able to pinpoint and address all the memory leaks, the kind that prevents my app from running for days. My AIR app starts off under 20mb on PC and 50mb on Mac (I have no idea why AIR burns more memory on Mac than PC) then starts adding about 10 meg per day. Reactive nature of AIR GC is not the issue because I've tried forcing GC proactively and can still observe leaks. As it stands, I can demo my app but it's definitely not ready for deployment because of the memory creep.
If Adobe wants AIR to succeed, they must offer better tools that enable developers to get a better handle on memory management because it's all too easy to make leak memory in AIR apps (try writing an Ajax-Flash hybrid AIR app, a double whamy of leak heaven). BTW, I am not interested in direct contact by AIR team to resolve my problems because, when I blog about a problem, it's almost never about just my problem.

Update:

Memory situation has been greatly improved by beta2 release of AIR. I still need to do more testing but memory footprint appears to be 10%~20% less and leaks down from torrent to trickle. I can sleep at night at this level. 🙂 Only sour part is that profiler will only be in the professional version of Flex Builder 3. Oh, well. I tried.

AS3 Syntax-Coloring Editor for Eclipse

I use Aptana plugin to write Flash/Flex/AIR in Eclipse. For AIR in particular, Aptana's AIR app launcher is great. However, one key component missing from Aptana is ActionScript 3 (aka AS3) editor. I've been limping along by mapping .as files to Java editor but I just remembered an old Eclipse plugin that used a template to control syntax coloring. So I went looking and found it here: color editor. It was still being maintained. Woot.
It comes with AS2 support but not AS3 so I went searching again and found the mode file for AS3 here: actionscript 3 syntax hilighting for jEdit. The color editor reuses jEdit's syntax coloring mode files. Almost there.
I expanded the color editor jar file into Eclipse 3.2 plugins directory then dropped the jEdit AS3 module ("actionscript.xml" file) into it's 'modes' directory. Restart Eclipse and used Open With to open some .as files. Eeeks. Too colorful to say the least. The color editor came with color preference settings panel so I changed the colors approximately match that of Java colors. Better.
Then I noticed that some keywords were missing (new, delete, super, etc.) so I added them to the actionscript.xml file and went back to coding. Note that Color Editor doesn't fully understand AS3, just enough to add some colors which I find useful.
BTW, TextMate Bundle for AS3 can be found in TextMate code repository.

Update:

Color Editor was hanging on some seeminly innocent looking javascript code so now I am back to using Java editor to edit ActionScript. Damn.

Extending OPML 2.0 through a Wiki

Since Dave Winer is working on OPML 2.0 spec again, I thought I should write about an idea I had that'll help people discover, document, and reuse extension attributues. The idea is to create a wiki for OPML attributes and use wiki page URLs as namespace URIs. The wiki should have three URL types: namespace, attribute, and profile.
An OPML namespace wiki page lists attributes in the namespace. An OPML attribute wiki page documents the attribute and its value. An OPML profile wiki page is intended to capture common practice by listing attributes used in practice. A namespace qualified extension element in OPML head could simply point to the profile page attributes used can be understood in context of the application domain.
That's it. This suggestion requires no change to the spec and one optional extension element in return for a place where all OPML attributes and common profiles can be documented. I think it's a bargain. A step beyond this is introducing wikified-microformating to generate schema info from then pipe that to OPML validators so that OPML documents can be validated throughly without skimping on extensibility.

Flex Source to the Rescue

Developing in Flex can be very frustrating at times. Latest hangup was due to mx.controls.Text class scrolling content undesirably when mouse wheel is turned. None of the solutions I found online worked but as I started writing my own custom text component, I remembered that Flex came with source code many of the framework classes. So I dove in and found this hidden yet relevant documentation in the source code:

If the Text component has an explicit width, its text wordwraps within that width, and the measured height is tall enough to display all the text. (If there is an explicit height or a percent height in this case, the text may get clipped.)

If it doesn't have an explicit height, the measured height is tall enough to display all the text.

If there is an explicit height or a percent height, the text may get clipped.

With this info, all I had to do was set width explicitly and leave height unspecified to prevent Text component from scrolling.
The lesson here is that, while Adobe provides a lot of documentation, real gems are in the source code.

Akismet is Alright

Duncan Riley at TechCrunch writes:

Akismet is a service that relies on the failure of the WordPress code to be able to natively deal with comment spam. The service is free for personal use and a paid service for everyone else. As the co-founder and essentially the head of the WordPress open source movement, Mullenweg leads the initiatives by WordPress to combat comment spam. On the other hand as the head of Automattic he runs a company that profits from those very failings. The question then becomes: can one profit from the failings of an open source product whilst still leading that very code’s development?

Wrong. The problem Akismet addresses is a general problem, not one specific to WordPress and it would be less effective for every blog hosting services to run their own comment filtering service. IMHO, fees Akismet charge are well-earned and kudos Akismet receive, for offering free comment filtering service to non-commercial bloggers, is well-deserved.

As to whether there is an acceptable line for advertising and conflicts of interest, my answer is yes but does it really matter when the line can be redrawn?

Trying Bon Echo

I've been getting tired of Firefox hanging frequently on my Mac but couldn't switch to alternatives like Camino because, as a developer, I need a browser with widest third-party support (like Silverlight plug-in). So when I ran across a comment suggesting Bon Echo as a possible solution to a similar problem Fred Wilson was suffering from, I decided to give it  a try.
This post is intended to help people find Bon Echo because googling turned up only old versions. You should be aware that:

  1. Bon Echo is a build of Firefox supposedly optimized for OS X.
  2. Bon Echo versions are slightly behind that of main Firefox versions (latest Bon Echo version is 2.0.0.5 while the latest Firefox is 2.0.0.6).

First point is essential to me because I can use existing Firefox configuration as-is. You will have to delete Firefox.app though. Hopefully, the second point will be resolved when Bon Echo becomes more popular.

Stretching TwitterGram

So a limping version of my TwitterGram Facebook app is up and running now but I still have a list of chores to finish, including an updater (it's manual update til then), before I can think about cooler features like:

  • conversation – many people posting TwitterGrams on one topic.
  • linker – show links and text while playing one or more twittergrams.
  • player – play a conversation together, auto-leveling volume as it plays.

A cheap way of doing conversation is just looking for TwitterGrams with same title. I can then list them in an OPML file so they can be played together. A custom Flash-based player is also needed to display links while playing so I can say "checkout blah" without having to spellout a URL. I think John Batelle was going to ask HP if they can do that for his voice-casts.

Flash-based player running on mobiles could make the listening experience more enjoyable and hands-free. Hmm. Maybe it makes more sense to just call-in to listen to TwitterGrams. Then VoiceXML-based player is all that's needed. VoiceXML works is needs to be done anyway to record TwitterGrams. I wonder if there is a simple way to 'capture' links with a single button click while listening to a phone call, sort of like 'catching' song info or product info while listening to radio or watching TV.

Anyhow, I am going to have to wrap up all this fast before I get too distracted away from my other projects. ;-p