Fedora Women Day 2016

CnZe3pLUAAAwGrm (1)

Fedora Women Day is celebrated to raise awareness and bring Fedora women contributors together. This is a great time to network with other women in Fedora and talk about their contributions and work in Fedora Project.

The event was held at Netaji Subhash Engineering College (NSEC) in Kolkata, India on 15th July, 2016.

Fedora Women Day was also celebrated in Pune, India and Tirana, Albania. https://fedoraproject.org/wiki/Fedora_Women_Day_2016#Local_Events

The event started at 10:30 AM. Women started coming in and it was pretty nice crowd.

The event started with my talk. It was my first talk so I was really excited.

I talked about Fedora Women Day and the purpose. Then I started talking about the work I do in Fedora Project. Most of the part of my talk was regarding Fedora Infrastructure and Fedora Cloud.

Since my most of the contributions lie in Bodhi(Fedora Infrastructure) and Tunirtests(Fedora Cloud) so I specifically gave some insight on these projects. I explained the architecture of Bodhi and Tunirtests and how one can start contributing those specific projects.

I also shared my story on how I started contributing to Fedora Project.

Here is the slide of my talk: trishnaguha.github.io/trishnagslides-what-i-do-in-fedora-how-can-you-get-involved.html

After few hours of my talk I had to leave early for some urgent work. You will find the full event report here: Event Report.

I received Fedora stickers, F24 workstation DVD and Fedora T-shirt, but not sure I can put the T-shirt on, it seems so large :(.

Jpeg

A Moment to Cherish

It was June when I was interviewed by opensource.com for my Opensource (FOSS) journey and Summer training in Dgplug.

https://opensource.com/life/16/6/how-community-taught-me-code

Heartfelt Thanks to my family, mentors and friends I have come across so far!

Definitely a moment that I would love to cherish for lifelong :).

Contributions:  https://github.com/trishnaguha  https://pagure.io/user/trishnag

A Great Guide For Contributing To FOSS

A book review on Shakthi Kannan’s book i want 2 do project. tell me wat 2 do. 

First of all I want to convey my thanks to Shakthi Kannan(mbuf) for such an amazing book. It’s undoubtedly a perfect and great guide if anyone wants to get started with open source contribution and its workflow.

It all started when I was writing testcases for Fedora Cloud Image(tunirtests). I was having discussion with DGPLUG folks since I was facing problem to set up a testcase and mbuf suggested me to take a look at the testcases given in his book i want 2 do project. tell me wat 2 doI ordered the book the very next day.

 

Jpeg

The book is divided into ten chapters where each and every chapter is divided into some subsections. When a beginner wants to get started with open source contribution Internet provides him/her with top links for getting started with open source contribution which generally contains upstream links and procedure of how to contribute. But open source/FOSS projects have its own workflow, own communication guidelines, own development guidelines, important tools used and all which a beginner is not usually aware of. And the beginners generally face problems to get started with these things at their first phase. So this is the book that covers everything from mailing list guidelines to project communication & its guidelines, development procedure & methodology of work, how to submit patches to upstream projects, how to talk or represent an issue you are stuck at to your mentor or people on IRC or mailing lists, tools used in FOSS, presentations and so on.

This book introduces us to all the terminologies related to FOSS. It beautifully explains what to do and wat not 2 do in the world of Internet and FOSS. I would like to suggest you to carry this book with you where ever you are, because it has answers to all your questions/queries when you are working on an open source project. You need it all the time 😉 .

I have learned about a lot things and terminologies after reading the book. This book has helped me a lot and will continue to do so. Thank You mbuf for such a great book 🙂 .

 

Handling Deadlock

This post is all about handling deadlock and what I did to avoid deadlock. This is the first time I have worked on handling deadlock. I have chosen an issue from fedora-bodhi which was about handling deadlock. The error was ”Deadlock found when trying to get lock; try restarting transaction” which is usually common when it comes to database.

Deadlock is an unwanted situation that arises when a process waits for indefinite time for a resource that is held by another process. So there is some way to avoid deadlock or handle deadlock. The transaction involved with the deadlock can either be rolled back or restarted.

try:
    Perform table transaction
    break
except:
    Catch the error
    Try again to perform table transaction

Lmacken guided me with some hints to handle Bugzilla deadlock. Since it was bugzilla server side issue it was not simple for me to reproduce the bug. But it was quite easy to handle bugzilla server-side deadlock. The deadlock was arising when an user was going to add comment to a bug in Bugzilla. So it was definitely a server side issue but could be handled with some little trick in bodhiLmacken told me to catch the fault triggered by the call of adding comment and try again. It was an xmlrpclib.Fault exception. Thus the technique to handle deadlock is the same as declared above. And I was finally done with my patch. Thanks to Lmacken for helping me to solve the bug and understand the technique :).

Hence I learnt how to handle deadlock and my pull request was merged 🙂

Tell-me-more

I am pretty sure that you are wondering why such a title!

Tell-me-more is a command line tool built using Python3 that provides information about the linux user and the system. The tool displays the users of the system, the current user who is logged in the system, and the memory information.

To run the tool follow README .

I have used regex-regular expression in Python3 for pattern searching. I have taken help of re module for pattern searching, argparse module for taking command line argument.

Check the source code in github to stay updated.

Finds the users


def bash_users():
    with open('/etc/passwd', 'r') as fobj:
        f = fobj.readlines()
        pattern = '/bash'

        for i in f:
            m = re.search(pattern, i) #searches if the given pattern is in i
            if m:
                print("%s" % i.split(':')[4])
            else:
                pass


Finds details of the memory of your system



def memory_details():
    with open('/proc/meminfo', 'r') as fobj:
        f = fobj.readlines()
        pattern = '^Mem' #All the strings starting with Mem

        for i in f:
            m = re.search(pattern, i) #searches if the pattern is in i
            if m:
                print("%s: %d MB" % (i.split(':')[0], int(i.split()[1])/1024))  #Displays the memory in unit MB
            else:
                pass

See howitworks for a demo of Tell-me-more. Fork me on github to contribute for this project. Thank you 🙂

Making of an index page

Continuation of static site generator….

Each and every blog has an index page that contains 5-6 posts of your blog posts, like wordpress has 10 posts in the index page/ Home page by default. I used to wonder how wordpress shows only the last 10 of my posts in its index page. And yes finally I’ve figured out the way 😉 . We are working on static site generator/ static blog generator in dgplug for the last 10 days and on the last Wednesday kushal shoot an assignment of making an index page to us. His question was a bit confusing, all the folks of dgplug were really confused. Because we were not thinking what kushal was thinking, so he decided to elaborate more on this Monday.

But I couldn’t wait for 3-4 days to solve the assignment, thus guessing what kushal was thinking I finally did something and kushal finally said that it matched with at least what he thought. kushal guided me with what else I have to include in the script and I followed him. Hence I was almost done with the index page of static site generator. Let me share with you what I have done 🙂

from markdown2 import Markdown
import os

def index_page(source_path, destination, N):
    files = []
    for f in os.listdir(source_path):
        if f.endswith('.md'):
            files.append(f)
    return files
    with open(destination, 'w') as d:
        for source in files[:N]:
            with open(source, 'r') as s:
                smd = s.read()
            markdowner = Markdown()
            dest = markdowner.convert(smd)
            d.write(dest)

index_page('source_dir_path', 'index.html', 2)

This script searches for all the .md / markdown files in the source directory and makes a list of it. Then converts it to html as needed. According to this script the index page is having 2 posts.

Thanks for your time :). Can’t wait to contribute a project on static site generator in my github.

Finally the irc bot can save the channel’s logs

Finally batuli can save the channel’s logs. I can still remember the very first day when I and sanketdg joined the irc channel ##testbot to work for irc bot batuli and I asked sanketdg “Won’t batuli save the logs of the channel as batul does for dgplug?” , sanketdg replied to me “Make it save the logs if you can!”.

I couldn’t ever imagined that making batuli save the logs of the channel could be done in so simple way. Ah yes, I spent my days studying about logging module and twisted log module. And i took help of twisted log module to make batuli save the channel’s log and sent a pull request. But sanketdg told me to make it simple and he suggested me to use logging module, yes he was pretty correct. The script was looking pretty complex. Hence I started working with logging module. On the next morning suddenly an idea came to my mind. I asked myself that why I am using these logging modules to save the channel’s log, I also have other options in Python . Because, Python is such a programming language with what you can do just anything. Coding in Python is nothing but playing with it 😉 . And what I did is just append the message of user to a file. There couldn’t be any simpler way to make your bot save the logs. Let me share it with you 🙂

with open(args.filename,'a') as fobj:
    fobj.write('\n' + time.strftime('[%d-%m-%Y %H:%M:%S]') + \
            ' <' + user + '> ' + msg)

To take command line argument, I have used argparse module instead to sys module to make the command line interface more interactive with user and it was an idea of sanketdg  🙂

So I am really happy that batuli now saves the logs of ##testbot. Join our channel ##testbot on irc.freenode . Fork us on github . Follow README section to know how to use batuli , just give it a try and I am sure that you will love it 😉

Calci

I have built Calci, a command line calculator for linux that performs basic operations like addition, subtraction, division and multiplication. I have used Python3 to build this command line tool. You will find that I had already made a blog post on Command line calculator earlier. Now this new post comes with some edits of the earlier one and another important thing is that I have made this open source .

To run Calci follow the steps given below:

  • git clone https://github.com/trishnaguha/Calci.git
  • python3 main.py followed by arguments

Since it is a command line tool you’ll need to provide arguments after python3 main.py . Type python3 main.py -h or python3 main.py –help to know this in details.

you can also fork Calci on github and send pull requests to add extra features or edit the existing features. You are also invited to open issue if you find any.

I am really excited about this project, Looking forward to turn this into a scientific one. 🙂

Interview fundue by mbuf

Job interview is a heavy weight term specially for a fresher. Being a fresher myself, I can realize that. Shakthi Kannan aka mbuf has made the term quite lighter with a guest session we had in dgplug on last Sunday. I will write in brief of what I learnt.

Usually there are two types of companies in the industry we see such as Cathedral model and bazaar model.

Cathedral style of work known as MNCs in India follow a strict hierarchy structure. Here we will have to follow what my Manager says. After the work we will report to my Manager, he/she will report to another Manager or Head who will report to a Vice President and so on. We may be unable to know what other departments and divisions are working on, there may be restriction of code access and physical building access too.

Bazaar style of work known as Start-ups have a flat structure. Start-ups with small number of employees are pretty transparent and open in communication. Sometimes it is required to work us on different job roles in Start-ups that doesn’t generally happen for MNCs.

And another thing I’ve learnt that there is no such term like “Job Security”, even a CEO or CTO can be replaced or fired if the authority wants. Most people like to work in larger companies because they think it is their “Job Security”. I would love to quote what mbuf said what actually job security is, “they can be relaxed at times (“sitting in the bench”) and not work actively in a project and still earn money”. We have to love what we are doing, rest will go on automatically.

Coming to Job interview, mbuf explained us so well about the Dos and Don’ts for a job interview. He gave us some tips which can make our stress less. Before applying for a job role we should find out what our interest is. If we see a job role interesting, find what skills do we need for it, we should work on acquiring them accordingly for an interview. We can also show our impact by showing our contributions for a project. If you has already worked on F/OSS project you can show your patches or codes as contribution in github or as any other source as proof in the technical interview. We should not ask how we fared in the interview. That’s the most important thing I have learnt from this session. Many of dgplug folks did the same mistake in their interview, they asked how they fared in the interview, thus couldn’t make it.

We had a great evening session in dgplug on preparing job interviews and also discussing careers and job opportunities for people working with Free and Open Source Software (F/OSS) . It had been a bright Sunday 🙂