03.05.2011

Lightboxes

posted by Karsten

I’m developing several Blackboard (BB) Building Blocks (B2) for the DEVELOP project that I’m involved with at the Uni.

In one of them I have list student submitted links to websites and the potentially show a website inside an iFrame (yea I know, but my hands are tied, ask BB!) This I thought would be looking a bit more interesting if I could do this inside a Lightbox, i.e. a window inside the webpage where the website would show up, and the user would then not have to move outside BB to review student submitted links. There are plenty of options out there, but this has proven a bit harder than it ought to be.

My restrictions are as follow:

  • The lightbox must be open source – MIT / GPL style we don’t care.
  • The lightbox should run in IE, Firefox and Chrome.
  • Must *NOT* rely on jQuery, YUI or Mootools.
  • But can use Prototype.
  • Cannot rely on variables that point back to an internal file location (B2 cannot be linked to absolutely, at leat I haven’t found a way to do it…)
  • Should still be “alive”, although we use it if it is the only solution that works.

So right now I’ve tried:

  • Lightwindow – Works, but not in IE9
  • GreyBox – require links to folder
  • HighSlide – works but is not open source, and only free for non-commercial use, which Universities hardly can claim these days…
  • Prototype Window – seems to through cross domain exceptions, and it hasn’t been updated since April 2007, so I would have been surprised if cross-domain access rules hadn’t changed since then.
  • ShawdowBox – Works, but is only for personal, non-commercial usage.
  • Lytebox – WoW, that seems to work!! My search seems to have ended…

And yet another day passed in the life the Doctor!

 

 

 

Share
27.04.2011

Competency Comparisons

posted by Karsten

This post builds on the blog post, so if you haven’t seen it, and do not know about competency representation you probably should! If you don’t know what ontologies are then this post can come to your rescue.

So there is a need to compare competencies. We know how to describe them, and we can even share them between disparate systems, however comparing is really hard, because there is no ontologies describing the different components in the RCD descriptors. We might be able to make some educated guesses in the graph of competencies, but it can only be guesses. If we were to do something more clever we would need to go into natural language processing.

However by specifying ontological relationships between different RCDs it becomes possible to start making comparisons between the different individual RCDs. Unfortunately traditional ontologies relies on formalised relationships which doesn’t really apply to the competency sector, or are too prescriptive. They are also binary in their very nature, i.e. either they exist or they don’t, and the inferences are therefore stringent. This stems from the fact that they are using/based on formalised logics, and as such describe the world using this logic. Fuzzy logic ontologies are being worked on, but that isn’t the biggest problem with ontologies within the competency area – it isn’t that problem of degrees of relationships, but rather degrees of agreements with statements.

The tool I created was based on standard ontology (OWL) tool set, using OWL and VSRCM graph relationships, based on “traditional” semantic relationships, but I used semantics taken from linguistic theory used in WordNet to describe how different words are related to each othe (e.g. synonyms, antonyms, meronyms, heronyms). In formal ontology this would be regarded as a bad idea, as the resulting semantic inferences would not necessarily be deterministic. To allow for this I developed a system where the results weren’t binary, i.e. true/false or in this case match/non-match, but rather indicated by a “traffic light” matching system if a match was achieved, possible, or not achieved. All of these assessments based on the inferences made within the ontological inferences showing the different inference paths so that the user can assess the validity of the inferences.

 

This is hardly traditional usage of ontology tools, and truly speaking has proven to be hard to published in traditional ontology literature. A paper describing this has been accepted for Journal of Applied Ontology, but with major changes due to this innovative use of ontology. I’m still struggling with these changes and not sure if I am prepared to make them, or indeed if I can make them and still present my new work. I have also submitted another paper for another journal with a special issue on Competency Management, and we’ll just have to wait and see how it will be received there…

Share
21.04.2011

BoB – update

posted by Karsten

I’ve just uploaded a new version of my Android game BoB to the Android market – it now has online high score lists (using Scoreloop), a new game mode (Wicket Hole) and an improved user interface.

The fruits of 4 weeks of hobby coding – even with guests in the house, a trip to Norway and Uni work in “the way” – am I a coding monster or what!

Share
14.04.2011

Windows 7 – 64 bit vs. Android adb

posted by Karsten

I’ve just gotten Windows 7 installed on my work computer. Normally I’d opt for 32 bit installations, as I usually find that a lot of my production suites doesn’t function that well with 64, but I had forgotten ask Nick from ITNG this odd request, so now I have 64-bit. It really ought to work, and in theory I really want to use the fastest operating system (OK, preferably a Linux kind, but so is work, that it is almost impossible for me!)

Unfortunately when I installed Android after installing Java I got into trouble. The adb didn’t load at all, and when trying the “android” command from the (awful) windows terminal, I got:

Exception in thread “main” java.lang.UnsatisfiedLinkError: org.eclipse.swt.inter
nal.win32.OS.LOWORD(I)I

Most links on the interwebs, and indeed the Android Java-docs, said that relates to the NDK, but I haven’t installed that yet, and have made no references to it yet. I thought it was because I had installed Java 64bit , so I tried to install 32bit instead, with no luck. In desperation I tried installing both 32 and 64 bit alongside each other. With little hope I tried the “android” command, and it seemingly works, at least I’m installing Android SDKs right now…

Share
30.03.2011

BoB has been published

posted by Karsten

Tadaaa! I’ve just published BoB on the Android market. You can find it here. It will be interesting to see if anyone downloads it. I personally really do like playing the game, even after extensive testing, so I hope that there will be folks out there interested in it, and even finding it fun to play…

Please tell me if there are any bugs, or if you have any suggestions.

Share
21.03.2011

Memory leak and Android / Java

posted by Karsten

Many (novice) programmers think that managed environments, such as Java, is memory leak free. The Garbage collector (GC) will just take care of all memory management, and everyone will be happy! Over the last few days I’d have wished this was the case…

The reason this isn’t true is that if something is referencing the object which is not in use, the GC can’t clean it up, and you can potentially end up with a mountain of wasted memory. Last Friday I suddenly realised that I might have been a bad boy and created one of these situations within my game. I could only play 10-15 games in a row on my machine and then it would crash with a heap allocation error. This is typically what will happen in this situation.

Obviously I thought that I’d been cleaning up within my code, but something was a miss. It took me many hours to fix this one, and I believe it is worthwhile mentioning this one, as it is a problem others are likely to get caught in!

The situation:

  • To minimise memory usage bitmaps are referenced statically within classes
  • One of these are used as background within a view set using setBackgroundDrawable(Drawable d)

What happens here is that a callback is create from the static bitmap to the view, so when the view object is nullified or goes “out of sight” there still exist a callback from the static bitmap to the view (even if is within a class not in use). Therefore the GC cannot cleanup the view object, and through that the context is reference, which means pretty much everything you’ve created within your view. For me that meant 4 full background images, and on a phone that means a lot of memory…

Therefore, this callback needs to be cleaned up manually!

Share
02.03.2011

BoB – getting closer

posted by Karsten

A screenshot of the game showing a few balls that can be pocketed into 4 different holes.The game development is moving along, and I’m almost getting ready for release. The game is now a real game, or actually several – I’m only showing one at the moment, which will changes before release. It has got real scoring, and a timing mechanics (a set time to play which gets some added time for each correctly pocketed ball) which for me wants me play it again! Luckily!! I think it is important that a developer wants to play his own game…

I showed it to a few friendly faces (notable Pat and Nick from ITNG at UoR), they both seemed to like it and had a few suggestions to improve it.

Now I “just” need to

  • finish the starting screen
  • add all the game modes I need for each version (a free ad version and an ad-free paid for version)
  • Create an high score list

And we are good to go…

I’ve made the game by developing a bespoke game engine of balls and boxes, so once this game has been released, it should be relatively simple to create another one based on this engine.

Share
27.02.2011

Rhomobile – installation problems

posted by Karsten

This last week I’ve been negotiating with a company to do some consultancy work creating an Android app using Rhomobile. Whilst I cannot go into detail at this moment about the app, the funding is dependent on some governmental funding scheme, and still awaiting clearence, I thought I’d better install Rhomobile and check it out – it looks great “on paper” as it is a multi-platform mobile phone app environment based on Ruby on Rails.

So I started installing the environment following the very good instructions on Rhomobile’s site, however after doing so, remembering to set JAVA_HOME manually (Ubuntu’s update-java-alternatives doesn’t – surprisingly!), I ran into trouble. I got:

platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java:461: cannot find symbol

symbol : method setForeground(boolean)
location: class com.rhomobile.rhodes.RhodesService
setForeground(true);
^
platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java:480: cannot find symbol
symbol : method setForeground(boolean)
location: class com.rhomobile.rhodes.RhodesService
setForeground(false);
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

It turns out that Rhomobile uses the deprecated setForeground(boolean) method, which Google has removed in the newest Android SDK. Luckily I had an older version of the Android SDK on my desktop, and it turns out that it works perfectly on that version. I can only hope Rhomobile fix this soon. I really hate using old SDKs!

Share
22.02.2011

Feeling old – the geeky way!

posted by Karsten

The geeky way of feeling old?

Well, hmn, for research, I am normalising some data on a blog, so that I can finish write this journal paper I’m working on. So while doing that I found one blog post written by myself where I talk about Fedora Core 5!!

I believe that is like 10 versions ago…

Reminded me of this XKCD comic:
XKCD about scary being old

Share
Tags: , ,
15.02.2011

Ontology – 101

posted by Karsten

In my competency work I’ve used ontologies extensively, and for those who don’t know what they are, I’ve decided to make a small simple “101” blog about them.

Ontology stems from a rather old classical philosophical study which deals with the nature and organisation of reality. When I say old I do mean it – I even referenced Aristotle in my PhD thesis, a fact I found incredibly cool!

Within computer science, shortly put, it is a logical theory that gives an explicit (partial) account of a conceptualization, i.e. rules and constraints of what exist in a reality. In other words a description of the individual objects in a “world”, their (actual and possible) relationships and the constraints upon them. Take the simple “boxes on a table” world in the picture. The objects would be the table and the boxes = {a, b, c, d, e}. Then several relationships could be made such as table (the boxes that rest on the table, so in this world c and e), on (boxes upon a specific other box, so in this world [a,b], [b,c], [d,e]) and more relationships could be defined. All these relationships are “intentional”, that means they a specifications of what can be not the actual relationships, they can be used to specify other worlds, such as the below world:

This gives the opportunity to share the ontologies and use them to describe different worlds and compare them with each other.  This is what make them so interesting in computing. There are traditionally 4 different kinds of ontologies: top-level/upper, domain, task and application . (Guarino)

  • Top-level ontology (also called upper ontology) should describe high level general concepts, which are independent of domain or specific problems. This would typically be concepts like matter, object, event, time, etc. These should allow for large communities of users, thus enabling tools that work across domains and applications of all the users.
  • Domain ontologies and task ontologies should define the vocabularies and intensional relations respectively of generic domains (e.g. medicine, competency or education) and generic tasks and activities (e.g. diagnosis, hiring or reflection). This is achieved by specialising the terms defined in the top-level ontology layer. In practice these two ontology types are often put in a single combined domain and task ontology at this level with one ontology for each domain, as this is easier for the ontology engineer to practically do.
  • Application ontologies describe specialised concepts that correspond to roles in the domain performing certain activities. These make use of both the domain and task ontologies.

When developing ontologies for use in real world there are 5 principles that one ought to follow (Gruber):

  1. Clarity – the formalism of ontological languages ensures this.
  2. Coherence – there should not be contradictions in the ontology.
  3. Extendibility – develop with other uses in mind.
  4. Minimal encoding bias – (an encoding bias results when representation choices are made purely for the convenience of notation or implementation.) This enables several computer systems to speak together.
  5. Minimal ontological commitment – should only make the assumptions needed for agents to work together leaving the freedom of the agents to create the “worlds” they need internally.
I think this is enough ontology theory for a blog post, if you are interested go to the first chapter in my PhD thesis.

There then exist a large range of different tools that uses these theories to describe the world, and several ontologies that can be used to share knowledge. OWL is probably the most popular ontology language in use, as it is the W3C language for the Semantic Web, it can be used in XML/RDF but there exist many other ways of using it.

A good  starting point for using ontologies would be Protégé, which is an ontology editor from Stanford University. There is tons of help on their web site, and the tool really helps the understanding of ontologies, sometimes it just makes sense to see things graphically rather than read it. Having said that I don’t use it anymore, it isn’t even installed on my computer, because it becomes much faster to write ontologies by hand when you’ve understood them.

If you want a more comprehensive “beginners guide” then I personally found this paper by Natalya F. Noy and Deborah L. McGuinness useful when I started down this ontological road.

Share