Nitish Upreti

A daydreamer exploring Algorithms, Software Systems Engineering and Data Science.

Passenger - Rolling Stone

| Comments

Last weekend while working from Starbucks, I heard this song and have been in love with it since then.

The lyrics are beautiful…

Sometimes I feel I’m going nowhere
Sometimes I’m sure I never will
She said it’s cause I’m always moving
I never notice cause I never stand still

Sometimes I feel like I’m falling
Falling fast and falling free
She says my darling you’re not falling
It always looked like you were flying to me

But I fear I’ve grown a rolling stone inside of me
She said oh don’t you know
that rolling stones stop at the sea
And that’s where I’ll be

Sometimes (I feel/) I’m sure I know no one
A thousand faces but no names
She said my love you do know someone
Oh and I know you back just the same

But I’m scared I said, what if this stone don’t slow down
Just be aware she said, what goes up will come down
and when you do I’ll be around

Oh when I’ve dragged this rolling stone across this land
I’ll make sure I leave this stone in her hands
For we both know too well, rolling stones turn in to sand
if they don’t find a place to stand

Hope the song vibrates with your soul :)

Say NO to Notifications

| Comments

Technology has always been my bread and butter. I strive to be an ‘early adopter’, trying to integrate every piece of meaningful technology into my daily life. However, since the past few months I have started thinking deeply about productivity and how our interactions with cellphones, wearable gadgets, internet among others affect it. After reading a bunch of literature around, there is one very obvious and clear lesson :

Say NO to Notifications

Yes, I am referring to the luring Facebook, Quora, LinkedIn, < Your Favorite Messenger App >, < Your Favorite News App > (the list continues)… on your smartphone, tablet and email. They are always on the hook to lure you in with further engagement. A very simple key to productivity thus is turning them off.

I have had a very positive experience after turning off most of the notifications I was subscribed to. As of now, I only have two major applications with notifications : Whatsapp and Twitter on my cellphone. Have cut down on everything else and it does feel good.

Wish you a productive day! :)

Beauty of Tail Recursion

| Comments

I always overlooked Tail Recursion whenever I encountered it. Also, I am ashamed to admit that for a very long time I had a very wrong idea of what exactly was being optimized by Tail Recursion.

Today while following FP with Scala on coursera, I finally took time to think through the idea which cleared my everlasting misconception.

I will quickly and lazily summarize the difference between the two flavors ( recursion with and without tail call optimization) here.

Factorial without Tail Call optimization
1
2
def factorial(x : Int) : Int = if ( x == 0) 1 else x * factorial(x-1)
factorial(5);
Factorial with Tail Call optimization
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import scala.annotation._
def factorial(x:Int):Int = {

       @tailrec
       def factorial(accumulator: Int, x: Int) : Int = {
         if(x == 1 || x==0)
             accumulator
         else
            factorial(x * accumulator, x - 1)
 }

     factorial(1,x)
}
println(factorial(5));

Consequence of second implementation : If a function calls itself as its last action, the function’s stack frame can be reused, so we save lots and lots of memory!

Now that I have a blog post on Tail Recursion, I am free from the guilt of misunderstanding this concept for so long. :D

Interview Preparations

| Comments

So here is the idea : I want to finish solving this book in the upcoming four to five months. The reason is quite evident : Mastering the skills needed for acing technical interviews and then moving on to spend time on things that actually do matter in real life.

Will be doing a lot of problems from the book and document code with my personal notes for the problems here. So without further adieu, time to get cracking! :D

Abstraction

| Comments

Technology is so complex, yet humans have championed it. Are we so smart?

Maybe yes and maybe no, but if studying computer science has taught me something, it is the power of Abstraction.

I can bet my life on the fact that no human alive (and living in near future) can comprehend all that goes inside making our present technology feasible. There are just way too many layers of abstraction in place. However, the beauty of this idea lies in the fact that we can build a simple comprehensible thing and then later take it for granted to build infinitely complicated objects further down the road.

The layers continue to wrap around and the marvel is technology.

What I Want to Do in Computer Science?

| Comments

In retrospection, I have come a long way from being fascinated by my first computer (remembered as the Cyrix machine machine) to being a graduate CS&E student pursuing the field for life. Last year was one of those years, where I actually understood the deeper philosophy behind the subject and felt a little more enlightened.

Computer Science is a huge field with multiple different existing specializations. Pondering about it, I can only imagine my calling in this fascinating area full of opportunities. As of now, I have several questions waiting to be answered and here are some of them :

What are my skills most suitable for?

What do I want to pursue with my own interests?

What should I spend most of time on to improve my skills further ?

How can I have the maximum impact (with my own personal strengths and weakness)?

This post is documenting what I have in mind as of today. It will be interesting to see how my career shapes up in future and then coming back to it. :)

As of now these are the areas I have been / am most active in (I am well aware of the fact that there are multiple overlaps between these areas)

1. Software Application Engineering

I almost spent my entire undergraduate on application development. However, my interest in this area has reduced dramatically.

2. Software Systems Engineering

For now this area appeals the most to me, especially development of software infrastructure for data intensive applications requiring massive amount of scale.

3. Algorithm Design

I started exploring algorithms beginning from my final undergraduate year and have a good grasp of the fundamentals. However, I feel I am still lacking the formalism and rigor needed in this area.

4. Data Science

I am just a newcomer in this field but really find it interesting. Starting from next semester, I will be taking lots of subjects that will hopefully help me understand this subject deeper.

5. Management and Technology Entrepreneurship

I believe (with my own self judgment, which could be miserably incorrect) that my awareness on how technology industry works is relatively good for my limited real world experience. I wonder, how would I fare in the role of a technology manager or leader for a team instead of an engineer or software architect? If someday I decided to get an MBA, how would things shape up? This entire scenario seems to be far ahead as of now but is quite interesting to imagine. Joining an early age startup or trying something on my own is among these possibilities.

Have you ever been in such a similar position ? Thoughts and Suggestions are welcomed.

On Distributed File Systems

| Comments

Recently I have been quite fascinated with Distributed File Systems for Map Reduce systems. I did some reading and am now in process of getting familiar with the QFS codebase. Here is a quick list of 3 academic journals which are the foundation for GFS, HDFS and QFS.

The Joy of Reading Academic Papers

| Comments

The other day I was reflecting on the past three months of my life as a graduate Computer Science student. Then a question popped up in my head : What were some of the things I was missing out on before joining graduate college? Hell! What was the one thing I would have missed out on the most? The answer was indeed quite obvious to me.

As an undergraduate I almost read no academic papers. To be honest, I was totally oblivious to this idea. However, in these past three months, I have discovered the joy of reading papers. How could I ever miss on it?

A good time to share some of the most interesting papers I have read / am reading :

  1. On RTree and R*Tree

  2. On HDFS

  3. On LFS

  4. This paper has my academic advisor as one of the authors: Socio Spatial Queryingg

  5. Lamport Clocks

Reading infinite number of papers is fundamental for a graduate student. It is indeed a great beginning for me.