Added: 2 years ago
From: thenewboston
Views: 118,815
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (347)

Sign In or Sign Up now to post a comment!
  • subs=subs*(1+growth); if you want to take the advantage of the loop, otherwise just do at 20 right away

  • Well... I believe the math would have actually been A = P(1.01^N)

  • That would be about 1% of P per day.

  • Thumbs up if you're subscribed

  • Video's main audience is adults.

    Assumes audience doesn't know compound interest.

    What?

  • The thing i love about bucky's tutorials is that he explains it a little as he is doing it and then at the end goes through it so i can take notes :)

  • @thenewboston, if you use for, why not do that ? "amount = amount * (1 + rate);" amount being init. with principal

  • I have a little problem, whenever I touch run, it runs the previous tutorial (forLoops.java for me) instead of this one (CompundInteres.java for me).

  • @bluedude34 He's using days, not years.

  • thumbs up if your gonna watch ALL the tutorials then make epic java games

  • According to that it would have taken bucky a little more than 306 years to gain 210,510 subscribers..... instead he gained them in a little less than 3..... i think bucky deserves a round of applause

  • @bluedude34 days not years.... did your math wrong

  • google what???

    

  • Comment removed

  • @limbokaj81 Compound Interest - so that you can see the formula which is basically

    A = P(1 + r)5

  • Like this if in the event you ever do anything practical with java you will put bucky in the credits

  • People say programming is hard. They don't know how much harder it is using excel...

    I PITY THE FOOL(s)

  • principal = head of school

    principle = idea of

  • @B1KMusic head of school = living organ ontop of a building.

    It's principal. Trust me.

  • *subscribe* troll :D

  • How I love people withe the time to be able to teatche other people over a term of 3 weeks without the use of books :P

  • We learned it with b*a^t.

    U only must remember nanananananananBATman

    and boom u got it :D

  • what is day + he used to print output

  • I read the comments first and find no sense but as soon as i watched the video i think them

  • The actual rate to get close to the real number of subscribers in the ~1050 days since this video is 0.00285%!

  • Has anyone but me noticed that he used the wrong principle? He said principal, as in principal of a school. Now i'm not criticizing him or anything, i just noticed that. Did anyone else?

  • @EpicFailuresUnited the accent...some people actually pronounce 'principle' as principal..

  • @jacobmayday Mine doesn't do that until until day 695 (by the way by E7 java just means *10^7

  • Inner math nerd is upset. The formula for compounded interest is A = P(1 + (r/n))^(n*t)

    A = Amount

    P = Principal amount

    r = interest rate

    n = number of times compounded yearly

    t = number of years

    Inner programming nerd is happy because these videos are awesome.

  • @jacobmayday 3,342E7=3,342*10^7 its just a way how large numbers are expressed on computers. But i dont know why your programm restarts ...

  • According to mine he should have 209k subs.

    He has 203k :O

  • @Bradstuffer he has 209k now :D

  • Well today you should have 175,222,170 subscribers, I think that's a little off.

  • Thank you maths.

  • subscribers now: about 200,000

    xD

  • Bucky, i have to say, without you i'd be no where in java, thanks a million

  • Let me propose an easier way for this....instead of having a "principal" and an "amount" variable,keep just one variable called "amount",give it the value of principal(amount=10000)

    then inside the loop put the following amount=amount+(amount*r)

    plain and simple without even using the Math.pow function and saving one variable from memory usage

  • @DevilOnHog I did the same, only with two variables. That is to say, I also didn't use the Math.pow function:

    for(int i = 0; i<10; i++){ amount = rate * principal + principal; principal = amount; }

    I see how yours is better. I also didn't make it print out each day.

  • @jacobmayday scientific notation :D

  • if your subscribers are increasing by 1% per day, it will double every 70 days. That means every year, your number of subscribers will increase by a factor of 32. That means that if you have 10,000 subs now, within 4 years you will have roughly 10 billion subscribers (there are only 7 billion people on the planet!)

    "compound interest is the most powerful force in the universe" Albert Einstein.

  • @BFitzProductions did you install the JDK right because I didn't have to import it

  • I fixed the problem, but how is it that you don't have to import math, but I did? Math.pow didn't work until I imported java.lang.Math.

  • you can also write the program without the Math.pow

    Code:

    for(int day = 1;day<=20;day++){ amount = principal + principal*rate; principal+=principal*rate;

  • btw, today, 12-22-2011, there are 192,953 subscribers, but there is suposed to be 3053444.

  • @jacobmayday make sure rate = 0.01 not 0.1

  • i checked 500000 days in the future and..

    "500000 Infinity" looks like youll have infinite subscribers here in a couple centuries! :P

  • @Gam3r979 actually more like 1000 years

  • Compound interest is A=P(1+R/M)^MT

    A= ending amount, P = Starting amount, M = compounds per year, T = years

  • If you put too many days it will just start saying "Infinity".

  • When would it be practical to use int instead of double if double can function both as a whole number and fraction?

  • how come he didn't import math directory ????

    how can he directly use it..?

  • May 10. 2010 - 377834 Subscribers... What?

  • Comment removed

  • if this were the actual rate you'd have over 52million subscribers today!

  • @jacobmayday that's scientific notation with letters

    I think

  • waaiiiitttt......I = PRT :P

  • @RynoFb I learnt I=PRN

  • @RedofYellow What does N stand for?

  • @RynoFb Number of years.

  • @RedofYellow Ok, well I = PRT is Interest = Principle(Rate)Time so it's llike the same

  • @RynoFb It is the same, just a different letter.

  • So i wrote the program and it says that since May10, 2009 until now, you should have 500million subscribers....

  • Bucky.....I am substantially impressed!

  • did anyone notice that is was supposed to be "principle" not "principal" >_<

  • For beginners it is wise to use floats instead of doubles, im sure bostonn will get into it in the more advaced tutorials :)

  • It's standard form. The E.

  • I had to research for 1 hour but know i really understand! Also this helps with Maths very good.

  • Come on Bucky I got to teach you some spellings, its Principle not principal.

  • "I wrote this when I had about.. 10,000 subscribers..."

    Now? 174,000 subscribers. Go bucky!

  • Just what I need for school!

    Thanks, Bucky :D

  • Great, now I can lend some money.

  • I my grandpa programs in Java, C, C++ and C#. He got me 2 java books, because i told him i wanted to learn programming, but i find bucky's tutorials much easier to understand, and much more entertaining to watch :D

  • 377,834 subs a year

  • Thank you so much Bucky. I felt like I would be freeloading if I didn't thank you.

  • Hi Bucky,

    Thanks for all again, you make easier the java understanding.

    I did that program without using theMath.pow() function and I left one variable and it works also properly as you can test.

    int day;

    double amount = 10000;

    double rate = .01;

    for (day=1; day<=20; day++){ amount=amount*(1 + rate); System.out.println("At the end of the day " + day + ", " + amount + " subscribers");

    }

  • @jacobmayday e# = x10^# its called expotental notation. Its a way of shortening HUGE numbers.

    so 1.2E10 = 1.2x10^10 or 1200000000 Hope that helps.

  • 100000 Infinity

    LOL

  • If you watch the view count each vid it gets Smaller

  • He should have 7.748834840250845E7 by now xD

  • System.out.println(amount+"\t subscribers on day "+i+".");

    \t = tab

  • If this were a correct calculation, you would have over 6.6 million subscribers...which you should. But sadly, you do not. :(

  • @jacobmayday also, you probably did something wrong.

  • @jacobmayday "ex" is shorthand for " * 10^x" where x is that number that comes after the e. Calculators use that too.

  • Comment removed

  • "a couple of half-subscribers" doesn't that equal one subscriber?

  • i have a 3 hour class each thursday where we go through java step by step, i watch this and save about 3 hours of time, so im ahead of my programming class, my friends comes to me for help.

  • @WindWalker940 I've said it once, and I'm saying it again. He's the Khan of techies.

  • I remember learning this in exel :D But now im learning how to make it, awesome.

  • Thank you.

    Using your calculator tutorial with this, i was able to make a basic input calculator for this :o I love your tutorials, very helpful.

  • by now you should have 400,000 subscribers....

  • Watched beginning of video: Oh shit, this may be my downfall!

    Watched rest of the video: Bucky saves the day! :D

  • i have 10000 subscribers now and 11 days from now i'm gonna have eleven hundred forty six subscribers....lol.....bucky rocks. he might delete you in near future from his subscriber's list .

  • I'm substantially impressed!!!

  • you should have 1186477.2510251561 subscribers! but you don't :( you only have 110000 :((((

  • On may 10, 2010, you should have had just over 375000 subscribers.

  • dude this is funny i always thought math after like 5th grade does nothing and algebra is helping me understand this here lol.

  • @thenewboston Principle*

    In school, the princiPAL is your PAL. 

  • You should have (to be exact on the 26th Aug) 812918.8833512849 subscribers :)...but you only have 149000....:(

  • Bucky you should have over 14 million subs now!!

  • y did he do 1+ r ?? i dont get it

  • @usama8800 R is the rate of the growth of his subscribers. In this case, each day the number of people subscribing to him is R = 1 % of the amount of subscribers he has. This means he has the next day the amount of subscribers from the previous day plus the 1 % new subscribers. This 1 % is equal to 0.01 times the amount of subscribers from the previous day, so:

    new amount = previous amount + (previous amount * 0.01) = previous amount * (1 + 0.01) = previous amount * (1+R).

    Basic math.

  • @colouredmirrorball thanks.!!! :)

  • There is no difference between (String args[]){ and (String[] args){

    when you make a class you can click an option to automatically type "main(String[] args){" but when i forget to do this and i have to type it out i find it faster / easier to just type "main(String args[]){".

  • Why'ed Bucky change from (String []args) to (String[] args)? Is there a difference?

  • in this case you actually spell principle as such ... in math the principle is not the same as principal.. who is the supervisor of your teachers at school

  • 822 days since May 10th, 2009.

    He should have 356,590 subscribers.

  • lol he did principal instead of principle...

  • Bucky has over 9,000 subscribers.

  • sprite+strawberries+lemon juice+fridge=awesome

    (just btw)

  • I tried to calculate how long till the entire population of the planet was subscribers, but after a certain amount of days it said infinity! i set max days to 1000000 and it wasn't even half way that it gave up!

  • ok i don't quite understand why u would times the day (1 + rate, day)

  • @BigGayDoug

    i don't think bucky meant to say it times the day

  • @BigGayDoug that's (1+rate)^day...

  • i get it now, if you * something by 1 you get 100 percent of that number if you * it by .01 it's 1 percent of it.

  • also don't understand why its (1 + rate) and not just (rate), what does the 1 do? and why put a * infront of math.pow

  • if he's gaining subscribers at 1 percent a day, 1 percent of 10000 is 100 not .01? am i being a retard?

  • Comment removed

  • ff

  • I think it would have made more sense if instead of day, years was used as the function goes by years. But ya this is the math way of calculating interest where as finance has simple and compound interest which calculates differently.

  • i didnt understand this...because compund interest is retarded!!! the java made sense though haha

  • Actually you were showing an example of something else. Compound interest has a different formula because the rate is compounded. This is just a standard interest rate formula.

  • wow u know u were suposed to have 1 mil subsribers now after 2 year and 2 months ?? well ur not that far :P u should be optimistic

  • @idvhfd Minecraft has economy, banking, and stocks plugins :P

  • i changed the day to 790 (thats up to July 9, 2011) and it says he should have more than 100 million subscribers :O

  • prize....

  • who else dont there amount of subscribers...29...

  • Bucky for Nobel price... for PEACE!

  • I am substancially impressed.

  • I like how u do the summary at the end.

  • Woot! I managed to create an interest calculator in the form I=Prt, which receives user input too, from this! Thank you bucky!

  • dont forget to click the ads for bucky!

  • Comment removed

  • over 100 subscribers a day. Damn

  • @100silverpizza

    You are crap programming.

  • you should had over 21 mil subscribers by now

  • Ok,I get it.it is the same god damn thing.

  • Can someone explain what is math.pow ???

    coulnd we just use : amount=principal*(1+rate)^day

  • Comment removed

  • @TheMislav100

    Java doesn't know these commands.

    The default Java command to do "^" is Math.pow. It does exactly the same, it's just written differently.

    What is does is calculate the power (which is the second parameter) of the first parameter.

  • I'm willing to bet the rise in buck's videos lately is due to people's interest in modding Minecraft.

    That's what I'm here for at least. :P

  • @100silverpizza due this has nothing to do with websites these are just examples

  • @100silverpizza Are you being sarcastic =P.

  • Shouldn't  it by A = P(1+(r/365)^(365*t) you are compounding every day

  • Hmm if this was compound wouldn't the math be

    Amount *= Math.pow((Rate + 1), intDays);

    this takes into account that after tomorrow you have more subscribers

  • I'm afraid of half-subscriber. Undead attacks :(

  • 477 nerds!!!!!!!

  • @nidea09 do u mean 477 millionaires. example notch, the creator of Minecraft.

  • have to make a question... you said you can't integer with the principal amount because you will have to use decimal points but looking to the data you have, you are talking about people. my question is:

    why can't i use int for principal if there shouldn't be any decimal number storage in this variable? shouldn't int solve the problem of the user typing wrong information?

  • 363 5.896421555566455E306

    364 4.1274950888965186E307

    365 Infinity

    wtf infinity thats awesome i want tha tmany im gonna have that many

  • dang it. if his subscribing rate continued he would have had

    539391740.5144048 by today

  • In which grade can you take algebra 1 ?

  • @graknol 7th grade in California. Its pretty much the same with all states.

  • ye will you have 120K+ subs. o.o

  • It shouldn't sound complicate if you took algebra 1

  • By today you should have " 1.5154133332062097E7 " subscribers =/ if only it were true =[

  • Awesome tutorials. Btw I think u need to update the principle after each iteration. Because ur subscribers depend on 1.1% of current subscribers. After each day ur subscribers change. so principal = amount in the end for each iteration.

  • @montycarlo5 if i understand this video correct, then i think that he solves this in the part "Math.pow(1 + rate, day), for each day the rate gets bigger so it still is correct. I think that is how it works. If it does not, please tell me.

  • where's the minecraft plugin tutorial :(

  • @seed419 He never said that there will be and learn to walk before your run.

  • @RokuNoRaiden That was a joke Mr. Good Sense-Of-Humor :)

  • @seed419 Well sorry i didnt really think it would be a joke without a smiley and having a frowny instead =D i guess my fault,i dont actually have a good sense of humor anyways.

  • Comment removed

  • Isn't this better way?

    principal = principal + principal * rate;

  • well, by now you should have had 239,000 suscribers... and you got 100,000

    :( bummer

  • Very good bucky !!!!!!!!

  • learning from the comments on this tutorials, people learn java to either make mods for minecraft or make a game like minecraft :)

  • @Budishaa isn't it funny how after Minecraft has been modded so many people learned java and they can actually be game developers.I think they waste their time modding an already good game ;)

  • @MrAvatar4o well it does help,as many people have to look back at tutorials just to do something again in minecraft coding :(.I used to do that,but now im about to make my own game.

  • @chrisall76 Good luck on learning,coding and all the things you will need to make your own game!

  • principal=principle

    lol