SwiftCode at SJBIT

SwiftCodeOctober 22nd – 24th we had our SwiftCode workshop at SJBIT college.
[To be continued…]

Advertisements

SwiftCode at BNMIT

Firstly, check out our technology stack :

swift-code4
It is Play framework, REST API, Java, AngularJS, MySQL, we deploy our application on AWS, Heroku. All our development happens over Lubuntu, a lightweight and fast operating system. We make use of Git along with GitHub for version control.

What is SwiftCode ?

SwiftCode program is intended to show a modern age computer science graduate how to build scalable and robust applications using state of the art techniques and design methodologies that have shaped software today.

This blog post beautifully explains how we set up collaborative development environment for our workshop : How to Quickly Set Up Collaborative Software Development Environments

On August 20th, we hosted our first workshop at BNMIT engineering college, Bangalore. We had 25 students from Computer/Information Science department.

On the first and second day, Sandeep and Akshay took the session on Java Play framework, explaining how to build a RESTful application. They completed the backend side of the application. Students were often made to commit and push their code on Github. At the end of day 2, Shrita showed how to test our APIs using the Postman.

On the third day, Prarthana took a session on front-end development, talking about how responsive websites could be built using bootstrap, architecture of Model-View-Controller (MVC) and AngularJS.

At the end of the training, all students were able to build a social media (similar to facebook) application on their own. They had soo much fun and learned a lot.

You can see all the repositories created by them at our GitHub org : https://github.com/swift-code

This slideshow requires JavaScript.

Image source : SwiftCode

It’s a great start to our long journey. Keep waiting to know about our next stop! 🙂

[To be continued…]

One last step for completion of Google Summer of Code – KDE – WikiToLearn

One last step for completion of Google Summer of Code – KDE – WikiToLearn

Collaborative Editor Extension for MediaWiki
The Google Summer of Code 2016 is coming to an end, just couple of days left.

The good thing is that I’m also almost done with my project and enjoying my free time. 🙂

I have published the screencast of how my project (Collaborative editor extension) works on my laptop.

YouTube : https://youtu.be/lf1Kg0gVIWk

I had built the extension on normal MediaWiki.
I tested it on my local instance of WikiToLearn i.e http://tuttorotto.biz (URL is accessible only if you are running its local instance)
It works good and as smooth as it was on MediaWiki.

The things I’ve planned to work on these final days are :

* Write good documentation. Since my project was bit complicated, I do feel it requires a good documentation on how does it work, how to use it and configuring it.

* It may need some tweaking on UI so as to match with the current skin of WikiToLearn. It would be easy, we can do it anytime but my focus is on get the collaborative editing work good.

* I’m curious to know how it would perform when we deploy it on staging or production server. I know WikiToLearn will be used by the huge number of people every day and hence it will have high traffic.

I’m also looking for any good tool to write my documentation. Maybe GitHub wiki, ReadTheDocs or a blog post would be fine I think.

Hope all these goes well. 🙂

Cheers!

[Edit]
Testing Rich Elements.

YouTube : https://youtu.be/T3KyDwNi_VM

Why git ?

Why git ?

Hey people,

This post is dedicated for my friends who are new to FOSS  world or would like to get started with git.

Every time I start to explain about git to my friends I give them this problem statement and ask them to give me the solution :

You are in a project team which consist of 5 people and each of them stay in 5 different countries. Your project is to build some application where all 5 of you have to do some code contribution to it. Now, how this work can do done collaboratively ?

(I know that people usually share the code via storage devices like USB drives. 😀 That’s the reason I said your team mates are in different countries.)

Do you think you can share the code snippets over email ?
Or by using any cloud platforms like dropbox, google drive, etc ?

Well, these approaches are possible too but they are not very much efficient. Management of the code becomes hectic.

This is where the git comes for the rescue.

Git is a popular version control system (VCS) used for software development. As I have seen, most of the open source projects development are done with this VCS. Git has been beautifully designed with graph theory tree model.
Git provides lots of features like code tracking, reverting, keeping the development of new features separately from the main code base using branches.

$ man git

Documentation of git on man page is not much helpful. One has to look for stack overflow for most problems he usually faces.  For instance, three of the top five highest voted questions on Stack Overflow are questions about how to carry out relatively simple tasks on git.

Steve Bennett explains about 10 things he about git.
Some of his points are true.
It may be complex, lengthy process, new technology to learn, but it will keep developers life simpler. 🙂

git
So, no more sharing code via storage drives, emails, dropbox or google drives. You can use git, push the code onto some server like gitlab, github or bitbucket and work collaboratively. 🙂

In my next post, I’ll write about how to work collaboratively using git. 🙂

Mid-night git session at dgplug

I’m using git since few months. The world of git is too big. You have lot of things to explore in that.

One way to explore things in any technology or programming language is by solving the problems.

On #dgplug (Durgapur Linux Users’ Group) channel, someone had a problem with git.

The problem statement goes like this :

A person has made 4 commits and sent a pull request. Now, the owner of the GitHub repository is asking that person to remove the last 2 commits i.e commit number – 3 and commit number – 4. How can one remove the last 2 commits keeping first 2 commits as it is ?

Sayan was there to help in this problem. He took a hands-on session at that late night (It was around 11.45 p.m IST).

If you want to learn to solve this problem, just follow these instructions :

First we cloned this repository :

$ git clone https://github.com/kushaldas/pym/

As usual, you need to change your current directory to project directory, so hit :

$ cd pym

Now you are inside the project directory. We moved into code directory of the project. To do this, hit :

$ cd code

We added a new file called helloworld.py

After this, check the status of the git by executing :

$ git status

You will be able to see helloworld.py file name in red color under Untracked files. This tells that the file has not been tracked by the git.
Please remember this point as this is important.

Next do :

$ git diff

This will not show any changes as of now.

Now add this statement in argvtest.py  file :

print 'hello world'

Note : argvtest.py file is already present in the code directory

Now again, check the status of the git by executing :

$ git status

Can you see the changes now ?

We can see argvtest.py file in red color under modified files and hellowold.py file in red color under Untracked files.

Now do :

$ git diff

You can see the changes you have made. If you have added a new line you will be able see it in green color preceding with + (plus) symbol. If you have deleted a line you will be able see it in red color preceding with – (minus) symbol.

I hope you have completely understood till here. 🙂

Now do :

$ git add argvtest.py

The argvtest.py file is now staged. To check this, do :

$ git status

You can see the color of the modified file i.e argvtest.py has been changed from red to green. This represent that the file has been staged and tracked by git.

Now do :

$ git diff

You don’t see nothing, because by default git diff shows whatever is there in modified.

Since we have nothing in modified area, it doesn’t show anything.

argvtest.py file is now staged and if you want to see the changes, do :

$ git diff --staged

This will show the changes in the staged area.

Note : $ git diff --staged and $ git diff --cached does same thing.

Now let’s commit this by doing :

$ git commit

This will open a text editor and you will see the text in there “Changes to be committed”.

Now write the commit message in the first line, then save and quit. (Lines starting with # will be ignored)

To see your commit, do :

$ git log

To see the changes made in the commit, do :

$ git log -p

There will be lot of commits, now do :

$ git reset --soft HEAD~1

$ git status

See the output. Understood what $ git reset --soft HEAD~1 did ?

Soft reset brings the changes to staged.

Now,

$ git reset HEAD argvtest.py

will bring into unstaged area as you can see in the output, it shows the file name under Unstaged changes.

HEAD is referred as the topmost commit in git just like tip is referred as the topmost commit in mercurial.

HEAD~1 takes 1 commit behind.
HEAD~2 takes 2 commit behind and so on…

Important note : If we do $ git reset --soft HEAD then we won’t loose the changes made in other commits which were removed.

I hope after reading this post you would have understood how to solve the above mentioned problem. 🙂