Having a newline character at end of file

Background/problem/question: When you create a newfile, and push it to Github, in code diff view, it will say no newline at end of file. Sometimes text editors would also add an EOF newline, if they noticed that the file being edited does not end in a newline, when they are saved (usually it is configured … Continued

Use different conditions to test methods

Let’s say that you have a function that takes an HTML <ul> structure and check items. For simplicity, our method would check if each item in the list has a link pointing to type of resource (A). So here can write a test that takes a list with items containing resourceĀ A links. Here we expect … Continued

Don&#8217;t commit the first thing that works

I was working on a bug fix on our application with another fellow programmer. First we understood the root cause of the bug and what makes it to happen. All that was good. Then we thought of a solution and applied the first fix that I thought. Code works and bug is fixed, happy days. … Continued

Getting BrowserStack to work with local machine URLs

By default BrowserStack does not have functionality to work with your local machine code. To get this working you have to install BrowserStack local extension.Therefore follow below steps to get it working. Step-by-step guide Make sure you have an account or BrowserStack access. Login to site. When you access, you will see install additional features … Continued

Jasmine Best Practices

The file name should be Matching for the top level test suite name. There should be one top level test suite per file. Give a meaningful name or title for the test suite. Either use var or this to define variables that needs to use across tests. var variables should be placed just below the … Continued

Fix Sublime Text auto-complete hiding issue

Hello Sublime Text lovers out there: you might be using auto-save package [https://packagecontrol.io/packages/auto-save] as a plugin. But there is an irritating bug with it that causes auto-complete popup to hide when auto-save is invoked. While this is not officially fixed in the package, there is a patch (workaround) that will resolve this issue. Please see … Continued

What makes a software product great?

Before talking about software, lets talk about cars. Why do I want to talk about cars is to take great car design as an analogy to great software design. What comes to your head when you hear BMW or Mercedes-Benz? The standard quality of these vehicles. They ordered by most important first are to be; … Continued

Why your photos not deleted when you delete a user in Laravel

Ok so you have a relationship mentioned in your eloquent user model to link the photo model relationship. So in your user model class you might have something like below to define the relationship.

In your Photo class you might have put some code for deleting event to delete the photo files.

Ok … Continued

Sonder WordPress Theme

I wanted to develop a minimalist type of a WordPress theme and use on my personal website. The source code is available under Git if you are interested in using it. View Source