learn
Build a Simple Timesheet App using Vue & Vuetify
· ☕ 21 min read
In this post we will see how to create a simple timesheet app using Vue and Vuetify. This is not quite a comprehensive tutorial on Vue or Vuetify, rather a demo of front-end features, see how easy it is to build an usable app, and in general, how modern app development makes the whole process enjoyable.

Create Simple Tooltips in Vue
· ☕ 3 min read
Tooltips are omnipresent, or rather have to be. While there have been excellent standardisation of user experience since we saw what Bootstrap was capable of, there are days and applications that can throw off users with strange icons, buttons and navigation. Ergo, tooltips. The humble tooltip can provide helpful hints, short messages and guide user on what a particular button, text box or any other element will do before clicking the thingy and causing destruction of a planet.

Find user's country without Geolocation and IP Lookup
· ☕ 2 min read
I have this nagging problem of determining an end user’s country/region in my web apps. The reasons for doing that are many - Automatic conversion of an event date/time Display regional news Show prices in user’s currency .. and so on We could do two things to determine a user’s region -

Multiple Ways to Define Functions in Javascript
· ☕ 3 min read
We have looked at functions quite a bit on this blog over the last two years. We have seen many avatars of a function including a function object, a function’s method, function of functions, and so on. But, what we have not done is to document all the ways in which we can define functions.

Using Nullish Coalescing Operator
· ☕ 6 min read
ES2020 introduced nullish coalescing operator. We will see just how and where can you find use for it? What it is? Nullish coalescing operator (??) is introduced in the newest Javascript specification. It’s primary design goal is quite simple - provide a way to check for nulls to return true or false values from an expression.

Javascript - A Beginner Guide
· ☕ 30 min read
Here’s a good guide to get you started on Javascript in a practical way. Why another guide? Practical - don’t learn for the sake of learning, learn for the sake of doing! Tactical - learn what matters, fast (yes, that’s what everyone says) Strategic - see the big picture This guide will get you started from the beginning, graduate you to using industry standard tools, and point you towards the right direction for learning even more than what can be offered in one guide or course.

A quick start on ASP.NET Core Razor Pages
· ☕ 8 min read
Here’s a quick introduction to Razor pages in ASP.NET core, and an opinionated way to quickly start building applications using Razor pages. And yes, there is a case for using Razor pages even in 2020. So.. ASP.net? Yes, indeed. I have had a love-hate relationship with ASP.NET through years. I am way less productive using ASP.

Reusable debounce function for Vue
· ☕ 5 min read
Debounce operations in Vue using this 10 line script. Avoid loadash and friends. What is debounce? Delay and throttle operations to wait and collect user input before doing something with the input. The “something” can be updating another field, doing an API call, or starting a timer to self-destruct. Did you not debounce earlier?

Centralized alert for Vuetify
· ☕ 4 min read
Centralize all error, warning and info alerts in one place. I like v-alert and tend to over-use it. It enables us to show detailed notifications (error or otherwise) - without significantly causing user inconvenience. I find v-alert more suitable in my apps than using, say, popup alerts that interrupt users, or “toast” notifications which I find unsuitable for detailed messages.

Asserts are not just for testing
· ☕ 2 min read
Assert is a general-purpose validator and should not be used in the context of testing alone. An assert in Javascript simply checks for truthy values and produces an error otherwise. We use it quite a bit in automated testing when checking for correctness of output for pre-defined inputs. We use asserts like so -

Three quick ways to convert objects to arrays
· ☕ 2 min read
Easily convert objects to arrays and iterate to your heart’s content. There are multiple ways of converting an object to an array (which, also is an object but a different one at that.) Method 1: A simple Object.values() method The first idea that comes to mind is to just use Object.

A Different IIFE Syntax
· ☕ 1 min read
Here’s a different syntax for our favourite IIFE’s. Immediately invoked function expressions enable us to write functions without using “functions”. Well - just kidding. They are functions but with a different syntax. A typical IIFE looks like this - 1 2 3 4 5 6 7 8 9 10 11 const x = 1, y = 9; var sum = 0; (function() { sum = x + y; console.

Conditionally copy props to new object in Javascript
· ☕ 2 min read
Here’s a shorter, readable way to copy props from one object to another subject to defined conditions. The shortest way to copy object (when you don’t quite care about copying sub objects by reference) - 1 2 3 4 5 const planet = { name: "earth", position: 3 }; const newPlanet = { .