Tuesday 23 June 2015

The road to the true video search

It's been a while since my last post ... A lot of things have happened.

One of the most important things in my life was a shift from Academia research to the Startups world. And I should say that is an amazing journey!

No doubts, I enjoyed doing my PhD, I loved my colleagues. But in the end of the day it's not really "our" research or "our" thing. Everyone is on its own, doing his/her own thing. It's like everyone has his/her own child that they take care of.

Startup is different. There is one child, and each one of 10/20/30 parents makes sure that this child becomes amazing. It is the true team work. Everyone makes an impossible effort to shape a diamond into a brilliant. I love the way each of our team members is picky on every single detail of the product or the process.

What have we done? At Koemei, we deliver true video search experience.
See for yourself. You can now search inside the video recording, you can jump to a point of video that interests you. Type 'software' in the search below and hit enter. Read more about it and try it yourself at https://koemei.com




Thursday 22 September 2011

Bring OpenSocial gadgets to Moodle (updated)


We present here a plugin that allows to bring OpenSocial gadgets into Moodle. OpenSocial gadgets are rendered via Apache Shindig (extension of version 2.0 that supports Spaces).

Moodle is a Learning Management System used in many Educational Institutions (Universities) to manage courses. It is a plugin based PHP application that can be extended by installing additional modules. These modules have to be installed on a Moodle server by a system administrator. The Moodle view usually consists of a main center area and a rather narrow right column with blocks. The center area normally contains main resources, such as, wiki, forum, lesson, quiz, etc. The right block contains some helper plugins, such as, calendar, upcoming events, latest news, recent activity, etc. These are to extend the functionality of the main page.

There are two different OpenSocial plugins for moodle. The first one (shindig-moodle-mod) adds a new module to Moodle. It is very similar to pages in moodle, however in addition, OpenSocial gadgets can be specified. Once it is installed, a teacher can choose a "Widget space" to be added to the course and specify OpenSocial gadgets for it. The teacher can choose whether 1,2,3 column view should be used for gadgets (Fig. 1).
Fig. 1

The resulting outcome is the iGoogle similar view where students can work with gadgets (Fig. 2)
Fig. 2


The second plugin (shindig-moodle-block) adds a new block to Moodle. Teacher can add OpenSocial gadgets to the right column for already existing in Moodle wiki pages, lessons, forums, etc. (Fig. 3)
Fig. 3


One of the main benefits is that the big pool of OpenSocial gadgets can be used by teachers. Thus, once the OpenSocial plugins are installed in Moodle, a teacher can extend the functionality of Moodle without bothering system administrators with plugins installation. The teacher can add and remove gadgets easily and even can write her own ones. The plugins greatly improve the flexibility in choosing the resources and applications for the course specifics. OpenSocial gadgets can be found in the open widget repositories, such as, Role Widget Store, iGoogle Directory, etc.

In addition to reuse of applications existing in the Cloud and flexibility in choosing applications for the course, contextual gadgets and OpenSocial API are the other additional benefits.

Space extension allows gadgets to adapt to a specific context. For example, wiki gadget saves data
for a course and manages access to itself only by people engaged in this course. The same wiki gadget will behave differently being added to another course (different wiki history and different people to access it). Such space extension is already used in production in Graaasp and planned in Apache RAVE project.

OpenSocial API brings the standard way to retrieve and exchange social information between different Moodle installations and other social networks, that improves data portability and interoperability.

Plugins work for new version of Moodle 2.1. It should work for Moodle 2.0, though it was not tested. The installation instructions and source code can be found at github:
OpenSocial Moodle module (https://github.com/vohtaski/shindig-moodle-mod)
OpenSocial Moodle block (https://github.com/vohtaski/shindig-moodle-block)

This plugin was developed within the ROLE Integrated Project and is already used in 5 courses at Shanghai Jiao Tong University.

Thursday 8 September 2011

Crowd (collaborative) translation Rails plugin.


This plugin is to add collaborative language translation (also known as crowd translation) functionality to your site!

If you use several languages, you can ask your users to help you to translate your web application into other languages (crowd translation). This plugin helps you to manage this process. All installation instructions and the source code can be found at github: crowd-translate.

When you manage your languages you normally have parametrized strings pairs (key-translation) "login_required":"Login required for this action." Then, depending on the current language, string "login_required" will be substitued by either english or russian or something else.

This plugin allows to keep track of key-translation pairs and users can provide their own translation for different languages in a collaborative way. It helps you to generate the resulting language files for languages you use. You also have a rather flexible rights management - you can specify who is able to add translations and who is not.

See below for screenshots, small howto and explanations. If you have any questions, post comments here or on github.

Statistics page
Translation interface


Translation Howto

We have four basic statuses of every string to translate.

untranslated - No human translation is done for this string
needs review - String was translated but approval is required by admin
reviewed - String translation is approved and ready to be used in Yoursite
improvement - An improvement or errors fix was added for the already reviewed string and waits for approval by admin.

Automatic machine translation

Untranslated strings have an automatic machine translation. Change it if appropriately or leave it if it is correct, then submit the string translation.

Reviewers and ordinary translators

If you are a reviewer, your changes will not require confirmation and become 'reviewed' as soon as you submit them. If you are not a reviewer, your changes will have a status 'needs_review' and will require confirmation by admin. We will grant you reviewer right, once we are sure that you are serious about this work.

Statistics

On the 'View stats' page you can see how many sentences are there for every language: how many untranslated, reviewed, etc. You can directly jump to specific translation page from the statistics page.

Notifications

If you set notifications to "Yes" for a specific language, then when new untranslated strings are added to this language set, you will receive a notification by email.

Search

You can search for a keywords in a translation set for specific language.

Bring OpenSocial gadgets to Moodle.

I have developed a plugin for Moodle that allows to add OpenSocial gadgets. OpenSocial gadgets are rendered via Apache Shindig (extension of version 2.0) in an iGoogle similar fashion.

Plugin works for new version of Moodle 2.1. The installation instructions and source code can be found at github: moodle-shindig-mod.

The plugin adds a new module to shindig. It is very similar to pages in moodle, however in addition,
OpenSocial gadgets can be specified. Once it is installed, a teacher can choose a "Widget space" to be added to the course and specify OpenSocial gadgets for it. The teacher can decide whether 1,2,3 column view is used for gadgets.

Widget space creation


The resulting outcome is the iGoogle similar view where students can work with gadgets.

Widget space view


Hope it is useful!

Thursday 30 June 2011

Digging deeper into Google+ or why it can be very big thing

Simply put, Google+ is to fight Facebook
http://mashable.com/2011/06/28/google-plus/

Main business model is (well, who was doubting it!) - online ads
http://mashable.com/2011/03/31/googles-plus-1-and-facebook/

Why Google+ can be big thing?

Small story. Luckily I've received an invitation today to Google+ so I could try it out.
Invitation came from ... Won't tell the name, ok?
But he is a big guy (the big tech guy behind Red Hat, hi5, LinkedIn and now Google (10 months)).
Why would I receive an invitation from him? Well, he is the biggest guy behind Apache Shindig and
OpenSocial. That's why (I am also quite active here). When I entered Google+, I realized that he is in Google now and he is one of the people behind Google+ :). I got as well an invitation from another OpenSocial/Shindig guy who is also in Google.

As I looked closely at the interface, I realize that it is nothing but the implementation of OpenSocial specification.
1. Circles are exactly OpenSocial groups - Family, Acquaintances, Friends, Following.
That's the main (and cool!) difference from Facebook where everybody is a friend (which often does not make sense at all)
2. Activity Streams - standardized in OpenSocial 2.0. These Streams are connected to Groups or a Person.
3. Albums - standardized in OpenSocial

I do not know if they already opened the apis to these things, but it is exactly OpenSocial thingy, so I am quite sure they will.
This means their data is interoperable with LinkedIn, hi5 and all others OpenSocial compliant containers - all but Facebook.

That's about connections to OpenSocial. So why it can be a big thing?

1. OpenSocial gadgets and APIs are to come (for sure). They are open vs. closed Facebook-own APIs.
2. Google has a big luggage of cool things and services already and they will be integrating it within Google+.
    a) they integrated google talk chat already.
    b) Picasa photoes are integrated
    c) They integrated your contacts from gmail
    e) How about sharing a google calendar with a circle ?
    f) How about gmail, sending emails to a circle ?
    g) How about Google docs shared within a circle ?
3. A lot of people already use google tools and Google+ allows to take advantage of sharing these tools with people (circles), making these tools social. Facebook actually does not have any tools. I can't imagine using Facebook with my colleges, for example.
4. Everybody is using google as a start page, and now you get this Google+ at a starting page. Why would you go to Facebook ?
5. Google has very nice, simple and intuitive interface!
6. Google has a lot of data about his users, which means recommendations/suggestions can be very precise :)
7. Hehe - you can actually export all your facebook friends :)

In any case. As in any Google application, there are a lot of techy and nice visual things to re-use in building web applications. See multiple selections and drag-and-drop, for example.

Long life to Google.

I have no relation to Google (I'd like it to but I don't, at least for now)

Wednesday 22 June 2011

Why is JavaScript 2.0 the Next Big Language?!

2007 forecast is turning into reality.
http://steve-yegge.blogspot.com/2007/02/next-big-language.html

Why JavaScript ?

Everything below is my personal opinion and experience (I am just a researcher at university,
no company interests involved :)). You are free to agree or disagree.


Popularity
It is already big thing. It is in every browser, on every mobile, in palm's WebOS you can run it natively. There is a lot of work around "JavaScript outside the browser" going on (CommonJS, Node.js, Rhino on Rails). If you know JavaScript, you can code browsers, Web servers, mobile, 2D and 3D graphics, anything!

Some people say: "It's not serious language". Well this language is used to build Google Maps for you, Google Docs, Facebook. If that's not a serious projects, maybe Google should concentrate on some other serious stuff?

Openness
Most of JavaScript code is open source. It's running in browser and it's an interpreted language you can easily get the code and run it yourself.

Swissknife
If someone does web development, he has to know javascript. That's THE language to be used on the client (you just don't have a choice). On the server side - well that's up to you! You can choose Java, Ruby, PHP, Python, Scala, whatever. But think, that's one more language to learn.

I personally use now (due to the project requirement) Ruby and Java on the server (before it was also PHP). That's OK for me (cause I've already done it), but it's a pain when new student comes and ... I tell him: "here are four languages you have to learn now - Ruby, Java, PHP, JavaScript". That's a lot for one single student. Of course, one could say - "if you know one language, it is ok to learn another one". Well, that's true but in addition to a language you need to learn a framework for it. And even simply few languages is a lot for a person. It's much easier to say: "Learn JavaScript and you are done", right?

Write code only once
I've been coding for Web for quite some time now. I do heavy client side applications and unfortunately sometimes I need the same functionality both on the client and on the server. Well for now I have to implement a thing in Ruby and then re-implement it in JavaScript or vice-versa. That's a real pain! With JavaScript everywhere, I don't need it any more - I write every function only once!

Performance
JavaScript is an interpreted language. Which means that it is supposed to be much slower, than compiled languages (C, Java), and get into category of Ruby/Python/PHP.

JS is around 3-10 times slower than Java while Ruby is 10-30. See this benchmark study:
http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=java&lang2=v8
This is due to special optimizations done by Google and other browsers. The constant rivalry between browsers makes the JavaScript engines faster and faster every day.

There are discussions (and implementations!) about introducing static types to javascript, that would make its performance the same as compiled languages.

Niceness
Actually JavaScript is a very nice language. Many people used to see it as a hacky not-reliable language, but many things have changed since its first introduction in Netscape. I (and many will agree with me) find it as a nice, elegant language. If you disagree, get a good book and start reading it :)

Easiness
It is so easy to start. Just run the Chrome browser. Right click -> Inspect Element -> Console tab. You got it! Just type the code 8+5-7 and hit the Enter. You'll see 6 as a result. It was easy, right?

Google behind and others
Google is a big pusher for JavaScript. Having a big company behind the language is almost often language success (Java, as example). There are many others to help Google here (Joyent, Mozilla, Opera, etc.)

JavaScript is THE language for Web development

Some people claim Scala to be the Next Big Language. Well, I doubt it. I find it very cool and I would definitely prefer Scala to Java. Maybe it will get accepted in some areas, but I don't think in Web development. I personally do not want to learn an additional language. I am fine with only one. I do not want to rewrite my code for both Scala and JavaScript. Remember - I have to do it for JavaScript, no choice here :)

If you are creating a web application, very often language speed does not matter that much. The most important thing is the memory management and JavaScript has a super-cool thing here called Node.js It is an event-driven server-side JavaScript based on fastest V8 JavaScript engine from Google. This is THE WAY to go today and this is one more big PLUS for JavaScript.

If you are to learn a programming language and you have a slightest feeling you might need to do some work for the browser, pick up JavaScript!

Tuesday 24 May 2011

+1 for Node.js

Everybody talks today about Node.js.
I should say that's the coolest thing I've seen lately on the Web.

All my Web projects are in Javascript with Rails backend.
I should say I love Ruby, I love its simplicity and clarity, I love to write code
in it. But (of course) there is a small "but".

But!!!
First, Ruby is still slower than compiled languages and often it matters!
Second, if somebody wants to join my project they need to know both JavaScript and Ruby.

I've been always dreaming about having ruby running inside of a browser instead of JavaScript.
Unfortunately, this is just a dream. The reality is different.
Javascript is coming to the server side to replace Ruby/PHP/Python/Java. I truly believe it will happen soon. It is kind of obvious. Every Ruby Web developer knows JavaScript. Every PHP Web developer - does. Every Python Web developer - does.

Why Node.js?
- It is based on V8 JavaScript Engine (performance ~ compiled language)
- It is event-based framework compared to thread-based (memory savings: 8mb -> 8kb per user)
- JavaScript has some libraries on top (http://jashkenas.github.com/coffee-script/), that makes it fun-to-write similarly to Ruby/Python/etc.

Of course, all these things can be done for Ruby or Python as well (EventMachine, for example).
The strength of Node.js is that it is not bound to some specific community but to all Web developers in general. Which means a lot of libraries to come soon.

To conclude. I give my vote to Node.js. I (as a Javascript/Rails developer) will switch all my rails projects that are in active development to Node.js.