Pretty much every one of us would be using Gmail, and I’m going to share some Gmail productivity tips that would help you achieve a saner mailbox.

Before we proceed, these are commonplace tips and a bunch of my friends are already using it — So you can just skim over this article for correctness and move on. This is for the people who don’t use Gmail’s features as efficiently as you do 🙂

Since this comes directly in correlation with the other features, I’d like to make this the first item of discussion. As you might be aware, Google **ignores any dots** in their Gmail.com emails (This however, doesn’t hold valid for the Google Apps email IDs).

Therefore, your *a**bc.xyz@gmail.com* can also be written as*a**bc.xyz@gmail.com* or *a**.bcxyz@gmail.com*and so on.

It gets better from here. A little known feature of Gmail is that **Google ignores any characters after a ‘+’**. So abc+1@gmail.com,abc+2@gmail.com etc. would still deliver emails to abc@gmail.com

Now this is a great gift for people who pretty much live on the WWW, where they can give different set of email IDs to different websites and still get all their emails in one inbox.

Coming to the 2nd tip, there’s this feature called ** Labels** which I’m sure most would be familiar with, that comes in handy for handling these sticky situations where you get too many emails to keep track of, and find it hard to avoid the spam and newsletters.

Use labels to categorize your emails, and then *archive* them, so that you can go back to them whenever you want, using the labels you had assigned to them earlier.

Now the **filters** feature from Gmail takes the icing amongst the other tips and it makes them 10x better.

This is one feature I love the most: Create a filter — It could be based on your sender, receiving email ID (I use the various +1, +2 emails I created, over here), subject line, or a combination of all this and much more.

Once you’ve created a filter, Gmail shows you the list of emails that match that filter — Here you can choose multitude of options, including archiving it, trashing it directly, marking it important/unimportant, marking it spam/not spam, labeling it, categorizing it, marking it read *and so on.

I personally use a combination of all these — I label almost all the emails using filters, mark few as important, some as spam, delete some, and most importantly, I archive and use ‘mark as read’ for most emails that don’t require my immediate attention/don’t require my attention at all (Newsletters for instance).

Thus, effectively I’ve around 329 filters as of last count (which was 3 weeks ago), and around 160 labels. With these in place, I barely have 20 unread emails at any point of time, including some I’ve deliberately marked as unread for immediate attention and some recent emails.

With all these in place, I’ve exactly 1 email sitting on my Inbox at this moment, which is something I’ve left there as a reminder, and because seeing a **zero inbox** was depressing for me 😛

That’s it folks — These are 3 very, very simple, but powerful Gmail productivity tips that can make your inbox infinitely better !

]]>While the original problem is a bit more complex, Hackerrank had broken it down a bit more simpler.

**Note**: This solution times out after the first 2 test cases out of a total 7 test cases. So, while the solution is technically correct, it's not the most optimal way to go about it.

The nth term of a sequence of triangle numbers is given by,

```
tn=12n(n+1)
```

So the first ten triangle numbers are:

1,3,6,10,15,21,28,36,45,55,⋯

You are given an integer. If it is a triangular number tn, print the term n corresponding to this number, else print −1

First line of input contains an integer T denoting the number of testcases. Each of the next T lines contains an integer.

Print the answer corresponding to each test case in a new line.

1≤T≤10^5

1≤tn≤10^18

```
3
2
3
55
```

```
-1
2
10
```

```
def find_triangle_term(number)
flag = 0
(1..number).each do |num|
if number == (0.5 * num * (num + 1)).to_i
flag = num
else
flag = 0
end
break if flag > 0
end
(flag == 0)? -1:flag
end
test_cases = STDIN.readline().chomp.to_i
loop do
triangle_number = STDIN.readline().to_i
puts "#{find_triangle_term(triangle_number)}"
test_cases = test_cases - 1
break if test_cases == 0
end
```

- Read the number of test cases from STDIN as integer
- Loop over the test cases
- Read the set of numbers (1 on each line, 1 for each test case)
- Checking each input with the find
*triangle*number() function and print the output- find
*triangle*num() function: - Set a flag value
- Loop from 1 to the entered number, checking if it's a triangle number or not.
- Assign the term value to
`flag`

if it's a triangle number - Assign 0 to
`flag`

if it's not a triangle number

- Assign the term value to
- Check
`flag`

value and return`-1`

or the`flag`

value as appropriate

- find

That's it folks ! I'll be writing more about other problems I solve as and when they happen :)

Note: Solution files for this and any future Project Euler problems that I solve can be found here: Github: glnarayanan/ProjectEuler

]]>The first problem that I tried was Problem 13 - Large Sum

Work out the first ten digits of the sum of N 50-digit numbers.

First line contains N, next N lines contain a 50 digit number each.

Print only first 10 digit of the final sum

1 ≤ N ≤ 10^3

```
5
37107287533902102798797998220837590246510135740250
46376937677490009712648124896970078050417018260538
74324986199524741059474233309513058123726617309629
91942213363574161572522430563301811072406154908250
23067588207539346171171980310421047513778063246676
```

```
2728190129
```

When I started this originally, I was a bit confused and I was approaching it wrongly.

I thought I'm supposed to find the sum of digits of all numbers combined together, then print the first 10 digits of it. Naturally it was completely wrong, and I realized it after few failed submissions (Boo to the late night/early morning mind set which confuses you)

Read the problem statement carefully. It's not about adding the digits of the numbers. It's about adding the numbers themselves, be it 5 or 50 or 500 numbers, and finally printing **only** the first 10 digits of the sum. Each number, of course, would be 50 digits long.

Without further ado, here's my solution:

```
inputs = STDIN.readline().chomp.to_i
val = 0
loop do
n = STDIN.readline().to_i
val = val + n
inputs = inputs - 1
break if inputs == 0
end
array = val.to_s.split('')
print "#{array[0..9].join('').to_i}"
```

- Read the number of test cases from STDIN as integer
- Initiate the final value for our calculation
- Loop over the test cases
- Read the set of numbers (1 on each line, 1 for each test case) and keep adding them iteratively for our val
- Once the final val is present, store it in an array, splitting each digit of the final sum into individual array elements
- The elements would be stored as char/string in this case, as the .split() method in Ruby works on string

- Print the final value, taking only the first 10 elements of the array and converting them to Integer again.

That's it folks ! I'll be writing more about other problems I solve as and when they happen :)

Note: Solution files for this and any future Project Euler problems that I solve can be found here: Github: glnarayanan/ProjectEuler

]]>The problem statement is as follows:

Given two points P and Q, output the symmetric point of point P about Q.

The first line contains an integer T representing the number of testcases

Each test case is a line containing four space separated integers Px Py Qx Qy representing the (x,y) coordinates of P and Q.

For each test case output x and y coordinates of the symmetric point (each point in a new line).

```
2
0 0 1 1
1 1 2 2
```

```
2 2
3 3
```

Point of Symmetry: A point of symmetry is a point that represents a "center" of sorts for the figure. For any line that you draw through the point of symmetry, if this line crosses the figure on one side of the point, the line will also cross the figure on the other side of the point, and at exactly the same distance from the point

Source: Purple Math

Formula: In Euclidean geometry, the inversion of a point X with respect to a point P is a point X* such that P is the midpoint of the line segment with endpoints X and X. In other words, the vector from X to P is the same as the vector from P to X.

The formula for the inversion in P is

x*=2a−x

Source: Point reflection - Wikipedia

With that in hand, the formula to find symmetric point of x coordinate is:

```
x' = 2Qx - Px
```

And for Y coordinate, it is:

```
y' = 2Qy - Py
```

```
test_cases = STDIN.readline().chomp.to_i
loop do
co = STDIN.readline().split.map(&:to_i)
print "#{2 * co[2] - co[0]} #{2* co[3] - co[1]}\n"
test_cases = test_cases - 1
break if test_cases == 0
end
```

- Read the number of test cases from STDIN as integer
- Loop over the test cases
- Read the set of points for each test case, into an integer array called co (Short for coordinates)
- Px = co[0], Py = co[1], Qx = co[2], Qy = co[3]
- Based on the formula above, the solution translates to:
- x' = 2 * co[2] - co[0]
- y' = 2 * co[3] - co[1]

- Since Hackerrank requires the output to be in specific format, the print statement is modeled that way

That's it folks ! I'll be starting with couple of Project Euler problems in the next posts.

Note: Solution files for this and any future Mathematics problems that I solve can be found here: Github: glnarayanan/Mathematics

]]>I had to start with the simpler ones because I hadn't coded for almost a year and even when I was coding actively, I hadn't actually solved Hackerrank type problems since 2012.

I first started with the learning/practice domain for Ruby as it is my preferred language for coding and one that I would be using at work if I ever get back into coding at my job (Which is unlikely, as I'm currently a part of Business Development team at work, a job that I love a lot)

Once I completed the entire Ruby tutorial track, which took around 2 days, thanks to my attention-deficit laziness, I moved on to solving very simple problems in Mathematical domain and under the Project Euler contest.

My first attempt at Mathematical domain, as well as my First Problem in Project Euler went quite well, and cleared all test cases.

But, the second problem I solved under Project Euler did hit a snag for me, where it cleared only 2/7 test cases, timing out for the rest. Naturally this is an indication that the algorithm's performance needs exponential optimization, which I intend to do, over the course of this week.

My next few posts will be about the Problem statements of solved problems and the approach I took to solving them.

]]>I went to the movie Pasanga 2 / Haiku last night and this is my personal take on the movie. Hope you enjoy it

Note: This is not a simple movie review but also my personal take on the learnings from the movie.

Before we start, yes, the movie Pasanga 2 is quite similar to Taare Zameen Par. But that doesn’t make this movie any less. If I might say so, this goes a step above Taare Zameen Par in fact, with a bit less preaching, and a bit more of example driven approach

While Taare Zameer Par took up Dyslexia as the theme, director Pandiraj has taken up ADHD as the theme for Pasanga 2, and has worked wonders with the movie. Kudos _/_

On one side, you’ve a ADHD kids and their parents, trying to make peace with the reality that alienates them because of their non conformity to the societal norms, putting their parents into trouble in the process.

On the other side, you’ve a doctor and teacher who wants to challenge this reality, and are setting an example with their own kids.

What happens when the reality brings these people, living inside their distinct bubbles together, forms the story.

While Karthik Kumar, Bindu Madhavi, Suriya, Amala Paul (and the other pair of parents, whose names I’m not familiar with) have performed extremely well, the real hero of the movie is the **Screenplay**

You’ll laugh, you’ll cry, you’ll feel when you watch this movie.

For some like me, who has faced a fair amount of this alienation throughout my childhood,with parents who cannot understand any of this, this movie is an experience I can personally connect with on most parts (Ofc me being an introvert kept me away from most trouble, saving them from a bunch of hurdles :P)

The movie Pasanga 2 tells the society what most parents fail to see — Kids are flowers that have to bloom on their own. You cannot expect a Rose from a Hibiscus plant and you most definitely cannot force the plant to give you a Rose. Likewise, it’s up to the parents to identify what their child is good at, to nurture it, to cherish it, and to help them excel at it.

*By trying to live the life you couldn’t live, by forcing it on your children, a parent would effectively be robbing their kids of their own lives.**Let them shape their own life, let them define their path. Be there for your kids as a support, and nothing more.*

Note: This post is about my first computer experience and how it instigated my learning process. While I had played few games on friends’ computer earlier, until I got my own, I was totally clueless when it came to computers.

My first computer was the budget HCL computer introduced in India, for INR 10000 and odd. (~ $ 160 at current rates). This was in Jan 2006. The PC was launched in Aug 2005, came to local stores by Dec 2005, and delivery was made on the 1st week of January.

The configuration was:

995 MHZ VIA Processor

40 GB HDD

128 MB RAM(32 MB of it was used up for V-RAM, leaving 96 MB for the OS)

15″ CRT

I was in my Class 9 when I got this. At that time, I didn’t even know how to turn it on or off. A friend of mine installed Windows XP on this machine and gave the CD for XP.

Next few days were completely occupied with me clearing up more space on my system by deleting those ‘unwanted’ files in Windows folder and Program Files folder. Yes, I was killing the OS slowly. With these activities, one of my friends gave me the nickname “Delete Mahaan” (A Saint in Deleting :P)

Naturally, Windows refused to start now. I tried re-installing Windows XP by recollecting the steps my friend followed while installing. I found it fun at that time. So, my next few weeks entirely consisted of me erasing and re-installing Windows XP on my machine(Yes, jobless I know).

Then I started gaming. Max Payne, Harry Potter, Mummy, Age of Empires etc. Ofc the game avatars which are ‘running’ on the other system would be crawling in mine 😛 But that made the gaming easier sometimes.

Then came movies. I went to browsing centres to download movies. I also got some random encoding software (I had no clue what they were, but still got them to checkout). I came home and tried encoding the movies. Sometimes, the movie size came down drastically, so did the quality, but I didn’t care. I was, at last, found a way to store a lot of movies on my disk.I went about this encoding business as well, in addition to the gaming now.

Then I was introduced to Ubuntu 5.04. In those days, Ubuntu’s installation was pretty much text-driven like it’s for the server edition. Again, I fell into the loop of erasing and re-installing OS. It was fun.

This went on for another 6 months, and then I got a new PC, after using this one for 1.5+ years (mid 9th std. to the time when I completed my 10th std.) . A year later, I got Internet, at a time when most parents would be disconnecting their Internet/Cable anticipating the 12th std board exams 😛

A year and a half later, into my 2nd semester at college, I started using Internet for learning, rather than gaming.

Few years down the line, I’m now using Computer for gaming, blogging, movies, work, social media, music, notes, banking and what not. These days, almost my whole life is with computers. So much so that my companion and few friends wonder if I’ve been replaced with a Robot, and have nicknamed me as “Matrix Head” or “Chitti v2.0”.

All said and one, my first computer experience is something I still cherish till date, and I feel the experimental attitude with “**What would happen if I do this?”** still drives me to keep doing things one normally considers as an unnecessary risk and learning in the process.

I studied in SASTRA University, Srinivasa Ramanujan Centre and graduated CSE in 2013.

This post is about some of the great professors from SASTRA who shaped my life – both during and beyond the university.

Without a doubt, Prof. K. Manimozhi tops my list of great professors from SASTRA. With her teaching algorithms for you, even a non-techie would really start loving algorithms and be motivated to work with them. She made even the seemingly complex algorithms look like a piece of cake.

Incidentally, she was also my guide for my final year project. I was over-ambitious with my project, took something that takes years to complete and tried to do it within a couple of months. Of course I couldn’t do it the way it’s supposed to be done. But throughout all this, she stood as a pillar and never for once asked me to back down or try an easier project. She motivated me to try my best and taught me that I should **Never give up on what I want to do. **I’m still trying to follow that.

When you talk about great professors from SASTRA, you just cannot miss this man. He handled Computer Graphics lab for us. The theory for CG was very boring and consequently most of us never really grasped what’s being taught in the theory classes. But almost all of us looked forward to the CG lab.

Eashwer sir used to act very strict during the class. Reality is, he’s the exact opposite of being strict. He appears to be strict, so that people listen to him. And once you start listening to him, you’ll never want to stop.

I think this is the only lab where we were freely allowed to experiment the concepts the way we wanted, to test our vague theories. And he was one of the select few professors who made us realize why we’re studying a particular concept in CG and where we can apply it. His policy is simple: **Either learn to apply to what you learn in theory or don’t learn at all**. I regret not taking CG seriously now.

He taught us Engineering Drawing/Engineering Graphics. A lot of my friends hate ED/EG. But this guy and another professor who’s about to follow next, made us love it.

We enjoyed fixing our scales and sheets and drawing the lines.

**Yes, everything in ED is nothing but lines**. It may appear complicated, but in reality, it’s nothing but a line. **Anyone can draw a line**. That’s what he taught us.

Because of the way he taught us, when the ED Semester exams came, I felt like I was going to just another ED class. There was no tension, no pressure, none at all. Walked in and out casually.

He taught us Basic Mechanical Engineering and Engineering Mechanics for us. BME is mainly a theoretical subject. Quite a few people feel bored.

BVM made it easy for us understand the subject and taught in a simple manner. Before telling about EM, let me tell you a small tidbit about myself. I suck at the textbook math. I’m good with numbers and statistics and all that, but when it comes to a test or a problem to be solved on paper, my brain stops working and I can’t do it. But this man made us understand and solve even the complex EM problems as though we’re just adding 1 + 1.

Now we’re coming to fun part. He is the ‘father’ of all great professors from SASTRA for his quick wit and make-everyone-laugh remarks. He’s none other than our dear **Prof. Dr. Seshadri, **who took Basic Civil Engineering for us. Obviously, I never listened and caught on to that subject. But I liked this man for his witty remarks.

The way he mocks people casually and make them smile I do remember squirming when he made fun of me and Saravanan Salai when both of us were sleeping nicely and in a dreamy state (No pun intended, but that’s how he mocked us 😛 ) And he has the habit of writing witty comments in the test papers if the person has unnecessarily written stories for the answer.

Why, he even made some of my friends *understand that we cannot drive trains on roads but we can drive cars on railways and thus railways* > *roadways*

This was an answer my friend Saravanan Salai wrote for a test, out of desperation, because he couldn’t think of anything else to write 😛

Dr. Seshadri passed away recently, a great loss to the students. May his soul rest in peace.

All in all, the 4 years at my college was the best time of my life, with so many ups and downs. A lot of people made it great for us. Among them, these 5 people top the list.

]]>I’ve been using Todoist for almost a year now (To be precise, 339 days at the moment of writing this post).

I didn’t try the Todoist free version. As soon as I signed up, I went for the premium plan. I was apprehensive about this at first, thinking if it would be a worthy investment.

I’ve grown to love Todoist over this period. I keep discovering and re-discovering how the handy features of the app can help me handle better.

For an ADHD person like me, who keeps juggling between different tasks through the course of a single hour, Todoist helps me **prioritize** and **focus**. It helps me **track** my tasks and help me get work done.

Using **Projects** , I categorize my tasks on a higher level and focus on what’s more important for the day. For example, I could have some pending tasks within my*Hobbies *project, but that won’t take priority over the pending tasks on my*Work *project.

Using **Labels**, I further drill down to categorize tasks and see what needs immediate attention.

Using **Priority**, I assign a priority to each of my tasks so that I focus more on the and ones (High priorities).

I set **Reminders** throughout the course of the day, so that even if I juggle out a task, Todoist would remind me to get back to it.

I’ve also started using it to manage my **personal reading list**, managing which was a Herculean task by itself, thanks to the *un-usable* interface of Goodreads/Amazon Wishlist.

Oh did I mention? I also use the **Task Template** feature to bulk upload tasks at times. This is particularly helpful when I’m managing my reading list or learning list.

The **Keyboard Shortcuts** are one of **THE BEST** but under-appreciated features. Especially when I’m using the desktop app or Chrome plugin, these come in super-handy.

**Improved Productivity** — Surely this term must be a cliché by now, but still, using Todoist has helped me a lot with my productivity

Orkut was the first thing I got introduced to, on the Internet (Yup, I started out a bit late). Back then, it was invite-only just like the Gmail of those times and the landing page used to show this **“You’re connected to x number of people”,** something that made quite a few flock towards it.

Few years down the line, I got a broadband connection at my home. **The first thing was to open an Orkut account**. I started adding friends randomly, joined a heck lot of communities. By this time, there were pros in my class. I took tips from them, started scraping a lot, then came the fake accounts (:P Admit it, you would have done it/contemplated it at some point). Used a variety of scripts for scraps, profile decoration, fake friends etc. **Thus went my entire 11th and a good part of my 12th standard too.**

Then the killer blow came in the form of **Facebook**, towards mid 12th. This was the time when I felt **Facebook was much simpler** (It was, at that time). Thus, I slowly started moving away, and my Orkut life went into hibernation.

**Forward back by a year:** I had a mild Orkut craze again, in my college first year, as my friend was an active user. I resumed using it actively.

Then again, came the slump in the form of **Farmville**. I started playing Farmville in Facebook and all my time went there.

Then came another villain in the form of **Google Buzz**. I don’t know about others, but my friends, my college seniors and I were all extremely active in Google Buzz. We discussed literally everything under the sun and this even brought us together. By the end of my 2nd year in college, I decided to **delete my Orkut account** or at least start anew, as I had so many spam scraps(generators again), fake friends etc. Thus began the second chapter of my Orkut life

So, **I started anew**, added only a few people, joined communities selectively, and then neglected it completely. Only this time, **the break-up was almost final**. Because it was **3 years** before I opened Orkut again, just to take a last look at it.

Yup. I opened it only after reading the news about its shutdown.

Orkut was a craze during my school days, but honestly speaking, Facebook and even Google Buzz eclipsed it in a lot of ways.(Especially the privacy, and the originality part).

]]>