Sign in

Mohit Khare
Product Engineer @ gojek | http://mohitkhare.com/about
Add Dark mode to websites — mohitkhare.com

I am a huge fan of dark mode — from editors, terminals to websites, I have most of stuff customized for dark mode. Now most of the website and apps support a dark mode.

Dark Mode is ❤️️

One of the typical case is using your mobile and laptops at night and you don’t want lights on — relatable? Yeah, It is such a pain to use light mode in low light scenarios. Now you want to add it to your personal website and side projects too right? Let’s learn how to do that!

Using Media Queries

A new media query prefers-color-scheme is…


Last year as I kicked off my career entering the professional tech world, I came across the concept of Objective, Key, and Results (OKRs) at work. I was quite intrigued by the whole concept of OKRs.

In very layman terms -

Main objective of OKR is to plan out qualitative goals with quantitative results for those with proper time tracking.

People do use diary or todo apps for tracking there work. Todo apps usually work for tracking tasks over a shorter duration. You need a framework to plan out for your bigger goal and track your progress towards it.

In…


No matter who you are or what you do for a living, you make numerous minor decisions every day. They can be as simple as choosing which exercise to do this morning or as complex as making executive decisions for your company.

I have been researching a lot of decision making lately while building Taski , finally decided to share some of the learnings.

What is a decision?

A choice that you make about something after thinking about several possibilities. — Cambridge English

A Decision is nothing but a choice made after considering multiple factors, which vary widely from person to person. …


Have you come across acronyms and got confused about what they mean. Wait! Do you know what these abbreviations mean?

If Yes, very well. You’re super cool 😛

If No, then you’re facing the problem exactly what I faced!

In any case, you are missing out on many acronyms. No worries, Acrons is here for you.

Problem

The terms above are some of the commonly used acronyms these days. People use it all the time, whether on Instagram, Facebook, or Twitter. I used to search about them almost every time except the ones I was aware of (like ASAP).

This grew…


https://mohitkhare.me/blog/go-with-redis/

If you are aware of both Golang and Redis — you’ll know they both are fast⚡️and easy to learn ✅. Well, Redis is written in C — it is built to be fast right 😉. Who doesn’t want to make their app fast? Let’s dive in to learn using Redis with Golang.

Intro to Redis

In case you are not aware about Redis, Let me introduce by stating official explanation which is quite self-explanatory -

Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. …


https://mohitkhare.me/blog/reading-101/

Reading is one of the key to success. I can’t emphasise how important it is to keep reading whether it is books, articles or blogs.

To be honest, I was not a big fan of reading books like a year back, I just read 2–3 books that too not completing them. I read a lot of articles/blogs though. In my free time, I usually kept scrolling through medium, reddit, linkedin and hackernews. But, in the past 6 months, with inspiration from many folks on Twitter, I started reading books and have completed around 10 books. …


When you start working on a application, there are always some point of failures which can occur, a good programmer has to deal with handling with such unexpected situations in one or the other way.

Recently while working on microservices, I learnt how to handle errors in a way which is easy to understand and covers all edge cases.( well, not all but most 😛)

Simple Hack —

This is basically just printing out errors using —

errors.New("some error")

This is not the way you want to go about handling errors all over your service, since there is no structure…


In most of the applications/MVP you generally start the implementation with a login/signup feature. With some DB interactions this is quite easy.

But, you don’t want to make user login again and again whenever he opens a new page on your site. You must have noticed on sites like Facebook, Gmail, Twitter — you don’t have to do a login again, rather you are somehow authenticated and you can see the desired home page.

This automatic authentication which persists all over the site is done with the help of cookies and sessions. Let’s understand them one by one.

What are cookies?

Cookies are…


There has been a lot of buzz about Vue.js recently. I started of with some basics.Today I’ll talk about how to dynamically show and hide DOM components based on some conditions.

If you are not aware of Vue.js, I’ll highly recommend you to get started with this awesome javascript framework (mostly used for frontend). It has best of both Angular and React.

In this post, I’ll be covering some of the conditional basics using v-if,v-else,v-if-else.

I’ll recommend to try this out practically so that you just don’t read and forget, rather remember the basics.

Open your favorite editor and create…


The Problem —

I had to download some files in the background every day on my Golang server. So, let’s break this problem into two parts —

  1. Run tasks periodically.
  2. Run tasks in the background.

Run tasks periodically —

If you are aware of background tasks, you must have come across/used Linux Cronjob sometime.

But wait, What is Cron?

Cron allows Linux and Unix users to run commands or scripts at a given date and time. You can schedule scripts to be executed periodically. Easy! No? Just a simple Linux command.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store