Eagle Eye

Eagle Eye

I watched “Eagle Eye” recently.  I haven’t seen the trailer and the rough plot descriptions that I have seen around were way too vague, so I didn’t really know what to expect of it.  Once I saw it, I realized that the plot is indeed difficult to describe without spoiling it for those who haven’t seen it.  On the other hand, the covers are open pretty early in the film, so I wouldn’t felt robbed if someone told the truth.

If you don’t want to get any spoilers, stop reading here.  Maybe fast-forward to the last paragraph or so.  For the rest of you – the film is a bit too far fetched conspiracy of the computer going crazy.  It has all the attributes of any other conspiracy film – innocent victims, dictator’s plot for the greater good, lots of secrecy, lots of car chases and shooting, and a few federal agents.  The only difference here is that it’s not a human or an organization, but a supercomputer going nuts.

I think we’ve all seen films with computers going crazy.  These films had their time and place, except maybe for last one, which can still make it through.  I’m talking about the Terminator, of course.  Everything else should die off as an IT legacy.  Three year old kids these days know how to use a computer.  You can find one in absolutely every non-government office which has electricity.  Millions of people are connected to the Internet, have very sophisticated mobile phones, and have seen films about insane computers.  It’s just not working any more.

And I think that’s about the only thing that was bad in this film – the story.  Other than that, it was pretty good.  There are quite a few well-known people.  There are plenty of special effects.  There is enough suspense and drama.  And even something to listen to while everything moves, shoots, thinks, and explodes.

My overall rating is 4 stars.

Game addiction and young generation

Being a gamer myself and actually knowing something about the game world from the inside, I always found it funny when mass media talks about games from the evil point of view, especially when they throw the addiction bit in.  My position on this is that games are not drugs, games are not alcohol, games are not some other sort of chemical substance, so it is impossible to have physical addiction to games.  Yes, one can get used to games a lot psychologically, but the extent of this addiction is not even comparable to anything “real”, like smoking for example.

My opinion is based of course on my personal experiences and interactions with many other gamers.  They all are different people with varying level of “addiction” to games, but they are all sane people.

However, today I was enlightened.  And that reminded me of something else.  I used to listen to BFBS radio (British Forces Broadcasting System) a lot.  And I remember there was a period when they were discussing a problem they have in UK with pubs and early closing hours.  A lot of semi-drunk people are kicked out to the streets all at once and they don’t have anywhere else to go, but home.  I never thought of it as a big problem.  After all, how many pubs in the area can you have and how many people that could be.  I, of course, was thinking in terms of pubs we have in Cyprus, where the worst case scenario would be somewhere around 200 people.  Until I’ve heard the radio mentioning some pubs which host as many as 4,000 people.  Than I understood the problem properly.  Indeed, if you have a couple of pubs like that in the area and you kick all those people out at midnight, you’ll have a problem on the street with noise, crowds, and probably a few broken properties and a few wet walls.

In the same way I was today enlightened about the “game addiction” problem within younger generations.  How did that enlightenment come to me?  By means of this video (via The Next Web blog):

[youtube=http://www.youtube.com/watch?v=YersIyzsOpc]

This opens a totally different perspective now, doesn’t it?

Crank : High Voltage

I got my hands on “Crank : High Voltage” last Saturday.  I’ve heard a few good reviews of this movie, so I decided to watch it, even though I haven’t seen the first part “Crank”.

I wasn’t disappointed at all.  The film is pure action from start to end, with somewhat bizarre story, which I didn’t mind at all.  It contains lots of chasing, fighting, swearing, and even some sex.  Excellent cast and directorship were spiced up with plenty of visual effects and good soundtrack.

This is not a serious movie by any measure, but a very enjoyable one if you are into fast cuts, action, and crime on the big screen.  My rating: 5 stars.

Masters of Dirt in Cyprus

As I mentioned earlier, Masters of Dirt – world-wide known group of free-style motocross riders – were coming to Cyprus for a few shows.  I went to see their show in Limassol yesterday.

Masters of Dirt (photo from Cyprus site)
Masters of Dirt (photo from Cyprus site)

In brief, I had an excellent time.  There were a few people who were trying to spoil the fun (DJ Mousaka) or were not quite up to the par with the show (The Fuel Girls), but that was easily compensated by the Masters of Dirt.

Taking the unimportant out of the picture, imagine this: loud hard rock music (Rammstein, Marilyn Manson, AC/DC, and such), fireworks, and motocross bikes jumping off the rump one after another, doing all sorts of crazy stuff in the air!  Pure awesomeness!

The show started with some warm-up tricks, which looked like anybody can do them, slowly progressing to more difficult ones and to group jumps in pairs and “trains” of four.  After a little break they went totally insane.  It was non-stop action from four riders, who were later joined by a quadro-cycle rider.

My favourite bit was when they did the back-flip  progressions.  I am not very familiar with the free-style motocross sport, so I learned a lot.  They were calling for the name of the trick (“tsunami”, “cancan”, etc) and had two riders – one was doing the original trick, and the second one was doing the back-flip variation of it.  That is the same jump and move while the motorbike was doing a back-flip in the air.  Some of the original tricks looked very difficult. However their back-flip variations were in the “impossible” range.

If you haven’t seen their show yet, here’s your chance.  They will have another show in Limassol tomorrow, Sunday, June 28th.  I suggest you catch it.  And if you have any kids – make sure they see it as well.  Tickets are 30 EUR for adults, 25 EUR for minors, and entrance for kids under 6 years of age is free.  I had Maxim (4.5 years old) and he enjoyed the show quite bit too.

Highly recommended.

WordPress dynamic sidebars : take it easy with widget control

One of the coolest things about WordPress is a dynamic sidebar. Dynamic sidebar is a special are defined by a WordPress theme, where widgets (blogroll links, recent comments, related posts, etc.) can go.  The beauty of it is how simple it is for the theme author to define and style such an area, and how simple it is for the theme user to configure which widgets go where.  One line of code for the theme designer, and a user-friendly administration interface with drag-and-drop support for the end user.

As simple as it is, I’ve seen it abused by theme authors one too many times.  Consider an example (borrowed from a really nice theme in the wild, which I won’t name):



What happens here is the following: in line 3 we check if this version of WordPress supports dynamic sidebars (these were added in WordPress 2.2.0, if I remember correctly). If they are supported, we insert all widgets that were dragged and dropped into ‘east_sidebar’ dynamic sidebar, using WordPress administration.

Now for the tricky bit. If the function does not exist or something went wrong while displaying the widgets, we fall back onto some defaults. In this case we show the list of categories.

What’s so tricky about it? The trick bit about it is the return value of the dynamic_sidebar() function. It returns a boolean value. True if the sidebar was found and called, and false if sidebar was not found or was not called. This “was not called” actually means “failed to find at least one proper widget”.

What happens in practice is this. You find this nice theme that you want to use for your blog. You install and preview your site. Everything looks good. The sidebar looks good too, but you don’t particularly like the selection or the order of the widgets. So you go to the administration interface and what do you see there? An empty sidebar. Instinctively, you drag-and-drop a widget into the sidebar. Refresh your site and you see something totally unexpected. The sidebar that had a bunch of widgets now only has one – the one you drag-and-dropped. Weird.

That is because when you installed the theme, it registered a new sidebar, which is by default empty. When the sidebar of your site is displayed, dynamic_sidebar() function returns false and the theme falls back onto default widgets in the theme. Once you have at least one widget dropped into sidebar, that doesn’t happen any more and your lonely widget is displayed now.

That’s not a big problem with simple themes, which have only one or two dynamic sidebars. However, more complex themes with four, five, six, and more sidebars become annoying. Because there is usually some default pre-selection of widgets for each of those sidebars, and in case you don’t like it, you’ll need to do a lot of work in that administration.

Even worse, if you want to leave some of those sidebars empty. If there are defaults set in the theme, the only way for you to silence the sidebar is edit the theme source code. In the example above that would removing everything from line 4 to line 12. If you have more than one sidebar that you want to silent, you’ll need to repeat the procedure for every one of them.

So, what’s the solution? What’s the right way? To be honest, I don’t know. From the point of view of somewhat experienced end-user, I’d prefer no default widgets in the theme source code. Let them come up empty by default – I’ll drag-and-drop whatever I want using the user-friendly administration. On the other hand, from the point of view of non-experienced end-user, empty sidebars might confuse the heck out of me. I need to know about widgets to solve the problem, and unfortunately not all WordPress users do. Also, I guess it’s a bit harder for the theme authors to promote their themes if they come up with empty sidebars once installed.

One solution that might work is a theme option. Show default widgets by default, but allow to silence them all from the theme controls. That would work as a compromise and avoid unnecessary source code editing. Also, I think it would be pretty straight forward to implement (check for the value of the theme option instead of the return value of the dynamic_sidebar()).

What do you think?