Saturday, July 24, 2010

Mid term evaluations of GSoC-2010

It's being a while from my last post, but can't help, I hardly got time to write a post :(.

I had my mid term evaluations of GSoC-2010 in mid July, and I received my results on 17th of July at 01:12 AM through a SPAM mail :D.

Here it is:

Hi Nirmal Fernando,

We have processed the evaluation for your project named Apache Derby-4587- Add tools for improved analysis and understanding of query plans and execution statistics with Apache Software Foundation.
Congratulations, from our data it seems that you have successfully passed the Midterm Evaluations. Please contact your mentor to discuss the results of your evaluation and to plan your goals and development plan for the rest of the program

Greetings,
The Google Open Source Programs Team


This was another thrilling moment to me :). After the evaluation day, I saw following on Derby-dev mailing list, sent by my mentor Bryan.


"I think that the core mission of PlanExporter is to enable the export
of query plan data in a complete and well-structured XML document, with
a documented schema, tested by our test suite.

I think that Nirmal's current patch in DERBY-4587 is extremely close
to meeting that goal. ..."


This boosted me up !! :)
Here's a basic vanilla HTML, that shows a small portion of what I'm doing in Derby.



I have lot of things to post and I'm waiting till I finish my training on 30th of July.
See you soon with a post !

Monday, June 14, 2010

Why not create a PDF of your own?

My first project at IFS was about applying PDF/A standards to IFS reports. This project involved a conversion of PDF version. For that I needed a some kind of Java library which will provide me a set of functionality to perform a conversion.

While searching for few hours I found this wonderful Java library called iText. It has both Java and C# .NET versions.

You can use iText to:
  • Serve PDF to a browser
  • Generate dynamic documents from XML files or databases
  • Use PDF's many interactive features
  • Add bookmarks, page numbers, watermarks, etc.
  • Split, concatenate, and manipulate PDF pages
  • Automate filling out of PDF forms
  • Add digital signatures to a PDF file
  • and much more...

You can download iText binaries and source files from here.
 iText API from here.
An excellent tutorial on iText can be founded in here.

Create a small PDF file and enjoy seen it's working, if you like to do more work using this that would make my effort even more success.

Introduction to PDF/A Standards

Most of you may not familiar with PDF/A standards, neither me, before four months. So I decided to make a post on this to share what I know about PDF/A.

What is PDF/A?
I am sure at least some of you might got into some troubles if you tried to open PDF documents which are in different fonts,and if matching fonts not installed in your computer.This is because that PDF file does not contain embedded fonts. You can embed fonts that are used in the file at the moment of the creation of the file.
Not only fonts but the colour profiles used, and etc.
PDF/A standards ensure the documents can be reproduced in the exact same way, at any place and even after a long time. Current version is PDF/A-1.

DOs and DONT'S in PDF/A-1

PDF/A-1 files must include:
• Embedded fonts
• Device-independent color
• XMP metadata

PDF/A-1 files may not include:
• Encryption
• LZW Compression
• Embedded files
• External content references
• PDF Transparency
• Multi-media
• JavaScript



Levels of Standards
1.       PDF/A-1a: All the requirements of PDF/A-1b + additionally requires that document structure be included being "tagged
2.       PDF/A-1b: ensuring reliable reproduction of the visual appearance of the document



Reference: 
PDF/A FAQ 



I hope to put a post on PDF creation, as soon as I got some time. These days I'm busy with my work at IFS and GSoC.

Thursday, May 6, 2010

Creating a batch file...

A batch file allows Windows users to run a sequence of commands automatically, after just double clicking (executing) the file. A batch file is just a file with an extension of ".bat", you can simply edit this file pressing 'edit' after right clicking on the file.

You can find some useful information about batch files, commands etc. from here.

Here's a simple batch file created by me:

cd /d C:\Documents and Settings\NirFLK\Desktop\Project2
auto_aaaBuild.exe C:\Program Files\aaa Applications\aaa.exe
CALL 2.bat
del 1.bat

Explanation:
line 1: Does the job of "cd" in a command prompt. (i.e. switch to the given path) Note: you need to include '/d'.
line 2: Running an exe file with a parameter
line 3: CALL used to execute another batch file within this batch file
line 4: After executing the 2.bat file, this line will delete itself.

Wednesday, May 5, 2010

Do you want to automate a process?

Sometimes we have to do a same set of things manually everyday. Personally I felt some processes are really tedious, so it is really inefficient to do them manually. There's a solution if we can spend some time on coding. To automate a process we normally use scripting languages, eg: shell scripting, AutoIt etc. In this post I will focus on AutoIt scripting language, which I got to know from a friend of mine.

AutoIt is a freeware scripting language which is mainly useful in automating Windows GUIs (it can use for general purpose scripting as well.). You can download AutoIt from here. I suggest you to download the full installation package since there are some other tools (such as AutoIt Window Info tool) other than the editor, which I found very useful.

You can find AutoIt documentation from here. It has nicely documented, and some examples in "Tutorials" section which is really useful to learn AutoIt. List of functions in AutoIt is listed here.

I used AutoIt to automate some GUIs in my training place (#IFS), and at my home to compile, build, and run Derby from source and also to establish a connection to a database in Derby.

I like this because it is easy to use language, and anyone can get use to it with one full day :).

Here is a script to automate the installation of a software (trial version) called PDFAppraiser:

Run("PDFAppraiser_1_0_1_Install.exe") 
WinWaitActive("Apago PDF Appraiser 1.0.1 Setup", "&Next >")
Send("{ENTER}")
WinWaitActive("Apago PDF Appraiser 1.0.1 Setup", "I &accept the terms in the License Agreement")
Send("!a")
WinWaitActive("Apago PDF Appraiser 1.0.1 Setup", "&Next >")
Send("{ENTER}")
WinWaitActive("Apago PDF Appraiser 1.0.1 Setup", "&Next >")
Send("!n")
WinWaitActive("Apago PDF Appraiser 1.0.1 Setup", "&Install")
Send("!i")
WinWaitActive("Apago PDF Appraiser 1.0.1 Setup", "&Finish")
Send("{ENTER}")

You can download the .exe of the script from here

If you want to test what this script does, place both the exe of the script and pdfAppraiser.exe in the same path, and double click on the exe of the script and watch it runs within seconds.

Explanation of the code:

Run(...) - this method starts the installer
WinWaitActive(title, active button/etc.) - this method waits until the window that titled as title appears with an active button specified. 
Send(...) -Sends a command to proceed to the next window or else you want to do. 

You may wonder how I found these &Next > and other names of the buttons, I found these by using AutoIt Window Info tool, this tool will help you to see what are the names or commands or mnemonics used by the GUI developer.

Hope this post will give you some idea about AutoIt, and believe that you will use this tool.

 

Wednesday, April 28, 2010

Google Summer of Code- 2010 - A Moment of thrill

Finally the 26th of April came after waiting for sometime. The nervousness was maximum. Google planned to announce the names of the students who are accepted by UTC 19:00 (00:30 on April 27th from SL time(GMT +5:30)).

It was exactly 00:16, I saw a tiny window appearing at the right bottom of my screen, subjected "Congratulations !!", I murmured "Oh My God !! (with full of excitement)" and rushed to my gmail tab. Yeppy, I was thrilled with happy, after seen the mail (I have no words to express my feelings) from GSoC Admin team. Here I quote from that mail:

Dear Nirmal,

Congratulations! Your proposal "Apache Derby-4587- Add tools for improved analysis and understanding of query plans and execution statistics" as submitted to "Apache Software Foundation" has been accepted for Google Summer of Code 2010. ...........


The happy I got doubled after seen many of my colleagues also got through it. At about 00:30 I refreshed the GSoC web site and got confirmed my acceptance after seen the list of accepted students.

Following are the statistics:

CSE-Batch-07: 12 students
CSE-Batch-06: 10 students
____________________
CSE : 22 students

ENTC-Batch-07: 1 student

IT Faculty: 3 (not confirmed)

You can find my proposal to Apache Derby from here.
Here are some comments I received for my proposal.

Your proposal looks very good to me, thanks for letting me preview it. I think it is well written and clear.

bryan

--------------------------------------------------------
Nirmal,

I do not have any specific technical input, but wanted to say that I think this is a very good and thoughtful proposal and appreciate your efforts to provide this capability for Derby. I also think your interaction with the community has been very focussed, relevant and and shows good technical understanding.

Kathey


Few days before this day (26th of April), I was asked to submit my ICLA to The ASF, normally only major contributors get this chance to become an Apache committer, this implied some things to happen in the future, but I didn't take it that seriously.

This is the mail I received from my mentor as a reply to my thanking mail to him.

Congratulations! I am pleased. Several other members of the community voted positively on your application, as they felt that you had been working well in the community this spring.

I hope that you will have a productive and rewarding experience, and I'm looking forward to helping you with the project over the summer!

bryan

First and foremost I would like to thank Almighty God for bestowing his eternal blessings on me. Next to my mentor for this project Mr. Bryan Pendleton for the enormous support he gave me throughout this period, and I hope to get his help for a successful completion of the project. It's my duty to thank the Derby community, for the helpfulness and commitment they showed, it's a privilege to be a member of this wonderful community. Sincere thanks to the Head of Department, and the dearest staff members for guiding us to reach the success. To my dear colleagues who encouraged me a lot. Last but not least I would like to thank my family for the remarkable support they gave to me.