Videoblogging theoretics, being the media, and the completely improvised future of a world currently without rhyme, reason or good beetroot fertiliser.
I tend to be pretty passionate about programming language coding conventions, and communicating best practice can be difficult at times when there's a plethora of bad conventions out on the interwebs. And if universities are actually teaching conventions, then they're not teaching them particularly well, or perhaps by lecturers with limited real world experience.
Consider this code fragment:
// check for aaaa. We need to use bbbb because cccc doesn't dddd
if (condition1) {
// optional comment on code
..code goes here
} elseif (condition2) {
// optional comment on code
..code goes here
}
All good so far, but what if we need to comment on condition2? Not a comment for the code contained within, but the condition itself. If code is a narrative (as the analogy goes), then logically the code should look like this:
// check for aaaa. We need to use bbbb because cccc doesn't dddd
if (condition1) {
// optional comment on code
..code goes here
// check eeee next, because ffff
} elseif (condition2) {
// optional comment on code
..code goes here
}
The code reads linearly, which is what we want, but the new comment in column 1 breaks the readability. So how about indenting it?
// check for aaaa. We need to use bbbb because cccc doesn't dddd
if (condition1) {
// optional comment on code
..code goes here
// check eeee next, because ffff
} elseif (condition2) {
// optional comment on code
..code goes here
}
It reads better now from condition to condition, but our condition2 comment is now slightly out of scope and our peripheral reading. The alternative would be to put the comment inside the code block:
// check for aaaa. We need to use bbbb because cccc doesn't dddd
if (condition1) {
// optional comment on code
..code goes here
} elseif (condition2) {
// check eeee next, because ffff
// optional comment on code
..code goes here
}
Now the code isn't that readable because we get to condition2 and there's no explanation of it. Sure we could drop inside the condition to read it, but it's still outside the context of the if/else block, plus it now runs into any comments for the code in the block, which would mean either an intervening newline, or a combined comment that wouldn't read as clearly.
Remember that condition2 isn't just a simple condition, we said that it needed to be documented, probably because it needs to call a function or perform some logic that's not immediately obvious.
This is a good argument for using newlined elses:
// check for aaaa. We need to use bbbb because cccc doesn't dddd
if (condition1) {
// optional comment on code
..code goes here
}
// check eeee next, because ffff
elseif (condition2) {
// optional comment on code
..code goes here
}
But again, the code's starting to split apart into illegibility, and there's a dozen reasons why newlined conditions are bad anyway.
One argument would be that the code needs to be rewritten so that it's simpler. If possible, all the comments could be pulled up into a single pre-if comment, but the further the else is from the if, the less readable that's going to be. If it could be split into a switch (depending on the language), then that would be an option.
Most switch conventions I've seen allow case condition comments to be above and flush with the case statement, so that would seem to be an argument for allowing pre-elseif comments, but indented or not?
I could only find two references to this if/else comment case on the web. The first was on Dave Hyatt's Surfin' Safari blog (for WebKit), in a post by Maciej Stachowiak:
http://webkit.org/blog/25/webkit-coding-style-guidelines/
It shows a comment above an else if condition, however, the code isn't clear whether the "comment on else case" (sic) is a comment on the condition, or on the code within the else. It would seem to imply the code inside the else, and so isn't useful to us.
The only other reference I could find was on in the Adobe ActionScript in Flash CS3 documentation:
The example code shows exactly what we're talking about, and shows the case that I've always used these past 30 years, an indented comment above the else/elseif.
So assuming that the convention is that all conditionals have blocks and that block openings must be on the same line as the condition, which convention do or would you use?
It's amazing, but this blog has actually ruined Louise's social network. Lots of Louise's friends are reading my blog, which is great. (Where were you 7 years ago when I first started?) But many of my Molly news posts are full of more information and personal thoughts than I've even shared with Louise at times. So whenever Louise speaks to someone on the phone, not only have they heard all the news, but sometimes they're telling Louise additional things about her life. Louise still hasn't read my blog since going into hospital, so it's all pretty surreal to her.
Molly's doing really well. At times she seems to smile, and sometimes even acknowledge that we exist. Not really, but almost. And she's still not crying much, except when she's doing a number twos. Very similar to her Daddy in fact.
We're still pretty sleep deprived, as she's still on 4th hourly feeds, but we're dealing with it quite well, and are starting to get into a rhythm. The Olympics on in the background helps, but that just reminds me of how much a hate our free to air TV stations. Insert Channel 7 TiVo rant here.
So finally TiVo is about to be officially released in Australia. And the TV ad for it is attempting to pull the heart strings of any Australian watching the Olympics. Average Aussie householders walking down the street extolling the virtues of TiVo, with the tag line:
We're Australian and we're taking control. Join the revolution. TiVo. TV your way.
In case the advert isn't clear enough, TiVo is being brought to Australia as a Channel 7 joint venture with the U.S. based TiVo company. TiVo of course is a U.S. product that's been around for almost ten years now, and while it's easy for people watching the ad to think that Channel 7 and TiVo care about us the viewers and just want to bring this great product into our lounge rooms, the truth is fact much much different.
Ten years of TiVo in the U.S., but not here. Could it be TiVo not wishing to enter the Australian market until now? Could it be some technical innovation that's only now allowed Australian PAL televisions to work with TiVo? Or is that there's never really been a market here? None of these in fact.
The only reason we've not had TiVo in Australia, is because the free to air broadcasters, especially channel 7 and channel 9, have been preventing TiVo from entering the market for almost ten years, because one of TiVo's main features, is the ability to skip over ads in recorded programs. Ads of course are the televisions stations' primary income, so the threat of TiVo to our local broadcasters was and still is, huge.
Yet TiVo went to market in the U.S., so how come it was prevented from doing so here? Well, Channels 7 and 9 found a nice arguably dodgey loophole in our copyright laws. Because their program schedules were devised by them, they apparently thought that they held the copyright to them. And as with most people who don't understand what copyright is actually designed to do (protect an artist's right to income), Channel 7 and 9 used their copyright over their program guides (or EPG, Electronic Program Guide) to prevent TiVo from using them.
And of course without a program guide, TiVo can't be programmed to record anything, and would be dead in the water in the Australian market.
Third parties have in the past set up their own EPGs on web sites, by manually typing in program schedules as they're published in the newspapers, or by screen scraping web sites which display limited program schedules, such as the television station web sites themselves, but 7 and 9 have shut each of them down as they appeared. In fact 9 are still in court with IceTV, who were selling an EPG with a web site which would act like a VCR for you.
TiVo have been in Australia unofficially for years though. A friend of mine has several, and has been using them successfully for about five years now. Local hackers reprogrammed the TiVo software many years ago, and several web sites have published EPGs for it at various times before being shut down. But it's not like taking a box home and just plugging it in and it works.
Enter Foxtel's new iQ box, which basically does the same thing as the TiVo, but only if you have Foxtel. Consolidated Media Holdings (CMH), a Packer company, owns 25% of Foxtel, so of course Channel 9's EPG is available on the iQ, but Channel 7 and Channel 10 refused to provide theirs to Foxtel, or at least didn't initially, I'm not sure of the situation now.
So in response, after ten years of aggressively preventing companies like TiVo from entering the Australian market, Channel 7 did a deal to bring them in as a Channel 7 branded product. To 7's credit, they've left in the ad skipping, and it's going to be a one off purchase for the TiVo itself, although there are rumours that you'll have to subscribe to the EPG for a small fee. From devil to angel in a single business deal.
And so it is amusing in so many ways, the tag line used in the Channel 7 TiVo commercial. Yes we are Australian and are taking control, but only after Channel 7 had run out of ways to prevent us from doing so. You couldn't really call it a revolution, and you couldn't really call the last ten years TV our way. But TiVo is finally here, and that's not a bad thing. It's just a shame that Channel 7 is now considered the TiVo champion, when fact they were until very recently, it's biggest opposition.
After so many years of embracing independent media, if you think that big media's stranglehold on the world is loosening, then you'd be wrong, and the Olympics are a primary example.
Time zones are always a problem when reporting world wide news events, but most of the world understand this and just deal with it. Something broadcast from Australia, say APEC or some such, gets broadcast on Australian time, and if this means evening in Europe, the middle of the night for the U.S., or daytime for Asia, then so be it. The current conflict in Georgia? During the day in Europe and Asia, but middle of the night for the U.S.
The rest of world recognises that time zones exist, and that sometimes they work for you and sometimes they don't. Sometimes they fall during television's prime time, and sometimes they don't. Unless of course you're U.S. broadcaster NBC, in which case you can simply pay to make sure world events, in this case the Olympics, happen in U.S. television prime time.
Let's just put this into perspective. A television broadcaster has paid money so that a news event will take place in prime time.
Traditionally, at a swim meet, the heats are run during the day, and the finals are held at night. That's the way it's always been, regardless of where they're held, and regardless of where they're broadcast. Yet NBC has the power to change the Olympics so that the finals are held during the day, and the heats are held at night, so that they sync up with U.S. time of heats during the day and finals at night. And they've done the same with a whole range of events, including the gymnastics and the marathons.
In Australia, we're only a few hours ahead of Bejing time, so the traditional timing for the swimming would have been perfect, heats during the day, and then finals at night. But with the U.S. pandering in place, we now have the finals being run at lunch time Australian time.
For us, the swimming is where we excel, it's what we do, and we generally have a passion for swimming more than any other sport. It's a tradition for us, especially when we usually beat the U.S. swimmers.
But not this time. On one of those rare occasions when a world wide event actually occurs in a good time zone for us, we're now stuck with most of our population not actually being able to see the swim finals because they're being held at lunch time.
NBC Sports Chairman Dick Ebersol is one of the key people to blame. In an interview with The Guardian, he said:
In the first conversation that I had with the new head of the IOC, Jacques Rogge, I told him that it would be almost impossible for an American network bidding on the games in the future ... not to have some way to have 'live' happen. ... I emphasised from the beginning that it was important to us, if possible, to have swimming and gymnastics work this way.
But it's not just NBC who's to blame. Obviously it was the IOC, traditionally as bent and corrupt as the drug cheats they keep ranting about, that had to agree to the change, because the Chinese certainly don't need the money. Co-incidentally of course, the change in schedule means that the swim finals will now broadcast in Europe in the late afternoon and early evening, not such a bad compromise for them.
Now the swimmers themselves aren't particularly impressed with the situation either. All their competitive lives they've been used to swimming heats in the day and finals at night, and now that's been completely flipped on it's head. So much so that swimmers are saying they rarely reach their peek until the night, and so world records won't tumble as much as they usually do under the new schedule. Yet obviously NBC don't care if the performances are watered down, so long as it's watered down in prime time.
Big media is still in charge, they've integrated citizen media into their model, and they still control everyone who counts. Meanwhile the world keeps on spinning, and still the world's news events just happen to occur more often than not in U.S. prime time. Their demise cannot come too soon.
With the U.S. credibility around the world at it's lowest point ever, and their financial markets completely crumbling, when will big U.S. media lose its stranglehold on what world events happen outside U.S. borders?