• Structures and Methods in Go

    In this post I am going to discuss Go lang’s another features, structs As I told earlier that Go is not a typical Object Oriented Language. Structures is kind of answers of what you do with Classes and objects. Well, Structure is not a special concept to Go only. If you have worked on C language then you could have an idea what is it all about. Let’s write a simple program [crayon-5c15e8c21fe0b179888220/] Ok this is the complete program. After typical declarations I am defining a struct with name person. As you remember you write variable name first and then it’s type in Go. Alright.. so now we have to use…

  • Implementing beanstalk to create a scaleable web scraper

    Image Credit (http://blog.hqc.sk.ca/wp-content/uploads/2012/12/Queue-2012-12-11.jpg) Queues are often used to make applications scaleable by offloading the data and process them later. In this post I am going to use BeansTalk queue management system in Python. Before I get into real task, allow me to give a brief intro of Beanstalk. What is Beanstalk? From the official website: Beanstalk is a simple, fast work queue. Its interface is generic, but was originally designed for reducing the latency of page views in high-volume web applications by running time-consuming tasks asynchronously. It’s demon called beanstalkd which you can run on *nix based machines. Since I am on OSX so I called brew install beanstalkd to install it. Once…

  • Let’s Go:: A very brif introduction to Go language

      Hello World I am back! I know it took *a bit* long resuming this blog as I got pretty busy in other stuff related to my work. Alright so this post is about writing applications in Go, a programming language create at Google by Ken Thompson(“K” from famous K&R) and the creator of Unix and Rob Pike. I had not thought of learning another programming but there a few reasons I go for the Go Go is a minimal language like Python. Since it was developed by Googlers who are also Python lovers, they came up a language which is simple to write like Python but more efficient like…

  • Develop database driven applications in Python with Peewee

    It is not uncommon that most of the applications these days are interacting with database these days. Specially with RDBMS based engines( DB engines that support SQL). Like any other languages Python also provides native and 3rd party libraries to interact with database. Normally you have to write SQL queries for CRUD operations. That’s OK but at times it happens that things get messy: The Big Boss decided to move from MySQL to.. MSSQL and you have no choice but to nod at him and making changes in your queries compatible with other Db Engine. You gotta make multiple queries just to retrieve a single piece of info from the…

  • Guest blogging

    Image: Wikipedia Those professionals often ask me about blogging and related things always come up excuses like how to buy hosting or it will take time to get noticed by Google( All of such excuses are lame). So, I am inviting anyone to be my guest(blogger) and write the stuff you want. As my blog’s subheading says: programming, productivity,entrepreneurship and life hacks, therefore only topics pertaining these will be published. My blog is not SUPER famous but gets traffic of xxx to x,xxx figure per day. Therefore, if you have an interest and looking for a launching pad, you are most welcome. I will give full credit to you. You can provide a summary of…

  • How to automate your deployment and SSH activities with Fabric

    It is not uncommon for developers to interact with remote servers. Beside FTP clients many use terminals or consoles to carry out different tasks. SSH is usually used to connect with remote servers and execute different commands; from running git to initiating a web or db server, almost every thing can be done by using an SSH Client. Recently I came across an awesome tool called Fabric. It’s a Python based tool that automates your command line activities. What is Fabric? From official website:   Fabric is a Python (2.5-2.7) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks. It provides a…

  • Develop your first web application in Django 1.10 – Part 5

    In last post I talked about using forms, in this last part of the series I am going to discuss about Django Admin and how can this powerful feature be used for records management. Django Admin Before we get into coding, we need to create a superuser(Admin). Open Terminal, go in your project’s root folder where manage.py resides and run the following command: [crayon-5c15e8c223813557535465/] The interactive tool will ask a series of things. Once it’s over, check your settings.py file that whether admin app is available in INSTALLED_APPS or not. It should have django.contrib.admin as an app there. if all set, go to http://127.0.0.1:8000/admin and log in with the user you just created. You should…

  • Develop your first web application in Django 1.10 – Part 4

    Learn how to use Django Forms to submit user input data into Database. In previous post I discussed about Db interaction with a Django application and how to pass data in a html view and display it. Now we will move onto next step and will learn how to use HTML forms to store data in database. Django Forms The form I am going to deal is.. yeah, the project form so that I can submit project details. I will create a new folder under tracker/templates and will call it project. The reason to do is that I want to view file separate w.r.t modules. In the file I am going…

  • Develop your first web application in Django 1.10 – Part 3

    In part 2 you learnt how to use templates and views in Django. In this part I am going to discuss how to integrate database with Django app for pulling and storing data. Before we get into it, there are few things that need to be done before we start playing with data and database. Setting up database In order to make our application able to interact with a database, we need to setup the connection of it. Django can connect many RDBMS based db engines. Since Django rely on an ORM, you don’t need to worry about underlying DBMs being used for your app as you can always switch to…

  • Develop your first web application in Django 1.10 – Part 2

    First of all I am sorry for taking so much time to make a new post due to home shifting and travelling. In previous post you learnt how you can integrate HTML in Django application. Now we will go a step further and see how you can create a layout and how to extend it with inner HTML pages. Creating Site Layout Earlier I had just dumped the HTML of home page in master.html and then used extends to call it in inner home page. Now it’s time to make the layout file available for all other pages. Almost every website these days follow a certain theme; it consists of a header, footer,…