Java allows a trailing comma when enumerating arrays and enum values?

public class Peshev {
    public static void main(String... args) {
        String[] fff = new String[]{"a", "b",};
        System.out.println(fff[0]+fff[1]);
    } 
}

Do you see the trailing comma after "b"? That's allowed. Unexpected from a strongly-typed lang as Java.

Can I watch 1080p torrents while they are still downloading on OS X? — YES (ver.2)

This is ver1 of this manual. Ver2 is updated with a better torrent client.

A 1080p movie is around 4 -8GB in size. Downloading this takes a while even on 50mbit connection.

What if it is possible to watch while downloading? So watching starts right away.

  • We need a torrent client that can download the movie file parts in order, not randomly.
  • We need a player that supports playing incomplete files.
  • We need a connection that is faster than the movie's bitrate.

The torrent client

Previously I used BitThief. It is developed by a technology institute in Zurich. It didn't have a polished GUI and took a little bit too much CPU while downloading.

The new client I found thanks to diimdeep. It is called qbittorrent and it is awesome.

Screen Shot 2013-03-17 at 9.24.31 PM

You can see that while downloading it downloads as a normal torrent client - the parts are downloaded randomly:

Screen Shot 2013-03-17 at 9.27.38 PM

But there is an option:

After that we can see that the rest of the file is being downloaded sequentially (blue - downloaded, green - requested):

The connection speed

How can we tell if the speed is good enough? By the estimated time of arrival (ETA):

If the movie is 1.5 hours and the ETA is 17 minutes, then the speed is sufficient.

The player

The player is and always has been mplayer. I use MplayerX because it comes with a nice OSX gui. Download and associate movie files with mplayer (avi, mkg):

Screen Shot 2013-03-17 at 9.45.59 PM

The final step is to to play the file after the downloading started:

That's it.

Screen Shot 2013-03-17 at 9.41.25 PM

Happy watching.