Featured post

Using Sinatra: Building a Web Application (part ll)

Hi There! in the previous article you learned about setting up Sinatra and HTTP request methods.In this article we will use the things that we learned to build a web app. I've changed my mind about "Scissor ,Paper ,Rock " game.We'll now be encrypting and decrypting a key using my algorithm and will learn the basic of ERB.

What's ERB ?

"Embedded Ruby is a templating system that embeds Ruby into a text document. It is often used to embed Ruby code in an HTML document, similar to ASP, JSP and PHP."So we'll be embeding our code on a HTML Page.

ERB Syntax :

The key concept of ERB is simple: it allows you to write HTML with bits of Ruby code interspersed with regular HTML. Before the template is sent back to the user, it's compiled. This means that any Ruby code in the template is executed, and all we're left with is regular HTML.

like this:

<h1>Today's date is < %></h1>
The ruby codes are written "<% here…

Debug django webapps like react native

Introduction Most websites/webapps are now mobile first. Internet browsers these days all have the mobile view that lets you see how the app looks on your phones. But this is not enough to judge the full mobile experience. So, it is better to debug it on an actual phone. To do this, we should either host the app on a server and open the URL on your phone. Or you can locally host it on your WiFi network.
What happens in react native React native is a framework of javascript that allows you to build native mobile applications. Debugging in it is made beautifully. A server is started, this prints a QR code on the terminal itself. This QR code is then scanned through an app called Expo. This app automatically installs the app on your phone and runs it. This is the most convenient way I have ever done debugging.
What happens in Django In Django, you have to run an HTTP server locally and either debug on your browser or connect your phone on the same network and access it on your phone thr…

Using Sinatra :A Web App Development Library(Part l)

Ruby is blessed with several web application frameworks such as Ruby on Rails, Merb, Nitro,  Camping and Sinatra.Many of us might have heard about Ruby on Rails ,In simple words, Sinatra is an alternative to it and the other frameworks mentioned above.Sinatra was designed and developed by Blake Mizerany in 2007 and named after musician Frank Sinatra.

In this article we'll learn about :
i.   Installing and Setting up Sinatra
ii.  Handling the HTTP Request

Prerequisites:  One Must Know Ruby to proceed further.

So let's begin :

Installing and Setting up Sinatra:
i.  Open the Terminal.
ii.   Type "gem install sinatra" without " ".

Voila! The gem got install.Now its time to Test it.So, for this we will create  file named "app.rb" and type:

require "sinatra" #to use the sinatra module
and run the app by typing "ruby /directory_name/app.rb" without ""  and then go to the web browser and type in the search bar 'localhost:port…

Different tools for serving static files through HTTP

Introduction Serving static files through HTTP is not a difficult task. Every little web developer is doing it. But not many people understand the real action that is happening underneath. HTTP protocol is very simple to understand and needs to be understood by everyone as it is one of the most used protocols in the world wide web.

Working of HTTP
The working of the protocol is very simple. It works on the basis of the request and response. A client (generally a user's browser) makes a request for a particular file and the server it. There are 4 basic types of requests: GET, POST, PUT and DELETE. GET is the most used type of request. When a URL is entered into the browser, the browser makes a GET request to the server. The server serves the required HTML file and the browser renders it.

But for this, we need to have a server which is capable of accepting requests and processing them. There are several tools available to make a simple HTTP server. We are going to have a look at so…

Fix "0xc00007b" error in Windows

It happens the best of us. We have a new game to play now and after spending hours downloading it, you launch it and are greeted with an error. The fix for the problem is not really given by a website clearly and I want to share the solution that works for everyone! Familiar with this?

> What exactly happens?  As soon as you encounter the error code 0xc00007b, a dialogue box may prompt up on your screen and flashing the message stating, “The Application was unable to start correctly (0xc00007b). Click OK to close the Application”
> The reason why :  There can be various scenarios under which you encounter error code 0xc00007b. You may get this error while doing any of the following:

● You might be trying to play a Game on your PC and after launching the application, error code 0xc00007b may flash on your screen. ● You might be launching software but unfortunately the error code 0xc00007b may resist you to do so. ● You may encounter 0xc00007b error when you install a 32-bit application …

Hands-on with the new XDA Feed App

Greetings Droids, 

Today we are going to explore an app released by XDA called "XDA Feed - Customize Your Android". It's the universal version of the app already available for a couple of devices. It's available in Google Play Store and virtually any device running Android Lollipop and higher (5.0+).
The purpose of the app is believed to curate the best stuff from the XDA forums. As going through the forums can be a daunting place for a lot of people.It's easy to miss out on latest ROM releases or must have icon packs. All content from feed is handpicked by humans to ensure quality. If you like to modify your phone or stay up-to-date (with posts notifications) with the latest the community has to offer then this app is what you need. 

Earlier, the app was specially made for Pixel, Pixel XL and OnePlus 3/3T which contained device specific content like ROMs, kernals and Mods and also general content like wallpapers, icon packs and themes. But, with this new app you ca…

How to serve a django app on a local area network

In this post, I will show you how I automated the process of hosting a django app on a local area network. The usual way to host a django app locally is by running “python runserver”. This just hosts the app at Now, this app cannot be accessed by others on your network.
In order for other devices to access your app, you will have to host the app with the IP address that your computer has on the network. For example, if your IP address is, your will have to host the django app at The port number 8000 can be different. To do so, you have to run the command “python runserver”. Now your django app will be hosted on the local area network and can be accessed by others using the address

To get you IP address, you can run the command “ifconfig” on the shell and find out (or “ipconfig” for windows). And then you copy and paste the IP address in the command. 
But there is also a way in whic…

How to geek: Learn to code like a pro

Warning! Philosophical text ahead. Skip to the next section to avoid it.
A lot of people come up with a lot of brilliant ideas. But not all of them are able to execute their ideas due to lack of programming knowledge. Lack of programming knowledge is something that can only be solved by sitting your ass down and doing a course patiently without giving any excuses. It is important to assess yourself thoroughly. If you don’t know something, you need to accept it. You can’t call yourself a web developer after editing a few HTML templates. If you want to be a web developer, stop editing templates and start building one from scratch. Speed is not more important than fundamentals. If you go after speed, you will end up becoming like season one flash. Another thing I’ve noticed in people is, they are not able to stay motivated for more than a day. They start a course online, binge watch a few videos and then forget about it the next day. An online course is not the same as a TV show. You canno…

Vim: The Text Editor For Geeks

Many of us just love to work with Vim , a simplified text editor with Mouse and GUI is rarely something we use.Being a touch typist we don’t want to move our hands from their position on the keyboard.In simple words,there’s command to everything,from moving the cursor to save and exit.

But wait, should I start using Vim just because I’m too lazy to move my hands around mouse?
Let me complete,
Vim can be used remotely. We can use Vim everywhere and can be run over an SSH connection and it works just well. So if you need to do remote work you only need to learn one tool so why not Vim?

What’s Vim?
I’m not good with the definitions so lets just copy it from Wikipedia ,
Vim (a contraction of Vi IMproved) is a clone of Bill Joy's vi text editor program for Unix. It was written by Bram Moolenaar based on source for a port of the Stevie editor to the Amiga and first released publicly in 1991. Vim is designed for use both from a command-line interface and as a standalone application…