TRENDING NEWS

POPULAR NEWS

How To Create Javascript Views Counter Without Returning To 0 And Starts At 10000000

How do people write more than 10,000 lines of code by themselves? What kind of an individual project could need that? What are the challenges that programmers face while coding such a huge system? How much proficiency is needed to reach this level?

If you write just ten lines of code a day.You'll have written hundred lines in ten days. You'll have written 10,000 lines in a thousand days. Which means you'll be able to write your 10,000-lineprogram in less than three years. Three-years is not all that long given the averagelife-span of humans. And, of course, if you write more than 100 lines of code a day,you'll finish your program much quicker.I work as a full-time developer, and I probablywrite an average of 500 lines of code a day.Does that sound like a lot? Well, the work day isEight hour long. If I write a line of code eachminute, that's 60 in an hour. Which is 480 in a day.Truth is, I often write more than one-line a minute.It doesn't take a me a minute to write this:var x = 2;var y = x + 10;In any case, given 500 lines of code a day, that's 2,500 a week, which means every month I write about 10,000 lines of code.That's not impressive. It's just doing a jobday after day. I'm sure the average plumberfixes a gargantuan number of toilets each year.This post is 29 lines long. It took me about twominutes to write and another two to edit. So that'sfour minutes altogether. At that rate, I could extend this to 3,480 in an average-length work day. But I'll spare you.

How long would it take a human being to count to 1 billion one at a time?

You may think it would take a billion seconds. That's 31.7 years. But the answer is not that simple. Take 999,999,999. Unless you can speak really quickly, you cannot say this number in just one second. That's just one unique number, right? Wrong. 9/10 of all numbers you will count will have the same amount of digits.It takes about 2.5 seconds on average to say a 9 digit number so I will use that. It can then be estimated to take 2.5 billion seconds (79.25 years) to count to a billion. You can be more precise and continue down with 8 digit numbers but this is a good upper bound value.Coincidentally, the life expectancy at birth in the US is around 79 years, so if you somehow knew the numbers the second you were born and started counting then, it would take all of your life to count to a billion. This can't happen however. You wouldn't be able to sleep, work, or eat. If you devoted 8 hours to counting, then it would take 237.25 years so your offspring would have to continue your legacy.As a side note, there is a trick to counting to higher numbers without spending too much time. Count to 100, then restart, but keep track of all the 100s you have counted. You can count a number a second now. With 8 hours of counting a day, and using 31.7 years from earlier, it would take 95.1 years.Overall, you would most likely die before you finished counting to a billion, one way or another.

TRENDING NEWS