Category: Lessons

The Fibonacci Sequence

Of late, I’ve been trying to get to the base of how algorithms and mathematics works in general. I’ve wanted to do this for a while because I have an inane fear of Mathematics, and I wanted to face it.

This was also an effort to deep dive into the fundamentals of Computer Science, a topic dear to my heart, but something I’ve ignored for a while. I chanced upon Teach Yourself CS, a good roadmap for getting started with brushing up your CS fundamentals.

As a part of this roadmap, I’ve been solving programs on Project Euler, Hacker Rank and other competitive coding websites. And almost all programs will have a challenge that includes the Fibonacci Sequence.

For ex : Here is Project Euler’s 2nd Program

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:

1, 2, 3, 5, 8, 13, 21, 34, 55, 89,

By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.

and here’s how I solved it

i = 0
j = 1
sum = 0
num = 0
while (num < 4000000):    
     num = i + j    
     i = j    
     j = num    
     if num % 2 == 0:        
     sum = sum + num    
print("Final Sum is")
print(sum)

If you can overlook my use of the while loop and my amateur Python skills, this looks like a good start. However while working on this program, I went on a rabbit hole, trying to read more about Fibonacci Sequence.

That’s when I stumbled upon the different applications for the sequence. One fun use case is Planning Poker, where participants in a Scrum meeting are given the sequence cards for estimation.

But what enchanted me was the fact that the sequence appears in biological settings as well. For ex: Some flowers are pentagonal because of the arrangement of spirals.

And it also extends into genealogy as well. Bees for that matter.

  • If an egg is laid by an unmated female, it hatches a male or drone bee.
  • If, however, an egg was fertilized by a male, it hatches a female.

And thus, if one were to trace the ancestory of any male bee, he has 1 parent bee, 2 grandparents, 3 great grand parents and so on.

While learning all these facts about how mathematics and nature are interlocked, I was reminded of Rene Descartes quote

In my opinion, everything happens in nature in a mathematical way.

Indeed.

Advice for Students

At my job, I sometimes get the chance to budding student developers. After the workshops, their questions usually revolve around a career in tech and getting started in the industry. I thought it would be a good idea to list down what has worked for me, so I can share it the next time someone asks me for this.

Before you start reading the post, I want you to keep in mind that I am a victim of confirmation bias. I believe that I was able to grasp some opportunities because I was the right person at the right place at the right time.

Some of the points in this blog post may or may not work for you. Some might work for you in short term, and some may take longer than anticipated. I want you to apply your own discretion and not follow my advice blindly.

Join a Student Ambassador Program

When I was in college, I got selected to be a part of the Microsoft Student Partner program, and that has helped me in my career in more ways than I can count. Almost all of the big tech companies have some form of Student Ambassador Program. Getting selected as a Student Ambassador brings you one bit closer to the industry and helps you understand the current trends that companies are looking for.

These programs also have a high bar for selection, and for many of you will also give you, your first interview experience.

Once selected, you will be expected to set up a tech club and/or speak at your / nearby colleges about their tech. This gives you the credibility to speak at different places on behalf of the company, and at the same time helps you improve your organizational and public speaking skills.

Don’t be restricted to doing these activities at your institution. Take the opportunity to get out of your comfort zone and speak at nearby institutions.

Keep in mind though to be extremely focused on what you want to be doing with these credentials. I’ve seen students who get selected into two or three of these programs simultaneously and then struggle with meeting the expectations for even one of them. Being part of multiple programs does help you have a fancier LinkedIn title, but doesn’t really count much in terms of career prospects.

Obligatory plug about a program that my team runs : Alexa Student Influencer. The ASI program looks for individuals who are pursuing college and have interest in Alexa and Voice UI in general.

Work for a small company / startup

There is nothing inherently wrong with wanting to work with big companies, but do not ignore companies with a small employee count or for not having a brand name.

Inside a small company, where time and resources are limited, you get to completely own and deliver projects. In big companies, this is rarely the scenario until you’ve spent a considerable amount of time gaining trust. Small Companies operate with quite a bit of restraint and extreme focus, and give you a clarity of what kind of career you want to pursue going ahead.

In college, I worked for a small company run by a good friend, Sachin Palewar – and got the autonomy of working on projects from scratch and we won some cool awards as well.

Resumes are dead. Personalised Profiles are in

One common thing that I have seen students do is, apply to a host of jobs with the same resume. I remember this one student candidate, who emailed almost every company in my town and put all of them in the email CC list. Needless to say, the rejection to his resume was quite a public spectacle with everyone hitting reply all.

Jobs are not a “One Size Fits all” market. The skills required to do one job might not be even a consideration for another job. So when you send a general resume, do not be surprised if you get a random response, or worse no response at all.

As a potential candidate, start filtering jobs that you are truly interested in and understand the expectations of this role. Once you have a grasp of the role and responsibilities for the position, create a personalised profile that highlights why you are the best fit for the role.

One suggestion that I have is to use keywords from the job description and use them in your resume.

For ex : If the job description says “The candidate will be expected to launch and manage EC2 servers and continuously monitor the performance for the application.” And if you have done that somewhere – highlight that in your profile like “Launched and managed servers at my internship at Example App and was responsible for monitoring during high traffic incidents.”

Think of the manager who is hiring for this role. They want to hire someone who is a close fit for this role. While freshers are not expected to know a whole lot about the job, the fact that you have done something similar in the past tilts the scale in your favor a bit.

If you have not done something that fits it, don’t try too hard to fit in your experience. It doesn’t look good trying to lie on your resume.

Look for Personal Recommendations / References

Once you have a personalised resume, there are still chances that it may be overlooked for some reasons. One way to get in to the interview shortlist is by seeing if you have someone from your network who works in the team / knows the hiring manager.

And if you know this person well, ask them if they can recommend you for this position. The key to doing this is by building a good professional network. I got into my current position, because of a recommendation by Sohan whom I had met at couple of events.

Having someone on the team who recommends you gets you someone who can follow up on your interview, and also give insight into the team culture. If you don’t have anyone on the team, the alternative is to reach out directly to the hiring manager / someone from the team. But keep in mind to not overdo this.

I have seen someone who reached out to 3 different people asking for the recommendation, and after they forwarded the resume – they found out that the person had already reached out to the manager and were told they are not the right fit.

Drop a simple email / message on the lines of

“Hey xxx,

A brief intro about yourself and a short description about your profile. I saw that you are hiring for yyy job and I think I would be a good fit for it. I have applied for it, but am yet to hear back and wanted to reach out to see if the role’s still open.

I know you are busy but I appreciate you taking out your time for this.

Thanks zzz”

Candidates who reach out directly and are able to express excitement about the job role catch the attention and thereby getting those interview rounds as well.

Personal Branding

Regardless of the opportunities you are looking for, it is quite important to have a personal branding. Personal branding can be achieved in the form of Twitter, Blogs, Stack Overflow and other similar sites.

Participating actively in Stack Overflow forums, blogging about programs & events you’ve participated are a showcase for your technical skills. I would highly recommend getting a personal domain name, and matching user IDs on the interwebs (Ex : I am pkarthikr on most places on the Internet).

I’ve had a few people reach out to me for opportunities after they read a blog post / tweet thread of mine, and it’s all because of the personal branding efforts.

Stay Healthy

This is something I regret not doing during my college days. For a long time, I had to struggle with my habits and health till I got it right. I am still not there, but things are better than a few years back.

In College, I’ve stayed out at midnight, hanging out at eateries and sleeping at odd hours. All these things, while never affecting me in the moment, took it’s toll later on. To be capable of doing good work, you have to be healthy.

Make sure, you have

This is not to say, you forego the fun stuff. Just be cognizant of the tradeoffs you have to make for this fun.

Stay Positive

I don’t want to sound philosophical, and fair warning, I have not practiced this either. But the idea for the entire blog post came up, after I heard from a student who was frustrated finding job opportunities as he was graduating out of college.

When I was going through the placements seasons in college, I was apprehensive and demotivated as well. It’s natural to feel that way, but take it in stride. If you get rejected somewhere, see if you can find out why you were rejected and improve yourself on those areas.

In an industry that changes technologies every few years, we have to continuously work on where we lack, and improve ourselves. That’s the way to be relevant in our industry.

If you’ve stayed till the very end of this blog post, and find yourself in the similar spot like the student I was talking about – feel free to ping me on Twitter. I am always up for a quick chat and help wherever I can.

Switching off the lights

Earlier this year, Animesh and I, took the tough decision to stop QICE & Learnflow – the companies that both of us started 5 years back. I write this post as a sort of timeline, on how we went from starting up our company to winding it up a few months back. I also plan to write about the lessons learned from all this.

(more…)