What are some interesting experiences you’ve had as a teen?

What are some interesting experiences you've had as a teen? by Dana Fletcher

Answer by Dana Fletcher:

A few years ago, I was at my friend Kristina's house, and after a few hours of fun, I was ready to go home. This was before I could drive, so I relied on my dad to pick me up. The only problem was my dad had a few more beers and couldn't come get me.

This also happened to be the night of prom at the local high school. Because of this, every taxi service was booked. So my dad had to arrange a ride for me with the only thing available:

A 33 foot stretch limousine.

My family is not rich by any means. But my dad is always doing something weirdly creative, and when the chauffer came to my friends front door and said “I'm here to pick up Dana”, I knew my dad had struck again.

What are some interesting experiences you've had as a teen?

What’s with 32 bit systems supporting max 4GB of RAM?

So you know that RAMs contain storage space. Common sense. Every byte of memory on RAM requires to have an address allocated to it. A 32-bit machine uses 32 bits long address to designate each byte of memory. And a memory that does not have an address allocated can not be seen by the machine.

Now let’s understand how these addresses work.

Each bit has a value of 0 or 1. If you have 1 bit long address, you have two possible addresses: 0 or 1. A two-bit system has four possible address: 00 =0, 01=1, 10=2, 11=3. 2^2=4. Three bits have 8 possible addresses: 000=0, 001=1, 010=2, 011=3, 100=4, 101=5, 110=6, and 111=7.

Each bit doubles the potential address space, which is why 2^n tells you how many addresses you use for a given number of bits. 2^1 = 2, 2^2 = 2*2 = 4, 2^3 = 2*2*2 = 8, etc. By the time you get to 32 bits, you have allocated address to 2^32 = 4294967296 bytes of RAM space which is equal to 4GB.

(((2^32bytes/2^10)KB)/2^10)MB)/2^10)GB = 2^2GB

Okay, so if the processor, and the operating system designed for that processor, can only handle 4GB, why can’t your PC (if it’s 32-bit) see that much practically?

Because not all of those addresses are available for RAM. There are other pieces of hardware inside your computer that need addresses, such as the PCI bus and the USB host adapter, Graphics card, etc.


Whenever you store something in the memory, you need to save the address to be able to read or manipulate it. Usually, the CPU uses only one register (32 bit in size) to store this address. Since there are only 2^32 different addresses, anything exceeding the 4GB mark remains unused.

However, there are techniques like Physical Address Extension (PAE) that allow a 32-bit OS to address more than 4GB of RAM.


Source of some info, More Source

What is the best strategy to improve my skills in competitive programming in 2-3 months?

Answer by Sachin Gupta:

This post has been taken from the blog post  Learn to Code by Competitive Programming written by MV Kaushik when he was interning at HackerEarth

Here are some steps to get started and be good at it.

    • Get comfortable writing code in either of one of these languages C, C++ or Java. Why only C, C++ or Java? Because these are the standard languages allowed in any programming competition.
    • If you are already good at C, it is suggested to learn C++. It is the most popular language among competitive programmers because of its speed and an excellent library in the form of STL (Standard Template Library).
    • Pick an online judge. Recommended ones are Topcoder and Codeforces. These sites have high quality of problems and also allow you to see other’s code post contest completion. These also categorize problems based on the topic. Some other popular judges include SPOJ, CodeChef (powered by SPOJ) andHackerEarth.
    • To begin with, start with simple problems that typically require transformingEnglish to code and does not require any knowledge on algorithms. Solving Div 2 250 (Division 2, 250 points) in Topcoder or Div 2 Problem A in Codeforces is a good start.
    • At the early stages of programming one tends to write long pieces of code, which is actually not required. Try to keep codes short and simple.
    • Practice these problems until you become comfortable that you can submit it for 240 odd points on any day.
    • Start implementing basic(or standard) algorithms. It is suggested to read them from Topcoder tutorials or Introduction to algorithms.

      1) Graph algorithms: Breadth first search(BFS), Depth first search(DFS), Strongly connected components(SCC), Dijkstra, Floyd-Warshall, Minimum spanning tree(MST), Topological sort.

      2) Dynamic programming: Standard dynamic programming problems such as Rod Cutting, Knapsack, Matrix chain multiplication etc.

      3) Number theory: Modular arithmetic, Fermat’s theorem, Chinese remainder theorem(CRT), Euclidian method for GCD, Logarithmic
      Exponentiation, Sieve of Eratosthenes, Euler’s totient function.

      3) Greedy:  Standard problems such as Activity selection.

      4) Search techniques: Binary search, Ternary search and Meet in the middle.

      5) Data structures (Basic): Stacks, Queues, Trees and Heaps.

      6) Data structures (Advanced): Trie, Segment trees, Fenwick tree or Binary indexed tree(BIT), Disjoint data structures.

      7) Strings: Knuth Morris Pratt(KMP), Z algorithm, Suffix arrays/Suffix trees. These are bit advanced algorithms.

      8) Computational geometry: Graham-Scan for convex hull, Line sweep.

      9) Game theory: Basic principles of Nim game, Grundy numbers, Sprague-Grundy theorem.

      The list is not complete but these are the ones that you encounter very frequently in the contests. There are other algorithms but are required very rarely in the contests.

    • You can find description and implementation of standard algorithms here
    • Once you have sufficient knowledge of popular algorithms, you can start solving the medium level problems. That is Div 2 all problems in Topcoder and Codeforces. It is advisable not to go for Div 1 500 at this point.
    • Learning to code is all about practicing. Participate regularly in the programming contests. Solve the ones that you cannot solve in the contest, after the contest. Apart from Topcoder and Codeforces you can also look at HackerEarth Challengesor Codechef contests.
    • Read the codes of high rated programmers. Compare your solution with them. You can observe that it is simple and shorter than your solution. Analyse how they have approached and improve your implementation skills.
    • Read the editorials after the contest. You can learn how to solve the problems that you were not able to solve in the contest and learn alternative ways to solve the problems which you could solve.
    • Always practice the problems that you could solve in the contest. Suppose if you are able to solve Div 2 250 and 500 in the contest but not Div 2 1000 then practice as many Div 2 1000 problems as as you can.
    • Do not spend too much time if you are not getting the solution or are stuck somewhere.
    • After you feel that you have spent enough time, look at the editorials. Understand the algorithm and code it. Do not look at the actual solution before you have attempted to write the code on your own.
    • Programming is a very practical and hands on skill. You have to continuously do it to be good at it. It’s not enough to solve the problem theoretically, you have to code it and get the solution accepted. Knowing which algorithm/logic to use and implementing it are two different things. It takes both to be good at programming.
    • Programming learning phase is going to take a lot of time and the key is practicing regularly. It takes some time before you can attempt Div 1 500 and other tough problems. Do not give up on reading the editorials and implementing them, even if it takes many hours/days. Remember everything requires practice to master it.

It takes considerable amount of time before you get good at it. You have to keep yourself motivated throughout. Forming a team and practicing is a good choice. Not giving up is the key here.

What is the best strategy to improve my skills in competitive programming in 2-3 months?

What was Anudeep Nekkanti’s Competitive Programming strategy to become 35th in Global ranking, in just 6-7 months?

Answer by Anudeep Nekkanti:

What I did ?

Result ?

  • Became very good with C++ and STL
  • Got introduced to most Competitive programming KEYWORDS (like DP, maxflow, sets, hashing, etc)
  • Learned Standard Problems and Algorithms
  • Indenting code
  • Fast typing 😛

How ?
Before starting programming, I searched about how and where to start, many said “Learn an Algorithm, implement it, solve  problems related to it”. I did not do it that way, If you know what algorithm to use you generally think in that direction and leave about correctness.  I did them problem by problem, easy to hard, I spent 1 – 4 hours on a problem.
I get the idea, I code it, Get it Accepted. (I used to test a lot, I always wanted to get AC on first go)

I do not get the idea, I save that problem and try it after a month again. If I still do not get them, then search for hints. If it clearly needed some algorithm which I never used then I first smile (? I could not only because I did not knew the algorithm 😛 ) and then start reading about that algorithm. TopCoder had tutorials of almost all common algorithms. This is where I did a BIG MISTAKE. I never cared about correctness or run-time analysis proof, I always learned how to solve the problem using that algorithm, I hardly learned about how the algorithm works. I feel bad about it now, but that is how I solved those problems then. I solved max-flow, convex hull, etc., problems using described algorithms but I did not UNDERSTAND those algorithms then.

Mistake: Once I started taking part in contests, I completely stopped practice.

35th in Global Ranking

  • CodeChef long contests are comparatively easy ( Which is good, You can learn a lot), you get a lot of time to think about a problem, search for resources. You only need KEYWORDS to search for similar problems.
  • I gave a lot of time for each contest. I used to solve 4 easy problems in 2-3 days, then take 5-6 days for other 3 problems.
  • CodeChef rating system is not good. It is highly Volatile.

If I am to start programming now, I would do it this way

  1. Solve 200 most solved problems on SPOJ, Problem by problem. In 2 months.
    (This will teach all standard problems, algorithms and implementation skills)
  2. Solve problems from CodeChef and CodeForces for 2 months.
    (This will teach variations, we can read others solutions and learn better ways. Skip easy problems)
  3. Solve problems from TopCoder for 2 months.
    (This will teach  Dynamic Programming. Div 1 500p)
  4. Check past ACM ICPC Regional’s Problems
    (Great quality problems)

If I am to learn a new Algorithm now, I would do it this way

  1. Read it from at least 3-4 different sources.
  2. Understand correctness proof and run-time analysis.
    (This is very very important, you will know it only when you  deal with non standard  and hard problems)
  3. Question yourself on every step for correctness. Try to tweak the implementation.
  4. Check other implementations.

Final Note
Thought I became good in solving problems and had good rank. I later(Feb 13) realized that I learned it the wrong way. I then started learning again. I learned all the algorithms again this time gave importance to the algorithm itself, correctness proof and mathematical analysis. It is worth the time.

Lucy and the Flowers – Problem from December long contest, Try to solve it with suffix arrays. You can only if you understand suffix arrays and LCP completely.

I was able to solve a not-so-obvious medium level Max-Flow problem at ACM KGP Onsite only because I completely understood how the algorithm works. It was at 4 hour 25 minutes I got 5th problem accepted, then I read this problem and got it accepted 4 minutes before end. Learning the algorithm helped. Dot.


What was Anudeep Nekkanti’s Competitive Programming strategy to become 35th in Global ranking, in just 6-7 months?

Why does breaking the sound barrier create a sonic boom?

Boom is really a misleading word for it because it implies something like an explosion – when really it’s more of a constant roar. It just sounds like a boom from land, because unlike normal sound, which would reach you from the plane constantly as it flies by, the boom is like the wake of a boat, only hitting you once for each pass.

I think part of the reason this isn’t well known is because of all the photos of jets breaking the sound barrier.

http://res.cloudinary.com/dk-find-out/image/upload/q_80,w_1440/A-iStock_000017498245Large_pxojdi.jpg

That plane wasn’t going supersonic though. The cone happens at transonic speeds, so when the plane is accelerating, as it nears Mach 1 a shock cone can appear. You can tell in the video that it is very close to Mach 1 because there is no sonic boom and the sound from the plane appears just before it passes.

What is the latest fad among the youth of India?

What is the latest fad among the youth of India? by @iAmogh

Answer by Amogh Talpallikar:

Let me take this opportunity to highlight a trend that I have observed on social media among young Indian IT “professionals”.

They grow up having not explored nooks and corners of their heart to find out what is it that they really like doing and what path could lead them there.

Some of them have vague idea but are too scared to venture out. Some can’t speak up in front of their parents who are the financial investors for a career they deem will be a fulfilling one for their children.

So they take a standard route till it hits them that they are stuck in something they don’ t like at all. It starts with a life where they end up putting an aimless effort during their 11th and 12th into getting into an engineering college and are ready to get into any college and any branch because Infy, TCS and others will anyways “train” them.

So, they waste their time in college trying to live up to a college life that masala Bollywood movies have shown them. Some of them struggle heavily with backlogs. Some realize too early that they don’t enjoy what they are getting into – Instead of using the time they have to shape their life they end up getting into habits that will help them curb their thoughts and divert their attention towards a black hole that is pulling them in.

Some of them get “placed” in a typical IT firm. This includes the so called “toppers” from some arbitary JFK Motilal Karodimal Institute of Management, Christopher Nolanic Science & Technology. This also includes struggling candidates who in their minds think of themselves as prodigies for having not only cleared backlogs but also ended up in the same company as the “toppers” with the same salary bracket of 2.8–3.5 L per annum in a top IT firm of India.

Meanwhile, the truth is — neither have any knowledge of what computer science is all about. They haven’t been exposed to how spiritually rewarding life as problem solver can be. Neither by their alma mater nor their current job title both of which are nothing but a mindless cycle of money making.

Then after end of first year in their work life, they are already bored of data-entry work or some really shitty IT maintenance work that is holding them by luring them into chances of going onsite so that they can get enough money to buy that flat but its too late.

When it strikes them that they are stuck in an endless loop and it’s going to take away their chance of having a fulfilling life, they look to switch but then they realize that the expertise they need to get into a good company are way beyond their current skill-sets.

They look for good startups thinking of them as organizations that can be taken for granted as small companies who will take up anyone and pay them high salaries just because they don’t have a brandname which turns out be a bummer because their technical expectations are way higher than traditional IT companies.

Now the only solution they see is getting into a startup and accepting a lower salary. Taking a risk, Leaving that Air Conditioned Office for an early stage startup where they can learn a lot and revive their career is a solution but No!The comfort of their IT firm which they complain about and the ID card they carry or the fake title of “Senior Software Engineer” that has somehow been bestowed upon them by their masters won’t let them escape the tight leash.

So what do they end up doing when their own lives seem miserable ? — WHINE

They whine on social media. They whine on Facebook. They whine on Quora.

On Quora they go by bios like

— Engineer by profession, Dreamer by choice

— Engineer for now, Knowledge Seeker for life

— Writes code for money. Writes poetry for soul.

You know the kind I am talking about.

Then they write answers where they talk about how their parents forced them into such lives. How pathetic their “non-technical” project manager is. How useless their teachers were.

They have time to whine on the internet. Spend hours downloading movies and TV shows from torrents. They have time to watch videos from AIB and TVF but no time to go through those awesome lectures and tutorials that are also available for free that can potentially improve their skill-set. Rest of the time goes in whining on Quora and trying to fetch up-votes.

These kind of people suck to the core. Sad part is as expected they are huge in number.

One of them whines. Thousands of them up-vote it.

Then it shows up in everyone’s feed under “Popular on Quora” and since Quora is touted as the next nirvana platform by many — They end up misguiding a lot of students who are yet to start out with a career as a programmer. They make life of a programmer seem nothing more than that of a person who just types gibberish via the keyboard and runs home when the company cab arrives.

This is not just a fad. This is a vicious cycle. This is a matrix and Neos of this world are all pulling each other down and not letting anyone escape. It’s such a sad state.

Lastly I would like to leave you with this message,

Programming can be fun. It’s like magic. Think of computers as really powerful beasts. Think of yourself as someone who can learn to command them at your will. You just need to learn a way to communicate with them. You need to think of innovative ways to make them do wonderful things because although they are powerful, they still need to be tamed. We need wizards like you!

What is the latest fad among the youth of India?

The Egg – Andy Weir

You were on your way home when you died.
It was a car accident. Nothing particularly remarkable, but fatal nonetheless. You left behind a wife and two children. It was a painless death. The EMTs tried their best to save you, but to no avail. Your body was so utterly shattered you were better off, trust me.
And that’s when you met me.
“What… what happened?” You asked. “Where am I?”
“You died,” I said, matter-of-factly. No point in mincing words.
“There was a… a truck and it was skidding…”
“Yup,” I said.
“I… I died?”
“Yup. But don’t feel bad about it. Everyone dies,” I said.
You looked around. There was nothingness. Just you and me. “What is this place?” You asked. “Is this the afterlife?”
“More or less,” I said.
“Are you god?” You asked.
“Yup,” I replied. “I’m God.”
“My kids… my wife,” you said.
“What about them?”
“Will they be all right?”
“That’s what I like to see,” I said. “You just died and your main concern is for your family. That’s good stuff right there.”
You looked at me with fascination. To you, I didn’t look like God. I just looked like some man. Or possibly a woman. Some vague authority figure, maybe. More of a grammar school teacher than the almighty.
“Don’t worry,” I said. “They’ll be fine. Your kids will remember you as perfect in every way. They didn’t have time to grow contempt for you. Your wife will cry on the outside, but will be secretly relieved. To be fair, your marriage was falling apart. If it’s any consolation, she’ll feel very guilty for feeling relieved.”
“Oh,” you said. “So what happens now? Do I go to heaven or hell or something?”
“Neither,” I said. “You’ll be reincarnated.”
“Ah,” you said. “So the Hindus were right,”
“All religions are right in their own way,” I said. “Walk with me.”
You followed along as we strode through the void. “Where are we going?”
“Nowhere in particular,” I said. “It’s just nice to walk while we talk.”
“So what’s the point, then?” You asked. “When I get reborn, I’ll just be a blank slate, right? A baby. So all my experiences and everything I did in this life won’t matter.”
“Not so!” I said. “You have within you all the knowledge and experiences of all your past lives. You just don’t remember them right now.”
I stopped walking and took you by the shoulders. “Your soul is more magnificent, beautiful, and gigantic than you can possibly imagine. A human mind can only contain a tiny fraction of what you are. It’s like sticking your finger in a glass of water to see if it’s hot or cold. You put a tiny part of yourself into the vessel, and when you bring it back out, you’ve gained all the experiences it had.
“You’ve been in a human for the last 48 years, so you haven’t stretched out yet and felt the rest of your immense consciousness. If we hung out here for long enough, you’d start remembering everything. But there’s no point to doing that between each life.”
“How many times have I been reincarnated, then?”
“Oh lots. Lots and lots. An in to lots of different lives.” I said. “This time around, you’ll be a Chinese peasant girl in 540 AD.”
“Wait, what?” You stammered. “You’re sending me back in time?”
“Well, I guess technically. Time, as you know it, only exists in your universe. Things are different where I come from.”
“Where you come from?” You said.
“Oh sure,” I explained “I come from somewhere. Somewhere else. And there are others like me. I know you’ll want to know what it’s like there, but honestly you wouldn’t understand.”
“Oh,” you said, a little let down. “But wait. If I get reincarnated to other places in time, I could have interacted with myself at some point.”
“Sure. Happens all the time. And with both lives only aware of their own lifespan you don’t even know it’s happening.”
“So what’s the point of it all?”
“Seriously?” I asked. “Seriously? You’re asking me for the meaning of life? Isn’t that a little stereotypical?”
“Well it’s a reasonable question,” you persisted.
I looked you in the eye. “The meaning of life, the reason I made this whole universe, is for you to mature.”
“You mean mankind? You want us to mature?”
“No, just you. I made this whole universe for you. With each new life you grow and mature and become a larger and greater intellect.”
“Just me? What about everyone else?”
“There is no one else,” I said. “In this universe, there’s just you and me.”
You stared blankly at me. “But all the people on earth…”
“All you. Different incarnations of you.”
“Wait. I’m everyone!?”
“Now you’re getting it,” I said, with a congratulatory slap on the back.
“I’m every human being who ever lived?”
“Or who will ever live, yes.”
“I’m Abraham Lincoln?”
“And you’re John Wilkes Booth, too,” I added.
“I’m Hitler?” You said, appalled.
“And you’re the millions he killed.”
“I’m Jesus?”
“And you’re everyone who followed him.”
You fell silent.
“Every time you victimized someone,” I said, “you were victimizing yourself. Every act of kindness you’ve done, you’ve done to yourself. Every happy and sad moment ever experienced by any human was, or will be, experienced by you.”
You thought for a long time.
“Why?” You asked me. “Why do all this?”
“Because someday, you will become like me. Because that’s what you are. You’re one of my kind. You’re my child.”
“Whoa,” you said, incredulous. “You mean I’m a god?”
“No. Not yet. You’re a fetus. You’re still growing. Once you’ve lived every human life throughout all time, you will have grown enough to be born.”
“So the whole universe,” you said, “it’s just…”
“An egg.” I answered. “Now it’s time for you to move on to your next life.”
And I sent you on your way.

What are the 10 must-read books during the ages of 21-25?

  1. The Defining Decade by Meg Jay. This book is entirely about you. It will answer questions about life, you didn’t even know you was asking. It will tell you all the things you parents didn’t about what you should do to get as much out of your 20’s as possible.
  2. The Art of Manliness by Brett McKay. The best book on long forgotten etiqutte, dedicated to generation of boy who forgot how to grow up. McKay explores manliness in this beautiful book. Worth reading regardless of your gender, as girls should read it in order to be able to recognize true gentlemen.
  3. On the Shortness of Life by Seneca. You should read this as fast as possible, and if you haven’t read it before reaching 30, this is the first thing you do. Now.
  4. Mastery by Robert Greene. Greene studies how titans through history gained mastery in their respective craft, and there is much you can learn from it.
  5. How to Achieve True Greatness by Baldesar Castiglione. In this short read, Castiligione discover what it task to be the perfect courtier. While entertainingly written, it will describe how one is charming and noble.
  6. Of Human Freedom by Epictetus. This book is, as the title suggest, about the theme of freedom. But it will shake your world, and help you to focus on the finer, more important things in life.
  7. Blink by Malcolm Gladwell. While this is a book about rapid decision making, it concerns itself a  great deal with memory. Gladwell gives training your memory a higher  purpose than just remembering strings of digits or memorizing a deck of  cards. Training your memory will eventually change your life, and  Gladwell will show you what you can look forward to.
  8. The 4-Hour Workweek by Tim Ferriss. Tim Ferriss is a master martketeer and entrepreneur, and he gives you his view on life to, which I have found many books on entrepreneurship neglects. This book explore how to train and eat inexpensively. It will save you time, money and make you better.
  9. Zen and the Art of Motorcycle Maintenance by Robert Pirsig. Read it. Read it all.
  10. Meditations by Marcus Aurelius. This book is the most important of all philosophy (in my opinion). Please read this.

I hope that help! If you want to expand you literary world further, I suggest your subscribe to the Reading List. The best of luck on your reading.
Source: What are the 10 must-read books during the ages of 21-25?

From a therapist’s office wall

I don’t like the phrase “A cry for help.” I just don’t like how it sounds. When somebody says to me, “I’m thinking about suicide, I have a plan; I just need a reason not to do it,” the last thing I see is helplessness.

I think: Your depression has been beating you up for years. It’s called you ugly, and stupid, and pathetic, and a failure, for so long that you’ve forgotten that it’s wrong. You don’t see good in yourself, and you don’t have any hope.

But still, here you are; you’ve come over to me, banged on my door, and said, “HEY! Staying alive is REALLY HARD right now! Just give me something to fight with! I don’t care if it’s a stick! Give me a stick and I can stay alive!”

How is that helpless? I think that’s incredible. You’re like a marine: Trapped for years behind enemy lines, your gun has been taken away, you’re out of ammo, you’re malnourished, and you’ve probably caught some kind of jungle virus that’s making you hallucinate giant spiders.

And you’re still just going “Give me a stick! I’m not dying out here!”

“A cry for help” Makes it sound like I’m supposed to take pity on you. But you don’t need my pity. This isn’t pathetic. This is the will to survive. This is how humans lived long enough to become the dominant species.

With NO hope, running on NOTHING, you’re ready to cut through a hundred miles of hostile jungle with nothing but a stick, if that’s what it takes to get to safety.

All I’m doing is handing out sticks.

You’re the one staying alive.