Showing posts with label university of moratuwa. Show all posts
Showing posts with label university of moratuwa. Show all posts

Monday, February 21, 2011

ගූගල් සමර් ඔෆ් කෝඩ් 2011 සදහා ශ්‍රී ලංකාවේ ප්‍රවර්ධන සැසි සහ අත් පත්‍රිකා

ඔන්න හා හා පුරා කියල සිංහලෙනුත් බ්ලොග් පෝස්ට් එකක් දාන්නයි මේ ලැහැස්තිය :)
මුලින්ම දාන්න යන්නේ නම් ගූගල් සමර් ඔෆ් කෝඩ් (GSoC) 2011 වෙනුවෙන් හදපු සිංහල අත් පත්‍රිකාව ගැනයි. මේ දවස් වල GSoC උණුසුම හුඟක් අයට දැනිල ඉවරනේ... දැන් අපේ කට්ටිය බරටම FOSS මෘදුකාංග තෝරාගෙන ඒවාට දායක වෙන්න (contribute) පටන් අරන්. අපේ කැම්පස් එක පහු ගිය අවුරුදු වල GSoC වලින් අංක එකේ හිටපු හින්ද [1] [2] ලොකු උනන්දුවක් තියනවා මේ වැඩසටහන ගැන. ඒ ගැන නම් හරිම සතුටුයි, විශේෂයන්ම මටත් ඒ සදහා දායක වෙන්න ලැබීම ගැන. 2010 අවුරුද්දේ ශ්‍රී ලංකාව දහ වෙනි තැන ලබාගත්තා... GSoC කියන්නේ මොකක්ද කියල දැන ගන්න කැමති නම් මෙන්න මේක කියවන්න. http://www.booki.cc/gsocstudentguide/_v/1.0/what-is-google-summer-of-code/
හරි ඉතින් තමන්ට විතරක් කරගෙන හරි යන්නේ නැහැනේ, අනිත් අයටත් උදව් කරන්න එපැයි. :) මේ අවුරුද්දේ එක නිසා මමයි, මගේ බැච් එකේ GSoC කරපු කීප දෙනෙකුයි, සිනියර් බැච් එකේ ප්‍රදීබන් අයියයි එකතු වෙලා අපිට හැකි පමණින් වැඩ කොටසක් කළා. ලොකුවටම කරපු දේ තමයි GSoC ගැන දැනුවත් කිරීමේ සැසි දෙක. ඒවා ගැන දැනගන්න මෙන්න මේක කියවන්න; මේ තියෙන්නේ "FOSS User" සගරාවේ එකේ මෙම සැසි දෙක ආවරණය කරමින් පළවුණු ලිපිය. :) 
ඒ දෙකෙන් පේරාදෙණිය විශ්වවිද්‍යාලයේ තිබුන සැසිය මට විශේෂයි. ඒ වෙන මොකක් හින්ද වත් නෙවෙයි එකට මම ලොකු සහයෝගයක් ලබාදුන්නා සංවිධාන කටයුතු වලට. :) පේරාදෙණිය පැත්තෙන් රසික, මේ සැසිය පවත්වන්න සෑහෙන්න මහන්සි ගත්තා. සම්පත් දායකයින් විදියට සහභාගී වූ ප්‍රදීබන්, නිර්මාල්, තිලංක, කසුන් ලක්ප්රිය අයව අනිවාර්යෙන්ම මතක් කරන්න ඕනේ. අපි ටික තමා මේ බර ඔක්කොම ඇද්දේ! ඒ වගේම IESL හිදී තිබුණු සැසිය සදහා දැන් නම් කිව්ව අය ඇරෙන්න උමාශාන්ති, කෙහෙළිය ඇතුළු සුහෝ යන අය විශාල වැඩ කොටසක් කළා.
අත් පත්‍රිකාවක් කිව්වට මොකද අන්තිමට පුණ්‍ය අනුමෝදනාවක් වගේ උනා නේද? ;)) තරහ වෙන්න එපා, මෙන්න තියනවා හදපු සිංහල අත් පත්‍රිකාව. සෝදුපත් බලන්න උදව් උනා කෙහෙළිය, අකිල, නිර්මාල්. මෙන්න ලින්ක් එක. http://www.slideshare.net/kasunbg/google-summer-of-code-2011-sinhalese-flyer
උමාශාන්ති දෙමල අත් පත්රිකාවකුත් හැදුවා, ඒක මෙන්න මෙතන ඇති.

  

Wednesday, December 22, 2010

Comic: Public Key Cryptography in a fairy tale!


The comic shown above shows a PKC scenario of a commonly known fairly tale "The Frog Prince". This was done by a group of ten people including me. Try and see whether you can understand it!! :) (click on the image to see it in original size (obviously)!)

HINT: This involves a Witch, a princess, and a frog (prince), and this shows the encryption scheme of PKC.

This comic was done as a requirement for the "Computer Security" module in my department, Dept. of Computer Science & Engineering, University of Moratuwa.

Saturday, August 21, 2010

DocBook WebHelp Project


DocBook WebHelp was the project I worked on for the Google Summer of Code 2010 program. Pencil down date for it was on 16th August, 2010, which means the Coding officially finished on that day. So, I with my mentor David Cramer finished all the requirements planned, and wrote all the documentation needed. Results was announced today, 21st August by Google Open Source Program team; I successfully finished the project :)

The demo of the output produced by WebHelp XSL customization is available on following link. The demo shown is the documentation of DocBook WebHelp.
http://docbook.sourceforge.net/release/xsl/current/webhelp/docs/ch01.html
http://www.thingbag.net/docbook/gsoc2010/doc/content/ch01.html

The latest output in the snapshots have lot more features and looks quite beautiful compared to the released version. Do have a look -
http://snapshots.docbook.org/xsl/webhelp/docs/index.html
http://vulture.gentoo.org/~kasun/docbook/docbook-webhelp-snapshot-current/content/ch01.html


WebHelp Output

WebHelp Search tab
You can download DocBook installation from,
http://sourceforge.net/projects/docbook/

The Webhelp customization is available under, docbook-xsl-ns-1.76.1/webhelp. Following is some brief details about the DocBook WebHelp customization.

A common requirement for technical publications groups is to produce a Web-based help format that includes a table of contents pane, a search feature, and an index similar to what you get from the Microsoft HTML Help (.chm) format or Eclipse help. If the content is help for a Web application that is not exposed to the Internet or requires that the user be logged in, then it is impossible to use services like Google to add search.

DocBook WebHelp provides a browser-independent, platform-independent documentation “Web Help” output format for DocBook files. WebHelp provides a sophisticated but inexpensive web publishing option for DocBook.

Features
  • Full text search.
    • Stemming support for English, French, and German. Stemming support can be added for other languages by implementing a stemmer.
    • Support for Chinese, Japanese, and Korean using code from the Lucene search engine.
    • Search highlighting shows where the searched for term appears in the results. Use the H button to toggle the highlighting on and off.
  • Search results can include brief descriptions of the target.
  • Table of Contents (TOC) pane with collapsible toc tree.
  • Autosynchronization of content pane and TOC.
  • TOC and search pane implemented without the use of a frameset.
  • An Ant build.xml file to generate output. You can use this build file by importing it into your own or use it as a model for integrating this output format into your own build system.

So, what do you think of the output? Are you interested to give it a try?

Follow up of my posts related to DocBook WebHelp are here
Follow up of my posts related to DocBook are here

PS: For discussions, please subscribe to my comment feed such that you won't miss my replies. Alternatively contact us via docbook-apps list - http://www.oasis-open.org/mlmanage/index.php

Wednesday, April 28, 2010

Google Summer of Code 2010

Finally this year’s Google Summer of Code (GSoC) 2010 students are announced. I am Glad to announce, I am one of them. :-)

I chose DocBook as my organization. DocBook provides a set of standards and tools for technical documentation. It was initially and is primarily intended for technical documentation, but has been extended for use in other domains as well.

The proposal I submitted "Web Help Output for DocBook" was to add a browser-independent, platform-independent documentation “Web Help” output format using a combination of HTML, CSS, and JavaScript with a search index created at build time by an indexer application written in Java.

Finally, one of my dreams come true. There is big enthusiasm about the program in our university, University of Moratuwa specially in Deparatment of Computer Science & Engineering. Our University lead last 3 years for the number of accepted students consecutively. You can find more info Open Source at Google Blog.
Unofficial stats for this year for University of Moratuwa includes,

CSE Batch '07: 12 students
CSE Batch '06: 10 students

ENTC Batch '07: 1 student
__________________________
Engineering Faculty: 23

Faculty of IT: 3

I represent CSE-Batch '07. My project proposal can be found here. The selected Student List is at http://socghop.appspot.com/gsoc/program/list_projects/google/gsoc2010

I should thank my mentor David Cramer, for motivating me and who guided me for this success. And I would like to thank  Jirka Kosek who was a co-mentor to me, who later resigned as a mentor to contest as a student along with Richard Hamilton who administrates DocBook project for GSoC. Sincere thanks to the Head of Department, Vishaka Nanayakkara and the dearest staff members for guiding us to reach the success.

I'm really excited and hoping to have a great experience! :-)

Proposal "Web Help Output for DocBook" for GSoC 2010


UPDATE: DocBook WebHelp XSL Customization is now integrated DocBook XSL release starting from version 1.76.0. The release is available for download at http://docbook.sourceforge.net/snapshots/. Release notes are at DocBook WebHelp Project (22/10/2010)

UPDATE: Google Summer of Code 2010 program finished on 20th August. See DocBook WebHelp Project for the end notes, features and to view the demo of the beta release. 

The modified schedule can be found in WebHelpGsoc2010. Though the schedule is not necessary at this moment it may give an idea of the development process went on which might help for a new developer coming in to WebHelp.
- 23/08/2010

Google Summer of Code 2010 - Project Proposal

ProjectWebHelp Output for DocBook
Student NameKasun Gajasinghe
Email******
IMkasun (irc://irc.freenode.net)
Time zone
MentorsDavid Cramer, Jirka Kosek

DocBook is a set of standards and tools for technical documentation. A vital requirement for technical publications is to produce a Web-based help format that is synchronized with the content. So the documentation is up-to-date making site maintenance easier. This will contain client-side searching with support for stemming, table of contents, Index and a HTML export ability. The main idea is to generate a Web Help Output from the DocBook content XML files using an Ant build.

Background
About me
---
Participating in GSoC
I am passionate about Open Source World and love contributing to free software. I hope that Google Summer of Code will be a great opportunity for me to become part of another open source community, contribute for the development of the project, make new friends, and develop new skills. I believe that GSoC will be a excellent starting point for this.
Why DocBook

DocBook is a leading format for documentation and is especially popular with Open Source projects. So, I am particularly interested in DocBook and hope to become a permanent member of DocBook project.
I have planned to devote 35-40 hours per week for this project.

Experience
----
 
Explorations
I have researched with suggestions from my co-mentors on ways to implementing client-side searching and came up with with following options.

Use Lucene QueryParser
Use the Java Indexer of the htmlsearch demo plugin as a base and add needed features

As Lucene works in Server-side, we have to compile it into JavaScript to make it work in client-side. For that Jirka suggested the use of GWT. But unfortunately Lucene isn't ported to GWT yet. I've looked at it and found that Luke, the Lucene Index toolbox has ported to GWT. Then, I went to Lucene IRC channel to get further details (#lucene @ freenode). Their I found that it is not possible to use Lucene only in client-side. They said that having queryparser in JavaScript can not be done and Luke uses a Java back-end in server-side for searching. So have to give up this option.
Java indexer is a good starting point. It does basic indexing and stores it in js files with keys (words) and their relevant file names. Then, it does basic searching based on given key words. This could be used as the base and improve the code and add new features. I have downloaded the source code and studied it. The proposed enhancements are listed under Proposal section.
For Table of Content tree generation, Considered,

Frameset approach with the tree included in a separate file.
Generate complete toc for every generated files and make it appear to be a pane

I chose the second method. As with that, "Deep linking" happens automatically and will be functional to some good extent under a no javascript environment. And this is the method mentor recommended. Further, researching will happen in the following days.

Proposal
DocBook is a set of standards and tools for technical documentation. It was initially and is primarily intended for technical documentation, but has been extended for use in other domains. The current DocBook schema is available in several languages including RELAX NG and DTD and is maintained by the DocBook Technical Committee of OASIS. The DocBook Open Repository is a project hosted on SourceForge that maintains a set of XSL stylesheets for converting a DocBook instance into a variety of output formats, including various html formats, pdf (via XSL-FO), man pages. The currently supported html output formats include monolithic html, chunked html, Microsoft HTML Help (.chm), Eclipse documentation plugins, and Java Help.

This proposal is to add a browser-independent, platform-independent documentation “Web Help” output format using a combination of HTML, CSS, and JavaScript with a search index created at build time by an indexer application written in Java.

Search is done in client-side. For that, I plan to use the “htmlsearch1.04” demo plugin from DITA Open Toolkit as a base and enhance it with the needed features. As DocBook is included as one of their supported products, it will be compatible for this project. Further, it's license allows the use of it in commercial applications as well.

The proposed design for searching is, first generate JavaScript files which contains all glossary terms of the html files with matched file locations (i.e. as key, value pairs). Then, for a given query, keywords are extracted and then by the use of generated glossary/index, the output will be displayed.
The enhancements currently planned are,


  • Support for stemming and lemmatization for a given query
  • Search with Boolean operators (AND, OR)
  • Meta-data such as 'Prev' and 'Next' in the content page will be ignored when indexing.
  • Improve support for Asian Languages (Japanese and other Asian languages, meta tag content is used.)
  • As searching in client-side may slow-down the application, necessary optimization will be adopted.


I plan to use YUI library for the TOC tree generation. I will abandon the frameset-based approach and instead use a CSS-based mechanism in which the TOC is generated in every page and CSS is used to properly format it for viewing. With this approach, synchronization with the content file happens automatically. Further with this mechanism deep-linking happens automatically.
UI design will be developed using CSS and other technologies and will be little similar to Eclipse Help.
The Planned development schedule is given below.

Development Schedule
I am already proficient in Java, JavaScript, XML and CSS, but will start studying XSL in the bonding period and continue to learn it while doing the programming.


Community Bonding Period: April 26 - May 24Get to know the mentor and the community
Study the required API and features for WebHelp
Preparing the development environment 
Look for a good searching approach.
Start designing a good model
Interim Period: May 24 - July 12Dividing the development process into stages with the help of the mentor
Developing the TOC tree using a CSS-based mechanism (YUI)
Implementing the synchronization with the content
Adding an index with the help of DocBook schema
Designing client-side search mechanism with all the things such as stemming and lemmatization into consideration and start coding. 
Designing a better user interface.
July 12 - July 16Submitting mid-term evaluations and continue with the development
Interim Period: July 16 - August 9Completing TOC with synchronization
Continue developing the search mechanism
Testing the synchronization and searching
Developing the User Interface
August 9 - August 16Refine the code and testing the code and doing necessary improvements.
August 20Final evaluation deadline
August 30Submitting required code to Google


References and Resources

[1] My Blog: Kasun's Tech Thoughts http://kasunbg.blogspot.com
[2] Twitter: http://twitter.com/kasunbg
[3] My Google Code Hosting Profile
(Projects hosted: documentation-aggregation-application, KFinder:A file searcher, cse-checkers(Java), cse-l3-2009-070137m:A Firefox extension)
[4] DocBook 5.0: The Definitive Guide
[5] DocBook XSL: The Complete Guide
[6] dita-users · DITA users yahoo group
[7] YUI Library
[8] Documentation Aggregation Application
[9] Delicious Extension for Google Chrome
[10] University of Moratuwa, Sri Lanka
[11] Deparment of Computer Science & Engineering, Faculty of Engineering