Good bye to the Web21c Team

As the local tradition dictates I should start with…

So… Right… As some of you might already know I decided to look for new challenges and I will be leaving my current employer BT and the great Web21c SDK Team very soon. The last 2 and a half years was an awesome time from professional and personal point of view. I would like to take this opportunity to thank all of you that I had a pleasure to work with and just mention some names (without any particular order):

George, T3, DJ (Profile where everything started!), Uros, Adrrrrian, Rags (I really enjoyed working with you guys on Aloha and SIP stuff), Josh, Gabby (You Are Great! Thank you for polluting me with your XSLT and SDK virus), Pawel, Leanne, T4, Alkesh (80 is not that big number :), The Denver Crew: Dustin, Andy, Hap, Jack, Ken (professional, open, helpful, it was always good to work with you regardless of the thousands of miles distance and different timezones), Paul D., T1 (always an inspiration), Nathan, JT, Milan (planning sessions and snowboarding without you would not be the same), Priyesh, Otu, Robbie, Nigel, Yannis, Fab, Kerry, Joe D, David D., Eastmad, Nauman, Dan, Paul M. and Shabeer.

I would like to thank as well Joe B, El. K, Dirk and Rory for making the Web21c initiative happen. It was good to see how the successful agile team can be created from scratch in a massive organization. Impressive.

So… Right… That is time of changes for me however. This was not an easy decision to make, on my part, but I decided to leave that Eldorado and change job as I was looking for a new problem domain and new ways of stimulating my professional development. I am moving to financial services industry and will work for IG Index couple of minutes from Baynard on the other side of the river.

I will be hosting some farewell drinks on Thursday 6pm, Booksellers. I hope to see you all there.

So… Right… Maintain the SDK Team spirit, don’t let the table football and xbox get rusty! Keep motivated, keep focused, deliver and innovate wherever and however you can. I do hope our paths cross again in the future.

Popularity: 19% [?]

Comments (1)

How to alter existing xml schema collection in ms sql

Microsoft SQL Server does not allow to replace an existing XSD schema in a straight forward manner. There is a way of extending a schema by adding new schema component to an existing collection but it will not help if we need to replace a schema:

ALTER XML SCHEMA COLLECTION [relational_schema.]sql_identifier ADD 'Schema Component'

We cannot drop the schema collection and recreate it as it might be used by a table. The way forward would be to untype all XML columns using the collection, then drop and recreate the schema collection and as a last step type the XML columns to that new schema collection:

ALTER TABLE my_table ALTER COLUMN my_xml_column XML

DROP XML SCHEMA COLLECTION my_xml_collection

CREATE XML SCHEMA COLLECTION my_xml_collection AS 'content of my XSD'

ALTER TABLE my_table ALTER COLUMN my_xml_column XML(my_xml_collection)

Popularity: 24% [?]

Comments

Mobile location based services suck due to content

Industry has been trying to tackle problem of location based services (LBS) for years. There was always something stopping wider adoption: mobile providers having brain of the size of a peanut finding always a reason to reject the request for the location data (famous code of conduct), clunky mobile handsets with no capabilities what so ever to accept in convenient way user’s input or to display in an acceptable way results, expensive mobile data pushing most of the possible users of the LBS systems off. I could go on and on about the reasons. Let’s just add one more: content. The ideas for location based services exist for years and I believe are very good. There are endless ideas which could improve our way of interacting with context sensitive data, ideas which could be possibly monetized.

Which year is now? It has been at least 7-8 years since I started to put interest in that. But what has changed, what has improved, what hasn’t? Certainly the capabilities of mobile handsets has improved with the new era of the “touchy” handsets changing completely the user experience. Let say it loudly: it becomes acceptable experience now. The problem of the cost of data becomes valid but more and more operators offer (unlimited) data packages for reasonable price. The wide adoption of Wi-Fi and wireless internet capabilities of modern handsets play important role here as well. Nothing really changed in the Telco Towers in term of availability of the location data. Ok, maybe you can get your location but forget about any ideas based on sharing your location with other people. Ain’t gonna happen. Luckily there are services like Yahoo Fire Eagle which tries to fill the gap, services which facilitate users sharing own location with push model and serving that location to interested parties (other applications), doing this in a secure way where the user can control who can see what and when by delegating authorization to own data. There is as well wider presence of mobiles with a GPS module built-in or connected via bluetooth.

We can see improvement and work done in all areas. So, what’s the reason for this rant? The reason is that the experience of using LBS services is still horrible! Let’s take the simplest possible service: “what’s nearby” search. I can get my location as accurate as it can be via GPS but I still can’t really find what I am looking for. Real life situation: I am near Blackfriars station in London, I know that that there is a branch of the Halifax bank nearby, possibly on Fleet Street. Can the new technology help me? The answer is NO. The Google Maps found couple of banks near Fleet Street, but not what I was looking for. The same Yahoo! GO service. Nokia Maps: no love neither. So, let’s face it: mobile location based services suck due to still poor content.

Popularity: 26% [?]

Comments

How to synchronize Google Calendar and Microsoft Outlook Calendar with Nokia N95

I was looking for a way of synchronizing my private Google calendar events and my professional Outlook calendar with Nokia N95 8GB. As it turned out it is possible to have quite neat configuration with 2-way syncing to and from your mobile. What is interesting it can be used with other phones as well, not just Nokia, not just Symbian 60 3rd.

The solution has two distinctive parts:

  • 2 way synchronization of Google Calendar with the phone
  • 1 way synchronization of the Outlook Calendar with the Google Calendar

There is a free service GooSync which helps with first problem. It works with many, many different phones and as basic version is free. The biggest limitations of the free version is that we can synchronize just main calendar, so people using multiple calendars might have to consider using Premium version of service. As a result of registration and installation the goosync software you will have a new synchronizer added to the standard Nokia Sync application.

Next… To pump out events from Outlook to Google Calendar you can use Google synchonizer. Install it on a computer where you have Outlook (note: the supported Outlook versions are 2003 and 2007) and setup 1-way synchronization Outlook -> GCalendar. The application working as a deamon will push events every X minutes to your Google Calendar.

To synchronize your phone with your calendars go to the Sync application on your phone and choose the goosync.com http syncing. You can use WiFi or GPRS to connect to the syncing service. Unfortunately you cannot schedule the synchronization, you will have to do it manually.

Popularity: 38% [?]

Comments

Ubuntu Hardy - Nautilus not starting due to bonobo activation server

I was looking forward to the release of Hardy as I upgraded my main computer much before the official release which meant couple of problems which I described in one of my previous posts. Most of the issues were resolved in couple of days but about two weeks ago I started having a problem with starting graphical interface due to the Nautilus not being able to register to the bonobo activation server, the same for panel. The environment was still usable but I had to start each time in the Gnome Failsafe mode. I assumed it must to be a pre-release bug or something. I know, I was passive and should have investigated that straight away. But using beta versions of software very often means that there are small issuettes here and there, which is natural, I think, and we agree for that the minute we start that version. I waited patiently for the fix checking everyday, pulling updated packages. It didn’t come. Finally the official release came as well but didn’t solve my problem neither.

As it turned out the problem laid somewhere else. I installed recently Mono 1.9 to try if the Web21c SDK can be executed on that. After uninstalling the software by running the ./uninstall script from the Mono home folder everything works smooooothly again!

Lesson: don’t assume.

Popularity: 37% [?]

Comments (1)

Fizz Bang python coding challenge

Very late, I know, but finally I sat down to the Python focus group homework which T4 started to run recently. The first challenge was:

Write a program that processes a list of numbers from 1 to 100. For each number, if the number is a multiple of 3, print “FIZZ”; if the number is a multiple of 5, print “BANG”; otherwise, print the number.

You are *NOT* allowed to use any *IF/ELSE* statements in your code. You can use the list-accessing ternary operator hack, but whilst I’ll accept your homework if you do, you’ll miss out on the prize (alcoholic), which goes to the most concise code (not including whitespace).

I started with implementation which uses IF statements just to get a feel for the problem and then I moved to a solution using datastructures, starting with the dictionary where key mapped to a function. Something like:

dict = {
    1: f x: x,
    2: f x: x,
    3: f x: 'FIZZ',
    4: f x: x,
    5: f x: 'BANG',
    6: f x: 'FIZZ',
    7: f x: x,
    8: f x: x,
    9: f x: 'FIZZ',
    10: f x: 'BANG'
}

Each key would map to a function which returns a correct value for that index. Then for a given index we could print the value as follows:

print dict[n](n)

It works for numbers from 1 to 10 only but as first cut that’s ok. You can see straight away that mapping to function is not really needed. Simple values in an array would be enough. Now we have to only make it more robust and use modulo on the value. After some time of struggling I got to this outcome (which is very similar to Kerry’s and Nigel’s solutions):

for n in range(1, 101):
    print ['FIZZ','',''][n%3] + ['BANG','','','',''][n%5] or n

There is already a second challenge waiting.

Popularity: 29% [?]

Comments

Selenium and the Permission denied to get property Location.href problem

SeleniumI came across a strange behaviour of Selenium and wanted to share my pain with someone really. But first couple of words of introduction. I use Selenium in my current webapp project which I am working on. The application uses quite a lot of javascript (Dojo framework mostly) which can be tested using D.O.H. framework but the Selenium is giving us the final sanity checks, acts as integration test framework and may be used by product owner in an agile environment to drive acceptance on user stories via automated acceptance tests.

Selenium is an excellent package. I really love it. Just to mention integration with various browsers, Selenium IDE, support for integration with build (Selenese ant task) and really easy way of creating and storing the tests as HTML. It is a framework which cannot be ignored by anyone working on webinterfaces.

There is previously mentioned selenese ant task which helps with integration of the Selenium tests and an ant build. You can grab the jar from the Selenium RC distribution.

However as most of the things around us it is not a perfect software. Anyone had the famous “Permission denied to get property Location.href”? Cross domain scripting issues?
In my case I figure out two reasons for above problem and I wanted to share it:

Problem 1:

Let’s look at the following selenium command:

  • open
  • http://host/some/url

Looks good, doesn’t it? So it might work, but it can as well break on another box with the “Permission denied to get property” and some other scary warnings. The solution in this case was simply to remove the host definition from url leaving just:

  • open
  • /some/url

Problem 2:

One of the pages I was testing had redirection in case of the authorization violation. So esentially after single HTTP request the browser was receiving single response with redirection and then performed another request to the URL defined in the redirection. Selenium couldn’t handle that correctly. But again, it wasn’t deterministic, it could work on one box but fail on another. Timing issues etc. Hate that. Neither of the combinations worked in consistent way: openAndWait, open + pause.

The solution in this case required change in the webapp to remove usage of the redirection (which I believe was an ugly way of dealing with the problem anyway).

Hope it will help someone with similar issues. If you know another tricks or something to avoid when using Selenium please contact me or leave a comment here.

Popularity: 58% [?]

Comments (3)

Notes on upgrading to Ubuntu Hardy Heron Alpha 6 on HP 9440

After being abnormally active last two weekends because of my well deserved ski holidays I had a chance to return this weekend to more usual couch potato life style. This allowed me to see Welsh proving over French who deserves to win Six Nations and Kubica blowing up his chance to be on the podium of the Formula One race in Melbourne. All that super exciting activities left me some time to play with latest alpha release of the Ubuntu - Hardy Heron Alpha 6. I used HP Compaq Mobile Workstation nw9440 for the trial. So, here are couple of my observations.

Most of the things worked without any problems (graphic card, sound, touchpad, wired network). Great stuff for alpha! However I had couple of problems:

  • Hardy will upgrade your Firefox to 3.0 Beta
    • probably you will lose most of your plugins
    • if you want you can downgrade the version to 2.x, it is still available through Synaptics or apt-get install firefox-2
  • Wireless connection does not work
    • I have the Intel 3945ABG chip on board.
    • The Network Manager doesn’t recognise and show any wireless connection.
    • The module iwl3945 is not loaded: lsmod | grep iw
    • Other users report the same or similar problems
    • There are solutions for the issue but you can expect that if you have the same chip you will encounter the same problem with out of the box configuration.
  • VmWare Player
    • reconfiguration of the software is needed. Run: vmware-config.pl
    • the process will try to build modules for current kernel but unfortunately the compilation can fail
      • I had to install missing linux headers: sudo apt-get install linux-headers-2.6.24-12-386
      • make sure you have installed build essential packages: sudo apt-get install build-essential
      • if the build still doesn’t compile try the vmware-any-any-116. More information on this blog.

I don’t want to discourage you from trying the Hardy release. I am pointing only on issues not telling about good things. It looks like another good release of Ubuntu is on the way. If you are ready for couple of minor issues then try the new version now. If not wait couple of weeks. The final release of Hardy Heron should happen in April 2008.

Popularity: 45% [?]

Comments (5)

VMware Tools for Windows XP as guest on Ubuntu Gutsy

Do you use VMware Player on Ubuntu host to use Windows XP as guest? If you are not happy with performance and you are annoyed with the Ctrl-Alt shortcut to leave the guest (that one for you Uros!) then consider installing VMware Tools package on your guest OS. This package is available only for the VMware Workstation but it is possible to install that on the Player as well. From your guest:

1. Download VMware Workstation: http://download3.vmware.com/software/wkst/VMware-workstation-5.5.0-18463.tar.gz
2. Extract windows.iso from the archive which is located in vmware-distrib/lib/isoimages/windows.iso
3. Mount the image. You can use free and nicely simple Virtual CDROM Control Panel to do it.
4. Run the setup.exe from the virtual drive

Popularity: 100% [?]

Comments (3)

How to use Java Web21c SDK from Scala

It is an example how to use the Web21c SDK from a Scala application.

First couple of words about Scala. Scala was created in 2001 at the École Polytechnique Fédérale de Lausanne (EPFL) in Switzerland. It is platform independent, multi-paradigm language which integrates features of object-oriented and functional programming, is type-safe (but you don’t have to define redundant types of information) and extensible (good candidate for DSLs). It brings a lot of very nice syntactical sugar as well! As Scala smoothly integrates with Java and .Net worlds we can run Scala applications on JVM or .NET CLR and easily reuse existing libraries for those platforms.

One of those libraries is Web21c SDK which gives us easy way of integrating communication services and comes in couple of flavours: SDK for Java, .Net, Python and PHP. We could integrate Scala with Java or .NET SDK but for the purpose of this example we will see how easy it is to incorporate Java SDK into our Scala application.

Let’s assume we use Scala plugin for Eclipse and we created a new Scala project.

We can get the latest Web21c SDK for Java and before proceeding to next steps we have to register our application and obtain own certificate for sandbox server which is free. Then we will create two folders: lib and resources in our project and we will unzip content of the Web21C-JavaSDK-5.0.zip and copy content of the lib folder from SDK to our lib folder. Let’s copy the Web21C-JavaSDK-5.0.jar there as well. We will copy previously obtained certificate to the resources folder and we will create a properties file called security.properties where you can store name of your cert and its password:

org.apache.ws.security.crypto.provider=com.bt.security.PKCS12Crypto
org.apache.ws.security.crypto.merlin.keystore.type=pkcs12
org.apache.ws.security.crypto.merlin.keystore.password=YOUR_CERTIFICATE_PASSWORD
org.apache.ws.security.crypto.merlin.alias.password=YOUR_CERTIFICATE_PASSWORD
org.apache.ws.security.crypto.merlin.file=YOUR_CERTIFICATE.pfx

constants.provider=com.bt.sdk.common.SandboxConstants

Next from Eclipse in the project Properties/Java Build Path/Source/Add Folder… we will add resources folder to the classpath and all jars from lib folder to the Properties/Java Build Path/Libraries/Add JARs… to place them on the classpath as well. We should be good to go.

Then we will create the Scala singleton where we will use directly Java objects. For example Manager classes for one of the Web21c services, for instance One Way Messaging to create a simple sms client (src/SmsClient.scala):

import com.bt.sdk.capabilities.messaging.oneway.MessagingOneWayManager

object SmsClient {
    def main(args: Array[String]) {
        new MessagingOneWayManager().sendMessage("tel:44xxxxxxxxx", "Hello World")
    }
}

Or even simpler:

import com.bt.sdk.capabilities.messaging.oneway.MessagingOneWayManager

object SmsClient extends Application {
    new MessagingOneWayManager().sendMessage("tel:44xxxxxxxxx", "Hello World")
}

Is that close to the famous “one line of code”?

Our project’s structure should look more or less like:

+ Web21cAndScala
    L---+ src
        L--- Web21c.scala
    L---+ bin
        L--- //compiled classes
    L---+ lib
        L--- Web21C-JavaSDK-5.0.jar
        L--- //other jars from lib folder
    L---+ resources
        L--- sandbox.pfx
        L--- security.properties

We are ready to try if it works. Try Run As… Scala Application. Great if it works! If you get following error:

Exception in thread "main" Reporting Service: Unknown
com.bt.sdk.ServiceException: Unknown exception encountered: java.lang.ExceptionInInitializerError
null
    at com.bt.sdk.capabilities.messaging.oneway.MessagingOneWayManager.<init>(MessagingOneWayManager.java:26)
    at SmsClient$.main(SmsClient.scala:7)
    at SmsClient.main(SmsClient.scala)

Then it means that folks from Lausanne haven’t fixed the bug in Scala Eclipse Plugin yet. It simply doesn’t copy resources on the classpath to the output folder (bin) and the Web21c Java SDK can’t see security.properties and the certificate. For purposes of this exercise you can simply copy content of the resources folder to the bin folder. As hot fix you could also create an ant task similar to the one below. You can make the execution of one or more targets from an Ant build part of the normal build of your project:

<?xml version="1.0" encoding="UTF-8"?>
<project name="copyprops" default="default" >
    <target name="default" >
        <copy todir="${basedir}/bin">
            <fileset dir="${basedir}/src" includes="**/*.*" excludes="**/*.scala"/>
        </copy>
    </target>
</project>

I know that it is very simple demo but I hope it will be of any use for someone. Let me know if you are having any issues with the sample. And remember that Sandbox Usage is restricted.

Popularity: 66% [?]

Comments

« Previous entries

Close
E-mail It