Monday, February 28, 2011

Tweaking Google Code's Issues Gadget

I'm a big fan of Google Code where I host the littleware project. I've been playing around with gcode's issue tracker trying to figure out some way to embed the tasks associated with a code sprint into the sprint's overview documentation, and I eventually stumbled upon a nice issue-tracker gadget in a Gadgets for Google Code bLog entry that almost does what I want, but not quite!

Fortunately, it turns out that the issue-tracker gadget is one of the gadgets developed by google's code-hosting team, and the code is open source here. I cloned a copy of their issue-tracker gadget under a littleware 'gadgets' repository, and was able to add a milestone parameter to the gadget with only a little bit of trouble. I think I'm all set!


I submitted an issue with the gadgets for google code project with some information about my patch. It would be cool if they fold the patch into their code - we'll see what happens.

Wednesday, February 23, 2011

Success tastes like pizza!

I think I finally have the blogger podcast thing working. To recap - I started by hosting my .mp3 media file with Google docs, and that works great, except Google docs publishes the .mp3 file to a URL that does not include the .mp3 file extension (something like https://docs.google.com/uc?id=0B-82pgvnWy-8OWM2ZWJhYzktOWU5OC00MTI4LWFiZWYtZWNhOTQ0ZjlmMDA2&export=download&hl=en), and iTunes requires that a podcast's enclosure references a URL with a valid media extension (more details here).

So I went looking for some other free place to host my .mp3 files, and found Microsoft's sky drive, which preserves a file's extension in its download URL (ex: http://public.blu.livefilestore.com/y1p5DNvAssqO8iaDVAKdFChzS01Pj_v3M9B68-VJdTj9sQr43GHTr8pThRglPvVeIzJlbU4AE3nQbW7NiocbkkOLA/shCore.js?download&psid=1). Unfortunately, that download URL does not persist - a file's URL changes from day to day.

Finally, I tried Google sites, and (so far) I think that works - with persistent iTunes-friendly URLs like https://sites.google.com/site/frickjack/projects/podcasts/Podcast20110223.mp3?attredirects=0&d=1

This picture shows our dog, Moose, guarding a pizza from our other dog, Ponzi - Moose wants it all for himself! One tip for home made pizza - if you don't have a pizza stone, then an upside down iron skillet works too.

From Food
Picasa logo

Skydrive lets me down!

Ugh!

I was pretty happy when I was able to setup a blogger based podcast with mp3 files served from Microsoft's sky drive, so I went ahead and linked my blogger template to a copy of Gorbachev's syntax highlighter on sky drive too, but it turns out the freakin' sky-drive URL's do not persist, so neither of those nifty tricks work. I just inlined the syntax highlighter into the blogger template, but I'll have to figure something else out for audio-file hosting. There must be some way to get Google Docs URL's to work with iTunes.

This is from Apple's "Making a Podcast" page:
The URL before the GET-style form values (before the first ?) must end in a media file extension (e.g. mp3). To work around this, the feed provider can alter their URL from this: http://www.podcaster.com/load.php?f=&Wipeout.php to this: http://www.podcaster.com/load.mp3?f=&Wipeout.mp3 Notice how it says load.mp3 instead of load.php. It should be possible to accomplish this via various means, such as web server rewrites. iTunes looks at the extension of the path part of the url, i.e. the part before the"?".

Ugh!

JScrollPane a JPanel !

If you're a frickjack like me, then you might believe that a JScrollPane only works with widgets like JTextArea that are specially designed to be scrollable, but (as with so many other beliefs) you would be wrong! Turns out JScrollPane works just fine with JPanel, which is a big deal when you're trying to layout a bunch of widgets on a big form or whatever. Anyway, the scala code below works, so I hope scrolling works for more complicated panels too. I'll let you know if I find out otherwise.

package littleware.demo

import javax.swing._

object Toy {
    def main( args:Array[String] ):Unit = {
        SwingUtilities.invokeLater( new Toy )
    }
}

class Toy extends Runnable {
    override def run():Unit = {
        val jbox = new Box( BoxLayout.Y_AXIS )
        (0 until 40).foreach( (index) => {
            jbox.add( new JLabel( "Test" + index ) )
        }
        )
        val jframe = new JFrame( "Toy" )
        jframe.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE )
        val scroll = new JScrollPane( jbox )
        scroll.setVerticalScrollBarPolicy( ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS )
        scroll.setPreferredSize( new java.awt.Dimension( 700, 400 ))
        jframe.add( scroll )
        jframe.pack
        jframe.setVisible( true )
    }
}

How do you like that slick syntax highlighting ? If it works (I won't know till I post, so frick), then it's all thanks to Alex Gorbachev's syntax highlighter - which I copied over to Skydrive, and hooked into the bLog template. Alex is probably an evil James Bond villain, but I'll have to paypal him $10- when I get motivated.

That's all pretty exciting stuff. Our dogs were very excited too ...

the pack is bored

Friday, February 18, 2011

Pound cake!

 

What to do with 1/2 pound butter, 5/3 cups sugar, 2 cups flour, ... Good old Fannie Farmer!

 

I also accidentally uploaded this pretty cool picture of my dog, Shug, while playing with Picasa. Go, Shug!

Posted by Picasa

Thursday, February 17, 2011

Blogger + Google Docs Podcast

I often enjoy listening to podcasts while I'm playing around with the computer. The java posse, TED, Entrepreneurial Thought Leaders, and the New Yorker Political Scene are some of my favorites.

I recently began wondering how I could publish my own podcast of (for example) a lecture at the university or whatever with as little expense and effort as possible. It turns out that cheap and easy podcast publishing can be a simple 3 step process thanks to great free online services like Google's docs and blogger, and the very useful open source audacity audio program (or Garage Band is probably even better on the Mac).

  • First, record your podcast with audacity or garage band or your iPhone or whatever. You can get as professional as you want - I'm just a hack for now.
  • Second, publish your audio file online. Google docs gives you 1 GB of storage for free, but Microsoft's skydrive provides 25 GB for free!
  • Third, setup a podcast feed that links to your audio file. A podcast feed is just a specialized RSS feed, which is just an XML file that readers know how to interpret. You could just edit an rss xml file, and publish that via Google docs or skydrive, but Google's blogger platform makes it easy to associate audio files with blog entries, so the blog feed also acts as a podcast feed.
  • Finally, register the podcast's feed url (ex: http://blog.frickjack.com/feeds/posts/default?alt=rss) with iTunes or your favorite podcast player.

Even an idiot like me can pollute the internet with worthless media!

Update ...

I wrote this post before I actually had the podcast feed working, and I wound up driving myself crazy trying to get iTunes to recognize the podcast when hosting the .mp3 file on Google docs. The feed worked fine with Google Reader, but I think iTunes looks at the enclosure URL to decide what kind of media file a feed item references rather than trusting the enclosure's mime type attribute. Google docs generates nonsensical urls that do not preserve the file extension (ex: https://docs.google.com/uc?id=0B-82pgvnWy-8OWM2ZWJhYzktOWU5OC00MTI4LWFiZWYtZWNhOTQ0ZjlmMDA2&export=download&hl=en is a .mp3 file), so iTunes throws a
There are no playable episodes ... The URL might point to text-only episodes, or contain file types that iTunes cannot play.
error when loading the podcast.

Fortunately, Skydrive came to my rescue with an iTunes friendly URL for my audio file: http://m8cb3q.blu.livefilestore.com/y1pCrRuW5NqZivMGgB7_oAUy_g8m_83domL0-7pAkoVezoGWOATDPuuLQNxECsNAK60JSxlYwkgHW2WycExfTMGXBxd4-gM0bqR/Podcast20110217.mp3?download&psid=1.

It also turns out that Google Reader is nice about letting random frickjacks embed its audio player!

Another Update ...

Freakin' sky-drive url's don't persist (there's some kind of cache timeout mojo), so the .mp3 links are now bogus. Back to the drawing board!

Wednesday, February 09, 2011

Apache mod_proxy build trickery

I lost a few more hairs building mod_proxy for an existing Apache install. It turns out mod_proxy requires proxy_util.c on the apxs build line.

   apxs -i -c mod_proxy.c  proxy_util.c

Of course the .so builds and installs fine without proxy_util.c, so you think everything is fine until apache pukes with a "missing symbol" error. Frickjacks!