Showing posts with label Empathy. Show all posts
Showing posts with label Empathy. Show all posts

Sunday, December 8, 2013

Tips for newcomers!

I composed a journal entry for the GNOME Journal sometime in June of 2011 but since the journal seems unrevivably dead, I thought, it's a good idea to share it on my blog.

Now that FOSS Outreach Program for Women internships is at it's verge of its action, what better time would it have been for this post to come.

Here it goes:

Becoming A New Contributor (Lessons from Empathy)

GNOME+Ubuntu was the first desktop and OS combo I ever used since installing the first linux distribution on my computer. GNOME made my transition from Windows very simple. As I explored more of it, I started to love the flexibility Linux provides and decided never to go back to the world of Windows which had always been hard on pocket. GNOME was my catalyst for this change!
Contributing to an Open Source project is more of a passion to learn and grow in an environment where all doors to knowledge are inherently open, rather than a compulsary chore that you are bound to complete in a set time duration. A community where everyone is willing to share his/her knowledge with you, without expecting anything in return, becomes an abundant, friendly sea which you are free to explore and collect the best of the pearls from, as you get to implement the aggregated knowledge mixed with your own skills and creative ideas and receive appreciation for every little effort of yours! The GNOME community is one such community I have witnessed :)

Getting started is the hardest part in any new endeavour. For a developer, the understanding of the development environment, having sound grasp of the developer tools and understanding the underlying APIs is what will lay the foundation for your contributions. The best way to learn them in fun manner is to exercise with them and to explore them as their need arises! GNOME's outreach program for Women and Google's Summer of Code are excellent programmes with which you can get in touch with experienced mentors who will help you overcome all sorts of fears of working on large projects with lines of code in some tens of thousands, and will be having a to-the-point answer to most of your queries. Also you'll simultaneously achieve a decent amount of stipend for your hard-work in return!
GNOME contribution becomes very easy for a FOSS enthusiast who uses it and takes it in high regard. You can contribute in many ways irrespective of you having a technical background. Contributions to GNOME can come in any of the designing, developing, documentating or marketing forms. I chose development simply as this was the most intutive way for me. I used to be just a daily user once. Slowly, I began reporting bugs as I experienced them and placing my desired feature for improvisation of applications I used and cared about. I also remember acting as a bugsquadder for a while.. And one fine day (which barely marked five months of first installing linux on my machine), I builded Empathy from source (thanks to Danielle and jhbuild :). It was tough for the first time and I started to code and debug using the Eclipse CDT IDE instead of using the in-built development environment Linux offers; I wish I had worked with "Beginning Linux Programming" by Niel Mathew and Richard Stones[1] or something similar beforehand! This book will prove an excellent reference if you are new at developing in Linux environment and want to boost up your development time through the fast and efficient tools your Linux distro has in store for you. After going through this, you will know how to be sure that your code is lint free and contains no memory leaks. My first developer contributions began with introducing improvements to my favorite application in GNOME- Empathy[2] which is mostly written in C programming language.

The foremost thing to begin is understanding the Git version controlling system[3] (GNOME uses that as do many worthy projects which you admire and use including the Linux kernel) which would be easy for anyone who had used any version controlling system in past (was not the case with me though). Next comes the APIs which the GNOME applications use. Most ubiquitous ones being, the GTK+ user interface API [4] and the core, GLib[5] and GObject[6] APIs. The An excellent mention over here would be the Andrew Krause's "Foundations of GTK+ development"[7]. For working on Empathy particularly, one has to understand the Telepathy specifications[8] aided with the Telepathy Developer's manual[9]. Yes they are huge but the approach should never be to understand all at once (I still keep unrolling them as need arises and when I feel like contributing more :).

People get to learn a lot with examples and I acknowledge the wealthiness of apt illustrations in almost all the important APIs you would need getting started ensuring a steep learning curve. To aid this, I also used to look up alternative full working examples for instance one might seek Tim-Philipp Müller's tutorial on GTK+ 2.0 TreeView[10] (you are right, I didn't came across the "Foundations of FTK+ development" till then).

The phase when I got involved in GNOME as a developer was a rocky one. GNOME was transitioning from version 2.32 to 3.0 and so were the many underlying core APIs. GTK 2.0 to 3.0 transition infused a series of API and ABI breaks rendering all applications built on top of it unbuildable and the developers were usually found adapting to the changes for most of the time. Albeit this, my starting was a lot eased with GNOME's Outreach Program for Women Internships 2010 and the supporting hand of an experienced Empathy and Telepathy developer, Danielle Madeley, who was my mentor. She was there to help me out whenever I got stuck and she is always ready to help even now! See how good and welcoming people of this community are! (One of the reasons I love GNOME so much! :)

Empathy is a multi-protocol messaging client which offers one-to-one and multi-user text chats and one-to-one voice and video calls over supporting protocols. At the first view of Empathy's code, nothing seemed familier to me except the C language constructs. I was clueless about how the pieces were put together. The overall design was utterly uncomprehendable with over 96k lines of code increasing at a tremendous rate. Now with huge applications like this, getting to know the entire application is not possible in a short duration if one has to be immediately productive so I decided to maintain my focus on multi-user chat features and bugs for the internship duration. Having sound knowledge of object oriented systems helps and with a little understanding of GObject one can begin to relate things, associate them and see how data flows among modules. Due to its object-oriented design, Empathy has all the advantages of any modular piece of work just like any other project based on GTK. Each file is a single class having certain set of private encapsulated data it works upon, and only a required subset of the data is accessible to other "classes" by means of public getter and setter "methods" while abstracting other data. Classes inherit other GObject classes and implement GObject interfaces. C immitating C++ ! Sounds cool, doesn't it? I was immediately a fan of GObject and its umbrella- generic C library, GLib, which besides Empathy is used by many other GNOME applications.

Owing to the fact that Empathy makes use of a lot of open source projects and libraries, one might wonder how can anyone actually begin to work without spending days of learning on it. The answer to it is Devhelp[11], a GTK+/GNOME browser for API documentation. It works natively with a library's gtk-doc generated documentation. It has this extremely useful search tool using which you can find the exact class/constant/function/signal you are looking for, almost instantly, for say, implementing some new feature. One easy way to keep devhelp updated with the latest documentation is to build the latest versions of libraries with "--enable-gtk-doc" option before installing and modifying the XDG_DATA_DIRS environment variable to include the "library_install_prefix/share" path before launching devhelp. Another useful tool is Git's grep tool using which you can locate the exact line of code you want to be at in a snap! So no more getting lost in the maze-like repository! Debugging and tracking sessions make one learn a lot! Among others, for debugging solely I got to experience new and useful tools like D-Feet[12], the D-Bus debugging tool to check values returned by methods on system/session buses and Wireshark[13] to monitor packets sent to and received from a network. Knowledge of these makes a prolific developer.

The work I completed under internship spanned a wide range of bugs the details of which have nicely been listed in my blog-posts[14] between December 2010 and March 2011. You can also track them from the slides of my talk titled "Contributions made by a newbie to the free desktop's Empathy" at GNOME.Asia Summit 2011[15]. All of my work branches have been merged upstream now and you'll be able to enjoy them in Empathy 3.2 :) Do let me know if you like and appreciate them. It keeps me motivated to contribute even more and gives me the satisfaction of impacting a large audience- the rare feeling which GNOME contributions can bring to someone!

Being a part of the GNOME community allows you to be with highly motivated people and think like them. If you are still wondering, or if there is still something stopping you from contributing, just know for once, that being here requires you to be ambitious and if you are here, you'll see yourself as a worthier person who is learning something new each day!

GNOME is lovable. GNOME reciprocates if you love it. Hope to see you soon; happy contributing!




LINKS
[1] http://www.wrox.com/WileyCDA/WroxTitle/productCd-0764544977.html
[2] http://live.gnome.org/Empathy
[3] http://git-scm.com
[4] http://developer.gnome.org/platform-overview/stable/gtk
[5] http://developer.gnome.org/glib/stable/
[6] http://developer.gnome.org/gobject/stable/
[7] http://www.gtkbook.com/home.php
[8] http://telepathy.freedesktop.org/spec/
[9] http://telepathy.freedesktop.org/doc/book/
[10] http://scentric.net/tutorial/treeview-tutorial.html
[11] https://live.gnome.org/devhelp
[12] https://live.gnome.org/DFeet/
[13] http://www.wireshark.org/
[14] http://chandniverma.blogspot.com/
[15] https://live.gnome.org/GnomeAsia/2011Summit/Slides

Wednesday, October 30, 2013

Mentoring for Empathy

It's a great pleasure for me to announce that I will be mentoring for Empathy for this round of Outreach Program for Women Internships.

So come on #empathy on GIMPNet and show us you are interested.

Cheers!

Wednesday, July 31, 2013

Going on...

Ahoj Planet!

Good news is that the patches I presented in the last post have been verified and merged with a few changes:

The remove contact dialog looks like this now with the name of the group displayed-



Only one of Join and Leave chat menu-items gets displayed in the top of the 'Conversation' menu-



(and with these we move one step towards having ability to close a chat window without leaving a chat.)
Besides these, other works submitted for review are:
  • Show typing icon against composing members of a private MUC or a chat-room



  • With my patches, the search-bar will now hide itself when an action is selected from the contact-roster after search is performed. This will make it look smarter and will improve its promptness for the next search. See for yourself in action! (Bug 643183)
  • Submitted a patch to close Bug 698530 - adding contact to group does not cause them to leave Ungrouped until Empathy restart.

    There's so much to be done. Stay tuned for more polishing!

Friday, July 5, 2013

Back to shooting bugs!

I had been underground as I was not well. I was too tired and was advised rest from work.

When I came back I picked up my pending branch on telepathy-networking in gnome-chess since work begun should not be left incomplete. I realized that my branch had diverged from gnome-chess master to quite some extent :( so I decided to fix and complete that at any next stretch of peaceful time such as the GNOME India hackfest being planned. :)

Meanwhile, I'll continue with bug-fixing and triaging, since the tiniest things are also important.
I have proposed fixes for:

  • Bug 643755 - Create Join Chat and Leave chat menu items for the conversation menu in MUCs (multi-user-chats)
  • Bug 698840 - "top contacts" who are offline are incorrectly showing in Empathy's contact list
  • Bug 585440 - Deleting a contact in multiple groups (in Empathy's remove contact dialog)
                           


    I am currently looking into Bug 703487 - Show typing icon against composing members of a MUC, which was lost in obsoleting old code and needs to be redone using the new API.

Wednesday, March 21, 2012

GNOME 3.4 to be out within a week!

For preparation of the 3.4 release, git.gnome.org master branches have been frozen against last minute (and possibly erroneous) code alterations to save the precious stability from being hit. See release schedule.

Also did I bring to your notice a tiny API provided by our well-known pastebin?

Well, everyone who has an account there is provided a developer-key to use it. One non-pro account holder can paste as much as 512 KB of data at once. Apart from reconditioning the whole of Empathy's debugger for visible load-time improvements and introducing an "All" option in the service chooser, I used this API along with libsoup to provide a convenient toolbar button for pasting large and complex debug data into it in one go. Empathy will be shipped with a licence to use my Pastebin-API developer key in open.
Shots of how the work looks:



The better the debugger, the better the application! Try it live and do test it out thoroughly :)


My glchess-networking work will continue in a separate branch off gnome-games master.

Hooray!!! GNOME 3.4.0 will be wrapped and out within a week! (amazing isn't it: 3.4 is not yet out and they're already planning 3.6 :)


Monday, March 14, 2011

Contact Blocking and Report Abuse to be available in Empathy3.0

Many users had requested this feature (bug) and it is now available for all to use.

Now Empathy supports blocking/unblocking contacts on per-user basis for connections that support contact blocking (for ex. gmail) and report abuse for connections that support this feature (though currently there are no connection managers implementing this). Danielle completed two branches for "Contact Blocking" and "Report abuse" last month and I recently re-based them to master for her which took some time since the branches had diverged  much.

Here a few snapshots of the interfaces introduced-

The Blocked Contacts can be viewed and managed with Edit->Blocked Contacts menu-item
in the main window to open up the following dialog

Blocked Contacts Dialog

...on which you can perform usual live search.

One can right click individual contacts in contacts' roster and on selecting "Remove" he'll 
notice this extra "Delete and Block" button, if supported.



The Contacts->Block Contact menu item in chat windows is a check menu-item that can be toggled


The subscription box provides a convenient way to right away block a contact without need to first add him or her.

Confirmation dialog that would pop up on each attempt of blocking a contact


On completion, Empathy was in string freeze while getting ready for release, and the ready-to-merge branch was too cool not to be available in this release, so Guillaume requested a freeze exception from the i10n team which was granted and the branch was finally merged! :)

Friday, February 25, 2011

Internship updates...

Hey people,

Didn't get chance to blog about what I had been doing lately so here's a compiled mix of it all.

Good news first:
  • Now Empathy multi-user chats are separated from the chat-room windows they are displayed in. i.e. users will be able to join/leave chats without closing the room [commit].

    I am working on the opposite i.e enabling the user to continue being connected to a chat when chat-room window has been closed (bug).

  • The /part command is working for chat-rooms and private MUCs (bug [commit])
    UPDATE: There was a small fault in part message construction in telepathy-idle. It was not sticking to correct format of PART messages as per RFC 2812 sections 2.3.1 and 2.3.2 which was preventing the full part message from being displayed to the members. It has been fixed in this bug now.

  • To prevent a user from deleting significant accounts like freenode from list of networks, a new "Reset Networks List" button was added in the IRC Network Chooser dialog (bug [commit])
New things I learnt in this phase:
  • Insight into telepathy-idle
  • Using Wireshark to monitor packets sent to and received from a network
  • Conflict resolution after rebasing.
    To help me gain more experience with conflicts, Danni has given me two massive branches to rebase.

There were some not so cool things also like, I started my work on notification for enabling/connecting a disabled/disconnected account when trying to connect to rooms affiliated to it (bug) but it eventually turned out to be blocked by this bug. There must be some comparison workaround used by Empathy to keep things working which I am yet to discover! A particular horrible thing was my hardisk snap and not having an up-to-date backup added to it but I was happy to be able to recover my data (thanks to Danni). It was another learning experience and I'll dedicate a separate post to it.

~

Gnome.Asia Summit 2011 will be held in Bangalore, India this time. I am happy to get a chance to speak about my internship experience in my talk- Contributions made by a newbie to the free desktop's "Empathy", in front of such assorted community of developers, documenters, marketing people, GNOME users and prospective contributors. I am particularly exited about getting a chance to see the biggies of this world! :D

Monday, January 24, 2011

Internship - Week 5

The much awaited "Save all' button feature of Empathy's debug window is now in a working state. :)

I started working over this one in my 'Save all' button branch as my second ever bug to be fixed for Empathy but insufficient experience in asynchronous programming and debugging caused it to stand by. This week I went back to it and with the past one month's experience, it was all play!

Here's a shot.



This "Save all" button will be useful when users face issues and are unsure of what part is causing a particular problem. It could be the connection managers, mission-control or parts of Empathy itself. So with this branch merged, instead of saving individual logs for each service selected using the service chooser, one will need to simply use this button and have a compiled log saved on disk.

I made another not much observable change in this branch too. The older save button used to fetch log messages from the model which was updated from the cache and was used to display the messages in the main view. To make both saving tasks work coherently and to avoid code reuse, I changed it to load messages directly from the cache like what our new "Save all" button does.

There was this another bug evident using telepathy-gabble 0.11.5, about which I also mentioned in my last post, where, in MUC chat window tabs the typing icon was not getting correctly updated [bug]. I begun with a patch for it but after discussing it over IRC, finally closed it as the typing icon in MUCs is no more relevant when the typing icon is displayed next to the composers now.

Monday, January 17, 2011

Internship - Week 3 & 4

Hi all!

The passed week and its last, I worked on the following:

The last feature was a proposal that caught my eye while browsing the empathy MUC issues.
Having the knowledge of who is typing in a chat room in real time would be quite useful. This was possible using "composing" states obtained from chat state notifications (XEP-0085). Although one-to-one user chats in empathy provide this facility but private chats and multi-user chat rooms were still deprived of this feature.

While working on this, Danielle helped me with chat state observation and discovered a telepathy-gabble bug causing unexpected parsing of incoming chat states as a part of this endeavor, after whose resolution I was able to pursue my tasks at hand. Hence, to test this work out, you'll need the bleeding-edge telepathy-gabble too.

Here are demonstrating shots for the same:
Private MUC

Chat room

So you can see that with the gabble bug rectified, now the chat window tab typing icons also work but they are a bit faulty. "Why", is what I am looking into!

Tuesday, January 4, 2011

Internship - Week 2

Hi there,
A very Happy New Year 2011 to all of you!
Last week, the Christmas and New Year fervor enthused everyone. The commits I feel weren't satisfactory and i'll be consequently giving more love to Empathy this week.

I submitted-
Some of my time was spent figuring out why /nick command behaves weirdly in Jabber MUCs and am currently working on this bug.

Monday, December 27, 2010

Internship - Week 1

Hi all,
Last week I created a new popup feature that would allow the users to quickly enable/disable accounts from the accounts tree-view in accounts dialog.

Right clicking a disabled account.


Right clicking an enabled account

Note that the icon on the enable menu-item is the most-available presence depending on the chosen presence and not always necessarily the "available" icon.

I also made a small change in the way private and multi-user chats appears to a user. Influenced by approach used by Google talk, the user's name in current chat will be reduced to the string "Me: " thereby making chat look clearer and avoiding unnecessary clutter. This recent change is awaiting commit after which a private chat will look somewhat like the following with only the current chat affected.
Using "Me" for the user's name in private chats

...and similarly in Multi-user chats too.

Now, i'll be concentrating on improving Multi-user chats (MUCs) and removing its major and normal bugs.

Wednesday, December 15, 2010

Internship begins...

So it's Dec 15th and my internship begins today. Excited? Yeah!! Immensely and a little nervous too!!! :D 

Well in this while I had been somewhat preparing for my internship to start in a good pace. I went through the basic GTK tutorials and underlying API references and fixed some of the bugs in Empathy.



A few ambiguities resolved. A small fix was made in Empathy's account's dialog which required changing the tab focus chain sequence. Another notable change was that when no accounts are set up in empathy (or all are disabled) then instead of having the full 'Room' menu made insensitive, only sub menus Join, Join Favorites and any favorite rooms are made insensitive. Which means, if a user had no account set up then he can now click on the "Room" menu and his default empathy view would be somewhat like this (ignore the theme):

There will be a 'Save all' button functionality added to the debug window hopefully soon. The work on it was stalled due to some GTK bug yet unresolved. I created a standalone application to demonstrate it but that didn't seem to have caused much effect.

I hope I keep up to mark and create things that the open world would remarkably recognize and appreciate! I have a long way to go and this is only the first step. I have learnt a lot of things on my way to this first rung of my career and it was a wonderful experience.
Wondering how enthralling it's gonna be beyond this. :)

Wednesday, November 3, 2010

added a new feature to empathy!

Today I coded a 'Save all' debug logs functionality for empathy ( Bug 592994 )

Yea, 'twas a handsome amount of code for anyone's second fix :) , but choosing this was a conscious decision! While looking for a resolution, I was exposed to some of the important and frequently used data structures in GTK, like GtkTreeModel interface and its GtkListStore and GtkTreeStore implementations. I used widgets like GtkComboBox, GTkToolBar, GtkToolButton and Gtk core reference - stock items while creating a custom button as this.

This bug was a must for me!

Saturday, October 16, 2010

My first empathy commit

Hey guys, yesterday was somewhat special for me as I made my first commit to empathy! :)
Check out the bug i fixed here and my commit here.

Will be committing some more in quick succession. Keep watching!

Featured Post

interviewBit Medium: Palindrome Partitioning II

Problem Name:  Palindrome Partitioning II Problem Description : https://www.interviewbit.com/problems/palindrome-partitioning-ii/ Problem Ap...