Being a privileged website
Oct 17, 2022·3 min read
We all know that not everyone in this world is having equal privileges. I have spent quite a lot of time fixing IE bugs in my early stage of…
Oct 17, 2022·3 min read
We all know that not everyone in this world is having equal privileges. I have spent quite a lot of time fixing IE bugs in my early stage of…
Oct 2, 2022·1 min read
With ever growing tech debts in any software products, sometimes we are overwhelmed with the number of backlog items. let's say we have a email validation in website during sign-up. we might want to do uniqueness and email format and max length of email according the RFC standard. we can only prevent case one by invoking backend. but we can prevent user inputting case two and three with plain javascript code. even if we forgot to add length validation, we will validate the email ownership by sending a mail to the inputted email. at worst case we will send invite link to invalid mail. according to wikipedia,
the ostrich algorithm is a strategy of ignoring potential problems on the basis that they may be exceedingly rare. It is named after the ostrich effect which is defined as "to stick one's head in the sand and pretend there is no problem". It is used when it is more cost-effective to allow the problem to occur than to attempt its prevention.
we can very well ignore the length validation since, anyways it will be validated in some other means. although email address RFC standard most likely won't change, maintaining the RFC standard based validation in our code is still and overhead. we can be ostrich in this case and pretend there is no problem.
Sep 15, 2022·1 min read
Cmd + shift + p -> configure user snippets -> new global snippets -> paste the following snippet -> save -> and type currenttime
{
"current time": {
"prefix": "currenttime",
"body": [
"$CURRENT_YEAR-$CURRENT_MONTH-${CURRENT_DATE}T$CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND.000Z"
],
"description": "Insert current time"
}
}Supported snippet variables can be found here. More about vs code snippets.
Sep 11, 2022·4 min read
Setting up a custom domain for our github pages has lot of benefits but at the same time it requires lot of patience. This article aims to…
Feb 5, 2021·1 min read
We can configure aliases very easily in bash or zsh. but those aliases are global to all directory. sometimes we need aliases or commands…
Nov 20, 2020·3 min read
I was reading a book called Outliers . that made me retrospect my life and the role of luck in my life. There are a lot of factors for one's…
Nov 8, 2020·1 min read
Remembering the branches and all the available commands are daunting work in git. what if the commands auto-completes itself like shown in…
May 3, 2020·3 min read
I've been trying to write a documentation page for my project (An android app to control your VLC media player) for a very long time. I…
Apr 22, 2020·3 min read
Some of us might have come across very crazy ideas throughout our programming career. when I started my programming career, I didn't know…
Feb 25, 2020·1 min read
Assume that we need to join two tables based on some condition. For example, Both queries do the same. we are saving 3 words in the first…