Podcast part I: recording

I have been producing podcasts for almost a year now, primarily at Les Cast Codeurs (a French podcast on Java) but also helped a bit on JBoss Community Asylum Podcast.

I have been wanting to share my knowledge and experience for a little while now. I’ll split that in three parts:

  • recording
  • mixing
  • publishing

First things first then, for today the recording.

The material

Microphone

I use the Snowball from Blue Microphones and am very very happy with it. The sound is great, I can also carry it with me to do interviews as it has an option for 360° recording. It plugs into my USB port, is self powered and looks gorgeous on my desk ;)

But in all reality, any USB microphone will do. For a long time I have been using the Plantronics 470 USB. The nice thing about this model is that it’s foldable and fits nicely in a traveler’s bag. Note that my version has a small bug: sometimes, after an hour or so of recording, the sound gets mangled. What I need to do is to unplug and replug the USB dongle. Hopefully, this annoying bug is no more in recent versions.

Skype

If you can, all meet in the same room to record your podcast. First, it’s nice to see people but more importantly, it will make the mixing work much much easier (see next post).

If you cannot, no problem, Skype is indeed surprisingly good to produce podcast. Just make sure everyone is on a decent connection and preferably on ethernet rather than WiFi. Oh and do not start the video, that will save some bandwidth and audio quality.

Recording

Recording strategy

There are two schools here.

  • Record the sound on one computer: basically the sound coming out of Skype
  • Record each podcast speaker locally (while speaking on skype) and mix the tracks together down the road.

The former is good in that it reduces the amount of mixing you have to do down the road. But it has a few drawbacks:

  • the sound quality won’t be as good as the second approach as you are dependent on Skype’s instant quality. While it’s easy to recover missing words from a conversation while *into* it, it’s quite tedious when you are listening to a podcast.
  • people tend to speak at the same time on skype. Since you don’t have instant visual feedback, it’s quite common to speak at the same time create a lovely cacophony.

You can record the Skype flux with tools like Audio Hijack Pro (on Mac, $32). There are free alternatives but simplicity is key for me and avoid mistakes (like not recording).

The second approach (ie. recording each local voice while speaking on skype) is pretty easy to set up but requires everyone to record locally. The easiest solution is to download Audacity (free and open source) and ask everyone to click on the record button.

Right before starting the podcast, make sure to have a common signal to sync the various tracks. I usually count down (3, 2, 1) and everybody say zero at the same time. And voilà, I’ve got my mark. Also ask everybody to stay silent for a couple of seconds: that will come handy during the mixing phase.

I personally ask everyone to record locally. I also record my Skype flux as a backup. It’s quite painful to have to re-record a podcast, so better avoid it.

PS: if someone can record the sound coming from Skype AND the local sound from my mic in the same file via Audio Hijack Pro, let me know. I know it’s possible but for some reason it does not work for me (not a huge problem as it’s not my workflow).

Recording format

Make sure to record in a non destructive format like WAV or AIFF. The reason is that you will apply a bunch of mixing tricks down the road and getting the real bits are going to help. The size is going to be roughly 700 MB per hour and per person.

What you can do to cut down the hard drive and bandwidth bill is to use the FLAC format that is a non-descructive compressed audio format. I personally use Max a free audio converter tool for Mac OS to convert my WAV or AIIF into FLAC. One hour of recording then goes down to 200 MB (around 4 times the MP3 equivalent). Audacity also can record in FLAC nateively in the latest beta version.

Backup

If you use the local recording approach, do yourself a favor, create a Dropbox account. It’s free for up to 2 GB, it’s a breeze to share files with others even my mother can do it: Dropbox materialized itself as a local directory synchronized in the cloud and subdirectories are sharable. The link I gave is a referral link and you get an extra 250 MB free if you use it.

Anyway, all the podcast participants must send you their audio file. Make sure to back them up right away (yes I know I’m paranoid). One solution is to leave them on Dropbox while you are mixing them on a different copy.

Other

That’s pretty much it for the technical side of it. Make sure to have fun when doing your podcast. You’ll be happier, people will notice the more natural tone and you will be more popular.

Another trick is regularity: record your podcast regularly. It could be once a week, once every two weeks, once a month. That will set your listeners expectations. Make sure not to overestimate your commitment: one a month is big enough. As you will see in the mixing blog post, it’s a lot of work especially when you are a beginner. It’s not unheard of to spend 6 or 7 times the final podcast length to record and publish it.

The second part will be about Mixing your podcast.

JSF Days 2010 Tomorrow and Wednesday

If the gods of French and German strikes allow me, I will be speaking at the JSF Days conference organized by Irian.

I will first talk about Hibernate Search and how the magic of approximation works in Full-text search and the next day I will cover Bean Validation and how it integrates in the Java ecosystem and JBoss AS 6 Milestone 2.

Come and say hi if you are in the Vienna area.

Migrating from Blogger (esp FTP) to Wordpress

I am one of the “few” that have been let down by Blogger. They no longer support FTP export which makes it a no go for me.

I’ve decided to move over to a self hosted Wordpress. It was a very easy process overall, this blog summarizes the few steps needed.

1. Install Wordpress

The first step is to install Wordpress. My provider offers a very easy install via SimpleScript.

I have personally installed Wordpress in a subdirectory of my blog site to avoid messing with the existing files.

2. Find a theme you like

Moving along, nothing to see here. Pick and chose from the theme explorer in the admin console of Wordpress.

3. Move your Blogger blog from FTP publishing to myrandomblog.blogspot.com publishing

For the import to work, you need to expose your Blogger blog as a blogger hosted website. Don’t worry, since your blog is already published, your users will still be able to access it while you are messing around.

4. Create a user (optionally)

By default, the user is admin but you can create a dedicated user (in my case emmanuel).

5. Import your posts and comments

In the Wordpress admin console, go to Tools, select import, Blogger, the specific blog you want to import (in this case myrandomblog), and click. You can optionally associate your posts to a user in Wordpress ( hence step 4. :) )

6. Adjust the .htaccess (if in a subdirectory)

In the root directory of your website create an .htaccess file if you don’t have one already and add the following rule.

DirectoryIndex index.php wordpress/index.php
<IfModule mod_rewrite.c>
RewriteEngine On
#point to the wordpress directory
RewriteBase /wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !^atom.xml$
RewriteCond %{REQUEST_FILENAME} !^feed$
RewriteRule . /wordpress/index.php [L]
</IfModule>

7. Adjust your feed to point to Feedburner (optional)

If you use feedburner and want your feeds to point to the feedburner feed, install FD Feedburner Plugin (from the Wordpress admin console, select Plugins-> add new

Then burn your feed in feedburner (or reburn it if you already have a feedburner feed). The URL to burn is typically blog.mywebsite.com/feed

Copy your feedburner feed URL in the Feedburner plugin configuration (you can reach it form the Plugins menu).

Note, you can also burn your comments feed using the same solution.

8. Redirect your old feed to the Wordpress feed

Blogger publishes your feed in atom.xml by default (unless you have overridden that in the publishing panel). Let’s redirect the old feed to the new feed, you don’t want to lose your existing followers, do you?

In your .htaccess file, add the following line

Redirect permanent /atom.xml /feed

You might have noticed that one of the RewriteCond rules is about the atom.xml file. If your feed is publicly available to a different file, change that as well.

9. Do not delete your old .html files (optional)

I’ve decided not to delete the old .html files that were pushed by Blogger. My reason was to let old references to still work. It’s up to you.

And you are done. Happy blogging :)

Le ParisJUG deux ans après

For people who either don’t speak French or are not in Paris tomorrow, skip this post, it’s useless to you :)

Le ParisJUG a maintenant deux ans. Difficile de se rappeler Paris sans un JUG vivant et actif. Difficile de se rappeler la France sans ses 437.654 JUGs. Merci à Antonio et toute l’équipe pour avoir initié cette aventure.

La soirée d’anniversaire est aujourd’hui mardi 9 février 2010 à 18:45. Venez nous rejoindre pour une soirée qui célébrera l’open source français avec Sacha Labourey (voir plus ;) ) en guest star. On est déjà au moins 348, donc un de plus, un de moins ;) Inscription gratuite mais nécessaire ici.

Hit the road Jack

Now that I am done with my what took a lot of my time recently, I will be on the road for pretty much the whole month of november all over Europe to spread the word.

First and foremost, I will inaugurate the new MarsJUG (in Marseille) on October 15th. I will be talking about Hibernate Search and how to implement clever full-text search engines using approximations (phonetic approximation etc).

I will also be speaking in Munich at the W-JAX conference on November 10th and 11th. This time I will cover:

  • Bean Validation (JSR-303) and Hibernate Validator 4 (just released)
  • What’s new in Java Persistence 2.0. I will spend a good chunk of it to explain the new type-safe Criteria API
  • Hibernate Search and how to do full-text searches with Hibernate-based applications

Next in line is Devoxx where I will give a university talk on Hibernate Search. If you want to know everything about Hibernate Search, this is the time! This is November 17th in the afternoon. This is an interesting format (3 hours), where i will cover a bunch of what is in my book Hibernate Search in Action and do a handful of demonstrations.

Last but not least, I will be speaking at JavaEdge ‘09 on November 16th in Israel. This time about Bean Validation and Hibernate 4.

If you come by these cities at the right time, come and join me! Between one of these conferences is my birthday :o )

Edit: I forgot that I will be speaking at the ParisJUG on December 8th about Bean Validation. Right after a healthy debate on Spring vs EE 6 (I heard that extra medics and blood supply have been planned)

JBoss Community Asylum – a new podcast with bits of me in it

Remember my French podcast Les Cast Codeurs? (Doing well, thank you for asking) Well apparently, I did not have enough and started a new one. In English this time.

JBoss Community Asylum. A podcast on, by and about the JBoss Community and its gazilllllllion projects and ideas. It’s available here and the iTunes link is here. Basically, instead of blaming people about the lack of podcasts on the great tech at jboss.org, Max R. Andersen (JBoss Tools), Michael Neale (Drools + cloud thingies) and me have decided to give it a shot. You will get the latest news on from the JBoss sphere and we will likely interview folks about their projects.

Let us know what you think and how you would like it to evolve. It’s a low-key bottom-up approach so anything’s possible.

PS: I made progress, I am not the sound engineer this time, yeah!

Book review: Dependency Injection by Dhanji Prasanna

Over the last few days, I have been reading Dependency Injection by Dhanji Prasanna published by Manning. I must admit, this is a much easier task than writing Hibernate Search in Action ;)

Summary first: very easy to read, a gold mine of knowledge and tips on a subject that is essential to the life of today’s Java developers. Go buy it and keep it around your desk.

Let’s quickly talk about the book structure. The book walks you gently through the DI (Dependency Injection) subject:

  • why do you need DI, what does it solves concretely in application developments
  • what is injection, what are the main concepts
  • using DI to improve application modularity
  • object scoping and how to approach that with DI solutions
  • best practices learnt with tears and blood
  • and a small concrete application showing how to use Guice as your DI container

If you are a beginner, this book will explain to you how and why using DI. If you are an expert and use DI on a daily basis, this book will help you rethink what you have taken for granted in DI-land and learn a handful of new tricks and design patterns.

I consider DI and the notion of scope (aka context) to be an essential knowledge to any Java developers. This will become even more pressing with the soon arrival of JSR-330 (Dependency Injection for Java) and JSR-299 (Context and Dependency Injection for the EE platform aka Web Beans) and their inclusion in Java EE 6.

Just like you had to learn polymorphism, you need to learn DI and context management as this is an essential tool for proper component design and application modularization.

The only gotcha is that this book comes right before the finalization of the two JSRs and hence does not cover them. Don’t be too afraid though, all the core concepts covered by these specifications are thoroughly explained in this book. The problem / solution approach used by Dhanji will perfectly complement your knowledge of the DI JSRs.

My advice is to keep this book on your desk when you develop (next to Hibernate Search in Action mine of course ;) ), you will save yourself the burden of learning the best design approaches the hard way.

Lies, damned lies, and statistics: EE edition

I came across some figures regarding downloads of Glassfish and JBoss AS that really puzzled me. Basically Glassfish was downloaded 700.000 times a month (end of ‘08) while JBoss AS was only downloaded around 115.000 times a month at the same. My first reaction was “Well done to you, Sun!” and then I realized that the gap was too good to be true. Let’s have a look at these numbers.

For JBoss AS, the Sun team has only counted the direct number of downloads out of SourceForge. That’s public knowledge by the way, go there for the JBoss stats.

For Glassfish (according to this), downloads numbers (not public BTW) come from:

Surprisingly, no stats on the direct number of downloads from the Glassfish project page. Let’s analyze that a bit.

JDK bundles is the thing downloaded even by my grand’ma by accident. I can tell you right there, she has never ever used Glassfish ( nor JBoss ;) ). How many times, did I download the whole enchilada while I just wanted the plain old JDK!

Java EE SDK. This one is hard. Of course, people interested in EE will go download this package. Are they interested in GF? Hard to say. On the other hand providing a SDK without runtime will do no good.

NetBeans. I’m surprised at the popularity of NB, but there it is. Are all NB users actually GF users? BTW NB also comes with a JDK bundle but I don’t know if this bundle also bundle GF :)

Let’s call this strategy the Russian doll statistic generation strategy. Frankly, that’s not very honest for your users and customers to use this strategy and then compare apple to oranges with your competition. When someone downloads JBoss AS, for sure he did not do it by accident (thanks to SourceForce’s sense of UI :) )

So we have two strategies here, JBoss could start playing the Russian doll statistics generation strategy and we can be pretty good at it:

  • include JBoss AS in Fedora and count it
  • include JBoss AS in RHEL and count it (Dell, IBM and the like are pretty good at delivering RHEL on their hardware)
  • include JBoss AS in IcedTea and count it
  • include JBoss AS in JBoss Tools and count it
  • include JBoss AS Core in JBoss ESB, Portal etc etc and count it
  • include the number of downloads from our maven repository (with the number of times you have to nuke your local repo that will be a big hit :) )
  • I’ve only added a few ideas but for sure our marketing guys can be more productive

Of course we won’t do that. An alternative strategy would be for the Glassfish team to only display their direct download numbers (the one they fail to display) and stop using bogus charts in their public and private slides.

On a side note, I find it disappointing that open source projects don’t keep their stats open and preferably via a third party provider like SourceForge. Granted the SF stats are somewhat flaky but it keeps everyone honest with their own (lack of) success.

Disclaimer: I am not saying Glassfish is not a success, I am quite happy to have them as coopetitors on the server market in general and Java EE in particular.

Having problems with Adium and Yahoo IM?

Yahoo has changed its login protocol, breaking a number of third party IM clients including Adium.

The Adium team has released 1.3.5.rc1 which solves the issue. Check it out. If you use Adium 1.4 beta, upgrade to beta7.

Hope this will save you some time.

Java generics end of mystery

Remember my puzzlement in front of http://blog.emmanuelbernard.com/2009/04/java-generics-mystery.html?

I usually try to make sense of the unknown type by looking at what should be allowed when two incompatible types are used as the unknown type, and then using the generic type using the unknown type as a reference to a known type to see what incorrect things can be done through the reference. If the assignment your questioning was allowed, you would be able to add two incompatible ConstraintValidators to the validatedAddresses as in:

class Address {}
class Person {}

// A set of ConstraintValidator for Address
Set<ConstraintValidator<Address>> validatedAddresses =
    new HashSet<ConstraintValidator<Address>>();

// A set of ConstraintValidator of a single unknown type (*)
Set<ConstraintValidator<?>> validatedThings = validatedAddresses;

ConstraintValidator<Address> a;
ConstraintValidator<Person> p;

// A ConstraintValidator of unknown type, ? = Address
ConstraintValidator<?> thingA = a;

// A ConstraintValidator of unknown type, ? = Person
ConstraintValidator<?> thingP = p;

// This would be allowed if (*) was a valid assignment, which puts a ConstraintValidator<Person> in a set of ConstraintValidator<Address>

validatedThings.add(thingP);

What I missed initially is that I cannot add new (and potentially heterogeneous) elements in Set<?> or Set<? extends X>, but I am free to add elements in Set<X<?>>:

Set<A<?>> c1 = new HashSet<A<?>>();
c1.add( new A<B>() );
c1.add( new A<C>() );

Set<? extends A<?>> c1 = new HashSet<A<?>>();
c1.add( new A<B>() ); <– compilation error
c1.add( new A<C>() ); <– compilation error

While the first example compiles, the second does not.

So to answer my initial mystery, I need to use the <? extends X<?>> approach (thanks Vivien for pointing that out).

Set<? extends ConstraintValidator<?>> valiatedThings = …;