Sunday, July 27, 2008

Drag and Drop in MacOS X

One think I simply love about Mac is the consistency of UI interaction design.

For example, you can drag and drop files - right simple. But you can also use the same paradigm to copy color code from one editor to another. It is much easier than retyping it, or twisting arm to get it to the text editor.

Here is a short example:

Running fresh Leopard **might** solve your AirPort problems

I could not stand it any longer - certain issues which worked on Ewelina’s Mac somehow did not work on mine, e.g., no auto-connect to known WiFi networks.

I thought to myself - this have to be because I did Tiger-to-Leopard upgrade. Time to reinstall my precious Leo and see what will happen.

The whole procedure started on Friday night, and I got it operational few hours later with my stuff seamlessly migrated thanks to the wonders of TimeMachine/TimeCapsule (sweet - trust me).

I have saved a lot of space as a side effect - this time I knew what NOT to install

And the Wifi apparently worked just fine.

At least until .... I came downstairs where a separate WiFi network is setup (our walls as so tick the signal can hardly go from one floor to other). To my surprise - autoconnect to the network downstairs did no work. I was trying everything - from changing network settings to fiddling with KeyChain access.

Nothing helped.

Than, following an old and very good advice of my old friend and Unix guru in one person, i.e., Dorota, I have checked LOGs using Mac’s Console.
And I have found this:

7/27/08 15:16:44 SystemUIServer[122] Error: _ACNetworkCopyKeychainItem() expected password for "WiSkrukDownstairs" not found: -25300 (The specified item could not be found in the keychain.)

After some googling I have came across a post suggesting that moving “System Preferences” from /Applications to /Applications/Utilities/ can be the cause.

Really ?! I mean - this application should be in utilities in the first place.

Well, anyway - I gave it a shout.

Result?

Now it works

Thursday, June 05, 2008

On AJAX problems with prototype.js v1.5+ (till 1.6.0.2 at least)

My (a little tiring now) work on JOnto 2.0 is getting closer to the finish line. I can almost see the crowd cheering.
Many changes, including WordNet in RDF/OWL and OpenThesaurus (non-English thesauri) support, full-text index, etc.

I decided to check the current version (let’s call it JOnto 2.0 PR 1) with the most recent prototype.js.

To my surprise it did not work. Hanged with no logs whatsoever (as usually with prototype.js).
The bug was not, however, in my code.
It took me a while to recall the details of this deja-vu feeling.

To make sure I will not forget it next time, and for other people to know what is going wrong, here a short description:

If you catch exception with onException(resp, ex) you will see that your script is trying to perform illegal operation.
Firebug reports “Component returned failure code: 0x80070057”
Safari is a little more precise - reports problems with an attempt to set illegal header in the HTTP request.

Where is the bug?

Apparently since prototype.js v1.5, i.e., the first time I have discovered it (since it worked in v1.4) the setRequestHeaders method uses following implementation:

for (var name in headers)
this.transport.setRequestHeader(name, headers[name]);

which does not catch any exceptions

My fix is the following, change this two lines to

var transport = this.transport;
$H(headers).each(
function (header){
        
try{
                 transport.setRequestHeader(header.key, header.value);
        }
catch(ex){
//                 YAHOO.log(header.key, header.value, ex);
        }
});

The question remains how is that possible that some invocations of Ajax.Request do and some don’t produce this problem.
For now - I’d rather patch the script and live on.

Tuesday, May 27, 2008

Ordering cafe in Starbucks - be sure to spell your name right ...

Otherwise your surname might become “Cru” (instead of Kruk)

SP_A0164_2.kqhKgfrXX7qP.jpg


And, never, ever say your name is the “same” as the person who was ordering just before you

SP_A0163_2.OoRCmXjHGypd.jpg

Fat frog

Ever wondered how to make a fat frog cocktail?

SP_A0221.Uyg0RMo0zgRp.jpg

In case you've spent too much time abroad...

(Part 2) Wizzair teaches us new, unified language Polenglish

This is a photo of a boarding card. The whole card is in English, except for the large-font caption, which reads:
“Please go to the gate immedietally” in Polish. The only problem is that word “gate” can no longer be translated into Polish, right? It had to stay “Gate” (instead of “Bramka”). At least someone was trying to make it a Polish-kind of word and did declension (Gate’u).

SP_A0332.WmpcbSurHbD2.jpg

Some problems with geography ?

This is the first post (of many coming) with stuff that is so funny I could not resist myself to capture the moment with mobile phone camera ...

Part 1: Hertz and the the lesson of geography

I never knew for my whole life I was Czech, not Pole. Apparently, Hertz is convinced I am.
And this is not just the labels being switch. The prices sounds right - €50 for “the region I called Poland” and €34 for “the region I used to call Czech Republic”.

SP_A0341_2.5dx6WjtTC6pK.jpg

Monday, May 26, 2008

Leopard supporting Java programming

The problem I usually have when starting to use a new library/API is which JARs to include so that only those required are included, and none else. Usually this is a wild guess, or listing content of all available JARs.

With Leopard (Mac OS X 10.5) this is no longer the case. The new “Preview” comes very handy in times like that.

bydefault1.Qt4uzNyljG2O.jpg

Thursday, March 06, 2008

Is Semantic Web Technology Taking the Wrong Turn?

This is the question Chris Bussler asks in his recent article in the IEEE Internet Computing "Peering" column, edited by Charles Petrie, from DERI Stanford. It is interesting that among few examples of successful, ongoing products of Semantic Web research, Chris mentions JeromeDL. I personally, consider it great success, since it is more than two years now since met the last time. That time JeromeDL was a little more than a rough idea. Now, it can even impress (maybe not everyone - but I do not care about these maggots).

Yesterday I got a chance to present JeromeDL and notitio.us to Nova Spivack from Radar Networks (I am still waiting for my beta account to Twine). He was clearly impressed, with access control module (Extensible Access Control - to be published soon) in JeromeDL, IKHarvester, SSCF (how isn't?), and last but not least - recommendations in notitio.us. TagsTreeMaps and MultiBeeBrowse weren't left without positive impression either. I think this were the best 15 minutes (stretched a little, I know) of sales pitch. Ok, meeting with INEK in Korea was jaw-dropping experience as well, but I had much more time than.

Tomorrow, I should be ready to announce the results of the our evaluation of Semantic and Social technologies in JeromeDL. Stay tuned - you might got surprised if you thought that semantic web technology has gone astray.

Blogged with Flock

Sunday, February 10, 2008

Why do I prefer ntriples?

A thought experiment (actually I had to do that just a minute ago): you have a number of publications backed up from JeromeDL. Each publication is in a separate folder, named as an ID of this publication. Inside you will find dublin core file (XML), couple of binary files (PDFs and such), and RDF description of the resource.

The task: Map a title to each resource using anything you can get on MacOSX or Linux.

Solution: The RDF description in JeromeDL is exported using ntriples format. Which means - one statement per line. Therefore a solution is a very simple workflow:

  1. find the RDF files

  2. prepare grep command

  3. execute


Which on any UNIX system will translate into:
find . -name "rdf.abstract.ntriples" | awk '{print "grep \"xontology#hasTitle\"",$0}' | sh -

Teaser: Try to do that spending only as little time as I did with either RDF/XML serialization or/and Windows. Good luck.

Friday, February 01, 2008

Snow in Ireland (First Day of Spring)

If you ever been to Ireland long enough you know certain facts:
  • there is so much rain - you could start inventing names for different kinds
  • the temperature (almost) never drops below 0C - so there is proper winter
  • the seasons in the Celtic Calendar are different. Spring, for example, starts on Feb, 1st.

And there you go - today is Feb, 1st - and we had quite a "snow storm" in the morning :)

Saturday, January 26, 2008

What is keeping me so busy recently? (2)

Another missing piece of my PhD Thesis was evaluation - which for obvious reasons could not have been done before :)

The first phase has just finished - I have managed to convince 25 victims to finish the evaluation.

Now it is my time to process all the data (I still hope from some help from Ewelina - as usual :D)

What is keeping me so busy recently? (1)

One of the things missing in my PhD Thesis was a chapter on an architecture of a generic SemDL. But before one can move to SemDL architecture, first you need to understand the research in "classic" DLs, and what are the plans for the future. In order to do that, I had to:

1) Take this pile of almost 100 articles on digital libraries architectures, read them, annotate them

DL Arch (source)
Originally uploaded by skruk



2) Compile all this information into a mindmap

DL Arch (mindmap)
Originally uploaded by skruk



3) Write up the results into a missing chapter in my thesis :)

Tuesday, January 15, 2008

Why social Internet in Poland might not be a good idea ?


Before I came to DERI, I was working on the semantic digital library project called Elvis-DL (now JeromeDL). My idea was to add a feature allowing registered users to share their opinion on the resources in the digital library, and hence, build up the knowledge around it.

The response I got at that time was - that it would be a bad ideas - as free comments will lead only to “spam” texts, or worse - comments expressed with bad language, etc. In other words useless.

Shortly after I started developing social features for JeromeDL in DERI, I have also added this “blog-around” feature. Everyone was pleased.

Why?

Because in the social Internet around the world, your comments on blogs present who you are, and people tend to express themselves politely. Hence, their comments are if not useful, at least nice to the others.

Compare comments on Flickr with comments on wp.pl (large polish information portal). Huuge difference, right?

I am in the process of evaluating my solutions (both semantic and social) for digital libraries; these that have been implemented in JeromeDL. I have sent information around, using any possible information channels I could think about. Most of them were social networking sites like Facebook, LinkedIn, GoldenLine; and mailing lists of all known to me social and semantic web groups.

One of my colleagues, helping me with the evaluation, suggested I should also send this information to the new and fast growing social networking site called nasza-klasa.pl.

I have to confess, I was not too much convinced to this idea; but since I wanted more people to help me, reluctantly, I have sent the information also there. The fora of my universities (GUT and NUIG) and the high school.

Shortly after, a very stupid (and frustrated, if you ask me) comment appeared at the GUT forum.

For me it is a clear example that social solutions build in Poland cannot be left without moderation.

Sad, isn’t it?


---

16 January 2008 17:46

As an after match of this stupid conversation, sadly enough supported by other people with strange attitude, and having no answer from the moderators of the system, I have decided to do the only reasonable thing - remove my profile from that site, since it was impossible to continue the conversation as it went.

Shame on you nasza-klasa.pl.

---

16 January 2008 23:59

Maciej’ve just sent me a copy of the conversation that continues on nasza-klasa.pl. It is nice to see that other people share my understanding of “cultural” conversation.
I could re-register to the portal - but I will not do that.
Consider this my protest against zero-reaction from moderators.
I do not claim that people who behave wrong should be removed out of the sudden, but tuning in to close a pointless conversation would be enough.
As Jaroslaw said - I removed my account as being part of the social network means for me to identify with the people there, and use the SN for the purpose. If I cannot talk to other people without being abused for using technical language, what is the purpose of using such a SN? Good luck nasza-klasa - but you just lost a very strong supporter of social networking. I am getting back to Facebook, LinkedIn, and GoldenLine - see you all there.

---

17 January 2008 09:28

As I can see - the discussion continues. This time the feather was taken by some weird guy who cannot even spell “evaluations” - congratulations - how such a person can be subscribed to university forum? The most funny is that he claims that my evaluation was set up only for computer science; well, it was not. It was set up for people who have some more understanding of the current Internet. The truly sad is that the people who felt offended by not understanding my post were actually computer scientists (or so they claim). And of course, he could not write even a short post without using “french” (yeah, I still know what “chgw” means)

Friday, January 11, 2008

Evaluation of social and semantic technologies in digital libraries


I would like to invite everyone to take part in the evaluation of the semantic and social technologies for digital libraries. The evaluation benchmarks search and browsing solutions delivered in our semantic digital library called JeromeDL [http://www.jeromedl.org/] against standard services offered by one of most popular open-source libraries - DSpace.

Please feel free to enter http://q.digime.name/ and help us with evaluating our prototype solutions.

Wednesday, December 12, 2007

Building thread-safe code with SimpleDateFormat


The scenario is simple.

Each resource in JeromeDL has an upload and update dates; each is stored in a very simple format yyyyMMdd, e.g., 20071212 (for today).

From time to time - we need to get a Java Date object of out this information.

What we do?

Use SimpleDateFormat object parse and format date, getting it back and forth between Java and RDF.

Simple, right?

Yes, as long as your read the whole documentation of the SimpleDateFormat class - to discover that the objects are not synchronized. In other words - what will run on a standalone application with one processor - might very easily break when you try it on a server with multiple processors (or Intel HT).

Luckily, the solution is equally simple - use synchronized block, and you’re done.

Wednesday, November 21, 2007

Who is using my system?



If you have a web application, based on Servlets/JSP (JEE), which sits behind the Apache/mod_jk, and you would like to track who is using your system, here is what to do:

1. In the Apache configuration (probably Vhost definition, as in my case), you will need:
        • JkMount /* NAME_OF_YOUR_WORKER
        • JkEnvVar REMOTE_USER "<NOTSET>"
The second entry will pass the information about user logged in on the Apache level down to your web application
2. In your application you can check who is using it, with credentials on the Apache level, with:
        • ${ REMOTE_USER } (JSP/EL)
        • request.getAttribute("REMOTE_USER") (Servlet or JSP/Scriptlets)
3. In your application you can also check who is using it, with credentials on the Tomcat level, with:
        • ${ pageContext.request.remoteUser } (JSP/EL)
        • request.getRemoteUser() (Servlet or JSP/Scriptlets)

That’s it.

Unless, your system is DSpace - where more problems will arise. You will need to, e.g.,
1. The register user is hidden in request.getAttribute("dspace.current.user"), and is of type org.dspace.eperson.EPerson
2. In order to get some human-readable description of this user you can call getEmail() method to get the email of the user.


Sunday, November 18, 2007

Deadly Sins (when using email)


I have just read this post. I subscribe to this opinion. And on the top of his 7 sins:
1. Hanging Questions
2. Buried Requests
3. Wrong Medium
4. Trying to Be Clever
5. Sending Urgent Requests Through E-Mail
6. Bulky Paragraph
7. Playing E-Mail Tag

I would surely put “Attach Huge Emails”. Seriously, this is very annoying. My mailbox is no 5GB+.

Mac vs PC (by Umberto Eco)


…Insufficient consideration has been given to the new underground religious war which is modifying the modern world. It’s an old idea of mine, but I find that whenever I tell people about it they immediately agree with me.
The fact is that the world is divided between users of the Macintosh computer and users of MS-DOS compatible computers. I am firmly of the opinion that the Macintosh is Catholic and that DOS is Protestant. Indeed, the Macintosh is counter-reformist and has been influenced by the ‘ratio studiorum’ of the Jesuits. It is cheerful, friendly, conciliatory, it tells the faithful how they must proceed step by step to reach–if not the Kingdom of Heaven–the moment in which their document is printed. It is catechistic: the essence of revelation is dealt with via simple formulae and sumptuous icons. Everyone has a right to salvation.
DOS is Protestant, or even Calvinistic. It allows free interpretation of scripture, demands difficult personal decisions, imposes a subtle hermeneutics upon the user, and takes for granted the idea that not all can reach salvation. To make the system work you need to interpret the program yourself: a long way from the baroque community of revellers, the user is closed within the loneliness of his own inner torment.
You may object that, with the passage to Windows, the DOS universe has come to resemble more closely the counter-reformist tolerance of the Macintosh. It’s true: Windows represents an Anglican-style schism, big ceremonies in the cathedral, but there is always the possibility of a return to DOS to change things in accordance with bizarre decisions; when it comes down to it, you can decide to allow women and gays to be ministers if you want to…..
And machine code, which lies beneath both systems (or environments, if you prefer)? Ah, that is to do with the Old Testament, and is talmudic and cabalistic…
[ Being a Mac user and a Catholic - I leave no comments to that ;) ]

Tuesday, November 13, 2007

Java6 for Leopard


My two cents - I really miss that - anyone also interested - please put
13949712720901ForOSX
on your web page/blog