About Programming Life During GSoC

During this three-month programming life, what I have worked on is the project aimed to integrate Cloud Input in ibus-libpinyin. Although what I am responsible for is only a small part of the great project, I still benefit a lot from this project.

Since coding, I have got connected with GLib, GIO and libsoup.

GLib provides core application components for libraries and programs written in C. It provides the core object system used in GNOME, the implementation of the main loop, and a full set of utility functions for operating strings and common data structures.

GIO provides a easy-to-use VFS API that sits at the right level in the library stack, as well as other generally useful APIs for desktop applications (such as networking and D-Bus support).

Libsoup is an HTTP client / server library for GNOME. It uses GObjects and glib main loop to integrate well with GNOME programs.

I have learned some of components already in a short time, like String Utility Functions in GLib, GIOStream in GIO, and SoupMessage, SoupRequest and SoupSession in libsoup.

In this project, my mentors have introduced these tools to me, and then I choose some of components which I think is useful at first and learn that by Reference Manual pages. By reading these tools’ cases,  I wrote small examples to learn these components better, and have learned how to use them, such as how to visit HTTP by SoupSession either Sync or Async, and how to get the request result through I/O.

After a brief understanding of their usage,then I have concepedt design under the mentor epico’s guidance. What I mainly involve is the candidates part, so I build the Class CloudCandidates. At the beginning,  the deep learning of the project is critical, especially the other candidates part of inheritance,  their function and members. Secondly I should concept new Class CloudCandidates which is used to process and select candidates from Google and Baidu pinyin API according similar candidates’ classes.  Thirdly,  Storing the new candidates(refers to cloud candidates), and display that in lookup table. During this part, being familiar with the parameters of request-send and the data structure of result-get also counts. Of course, knowing the candidates caller is quite useful. The last but not the least, seleting the valid cloud candidates.

Of course, I have met a lot of challenges in this coding period. When the difficulty of understand code came to me, I turn to mentors for help or list and refer to the outline of relationship in classes. Sometimes good effect didn’t come to me as expected, I’d like to change codes and assert that in smaller parts to detect effect in order to identify the wrong parts. After all of these trials, I preferred to turn to mentors for good advice. Till now, the biggest challenge is changing sync to async for its advantages.

There’s no denying that, from getting contact with the project to building new class and apply my thoughts into it gradually, I have knew to what the better code style is and how to build new rational class on pre-existing code. Beside, by hands-on learning, I can distinguish details between synchronization and asynchronization, and so on. All these will be of great benefit to my future coding life, I think. Without exaggeration, GSoC is quite exciting, fun, inspiring and cheering, for me.

 

On my personal part in the project, there is still room for improvement. So I’d like to polish it sequentially later on. For example, the parsing part in step 3 should be general and efficient. The part of access to the network may can use GIO tools instead of libsoup.

Here is my project link. Welcome any correctionhttps://github.com/lianna07/ibus-libpinyin.

This is the original rendering.

This is the settings’ part of cloud input candidates.

This is the result of cloud candidate’s part. (Currently, the second candidate  is the cloud one)

the first half of the project during GSoC

 

Till this blog, I have been experiencing the first half of the project which is aimed to integrate Cloud Pinyin in ibus-pinyin.This project is interesting and full of learning points. It seems just a module of ibus-pinyin, but actually not, from my own view. It’s more like building a house and requires quite a lot of knowledge, both on coding languages and compiling.

Mentors have discussed relevant demands and we have worked out the some details  about coding during weekly slack meeting on Friday. So now I have a global and clearer understanding on my final goal — to integrate Cloud Pinyin in ibus-pinyin and then to finish Cloud Pinyin input candidate words on the basis of existing Candidate word mechanism.

I have leaned something about autotools, and can compile some of my old codes  independent of graphical build tools. That’s really a enjoying process, for the first time without clicking the ‘build’ or ‘run’ button, the programs finally build successfully. I have also learned something about gio. Though it still makes me confused in it’s powerful and functional usage, it provides a new outlook on  access to the network for me. Besides, I plan to try to get in touch with relative algorithms next period which is quite useful for the project and I need to turn to mentors for help.

In the beginning, I had no knowledge about autotools. After following the mentors’ advice, by learning from its website, I am not knowing nothing any more.  Besides, I am new to the tool gio, and trying to study becomes new daily task.

So far, I have met up with the most challenging thing is compiling. For me, now, it is quite difficult  to know fundamentals of compiling both quickly and correctly. So I would like to finish the coding part related to functions at first, and concentrate on solving the problems involved with main function. After that I will take the compiling part into consideration, seek for help and overcome it.

The Blog for the first week during GSoC Libpinyin Project Coding

I am Xu Liana. As a junior student who majors in software engineering in Chongqing Normal University located in China. I have been in connection with programming for 3 years. I knew the meaning of these words for first time, such as Linux, GNO and open source, when I entered university. With the guidance of my professional teacher and senior schoolmates, I made initial contact with the open source community, and I have learned a lot of from the dynamic community ever since. During the three years in my university, I have accomplished some programs like Star Trek coded on C, Fun-eliminate(pinch peeps) and EC-WordPad(which is a bit like memo) coded on C++ and Qt, LAN communication small program on Python. It was a great pleasure for me to make a short speech on openSUSE 42.2 release in Chongqing Normal University and see the success of GNOME.Asia Summit 2007 in Chongqing city.

Now I am working on the project which is aimed to integrate Cloud Pinyin in ibus-libpinyin. Pinyin input method plays a significant role among all the input methods in China all the time. Though these pinyin input methods on ibus such as ibus-pinyin and ibus-libpinyin, are more and more popular in China, there are still some shortcomings of low accuracy and low speed, for they always search words from local table dictionary. Accordingly, integrating cloud pinyin in ibus-libpinyin is imperative.

In this project, I have received guidance from 3 mentors. The following is a brief introduction to them.

ZhaoQiang: An openSUSE employee working in Beijing, a development engineer of SUSE Linux Enterprise Desktop. He is responsible for maintenance of input method and GNOME desktop environment.

epico: The initiator and the developer of libpinyin method. He works in RedHat.He actively engages in directing the project and contributing more to libpinyin.

Hillwood Yang: A contributor in the openSUSE community. He commits himself to maintaining Chinese localization. And he is also an online and offline promoter of openSUSE in Asia.

On my personal note, GSoC is a platform which is full of opportunity and challenge. We can test ourselves in the projects which we work on and promote our strengths by this chance. Even better, it is most likely to be acquainted with those strong characters both predecessor and other students.
Besides, The most important is that I have benefited a lot from the open source community especiall openSUSE. That broadens my outlook and I have learned a lot.
So I’d like to do something to feedback the organization.
project, Integrating Cloud Pinyin in ibus-libpinyin, to me, personally, is a new challenge, because I haven’t met similar project and have little experience about it. I expect to overcome mountains of difficulties and successfully completed this challenging and interering project in August through my efforts with the instruction of three great mentors.

Finally, I think my basic knowledge on programming of software engineering will help me a lot in this project and the experience on programming in my college life will let me better organize something.