WebDriver

nadeem.shabir | | Sunday, June 14th, 2009

Faster than a speeding bullet! Easier to maintain than something that’s really easy to maintain! Reliable! That’s what we want from our tests, but how do we get there? This presentation covers key strategies and patterns for writing test suites using WebDriver, a developer focused tool for web application testing similar in spirit to Selenium RC. We’ll cover why it was written, the problems it addresses and how to integrate it into your projects and testing process.

This talk presented by Simon Stewart, creator of WebDriver, still serves as a useful introduction to the tool, even though the talk itself is a couple of years old and WebDriver has moved on since then.

I’ve been experimenting with WebDriver as an alternative to Selenium/Selenium RC, although it is worth bearing in mind that both projects are merging. I’m enjoying getting to grips with WebDriver and am finding that the tight integration between WebDriver and each of the browsers it automates is much faster than Selenium, since it uses the mechanism most appropriate for controlling that browser. For example in Firefox, WebDriver is implemented as an extension, whereas in IE, WebDriver makes use of IE’s Automation controls. In addition to Firefox and IE, WebDriver also supports the following:

  • Safari 3 on OSX
  • iPhone
  • Selenium Emulation

It’s the Selenium Emulation I’d like to touch upon here, what this basically means is that the Java version of WebDriver provides an implementation of the existing Selenium API, and therefore can an be dropped in as a substitute for the Selenium Driver. Here’s an example of how you’d do this:

  1.  
  2. // You may use any WebDriver implementation. Firefox is used here as an example
  3. WebDriver driver = new FirefoxDriver();
  4.  
  5. // A "base url", used by selenium to resolve relative URLs
  6. String baseUrl = "http://www.google.com";
  7.  
  8. // Create the Selenium implementation
  9. Selenium selenium = new WebDriverBackedSelenium(driver, baseUrl);
  10.  
  11. // Perform actions with selenium
  12. selenium.open("http://www.google.com");
  13. selenium.type("name=q", "cheese");
  14. selenium.click("name=btnG");
  15.  
  16. // And get the underlying WebDriver implementation back. This will refer to the
  17. // same WebDriver instance as the "driver" variable above.
  18. WebDriver driverInstance = ((WebDriverBackedSelenium) selenium).getUnderlyingWebDriver();
  19.  

This allows for WebDriver and Selenium to live side-by-side, and provides developers with a simple mechanism for a managed migration from the existing Selenium API to WebDriver. I’m still experimenting with it but I have to admit I really like it simplicity.

,

Yusuf Islam, the Cat of Old

nadeem.shabir | | Thursday, June 11th, 2009

You ever had one of those days when you get home from work, your tired, but you carry on working because there always seems far more to do than time to do it in? you feel like you want to find a way of picking yourself up out of whatever temporary rut you feel yourself in? Well yesterday was like that I think I must have stopped around 11ish. Rather than hit the sack I made myself some tea ( courtesy of Zach ), and started to flick through channels. I’ve noticed that I have a tendency to do that, a lot! there’s nothing you actually want to watch, so you just flick through until something vaguely interesting catches your eye. And something did, I stopped on BBC Four and caught the last few minutes of Alan Yentob’s Interview with Yusuf Islam (formerly known as Cat Stevens), from 2006.

I’d never seen the full interview before, and yet the image I was confronted with on the screen, of this bearded man playing this acoustic guitar and singing in this beautifully melodic voice just made me want to listen (at the 45 minute mark). It was curious I suppose that I’d tuned in just in time to listen to Alan Yentob ask him the question”:

“After all those years of resistance you’ve now picked up the guitar again. Do you think you have allowed yourself to sort of take a position you didnt feel this literalism about Islam which a lot of people find difficult to accept. Some people might say to that extent you’ve been brainwashed perhaps?”

Yusuf Islam:
“The positions that I took previously, I held fast to them because I believed them to be true. However, one only has to look at history, it wasn’t long ago when we discover, guess what, the guitar was probably introduced to Europe, through Spain by the Muslims. Now I’m saying, hang on, What? you know… and thats a reality. When I learned something better I moved, and that’s what you’ve got to do. I think we must not, ever, take the position that we know it all. God may show you something you never knew yesterday,we’ve got to be ready for that” …

Alan Yentob:
“Is there a message in these songs as you pick up this guitar again?”

Yusuf Islam:
“There is certainly a change in the wind and the way in which there is now a chance for a new understanding of the moderate middle path of Islam because the extremes have been exposed. A lot of people have missed the whole point, including some Muslims, who have gone off on some kind of..their own..strategy of trying to improve the world through some kind of devious means that has nothing to do with Islam, and yet is supposed to be in the name of Islam. The word Islam itself comes from the word ‘peace’ now that is the heart and soul of this religion. I discovered that, I’ve done that journey and perhaps I can help others to feel a bit more assured that in fact a lot of Muslims in this world, the vast majority just want to live a happy life and be at peace with the rest of the world”

I think there’s something wonderfully uplifting in his words, and in his music. His sentiments are nothing new to many muslims yet sadly social the perception of Islam and Muslims seems to be growing more and more negative as the actions of an extremist minority are used to label all Muslims are radicals. In fact I remember storming off in a rage as I watched the European election results and listened to Nick Griffin, the leader of the BNP, explain that stopping the spread of radical Islam was one of the reasons people had voted for him.

After the interview ended the BBC aired a hour long ‘BBC Four Session’ featuring Yusuf singing a number of his songs, both old and new, from a concert in Porchester Hall several years ago. I stayed up and watched the show and found myself being moved more and more by his songs and their message. I even ended up downloading several of his recent albums on iTunes as I watched the performance on tv - although I’m not sure if my colleagues appreciated that since I was humming, and singing along to them as I worked in the office today :-)

Rather than pick up the laptop and work this evening, I decided to see if I could find that interview and watch it all, sadly BBC iPlayer doesn’t have it, however it does still have the ‘BBC Four Session - Yusuf Islam‘ which is available to watch - it’s a wonderful concert, an inspired performance which I certainly recommend.

After searching on Google I did eventually find the Interview, there’s a copy hosted on Google Video ( disclaimer: it’s hosted by an organisation called ‘Turn To Islam’. I have no idea what this organisation is, I simply wanted to link to the video). I’m glad I watched it all Yusuf describes his early life, his celebrity status, his, his conversion to islam, and his return to performing. Perhaps the most moving part of the interview is when he describes his battle with tuberculosis - which will resonate with anyone who has ever found themselves lying in a hospital bed reflecting on their life, and where they are headed, particularly when he says “.. in that hospital I developed some insights which then later fed into my music … into my journey” … a poignant sentiment that touched me deeply given my own experience.

Yusuf Islam is an amazing man, who truly inspires.

,

Jin-Roh: The Wolf Brigade

nadeem.shabir | | Monday, May 25th, 2009

It’s not often I watch an anime, or any movie, that not only moves me but forces me to ask questions about society and our shared humanity. Jin-Roh is a title that has hovered around my awareness for years but I’ve never gotten around to watching it, at least not until today. It’s an exquisite work that transcends genre.

The story is complex and full of depth and some strong characterization, this a very serious movie; so for those who Ilike your robots and bikini girls, with hyper-guns and the whoosh of rapid-fire manga, this is probably not for you! This movie is thoughtful and contemplative … and will leave you feeling introspective.

The story is set in an alternate reality in which Japan has emerged from the second world war as Totalitarian society… The population riots, a group called the Sect creates havoc, and the armored Special Unit of the Capitol Police Organization (CAPO) plots to acquire more power. A soldier named Fuse, who was once one of the most formidable men in the Special Unit, agonizes over the death of a young girl who worked for the Sect and in doing so he becomes a neurotic mess intent on befriending the dead girl’s sister.

The opening ten minutes of the movie hooks you, it begins with a chase under the streets of a rioting city in whic two groups, Sect and the CAPO, which represent two diametrically opposed points of view come into violent conflict. Away from the riots, and killing, a heavily armed trooper hunts and corners a mule, a young girl carrying explosives for use against the police forces. The rest of movie is revolves entirely around the question of why the soldier does not shoot her, its a question that occupies the lead character, his co-workers and us as the audience as we watch him and wonder we can’t let go of her self imposed death. This is a slow serious story, about suicide bombings, and blindly following orders, and humanity’s growth or lack of growth.

What surprised me the most was how much this story borrowed heavily from the tale of Little Red Riding Hood, it’s difficult to go into examples with ruining the rest of the story, however the female terrorists who carry bombs for the Sect are known as “Red Riding Hoods,” and Kei, reads a bloody version of the tale to Fuse throughout the film. The dialogue is fully of ethical question and moralistic observations, consantly question what it means to be human, for example when Fuse superior observes:

“We aren’t men disguised as dogs. We’re wolves disguised as men.”

and he also when another of his superiors makes observation with regards to society:

.”.. apparently some animals when they dominate a group kill all the offspring of the other males under them, sometimes organisations do the same”

In my opinion Jin-Roh is a true masterpiece, and anyone who watches it will not be disappointed.

,

Anime Reviews: Afro Samurai Resurrection, plus more.

nadeem.shabir | | Monday, May 25th, 2009


Afro Samurai:Resurrection
Last September I reviewed Afro Samurai which was one of the best anime’s I’d seen in a long time. By the end of the first movie Afro had avenged his father and found a life of peace. In this sequel that peace is shattered by the arrival of a woman from his past (Sio, voiced by Lucy Liu) who is intent in schooling Afro in the same brutal lessons he dealt those who stood in his way as he searched for the number one headband. In a revenge fuelled attack, Sio steals the number 1 headband as well as the skull of Afro’s dead father. With this she intends to resurrect Afro’s late father and torture him. This movie sees Afro restart his journey, he must first find the Number Two Headband so that he can earn the right to challenge Sio. Samuel L. Jackson reprises his role as Afro and again provides the voice of ‘Ninja Ninja’ Afro’s imaginary who symbolizes his inner feelings and always acts as the voice of Afro’s conscience.

Like the original series, Afro Samurai provides some great action with plenty of gore and limbs flying around the place, as well as the usual bittersweet, and often tragic drama that asks some pretty profound morale questions. The visual style of the animation is stunning, as is the musical score, which was performed once again by RZA of the Wu-Tang Clan. It’s a great continuation of one the best anime series I’ve seen in a long time.


Hellsing - The Collection
The Hellsing Organization is a supernatural collective dedicated to protecting mankind from a war that rages in the Earth’s shadows in which humanity is only a pawn. Able to keep the dark forces at bay for so long, Hellsing has recently been coming across artificially spawned vampires so powerful that they can do nothing to stop them. So, the Organization calls in Alucard, a rogue vampire who combats this army of the undead with Seras Victoria, a female companion he rescued from death by vampirising. Whilst I found this series entertaining, and I did enjoy it a lot. It didn’t really feel like it had any depth. The series tries to build an aura of mystery surrounding Alucard and yet never really succeeds in explaining why such a powerful vampire decided to become a servant to a human master. Everyone should also also realise fairly quickly that ‘Alucard’ is an anagram of ‘Dracula’.


Mysterious Cities of Gold
Ok, so this isn’t really what I’d class as anime, but it is animation ;-) I recall how much in enjoyed this series as a child and couldn’t resist purchasing it when it became available last year. It’s take a while to watch it all, and I can report that it is still as wonderful now as it was then. For those who have never seen this or even heard of it, I recommend it thoroughly. This series comes from an era when story telling was paramount, watching it again I was surprised at how the series, although humorous and fun, required more maturity on the part of the audience than the sort of vacuous cartoons kids seem to watch these days. Plus I’ve always loved the opening score …

,

… i’m married :)

nadeem.shabir | | Tuesday, May 19th, 2009

Many people have been mailing me and asking why I haven’t blogged in a few months, and where I have been. Well in short I took a month off to get married to Sadia :) We are both very happy ;-). I’ve started putting pictures of our wedding into a set on flickr here, as well as some general scenic shots taken around Kashmir into a different set here. I have around 3,500 photos to organise and upload so you’ll have to bear with me ;-) Here’s a couple from the wedding pictures set:




Seth Godin on the tribes we lead

nadeem.shabir | | Tuesday, May 19th, 2009

Seth Godin argues the Internet has ended mass marketing and revived a human social unit from the distant past: tribes. Founded on shared ideas and values, tribes give ordinary people the power to lead and make big change. He urges us to do so.

This is a great talk by Seth Godin, here’s how he describes Tribes …

What tribes are, is a very simple concept that goes back 50 thousand years. It’s about leading and connecting people and ideas. And it’s something that people have wanted forever. Lots of people are used to having a spiritual tribe, or a church tribe, having a work tribe, having a community tribe. But now, thanks to the internet, thanks to the explosion of mass media, thanks to a lot of other things that are bubbling through our society around the world, tribes are everywhere.

The internet was supposed to homogenize everyone by connecting us all. Instead what it’s allowed is silos of interest. So you’ve got the red-hat ladies over here. You’ve got the red-hat triathletes over there. You’ve got the organized armies over here. You’ve got the disorganized rebels over here. You’ve got people in white hats making food. And people in white hats sailing boats. The point is that you can find Ukrainian folk dancers. And connect with them … You can tell when you’re running into someone in a tribe. And it turns out that it’s tribes, not money, not factories, that can change our world, that can change politics, that can align large numbers of people. Not because you force them to do something against their will. But because they wanted to connect … That what we do for a living now, all of us, I think, is find something worth changing, and then assemble tribes that assemble tribes that spread the idea and spread the idea. And it becomes something far bigger than ourselves.

The talk resonates deeply with me at the moment particularly given that I’m currently thinking long and hard about what leadership actually means, how to build teams, what to look for when recruiting people, how to ensure everyone feels that they are empowered and that their contributions are valued. However the more I think about it the more I’m beginning to believe that whilst its possible to create an environment in which people can have the freedom to affect change it ultimately requires the individual to first believe in what they are doing, to have committed to it and to the people around them. They will then want to move things forward, improve things, affect real change and want to break the status quo. Seth crystallizes this sentiment beautifully in this talk when he says …

What all these people have in common is that they are heretics. That heretics look at the status quo and say, This will not stand. I can’t abide this status quo. I am willing to stand up and be counted and move things forward. I see what the status quo is. I don’t like it. That instead of looking at all the little rules and following each one of them, that instead of being what I call a sheepwalker, somebody who’s half asleep, following instructions, keeping their head down, fitting in, every once in a while someone stands up and says, “Not me.” Someone stands up and says, “This one is important. We need to organize around it.” And not everyone will. But you don’t need everyone. You just need a few people (Laughter) who will look at the rules, realize they make no sense, and realize how much they want to be connected.



You don’t need permission from people to lead them. But in case you do, here it is. They’re waiting, we’re waiting for you to show us where to go next. So here is what leaders have in common. The first thing is, they challenge the status quo. They challenge what’s currently there. The second thing is, they build a culture. A secret language, a seven second handshake. A way of knowing that you’re in or out. They have curiosity. Curiosity about people in the tribe. Curiosity about outsiders. They’re asking questions. They connect people to one another. Do you know what people want more than anything? They want to be missed. They want to be missed the day they don’t show up. They want to be missed when they’re gone. And tribe leaders can do that. It’s fascinating because all tribe leaders have charisma. But you don’t need charisma to become a leader. Being a leader gives you charisma. If you look and study the leaders who have succeeded, that’s where charisma comes from, from the leading. Finally, they commit. They commit to the cause. They commit to the tribe. They commit to the people who are there.

This is a great, passionate and deeply profound talk and I recommend everyone take the time to watch it.

, ,

Lifes too short - write fast code!

nadeem.shabir | | Thursday, March 19th, 2009

ABSTRACT

This is the second talk that follows-up on the 14 best practices from YSlow and “High Performance Web Sites”. The first talk presented three new best practices: Split the Initial Payload, Load Scripts Without Blocking, and Don’t Scatter Inline Scripts.

The most important of these is loading external scripts without blocking other downloads and preventing page rendering. One complication is this may introduce undefined symbol errors if inlined code uses symbols from the external scripts. Luckily, there are several techniques to workaround this problem. That and other topics will be covered in this presentation of three more best practices:

* Coupling Asynchronous Scripts
* Use Iframes Sparingly
* Flush the Document Early

Much of this talk discusses material from Steve’s book, High Performance Websites: Essential Knowledge for Front-End Engineers. The talk is full of great advice, I found the discussion around loading scripts both synchronously and asynchronously and the performance gains that can be achieved. However this has to be combing with understanding that you also have to couple scripts together in order to preserver the order they are loaded in, as well as understanding that by default loading external scripts blocks download of other elements on the page. Steve discusses a number of techniques that can address these issues as well as the pros and cons associated with each. His discussion around John Resigs idea of using degrading script tags is extremely useful.

This is a hugely useful tech talk and a must for anyone doing serious Javascript development.

, ,

Tim Berners-Lee: The next Web of open, linked data

nadeem.shabir | | Monday, March 16th, 2009

20 years ago, Tim Berners-Lee invented the World Wide Web. For his next project, he’s building a web for open, linked data that could do for numbers what the Web did for words, pictures, video: unlock our data and reframe the way we use it together.

This is an inspiring talk by Tim that goes to the heart of the work that we are doing at Talis with our Platform and the new generation of products we are building on the platform, such as Talis Aspire and Talis Prism.

    "Data is relationships!"

    "The really important thing about data is that the more  things
       that you have to connect together the more powerful it is."

A wonderfully simple and succinct way of describing the importance of Linked Data. It’s a great talk and well worth watching.

, ,

“The Sixth Sense” - Wearable Tech

nadeem.shabir | | Thursday, March 12th, 2009

This demo — from Pattie Maes’ lab at MIT, spearheaded by Pranav Mistry — was the buzz of TED. It’s a wearable device with a projector that paves the way for profound interaction with our environment. Imagine “Minority Report” and then some!

Think Microsoft Surface without the table! This is amazing. The basic idea is that this device can augment our reality by providing information about objects we interact with in the real world. This immediate access to information at all times reminds me of Cory Doctorow’s book “Down and out in the Magic Kingdom”.

, ,

Anime Reviews …

nadeem.shabir | | Sunday, February 22nd, 2009

Seem to have watched a lot of anime over the last few months. Here’s a couple of brief reviews:

Guyver: The Bioboosted Armour
This new 26 part collection is a modern makeover of the original classic 1980’s anime series. Based on Yoshiki Takaya’s popular manga. The remake boasts a wonderful soundtrack with stunningly stylized animation and character designs as well as amped-up levels of violence and gore. I wasn’t entirely sure what I’d think of this series, I loved the classic series which was way ahead of its time and was hugely skeptical of this remake. The Guyver tells the story of Sho Fukamachi, a normal everyday teenager who accidentally comes into contact with a power bio-weapon called a Guyver unit. To his surprise and horror, this mysterious unit takes over Sho’s body and transforms him into an incredibly powerful mechanized warrior. With his newfound powers, Sho must protect the people he cares about from the sinister Chronos Corporation and their army of monsters (called Zoanoids) who will stop at nothing to retrieve the Guyver for their own devices and eliminate anyone who knows of it’s existence. I have to admit, I really enjoyed this series!!

Akira
I first watched Akira when I was only eleven years old, it was the first anime movie I had ever seen and changed my perception of ‘cartoons’ forever. Even today the animation doesn’t look dated at all largely due to the attention to every conceivable detail. Set in 2019, the film richly imagines the new metropolis of Neo-Tokyo, which is designed from huge buildings down to the smallest details of passing vehicles or police uniforms. The movie centers around the relationship between two disaffected orphan teenagers: the slight, somewhat timid and resentful Tetsuo and confident, breezy Kanada. Both of them are members of biker gang, but trouble grows when Tetsuo start to resent the way Kanada always has to rescue him. Meanwhile, a group of scientists, military men and politicians wonder what to do with a collection of withered children who possess enormous psychic powers, especially the mysterious, rarely seen Akira, whose awakening might well have caused the end of the old world. Tetsuo is visited by the children, who trigger the growth of psychic and physical powers that might make him a superman or a super-monster. You can read a detailed summary of the plot here. Akira is one of the most critically acclaimed of all anime titles and since its release in 1988 has been massively important in influencing the entire genre. I watch it from time to time and never seem to tire of it.

Next Page »

Powered by WordPress | Theme by Roy Tanck