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…]

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. πŸ™‚

Facebook CLI

Most of the time I would love to stick on to my terminal rather using GUI.

Last time I had tried Telegram CLI. This time I’m back with Facebook CLI.

I know you may not believe for the first time if I tell you that I updated my facebook status through terminal of my ubuntu 14.04 πŸ˜€ But trust me, it is possible and I did it just now. πŸ™‚

To do this we need to have a fbcmd application which gives you a command line interface for facebook.

Chill πŸ˜€ I will teach you to install this in a easy way

You need to have php installed in your system to do this.

If you don’t have, install it by typing the following command in your terminal :

(copy Ctrl+c and to paste on terminal use Ctrl+Shift+v)

$ sudo apt-get install php5 php5-cli

Download fbcmd.zip from the this link.

Note: make sure you have kept the downloaded file in home folder and Unzip the file.

You are almost done. πŸ™‚

Now get into that folder.

$ cd fbcmd

To complete the installation you need to execute following 2 commands :

$ sudo php fbcmd_update.php

$ sudo php fbcmd_update.php install

That’s it. πŸ™‚

You are done with installing. πŸ™‚

To begin type fbcmd:

$ fbcmd

The application needs to be authorized to access your Facebook account.

So follow these 4 steps to do this:

Step 1: Allow initial access to your acount via this url, execute this command :

$ fbcmd go access

You will see the following screen:

sagarhani1

Step 2: Generate an offline authorization code, execute:

$ fbcmd go auth

You will see the following 2 screens:

sagarhani2sagarhani3

Step 3: After you get your authorization code (XXXXXX), execute:

$ fbcmd auth XXXXXX

Step 4: Most FBCMD commands require additional permissions. To grant default permissions, execute

$ fbcmd addperm

Yay! You are done now. πŸ™‚

Learn to play with it by executing this command :

$ fbcmd help

I know you are excited. πŸ˜€

First update your status :

$ fbcmd status “I’m updating this status from the terminal of my ubuntu…. πŸ˜€ Next time I will tag you all :D”

sagarhani4

LINUX is funnn.

β€œLINUX is funnn”

β€œLINUX is funnn”

β€œLINUX is fnnnn”

β€œLINUX is funnn”

β€œLINUX is funnn”

This post is just to have fun with the terminal of LINUX. πŸ˜€ πŸ˜€ πŸ˜€

I feel it’s better you open a terminal (Ctrl+Alt+t) and execute commands along with me.


Note:

1. I’m running these commands on my Ubuntu 14.04.

2. To get more details for the following commands, man (an interface to the on-line reference manuals) it.

3. Most of these commands need to be interrupted mannualy. Use Ctrl+c to interrupt it.

4. To copy the commands from browser select the command and use the shortcut key Ctrl+c.

5. To paste the commands on the terminal use the shortcut key Ctrl+Shit+v.


Okay. πŸ™‚

Let’s start our jounery now. πŸ™‚

I’ll will give a call to Railway department to send us a train soon, so that we can start our journey.

$ sudo apt-get instal sl

$ sl

train

Yay!!! Train is on the way.

That was cool, right?

To know more details and to have more fun with this train contact the following command :

$ man sl

man is an amazing person in LINUX he will help you in all suitations. You won’t find woman in terminal ( Try $ woman sl). You will see how man can help in further commands.


Let’s go to my favourite command xcowsay. πŸ˜‰

This cow speaks. [surprising]

$ sudo apt-get install xcowsay

$ xcoway Hello

xcow

Hello!!!

Just a minute. I will call her friend now.

$ sudo apt-get install cowsay

β€œyey cow, where are you ?”

$ cowsay β€œHey, Sagar”

cow

Hiiii. πŸ˜‰

where did tux go?

$ xcowsay -d *file_name*

$ xcowsay -d tux.png

tux

β€œHiiii Tux. You are looking funny today. :D:D:D

What are you doing?”

$ cowsay -f tux “Hi, I’m working on my project. I’m busy. I need to go. Bye.”

project

Bye, Bye tux, cow.


Ufff…..

Do you know thier is command called β€œtoilet” ?

Let us see, what it will do?

$ sudo apt-get install toilet

$ toilet Hiii

toilet

WoW!!! It displays large colourful characters.


Have you ever watched a show named β€œTom & Jerry” on cartoon-network?

I used to laugh soo much πŸ˜€ πŸ˜€ πŸ˜€

Try oneko command it’s simillar to that show.

$ sudo apt-get install oneko

Get ready. Hands on mouse please. πŸ˜› Make sure tom dosen’t catch jerry. πŸ˜€

$ oneko

tom

Β Rofl:D πŸ˜€ πŸ˜€rofl


Their is a command to put fire on your system.(Not actually)

$ sudo apt-get install libaa-bin

$ sudo aafire

fire

Your system is looking red hot. πŸ™‚ Keep burning it. πŸ˜€


Next command, cmatrix.

This pattern reminds me about the movie β€œThe Matrix”.(Neo, Morphus)

$ sudo apt-get install cmatrix

$ cmatrix

cmatirx

Keep looking at it. You can see your name passing in middle. πŸ˜›

Kidding. πŸ˜€


Enough of fun. Now, just copy and paste the following commands.

(To paste on terminal Ctrl+Shift+v)

$ yes β€œSagar, You are the man _/\_ β€œ

yes

Note: If you try to replace the word sagar with any other word the command might not work and your lappy may get hanged. Execute at your own risk. πŸ˜€


Next, espeak

$ sudo apt-get install espeak

Make sure that the volume of the system is maximum, or else the command may not work effectively.

$ espeak β€œSagar_You_are_awesome”


It’s show time on telnet.

$ telnet towel.blinkenlights.nl

telnet

( No need to install anything, but you need to have an working internet connection.)


While I was learning all these funny commands I noticed a command named Fork bomb.

They told that it is a very nasty piece of code. This command will utilizes all the system resource and system hangs. I dint tried this command since my laptop is quite new.

The command is :

$ :(){ :|:& }:

If you are brave and want to take risk try it and please comment the result below. I’m very curious to know about it.


That’s it. πŸ™‚ Hope you enjoyed it. πŸ™‚

There are many more funny commands like these.

Click here to see more. πŸ˜›