Skip to main content

Posts

Book Review: Smart Brevity: The Power of Saying More with Less

Why Concise Communication Matters in the Digital Age Shrinking Attention Spans and the Need for Brevity Our attention spans are demonstrably shorter. Research suggests a decline from 12 seconds in 2000 to just 8 seconds today. Readers tend to skim, absorbing only a small portion (20-28%) of webpage content. The book "Smart Brevity" emphasizes the importance of getting to the point quickly in our fast-paced world. Key Takeaway: Capture attention early. The most crucial words are in your headlines, subject lines, and opening sentences. Research suggests 6 words are ideal for email subject lines for optimal mobile readability. The Power of BLUF (Bottom Line Up Front) The military concept of BLUF exemplifies the focus on brevity. Lengthy military memos have a concise summary at the beginning labeled "BLUF." This prioritizes clear, concise communication by putting the most critical information first. In time-sensitive situations, BLUF saves lives by avoiding confusion a...

New Year Message

Congrats & Good Luck 2020 Undoubtedly 2020 was a challenging year for most of us, and Congratulations on all those little things you still managed to accomplish last year. 2021 - New Year   Always remember, Today is the tomorrow you were worried about yesterday. So don't give up. Just keep fighting, be bold, do the right thing, and believe great things are bound to happen to you sooner or later. Accept what is, Let go of what was, Trust in what will be.  Happy New Year and this could be YOUR best year. Good luck.

General Hiring Strategy

Even while looking for members with specific technical skills, I generally look for these in any candidate:  1. Lots of people can raise issues and surface problems. But the best people identify the problem, propose a real solution to it, and help do the work to implement it. Those people are incredibly rare and incredibly valuable. Does this candidate look like one among them?   2. Generally, most companies don't need superstars. They need people who are curious and disciplined, and that can come from anywhere. Is this candidate curious enough? 3. Enterprise company: this is a great plan. Let's make sure we get these four other teams on board to get this done.  Startup: great plan! Is it live yet? What are the results?  Does this candidate have a startup mindset while approaching a task?   4. No one person leaving a good company kills it, but sometimes one person staying can. Similarly, the absence of a feature may not kill a good product, but the presence of a...

SQL Server Management Studio (SSMS) from Command Prompt

When using SQL Server Management Studio, I feel it's a pain and waste of time to choose the same SQL server instance, authentication details repeatedly. As a workaround, I use to make use of the "ssms" command. If SQL Authentication:  ssms -s MySQLServer2017ENT -d testbed -u demo -p demo here, -s:  Server details -d:  Database to connect -u:  username -p:  password For Windows Authentication: ssms -s MySQLServer2017ENT -d testbed But opening the command prompt and typing this each time doesn't make sense either. So created a batch file and placed it on the desktop that way, double-clicking the batch file is all one has to do. Mainly while working on my laptop, this comes in very handy. Content of the batch file: start ssms -s MySQLServer2017ENT -d testbed -u demo -p demo exit

Lessons learned over a period of time as an IT developer

Have listed down few Lessons learned on the field which I found useful over a period of time. 1: Always execute every line of your code After developing a feature one needs to obviously test it. Make sure every line of your code has been executed at least once. Many times see bugs on a certain line of code which had never been run by the developer. Kind of a condition within your code where the control never reaches during the normal flow. The code might look decent enough while reviewing, but unless you had made sure control comes to that part of your code and test it nothing is guaranteed to work. Sounds obvious, doesn't it? Think how many times you would have faced this scenario by having used some test data which never takes you to an "else" part of the code (or) "case" of a switch statement etc., 2: Logging, Error Handling to be part of the code from the very beginning. While developing a new feature/module/project add logging and error handlin...

Stack overflow is built using ASP.NET, C#, SQL Server, Windows, IIS...

Irrespective of what technology we work with how many times have we landed on Stack Overflow / Stack Exchange website on a daily basis? If we ask this to any developer the answer would mostly be MANY times in a day :) Site was launched in 2008 and is built using Windows, SQL Server, IIS, and ASP.NET along with HAProxy, Redis, and ElasticSearch, all served via Fastly CDN. Fun Facts: 1.3 Billion page views per month They transfer ~55 TB data per month 4 SQL Servers (organized as 2 clusters) Stack Overflow serves 528 Million queries per day (Peak 11000 queries per second) Stack Exchange, Careers, meta serves 496 million queries per day (Peak 12800 queries per second) Over 360 databases with the same schema, which changes frequently They made use of Microsoft Bizspark program before getting graduated All their production traffic is served using physical servers &  Cloud services are being used only for storing encrypted offsite backups (Glacier) and for DNS (Route53...

What is common between these apps?

What is common between these desktop applications/tools? Slack Wordpress GitHub Atom Editor GitHub desktop Microsoft Visual Studio Code Microsoft SQL Operations Studio All are built using Electron Framework   (Open Source) Electron framework lets us write cross-platform desktop applications using JavaScript, HTML, and CSS. It is based on Node.js and Chromium.  It allows us to (re)use web components - HTML, CSS and JavaScript in the creation of desktop applications.  Then it can be distributed across platforms - Windows, Mac OS X, or Linux.

Ten Quotes From Satya Nadella's Book "Hit Refresh" That Inspired Me

A few years back, Microsoft offered a free upgrade to Windows 10. That was an exciting move as their main competitor Apple was doing it for a long time now. As a consumer felt that Satya Nadella becoming CEO of Microsoft has brought in quite many changes, and started embracing open source, which was initially surprising. So for me, it was a no-brainer to pick his book "Hit Refresh" from the store immediately once it was released. The first half of the book was more interesting where he talked about his life in India, his kids, love for Cricket, and how he got more interested in Computers than Cricket over a period. Microsoft CEO Satya Nadella's Book One anecdote of how he was first interviewed at Microsoft was exciting. He was asked - "Imagine you see a baby lying in the street, and the baby is crying. What do you do?". - As a young engineer, he has answered the question exactly as I would have: "You call 911". - The interviewer'...

Make it WORK then Make it BETTER

Mostly this mantra is followed by most development teams (in particular startups) & it certainly makes sense as long as it gets understood completely. In my nearly two decades of experience, I have seen teams strive tirelessly to "Make it work" and deliver a minimum viable product. But are indirectly forced to skip the "Make it better" part due to lack of time/lousy estimation. Why?  Because once the minimal viable product is delivered, people start pulling resources out of that, start assigning the next module so that they can "Make it work". The assumption was we can work on refactoring the code tomorrow or the day after, which in reality never happens. Ultimately the development folks don't find time to "refactor" their initial code to "Make it better". "The problem with waiting until tomorrow is that when it finally arrives, it is called today." - Jim Rohn So what? It is already working anyway!  ...

SQL Server Always Encrypted - At a high level how does it works?

One of the excellent feature introduced in SQL Server 2016 is "Always Encrypted". This gives an extra layer of protection as no one (including the production DBA's) will be able to access the actual data without having the appropriate key. A high-level overview of how SQL Server 2016 Always Encrypted work: 1. Always Encrypted is a client-side encryption technology in which a SQL Server client driver (In our case, it would be ADO.NET) plays the key role. The driver encrypts the data which application sends as plaintext, and it then sends encrypted data to SQL Server. So, the data is encrypted on the fly as well as at rest. 2. Now when the application retrieves the encrypted data from the database the DRIVER transparently decrypts returning plaintext to the client app. Consequently, SQL Server never sees a sensitive information in plaintext. The keys, in fact, are managed entirely on the client side & the server doesn't have access to the keys either. 3. Th...

Quickly removing spam images from WhatsApp

One of the major issues with Whatsapp is in no time it produces numerous "spam images" which would eat up our smartphone's memory. Initially tackled it by exiting out of many groups and mostly used it for direct one-on-one conversations alone. It helped in cutting down on those useless images (memes, screenshots, quotes, images with good morning/evening messages etc.,) but it didn't completely solve the problem. Many of them were either close friends/relatives whom I don't want to block in Whatsapp but at the same time wanted a solution to quickly get rid of those spam images. After some analysis narrowed down on  Magic Cleaner App (Artificial Intelligence powered image recognition system) which seems to do the trick for me. This App does a decent job in identifying the spam images found the accuracy level to be around 75% - which is pretty good. It identifies and lists all images which it considers to be spam/duplicates. Review & if satisfied...

Universal Basic Income

"Universal Basic Income" - Heard about this only recently via an Elon Musk interview in November 2016 since then been reading about it. Understood it being discussed for many decades now and certainly not a new idea. What does it mean? A government would guarantee citizens a regular fixed sum of enough money to cover a basic standard of living, they can spend however they want, no questions asked. Majorly critics where saying something on this lines: 1. If we give money for free people will become more lazier 2. People would use it only for drinking / drugs / unhealthy things! etc., "Maybe 90 % of people will go smoke pot and play video games. But if 10 percent of the people go create new products and services and new wealth, that’s still a huge net win." - Sam Altman, President of Y Combinator, California Experiments: 1. Finland this week started it on a 2-year trial basis (2000 randomly picked unemployed citizens to get Euro 560 per month) ...

Is your SQL Server Database backup good enough? Can it save you during a disaster?

Met a DBA from a company who are in business for ~2 years. During the conversation came to know they have never tested their backup file - not even once. Also, they have very rarely used DBCC CheckDB command. Should I call it as surprised or shocked? It has become common to see Database Administrators to have fancy DB Backup plan, automate it and that's it. Their idea is whenever the need arises (read as disaster strikes) they can make use of it and restore the database. Although theoretically sounds like a good plan it actually isn't. Why? All those efforts to take regular backups would become completely useless if those files can't be used to recover the database. One important question missed by many companies to whom I have consulted for - "Do we regularly make sure that we are able to restore a database from our backups?". Despite backup process has succeeded how do we know it isn't corrupted (or) has some issues which don't allow it to be rest...

Positives of Cyclone Vardah - Unity, Humanity, Self-help

Chennai, Cyclone Vardah (Dec 12, 2016) - In person, have never witnessed anything as close to this in my life. The winds were so powerful it has uprooted close to 15 trees in our colony, the howling sound of the winds blowing was so scary which gives me goosebumps even thinking of it now. It was a complete carnage by "Vardah" on that day. Our colony had ~50 trees and out of which we lost 15 odd trees now. Minimum of 2 trees has fallen in each street. Colony compound wall has collapsed as one tree had fallen straight over it. Everywhere we were able to see only leaves, fallen branches, fallen trees, cut cables and not an inch of the actual road was clearly visible. Bad things do happen in the world, like war, natural disasters, disease. But out of those situations always arise stories of ordinary people doing extraordinary things - Daryn Kagan The positive side of it was from each street at least 2 members automatically volunteered and in no time we were a solid team ...

How I got billed even though I had registered as an AWS Free Tier user

Amazon AWS offers 12 months free tier to get started with their services. At a high level went through this link and created a free tier account to play around. Approximately after a month checked the Billing dashboard and was surprised to see that I am getting billed $0.81 for some usage under the heading "Elastic Cloud Compute" (EC2). Points mentioned about EC2 in AWS Free tier - 12 Months Introductory Period So I was mindful of those numbers mentioned there alone. But only after seeing the detailed bill understood that there are few items which are getting billed on an hourly basis even within Free Tier. Billing Dashboard: Billing Summary Billing Details Looks like NAT Gateway & Elastic IP address usage are charged even in Free Tier. $0.056 per GB Data Processed by NAT Gateways $0.056 per NAT Gateway Hour (I had used it for 6 hrs) $0.005 per Elastic IP address not attached to a running instance per hour on a pro rata basis (I had use...

From a Windows Machine - Connect (ssh) to Linux Instances running in a Private Amazon VPC

To start with the following tools need to be downloaded : 1. PuTTY 2. PuTTYGen 3. Pageant If you are a Windows user & trying to connect to (SSH into) an AWS EC2 instance then you need to use PuTTY. During the process of provisioning an EC2 instance, you would have created/downloaded a key pair file which would be in a .pem format. But PuTTY doesn't support the .pem format and it needs the key pair file to be in .ppk file format. That's where PuTTYGen comes into play. PuTTYGen helps in converting a .pem file into a .ppk file with a click of a button. Connecting to an EC2 instance in a public subnet: 1. Open PuTTyGen 2. Load >> Choose the .pem which you want to convert 2.1 [Optional] Provide a key passphrase & confirm passphrase. For simplicity sake, I skip it for now. 3. Click on "Save private key" 4. Open Putty 5. Enter the hostname / IP - For ex: ec2-user@35.154.74.77 6. Copy paste that into Saved Sessions textbox as well 7. ...

AWS fatal error: An error occurred (400) when calling the HeadObject operation: Bad Request

While using AWS and trying to copy a file from a S3 bucket to my EC2 instance ended up with this error message. Command Used: aws s3 cp s3://mybucketname/myfilename.html /var/www/html/ Error: fatal error: An error occurred (400) when calling the HeadObject operation: Bad Request The error goes off if we add the region information to the command statement. I am using Asia Pacific (Mumbai) so used ap-south-1 as the region name. Modified Command: aws s3 cp s3://mybucketname/myfilename.html /var/www/html/ --region ap-south-1

Is Auto Close Enabled in your SQL Server database?

In SQL Server, one of the Database Properties options is Auto Close . This is an option to be used (auto close = True) if our intention is to shut down cleanly and free the resources once the last user accessing that database exits. If after the last user exits we still want to keep the database alive without shutting down then set auto close as FALSE. But having this setting enabled in a Production environment will end up with performance issues majority of the times. Why? Because once the DB is closed all cached items (data / procedure cache, execution plans) will be flushed out as well. So it has to work from the scratch again when the next user connects in. How to know what is it set to? Option 1: Try this query which will return all databases in that server where Auto Close is set to TRUE. SELECT [name] AS [DatabaseName] FROM SYS.databases  WHERE is_auto_close_on = 1 --To change AUTO CLOSE option to FALSE USE [master] GO ALTER DATABASE [TEST]...

Creating & Executing SQL Queries in Visual Studio Code

Visual Studio Code is a modern, lightweight (but powerful) source code editor which runs on your desktop and is available for Windows, Mac, and Linux. A new extension has been announced which would support creating and executing SQL queries from within Visual Studio code editor. Setting up the environment: 1. Download and install Visual Studio code from here -  https://code.visualstudio.com/Download 2. Next you need to install the extension "mssql" on it. Refer the steps here in GitHub  or Microsoft Documentation As explained in the above link bare minimum these steps should have been completed: Installation of Visual studio code and mssql extension Creating the SQL Server Connection Profile Changing the language of the file to "SQL" Executing the query: 1. It's simple, just type the query you want and to execute it press "CTRL + SHIFT + e" 2. Results can also be saved as a .csv, .json file Sample output:

Enable thumbnail preview in Windows 10

By default "Always show icons, never thumbnails" option would be enabled in Windows 10. Just follow these two steps to change that setting. 1. Go to windows explorer and click on "Options" 2. Uncheck the "Always show icons, never thumbnails" option That's it just click on OK and you should be able to see the thumbnail of images.