A “Brave” new browser (?)

While watching the recently concluded 2019 cricket world cup, I saw some ads for Alluva, which calls itself a prediction platform. I am not sure how it works, but that’s not the point of this article. I signed up to Alluva and it had me create an account on MetaMask, to receive the Alluva tokens. There on MetaMask site, it was strongly encouraging using a new browser called Brave.

Get Brave!

The browser in itself if based on Chromium project and they state that they have “taken almost all of Google from the Chrome.”

I was intrigued. I am not the one to shy away from testing out new technologies. So I decided to take it for a spin. I downloaded it and took it for a spin. The first few sites all worked fine as the browser’s core code base is Chrome itself. But the moment I tried to connect to my corporate sites, it started acting up. I faced two main issues while browsing:

  1. For any SSO enabled site, it started asking for username and password instead of taking the authentication from the kerberos ticket.
  2. For any SAML federation redirects, the redirects just failed and the site failed to work.

These issues were a deal breaker for me. For all the technology evangelism I just can’t see myself using two browsers for my needs. I needed to have one browser. I was about to give up and go back to tried and tested Firefox. But I refused to give up. I asked myself, if Chrome works, then why not Brave? What is different in Brave that is causing the issue. I found the answer in one of the feature request on GitHub and a Brave Community post. Looks like when the browser code was compiled the developers disabled a couple of flags that are needed for SSO integration with kerberos and SAML redirects.

  • –auth-server-whitelist
  • –auth-negotiate-delegate-whitelist

When I tried to run the browser by running from command line and passing correct arguments for these parameters, everything worked fine. But again it is not very easy to always run it from the command line and all your settings are lost. So I was looking for an answer to make the process automatic and repeatable. I searched a lot of forums and help sites and I found the answer on superuser.com. This gives a step by step explanation of how to configure command line parameters for any application.

I tried both methods, and finally settled on the second method as the best method.

I created a small application using MacOS automator. It worked well. But I always had to launch the application from wherever I had saved it. Launching it from the Dock instead of from the actual location even after pinning it to the Dock defaulted to the original application launcher. The second method modifies the application bundle so it is a little risky but with enough due diligence and case, you can do it.

You can download the brave browser by clicking here.

How to setup use NexxHome garage door opener with Google Home

After a lot of discussions and false starts, we finally took the plunge in making our home a smart home starting with smart speakers and thermostats. After we moved into our own home, we were always kind of worried about the garage door and once or twice we have left it open only for our neighbors to call us and alert us about it.

We were not sure about how to handle it when a couple of our friends told us about the smart garage door openers that operate over WiFi and are accessible over the internet from anywhere. We did some research and based on the reviews and feedback from our friends, we decided to go for the NexxHome smart garage door opener. Based on the information provided on the product page on Amazon and on the NexxHome website, the device works with Alexa as well as Google Home. While I was able to find a lot of sites that showed how it works with Alexa, I was not able to find any tutorials on how to link and enable NexxHome with Google Home. The device doesn’t even come up on Google Home App when I try to add a device.

I was disappointed and stumped. But then, I found this document on the NexxHome support page that kind of gave me a direction to pursue.

Integrating NexxHome with Google Home is not very straight forward. There is a roundabout way of doing it. Before linking Nexxhome with Google Home, the Nexxhome App needs to be prepped up a little bit.

  1. Open your NexxHome App and tap on Setting (gear icon)
  2. In the next screen, tap on “Works With” menu and enable Google Assistant
  3. Once that is done, open your Google Home App and click on the user icon
  4. Tap on Explore and in the search window, type Nexx Home and select on the Nexx Home result
  5. In the next window, click on Link to link your NexxHome with Google assistant and enter your NexxHome credentials to login when prompted.
  6. Once you login, the Nexx will be linked and it will show Try it button to try the commands.

That’s it. This successfully links NexxHome with your Google Home and Google assistant.

Note: Although it links successfully, the linkage is not very reliable and you may not get the desired results every time. However, for me, it has worked as expected 8 out of 10 times. Hope this helps others as well.

Troubleshooting and fixing 404 errors on a self hosted WordPress

After hosting my website on Plone and attempting to host it on plain HTML5 I decided that time has come for me to use a CMS. As I wrote in the Hello World post (i.e. the first post) I chose to use WordPress. I installed it and as my work and life made me busier and busier, I kind of ignored. It is very apparent from the irregularity of the posts and blank periods in the posting.

Anyhow, the point is that I didn’t realize that the permalinks, categories and tags were not working. When I clicked on a particular post or tags or categories, it showed me a 404 error. So essentially I had a broken site on my hands. And here I was wondering why my site was not coming up in searches and why I was not getting any traffic. SEO helps Google to crawl and index the website most effectively when permalinks, tags and categories are setup correctly.

Apparently, it is a very common error in WordPress with a very straight forward solution. A simple google search most likely leads you to the right solution. My objective is not to add to the burgeoning posts of “How to fix 404 errors on WordPress”. The objective of this how-to is to address one edge case that will occur when you are trying to host WordPress on your own server/computer.

I followed a lot of posts and almost all of them told me the same thing.

  • Re-save the permalink settings and
  • Ensure you have the .htaccess in your WordPress directory (some of them don’t tell that you should have it in the WordPress directory though).

I was at my wits end on what to do to solve the problem. I was about to give up and try and reinstall WordPress when I came across this site and the how-to. That how-to does address the edge case of people like me who like to run their own web servers instead of buying managed hosting. In fact, I am running my site in containers. In fact re-installing WordPress would have added work and would have broken my site. Thankfully I stayed away from it.

The rewrite module of Apache is not automatically enabled. This was the “A-HA” moment for me. I checked out the modules that were loaded by running sudo apachectl -L and sure enough there was no rewrite module enabled there. I double checked that I had the rewrite module binary in the mods-available directory in my Apache distribution.

At this point, I was ready to enable the module by running sudo a2enmod rewrite and sudo service apache2 restart on my server and enable the module. After that, I was able to reset the permalinks to whatever I wanted it to be. This fix also worked tags and categories.

I hope this helps whoever is facing this issue.

I am not an ideal man

I am a man. Period. With all the fallibilities and weaknesses that accompany a man, I exist. I do not claim to be the perfect or ideal man. In the entire history of human kind, there has been only one perfect / ideal man – the supreme being if you will and that was Prabhu Sri Ramachandra.

And even he was unable to make everyone happy all the time and be ideal all the time. When he was an ideal son, he was not an ideal brother or ideal husband. When he was an ideal husband, he was not an ideal ruler… and so on.

I have never claimed to being perfect or ideal, but I do claim is that I am a good man and my heart is in the right place. Even if I am unable to convey my feelings and thoughts clearly at times, I never have bad intentions for anyone. Ever.

I have tried to be a good husband, a good father, a good son, a good son-in-law, a good brother and a good friend. But recently I have realized that I have failed miserably in everything. Possibly because, I have confused myself with the definition of good and ideal. It is OK to feel sad, angry and let down. It is also OK to not meet expectations every time as long as you are clear and upfront about it as to why you are doing what you are doing.

I always felt that I cannot let anyone down and I have to ensure that I meet everyone’s expectations else, I will lose my reputation and ruin my relation with whoever had the expectation. No. That’s not right. If the relation is so weak so as to break / ruin based on one transgression, then it was not a real and strong bond in the first place. I also know that all the interactions need to be transactional, but also realize that it is not possible for people to not remember earlier transgressions and treat every interaction as independent. But I think there is a limit to how long these things will be stretched and a person reminded of past errors.

As a man with fallibility, I am bound to make mistakes – To err is human – but it is also equally true that to forgive is divine – In forgiveness, both sought and given is where we find true peace and love.

Offside, Scott Adams

I subscribe to a lot of comics to be delivered in my mailbox (14 to be exact). They provide a welcome distraction from the sameness of my day and help me lighten up. The Dilbert strip from Monday 18th 2019 was in extremely poor taste and made me wince.

Dilbert Comic (c) Scott Adams

Even in jest, it targets a characteristic that is protected. Although, what Mr. Adams has portrayed might reflect reality, it might also justify this in some peoples’ minds that it is OK to joke about peoples’ ages as long as you are not serious.

As a part of my corporate training, I have undergone a lot of managerial trainings that has sensitized me in how things can be interpreted in a way that may not have been intended. I can see this thing happening in an office and some young worker get into trouble over this which is completely avoidable.

I urge young people to not joke about this and would expect Mr. Adams to remove this cartoon and not repeat that again.

Slyly yours, Netflix

Dear Netflix,

Did you really think that you could increase your revenue by surreptitiously increasing the subscription price by upgrading the plan without my permission (and several hundred thousands others) to premium.


Well, now the rant is out of the way, I think I can get down to business.

This all started a couple of days ago, when I got an email from Netflix on Apr 21 telling me that my plan price was going to increase to $10.99 from $9.99 and the updated pricing is part of Netflix’s commitment to improve Netflix. Ok. So far so good. I understand the prices are going up and I am willing to pay more for better service and I didn’t think twice about it.

A week later on April 29th, I received another email from Netflix telling me that they have updated my plan to premium allegedly as “I had asked” and the price had gone up to $13.99. I don’t remember asking or even logging in to Netflix account to update / upgrade my plan so where did this come from? I promptly went to the account settings and reverted the plan to standard which is 2 screens at a time with HD content as opposed to 4 screens at a time with HD and Ultra HD content. I don’t even own a TV that support U-HD content. Why will I use that service?

In perfect honesty, my family and I don’t even get to watch Netflix twice a week. What would make us upgrade to 4 screens and Ultra-HD content? This doesn’t seem right and honest behaviour to me. And now I am stuck with a service I don’t want to use and will not use till the next billing cycle.

I would still like to see where I have requested this change to the account plan.

Netflix, are you listening?

Uncivilized people in civilized country

I was traveling on the local train today for a meeting. As it happened, the meeting was at 9 am and I had to take the train in full rush hour. There was barely enough space to stand. But we all commuters being civilized squeezed in and managed the space.

I was in a conference call at that time and once I finished I was checking my email as I was going for an important meeting and was expecting some updates that would help me in the meeting. Accidentally my phone was touching my neighbor, a black guy who was busy in his own world.

I don’t know what ticked him, but he suddenly said,”Your phone is poking me again and again. If it pokes again, I will grab it and throw it away.” I mean, what was this reaction for? He could have simply said that my phone was poking him and I should take care. Being over crowded, I could not realize that my phone was touching him. I also retorted, “You can try…” and he simply looked away.

Where has the politeness and simple common sense of people gone? I can’t understand why he was being so rude to me. Well, if he had said it twice, thrice and I still didn’t pay attention, then maybe it would have been justified. But just once?

Could it be because I am a brown man in a black and white country? I don’t know.

Husband’s mother, wife’s father…

This is a relationship conundrum which I think most of the married folks out there can relate with. When I got engaged with my wife and I looked around and saw my friends’ behaviors as well, I realized that regardless of the situation at the home, in the relationship between a husband and wife, the husband’s mother and the wife’s father is the dominant personality. Whether the person’s personality is strong / dominant or not in reality, but the perception in a marriage is always the same. I always used to think, why is it always like this only.

I have been thinking about this for the past 15-16 years and suddenly I had a sort of epiphany and things suddenly got very clear. No matter how much a person loves his or her sweetheart, this conflict or situation if not a conflict will always arise in the relationship. According to me, there’s a simple reason for this. For every boy, his mother is his role model for a woman and for every girl, her father is her role model for a man. Subconsciously we are all comparing whoever we interact with, with our role models. For every action a partner in a relationship takes, it is instantaneously and perhaps sub-consciously compared with the person’s role model. “How my mother would have done this?” or “How my father used to do this?” While this is unfair for the person being compared, the stark reality of the situation is that it exists and there is no running away from it.

Do I know how to resolve the situation? Absolutely not. I do not claim to have an answer to this conundrum. My aim was to merely share the epiphany that I had and hope that it helps someone. We cannot hope to change the subconscious mind of a person, but the best that we can do is probably understand the person’s perspective a little bit and in that process make the relationship more enjoyable and fulfilling.

।।तथास्तु।।

Rock, Paper, Scissors… in Python

For a long, long time, I have been an enthusiast of Python programming language. I am embarrassed to say that I have been trying to learn it fully for the past 10 or so years. In this much time with proper focus and dedication, I would have been a guru. But here I am, still a novice. But that’s beside the point.

Now that summer vacation is here, I have decided to teach my kids Python programming as much as I know. I want to show them the path and take them with me as far as I can go and then I hope they will go further from there. While Some time ago (maybe a couple of years ago) I had given myself a challenge to create a program that I had no source or coaching. So I had decided to create a game in Python. I chose the simple game of Rock, Paper, Scissors.  Over time, I changed computers and somehow I lost the source code of the program.

When my daughter started learning, she reminded me of the program and wanted to play the game. So I got started to write the program again. I’m happy to report that I have successfully re-written program. I’m sure there is a lot of scope of improvement in the coding style, code, and overall structure. But I am just starting and hope to improve. I’m posting the source code of my program and I will welcome all constructive criticism of the code and suggestions for improvement.

# An all-time favorite game of Rock Paper Scissors.
# An all-time favorite game of Rock Paper Scissors.
# Programmer: Mukul Dharwadkar
# Date: June 27 2017

import random

def instructions():
"""Displays the game instructions"""
print \ """ Today we will play the perennial favorite game of... Rock! Paper!! Scissors!!!.
The objective of the game is to outthink your opponent (in this case me) and defeat.
The rules are very simple
1.Paper covers the Rock
2.Rock breaks the Scissors
3.Scissors cut the Paper
Choose your move from the following:
1. Paper (p)
2. Rock (r)
3. Scissors (s)
Are you ready? Alright then, let's play... """

def get_name():
"""Get player's name"""
print \
"""First of all, let's get to know each other a little better.
My name is Compy...
What's yours?
"""
player_name = raw_input("What is your name: ")
return player_name

def greet_player(name):
"""Let's be polite and greet each other properly"""
print "How are are you doing %s?" % name

def legal_moves():
"""Define the legal moves"""
legal_moves = ("r", "p", "s")
return legal_moves

def player_move():
"""Players choose their move"""
move = None
while move not in moves:
move = raw_input("What is your move %s? --> " % name)
return move

def computer_move():
"""The computer will choose its move in this function"""
move = random.choice(moves)
print "Computer's move is %s" % move
return move

def compare_moves(p_move, c_move):
"""We will now compare the moves the human and computer make and then take the output to declare the winner"""
#This is a very crude way of writing this comparison code. Is there a better way to do this?
#TODO: Find out optimized way of writing this block of code.
if p_move == "r" and c_move == "p":
return "computer"
elif p_move == "r" and c_move == "s":
return "human"
elif p_move == "p" and c_move == "s":
return "computer"
elif p_move == "p" and c_move == "r":
return "human"
elif p_move == "s" and c_move == "r":
return "computer"
elif p_move == "s" and c_move == "p":
return "human"

def declare_winner(winner):

if winner == "human":
print "%s wins. Congratulations and well played!!!" % name
elif winner == "computer":
print "Computer wins. Better luck next time %s." % name
else: print "It's a tie"

#main body of the program
instructions()
name = get_name()
moves = legal_moves()
greet_player(name)
p_move = player_move()
c_move = computer_move()
winner = compare_moves(p_move, c_move)
declare_winner(winner)

Note: The indentation of the code is lost.
To do: Create a GUI interface for the program if I can.

Running WordPress site in distinct containers

I have been running my site on Plone for a long time, but the maintenance required was too high and I ran into several issues with bloated data file, unsupported plugins to name a few. Plus the instance was not very portable in case my server died or I had to move.

Then I was thinking about creating my own content management system, but time was a factor and the I thought I was losing my focus. What do I really want to do? Publish my thoughts, or develop something new. Actually it is both, but I don’t want it to become dependent on each other. So I decided to use prebuilt software. I very quickly evaluated Drupal, WordPress, Movable Type and decided that WordPress looks to be the best at this time. More on the evaluation later.

Second challenge was to make it completely portable by using containers and not just VMs.

To be continued…