Que :: Q & A Portal Built Using Ruby on Rails, Marionette JS and SQL



Have a look at my another Open Sourced Project “Que”.

As said, improvements come with constant evolutions and the evolutions are great when there are contributions coming from diverse elite minds. Therefore, feel free to modify, fork or clone the project and contribute your updates and ideas.

It is a simple Questions and Answer Portal built using Ruby on Rails, Backbone JS, Marionette JS and SQL Database.

Source Code: https://github.com/karantongay/Que

The website is live on https://cryptic-stream-87241.herokuapp.com/

It features:

1. Asking Questions

2. Answering the Questions

3. Following and Unfollowing the Users

4. User Profile Section

5. Deleting questions and answers with validation i.e. only the owner of the question or answer can perform the delete operation

This project is open for improvements and contributions.

Splinter :: Java App to Split Large Excel Files


Recently, I have open sourced a small application on Github, built using Java that performs splitting of a large excel file into multiple smaller files with the help of Apache POI library. It also supports files with .xlsx extensions.

This can be used as a module in the existing applications or can be used as a standalone application by implementing some User Interface for the application.

The project is completely open for contributions and improvements therefore feel free to fork or clone or download the project and if there are any contributions please feel free to generate the pull request on Github.

Please follow this link to the repository:


Motivation for this project:

In most of the applications, especially those that deal with the excel sheets often face different issues if the excel files are large enough in size.

Such files may not be opened on a computer with limited resources and therefore cannot be used for further processing if there is a need to open the excel file and verify the contents.

This application helps to handle such large excel files and splits them into separate excel files of defined number of rows which can be opened easily.

Please feel free to share what all things you may feel you could contribute to make it better.

Happy Coding!

Introduction to Kotlin – A Quick Understanding!


Getting back after a long time, and this time coming up with a recent headline “Kotlin”, an upcoming programming language that offers state of the art features. Let’s know about it in brief.

Imagine, while writing a Java code, forgot to end a line with a semicolon (;) and yet the program executes wonderfully giving the expected results or forgetting to include package header or there might be some possible runtime exceptions and yet no complaints. Such concise and safe is Kotlin.

Let’s understand quickly what Kotlin exactly is and why it is a good language.

What is Kotlin?

The trend of continuously improving the programming experiences has introduced another programming language “Kotlin” which is a new language from JetBrains – known for making the world’s best IDEs. Kotlin is a statically typed programming language for modern multiplatform applications. In the recent Google I/O 2017 Conference, the Android team announced a First Class Support for Kotlin. For Android developers, Kotlin can prove a great resource that helps solve common problems such as Runtime Exceptions etc.

Besides Android, Kotlin also supports application development for JVM, Android, Browser and native application development too.

Why opt for Kotlin?

The core feature of Kotlin is that it compiles to JVM bytecode. It can use all the currently available Java Frameworks and Libraries. Additionally, it integrates easily with Gradle, Maven or other dependency build systems. Moreover, for a programmer, the language can be learned in a few hours by simply reading the documentation of the language.

Secondly, since it has been provided a First Class support from Google, developers might feel confident to use Kotlin for development.

Also, Kotlin can be introduced into existing projects meaning that existing technology investments and the skills of developers are preserved.

Things are always best understood when we experience it ourselves, so go ahead and try Kotlin online here: https://try.kotlinlang.org

The best feature this online development environment provides is to convert the existing Java code into Kotlin. Try this as well and experience how multiple lines of code in Java is reduced to commendably fewer lines of code.

Testing a Web Application Using Selenium IDE – A Simple Approach!


This tutorial is a guide to creating a Google App Engine Web Application and testing it using Selenium IDE. Once the basics of using the Selenium commands are understood, many other test cases can be designed in a similar way. The focus is also given on how can one easily create a Google App Engine Application.

Please download the supporting files towards the end of this post.

Additionally, Let’s understand how software testing can be really important.

Every day, we use many applications that have become part of our lives may it be to track the calorie intake, the number of steps we walk, send emails etc. It is really very important that such applications should always perform accurately and as expected. Otherwise, the credibility of such application can be compromised.

The reason for which our routine applications could deliver us seamlessly without failing to perform as per our necessities is because of the level of quality they are able to maintain by effective testing of the application before releasing it in the market.

For example, Imagine that one is using a mobile app to control an electrical appliance and the mobile app is not tested well before it is handed over to the user and it turns the appliance “OFF” when the user clicks on “ON” and vice versa. This can be miserable if someone is controlling the appliance from a remote location and relying on the application, without knowing what exactly is happening. Fixing this issue after the application is in the market can be expensive in terms of all aspects.

Therefore, it is very important to verify and validate the system against its responsibilities and performance to help reduce future risks. In brief, this process is nothing but “Software Testing”.

Testing verifies that the system meets the different requirements such as functional, performance, security and so on. This verification is done to ensure that we are building the system right.

Additionally, the software validation ensures that the system that is being developed is actually what the user needs.

This eventually helps improve the quality of the product and can reduce the post-release cost of the service and support and there shall be opportunities to increase the revenue.

Supporting files mentioned in the Tutorial:
1. Booths Algorithm Java File

2. HTML File

3. Selenium IDE Add on for Mozilla Firefox (Click Here)

Executing Long Running Tasks in Google App Engine – How to do it?

Most of the times a question flashes into the mind of the developers especially those who work on the Google Cloud Platform:

What if I am using Google App Engine Platform as a Service and will be having long running tasks that should run in the background for hours or maybe even days, is it possible?

Yes, it is possible. The answer is: use the “Task Queues”, one of the most laudable features provided by Google App Engine. But when hosted in the production, many types of unexpected problems arise with respect to long running tasks in task queues, which if not addressed, there may be a surprising behavior of the application in the production. Towards the end, we will be quickly discussing the different configurations required for respective application-specific requirements which are necessary for a long running task to run in the task queue.

Before going towards the discussion, let me quickly brief what is Google App Engine and what are Task Queues?

Google App Engine:

Google App Engine (most commonly referred as GAE) is a platform for building scalable web applications and mobile backends. It offers different features for web applications such as Automated Security Scanning for detecting web vulnerabilities, supports popular development tools such as Eclipse, IntelliJ, Maven, Git, Jenkins and PyCharm which makes developing on GAE developer friendly.

Moreover, features like User Authentication using Google Accounts, NoSQL Datastore, Memcache and Task Queues make GAE incomparable.

Therefore, it is most commonly preferred for developing web applications hosted on Google Cloud Platform.

GAE Task Queues:

Sometimes, there might be a scenario where a user takes a particular action on the web application and that task could be run outside of the user’s request which can be executed later.

For example, if a user wants to upload an “online” file to the web application, the user can provide just the link of the file to be uploaded and instead of waiting for the file to upload and prevent itself from performing other tasks on the application, user can return anytime later to check the progress of the upload. Here, the upload task is assigned to a task in task queue which runs asynchronously outside the user’s request and completes the task. Thus, the user can perform other tasks on the web application while the upload job will still be in progress in the background.

In this way, Task queues can help us to carry out important tasks that can be executed in the background.

Coming to the topic, let us proceed towards the discussion on how to run long running tasks in task queues and what configurations prevent the tasks to do so in production?

Let’s understand some very important information for achieving this:

Often times, the application behaves exactly as expected in the development server, but when on the production server there are chances that most of the features of the application does not work or does not yield as expected. This is because when we deploy the application on the cloud, we actually use the cloud resources and configurations that might be different from the development server. These resources and configurations can be configured by understanding the different cloud instances that are offered by the cloud service provider which are generally well described in their documentation along with the respective costs.

GAE offers two types of instance configurations, Frontend instances, and Backend Instances. As the names describe, the frontend instances are used to compute the operations that are carried out at the end-user level. The backend instances perform the computations in the background.

By default, when we first deploy our application to the GAE without editing the app-engine.XML (The application configuration file), the instance allocated is the most basic Frontend Instance. Beyond doubt, each instance is associated with respective prices.

As discussed above, scaling is the most promising feature of Google App Engine. Thereby, each instance can be configured with appropriate scaling. There are three types of scaling offered by the GAE, namely, Automatic Scaling, Basic Scaling and Manual Scaling. The configuration of scaling options can considerably affect the cost of running the application.

As the default instance is a Frontend instance, the default scaling is Automatic Scaling as per the documentation. This is where the concern for running long task in the task queue rises. How?

As per the official documentation, in Automatic Scaling, a task in a task queue can run maximum for 10 minutes. Thus, if there are tasks that can execute within the 10-minute deadline, this type of scaling would not create many problems. But we are talking about the long-running tasks that exceed the 10-minute deadline. So, how to make it work?

Indeed, automatic scaling would not help, we can switch to basic scaling or manual scaling. But while using Frontend instance, only automatic scaling is allowed. Therefore, it is also necessary to use Backend instance instead of Frontend instance.

Now, when used Backend instance, configure the app to use basic or manual scaling. For more information on scaling types and other information, please visit the official GAE documentation. (Link)

With the configuration of Backend instance and a Manual or Basic scaling, there are no restrictions for tasks to execute in 10 minutes deadline, instead, a task can run in the background until it completes its execution. However, using basic scaling would be preferred to control costs if there is no need to complex initializations and relying on state of instance’s memory over time.

Final Words:

While using different features of the Google App Engine, it must be noted that the behavior of the application is different on the development server and production server. Thus, before making a release, the application should be well tested for every feature on the Production Server.