A couple of weeks back during my weekend morning walk to the neighbourhood park, like most people, I had put on my headphones. I was walking, lost in my favorite playlist, when someone tapped on my shoulder and asked me a question that why people of my age have headphones plugged into their ears. I candidly answered, Because it is boring. Continue reading “Allow Yourself To Be Bored — Part 1”
Author: shekhargulati
Issue 1: 10 Reads A weekly newsletter on Software Development that will make you think
Hello Everyone, Welcome to the first issue of 10 Reads, a free hand-crafted weekly newsletter on software development, programming, and technology. Each week I will share 10 articles that open your mind and give some food for thought. This newsletter is not about all cool Github projects or how to tutorials. I will be sharing posts that make you think and help you become better software engineer. The number of articles is limited to 10 so that you are not bombarded with excessive content. I will also specify the time that it took me to read the article so that you have some real estimate on how much time it will take to go over the content. Total time to read all the content in this newsletter is 95 minutes. Continue reading “Issue 1: 10 Reads A weekly newsletter on Software Development that will make you think”
Always Be Reading
I became a software engineer by chance. I was offered a job by a software organization during my campus interviews. I took it. And I became a software engineer.
Because I had pursued bachelors in Mechanical engineering, there was little learned about computer science in four years of my undergraduate course. My only interaction with it was during the first semester, where one of the subjects was C programming language. As far as I remember I enjoyed programming a lot. After entering the job, it took me a couple of years to figure out how I can succeed in the professional world. I realized that my magic formula to do good in professional and personal life is Always Be Reading.
In this post, I will share my thoughts on having a beginner mindset and continuously improve yourself to live a meaningful and fulfilling life.
Continue reading “Always Be Reading”
Single sign-on in Spring Boot applications with Spring Security OAuth
This week I had to dig deeper into the world of Single sign-on. I learnt a lot of things about it from basic conceptual knowledge to how to setup your own Single sign-on server with Spring Boot. In this post, I will share my learnings with you. In case something is not clear please leave a comment and I will address it.
Continue reading “Single sign-on in Spring Boot applications with Spring Security OAuth”
5 Reasons I Should Wake Up Early
Last three years, one of my new year resolution is to start waking up early. And on each of the occasion, it only lasted few days. I have tried multiple times to wake up early in my life but each time I have failed miserably. I used to take pride in night outs — working the whole night hacking away stuff. Since, last three years I have become self-aware that staying up late in night and waking up late in the morning is not effective. It end up costing you more. So, in this blog I am writing 5 reasons I should wake up early. These are the reasons that resonates with me. Continue reading “5 Reasons I Should Wake Up Early”
Dynamically Loading CSS in Angular 5 application
Today, I was trying to figure out how to dynamically load CSS in an Angular 5 application and found out a workable solution. In this short post, I will show you how I managed to do that.
Continue reading “Dynamically Loading CSS in Angular 5 application”
Using wait-for-it with Oracle database docker image
Today, I was working with an application that uses Oracle as the database. We decided dockerize the application to make it easy for fellow developers to work with the beast. We found a working Oracle docker image by sath89. Oracle 12c Docker image is close to 5.7GB on disk so we are not talking about lightweight containers here :). Once image was dowloaded, running image was as easy as running the following command.
Continue reading “Using wait-for-it with Oracle database docker image”
Programmatically Generating Database Schema with Hibernate 5
Today, I was working with a code base that was using Hibernate‘s schema generation facilities to create the database schema for a customer on the fly. The application creates separate database schema for each customer. Then, depending on the client specific identifier it connects to the correct database. This blog will not talk about how you should design your application with multi tenant database. I will cover that in a future post. In this post, I will share the code snippet that helped me generate database schema with Hibernate 5. In this post, I am using MySQL database as an example. The same code snippet should also work with other RDBMS as well.
Continue reading “Programmatically Generating Database Schema with Hibernate 5”
What does Being A Traveller mean to me
Since last two years, I have started travelling in a meaningful way. For me travel is not about visiting all the places mentioned in a checklist or going by a fixed plan or doing adventurous sports because it is cool or taking a lot of selfies. I like my travel to be meaningful and enriching experience for both my body and soul. I like to sit in a local cafe, drink a cup of tea, and read a book. Travel to me is long walks around the unknown roads of the city. Travel gives me the opportunity to see the world with a fresh perspective. You learn a lot about city by talking to local shopkeepers and taxi drivers. Continue reading “What does Being A Traveller mean to me”
Adding copy to clipboard functionality in Angular application
Today, I had to work on an application that required copy to clipboard functionality. Below is a step by step tutorial that will help you add copy to clipboard functionality. The reason I had to implement copy to clipboard functionality is that with dnd-list copy feature gets broken so I needed a way to give user a copy functionality.
Angular version being used in Angular 5.
Step 1: Create Angular application
$ ng new myapp
Step 2: Install ngx-clipboard and ng2-toastr
$ npm install --save ng2-toastr ngx-clipboard
Step 3: Configure modules
In the app.module.ts, add ClipboardModule and ToastModule
import { ToastModule } from 'ng2-toastr/ng2-toastr';
import { ClipboardModule } from 'ngx-clipboard';
@NgModule({
imports: [
BrowserAnimationsModule,
ToastModule.forRoot(),
ClipboardModule
],
declarations: [
AppComponent
],
bootstrap: [AppComponent]
})
export class AppModule { }
Step 4: Add ngx-clipboard directive
Update app.component.html
<div class="col-11 p-2 lh-condensed">
<h6 class="font-weight-bold">
{{task.title}}
<div class="float-right">
<i class="ft-chevron-down"></i>
<div class="dropdown-menu">
Copy
Edit
Delete
</div>
</div>
</h6>
</div>
Update app.component.html
copyToClipboard() {
this.toastr.success('Copied to clipboard', 'Success!');
}