Monday, 25 April 2016

My First Fedora Meetup

Yesterday I attended a Fedora meetup where we discussed about how to write Test Cases in Python. This was my first meetup after I have started learning Python. When I reached the place there were around 12 people sitting with their laptops, then I also joined them. Few people were knowing each other, few were new like me. So, Kushal who was organising the meetup decided to have an quick intro so that we may know about each other. After intro I came to know some were college students, some were working and all of them were keen to contribute something and were passionate for leaning new things for which we were gathered there. Then he gave an introduction on Unittest module which was our topic of discussion for that day. After this Kushal told what we are actually going to do today and its benefits and how we can relate and impliment that in our work. Then he gave an example of unit test in which "cat" command was tested and we all tried it in our own laptops and it was a success to run that unit test. In between we have some snacks like cold drink and samosa . All of us enjoyed this refreshment. Then Kushal decided to give different Test cases to everyone rather than all working on the same problem so that it will be more beneficial as we all will learn more by this, as a new challange will be there for everyone. Although it was not easy to think a new problem for each of us but still Kushal ended up by assigning a problem  to everyone who were present there. Chandan and Praveen were helping him in this, all three of them were there to help us with our queries.

After we got the problem, we started writing unittest for the assigned query. I was assigned a problem in which I have to test can we create a loopback device and perform file system operation without losing the file. In between doubts and questions were coming from the participants which were answered by either of the three. The environment was like that we are working on a crucial project as everyone was writing their test cases and running them to get the desired output. I was also so indulged in my Unit test case  that I don't how the three hours went, I came to know its 9 when Kushal told lets finish it here, we will continue in next meetup. Then he told us to some basics things and asked us to give feedback about the meetup. Then all of us winded up and it was decided we will do the remaining part at our own place and the will push the code on github, if there will be some issue we can contact Kushal by droping a mail or on IRC.

(pics by @anweshasrk)











Friday, 22 April 2016

Database with MySQL

MySQL is an open-source relational database management system(RDBMS). Before proceeding further one should have the knowledge of what exactly database is?

Database is a application that stores collection of data. Relational database management system is used to store and manage huge volume of data, all data is stored into different tables and relations are established using primary keys or other keys known as foreign keys. Primary key is unique, and can not occur twice in one table and foreign key is the linking pin between two tables.
To use MySQL database, it is essential to become comfortable with mysql command  line.  So here are the basic commands which I went through to start with mysql database.
  • SHOW DATABASE - Used to view all available database.
  • USE <database name> - To work with specified database.
  • CREATE DATABASE <name> -  To create a new database.
  • DROP DATABASE <name> - To delete a database.
  • CREATE TABLE <name> - To create table.
  • SELECT command is used to view rows or column from a table.
  • WHERE command used to view only records that matches a specific condition, it can be with "greater than>", "less than<","not equal to!=" oe "equal to=". It can be used with OR, AND, NOT to combine multiple condition.
  • CONCAT function is used to combine values from multiple columns and display it. 
  • COUNT is used to display the total number of records in a table.
  • GROUP BY command is used to group records on certain conditions. There many more commands which we can understand more clearly only by using them.
So to see how these commands work I connected to MySQL server using MySQL client using mysql command, as it was already installed in system. After logging in successfully I created a new database for me named test, which I decided will contain different tables having student details, test detail, classes details,score details etc. Once my database was created I created various table inside it defining its parameters. Then I inserted the values to different tables according to the parameter defined by using INSERT command.
After doing this much of work I started playing with the tables by altering their name, by adding something new to them, by adding new column to them , by merging two columns and lots more things. It was a fun to extract different information by using various commands from different tables, and this is how I learned basics of MySQL.

Monday, 18 April 2016

A Day with IRC

IRC is mainly designed for group communication in discussion forums,called channels, it also allows one to one communication via private messages as well as chat. IRC is based on a client-server model. All you have to do is to run a client program on your computer which connects you to a server on the Internet. These servers link to many other servers to make up an IRC network,which transport messages from one user to another. For this only you need an Internet Service Provider to get you connected to the Internet and an IRC Client program.

After setting up with the provider and a client, you can choose a nickname of your choice and then connect different IRC networks. After going through the basic of IRC, I started with IRC and went through few commands and choosed a nickname (pyadav) for me. Then I joined few channels of my interest like dgplug, fedora-cloud, fedora-python etc.

You can find the channel of your interest with the /LIST command. After  finding the channel you can join it by using JOIN command as:   /JOIN #channelname - This changes your current channel to the specified channel and if the channel does not exist already, it will be created and you will be incharge of new channel.  To leave a channel you can use /LEAVE command. Private conversation can be done by /MSG command as  /MSG nickname <message>

Reference:


Monday, 4 April 2016

A New Beginning with Python

After making my mind to step into programming, the very first question that comes to my mind was "Which programming langauge must be learned to start with programming?" Then I hunted for which langauge should I start with being a beginner and ended up with 'Python' after a long research and conversation with my friends who already are in developing.

Python can become a stepping stone for everyone who want their career in programming universe as it was designed with newcomers in mind. It is easy to learn and grasp as the command are easy to remember because they are similar to the english words we use in our daily life. It is so simple, that you can start coding the very first day and make your own simple programs using python.

There are many more reasons I started with python as its a general purpose,
high level, interpreted language. The first code I leaned was how to print something in python, and it was so easy,I printed 'Hello World!' as it was the first code given in the book which I was referring ie  "Python for you and me".

>>> print "Hello World!"
Hello World!

"Python for you and me" was my first teacher to help me in learning Python (an interpreted , object oriented programming language) and helped me to get into python more and more with very new topics.

Also I joined the course of Udacity that is "Linux Command Line Basics" which was an introduction to the Linux Command Line interface and it
helped me in knowing more about the language and its basics. One thing I liked most about Udacity course is that we have different quizes followed by detailed solution after every topic. This keep us more involved in the course and makes it more interesting to learn and practice.The way of delivering each lesson was  just awesome, so it was worth joining that course.

After gaining enough knowledge about python I just started with some exercise having python programmes, and I found what I was looking for some good exercise of "Coding Bat" related to the topics which I have covered so far in Python.This helped me alot to brush up my concepts in programming.