These are chat archives for FreeCodeCamp/Help

11th
Mar 2015
Suzanne Atkinson
@AdventureBear
Mar 11 2015 01:57 UTC
anyone else with gitter problems?
Suzanne Atkinson
@AdventureBear
Mar 11 2015 02:10 UTC
So, little side project, non bonfire...playing with canvas. Doing something simple, just trying to get some random dots on the screen right now. Whenever I try to add translate or scale, to create a cartesian coordinate system, the screen goes blank. Would anyone like to see?
Suzanne Atkinson
@AdventureBear
Mar 11 2015 02:30 UTC
http://codepen.io/AdventureBear/pen/bNxzmd
before anyone says, "hey that's an exact copy of the snake game tutorial" it is and it isn't. Well it is, but I tore it apart and am rebuilding to make sure I get hte basics. I want to do a projectile so my update function will be different than what I have now (+1, +1).
Ming Zhang
@Scripore
Mar 11 2015 02:36 UTC
if I wanted to create a touch typing app similar to http://thetypingcat.com/course/colemak , would I need a frontend framework if I'm looking to use Rails on the server side?
I'm trying to learn Rails through creating a project, not exactly sure where to start.
Cristián Berríos
@crisberrios
Mar 11 2015 02:39 UTC
well, this bootcamp is all about js
so you won't find many people proficient in rails
but that project is pure JavaScript
Ming Zhang
@Scripore
Mar 11 2015 02:45 UTC
oh, I see. thanks, off to do more research!
Priscilla P. Wood
@RailsGirl
Mar 11 2015 03:09 UTC
@Scripore if you want to learn Rails you should try http://railsforzombies.org/
Christian
@crisxian
Mar 11 2015 03:54 UTC
haha. my page crashed on a bonfire i was working on for awhile
I just smacked myself on the forehead. Now I have a headache
Suzanne Atkinson
@AdventureBear
Mar 11 2015 04:02 UTC
i save often in a different location AND... I love crashing the browser!
it means you're experimenting
Christian
@crisxian
Mar 11 2015 04:06 UTC
lol. that's one way to look at it
Suzanne Atkinson
@AdventureBear
Mar 11 2015 04:36 UTC
I'm serious..the first one or three times I did it was always like OH CRAP, there goes all that work. Now I'm like, "OH COOL< I did something awesome!"
Nathan
@terakilobyte
Mar 11 2015 06:37 UTC
it’s very hard to crash the browser with bonfire
you are definitely pushing the limits
MychaelZ
@MychaelZ
Mar 11 2015 06:42 UTC
it has frozen up on me several times
i had to refresh the page to get it to work every once in a while
Nathan
@terakilobyte
Mar 11 2015 06:50 UTC
firefox?
or chrome?
I’ve never had it freeze in chrome, even after hundreds of intentionally induced errors and long and big loops
MychaelZ
@MychaelZ
Mar 11 2015 06:52 UTC
chrome
Nathan
@terakilobyte
Mar 11 2015 06:56 UTC
strange
I’ve been unable to get it to lock up in chrome
I’ve not found the correct method for shaking the chicken bones I guess
MychaelZ
@MychaelZ
Mar 11 2015 06:57 UTC
i was running simple functions and it would just freeze up that i'd have to refresh it
no for loops or anything
Nathan
@terakilobyte
Mar 11 2015 06:58 UTC
though thinking about it, a good solution to protect against that case would be to save the user’s code every time they try to run it, then just delete the “working copy” upon valid completion
what functions? I’d like to see it if you can reproduce it
also I owe you a code review
wanna do that now?
I’m sorry, I got super caught up building camper news
MychaelZ
@MychaelZ
Mar 11 2015 07:01 UTC
yeah sure i just wanted a few tips nothing significant just like where i should space and stuff. but let me try to freeze it up and i can show u
Nathan
@terakilobyte
Mar 11 2015 07:02 UTC
yeah sure
I’m currently reading about the optimal search route to find waldo
MychaelZ
@MychaelZ
Mar 11 2015 07:09 UTC
i did a few bonfires its working great
i'm not sure why it was messing up before
Nathan
@terakilobyte
Mar 11 2015 07:15 UTC
I’m starting to suspect that it may be an issue with loading
the sandbox may not be loading ramda
or the call to load it could be taking very long and cause it to hang
it would definitely appear frozen if the sandbox wasn’t even initializing
Nareg Khoshafian
@nkhoshaf
Mar 11 2015 16:24 UTC
Where can I get help/track my progress for Bonfire challenges? Github? Does anyone have a link?
Jason Rueckert
@jsonify
Mar 11 2015 16:27 UTC
@nkhoshaf there currently isn't a way to track your Bonfire progress. But it's in the works, from what I hear
last night I finished that one you are working on
Nareg Khoshafian
@nkhoshaf
Mar 11 2015 16:29 UTC
@phlacin the mutations exercise?
Jason Rueckert
@jsonify
Mar 11 2015 16:30 UTC
yeah
Nareg Khoshafian
@nkhoshaf
Mar 11 2015 16:30 UTC
what string method did you use do you remember? I've used a bunch like search, includes, find, etc?
nothing seems to work I think I'm missing some logic (another for loop or if/else statement perhaps)
Cristián Berríos
@crisberrios
Mar 11 2015 16:31 UTC
have you looked at indexOf?
Nareg Khoshafian
@nkhoshaf
Mar 11 2015 16:32 UTC
no i'll try that now thanks! @crisberrios
Cristián Berríos
@crisberrios
Mar 11 2015 16:32 UTC
:thumbsup:
Jason Rueckert
@jsonify
Mar 11 2015 16:36 UTC
i think I ended using charAt()
Nareg Khoshafian
@nkhoshaf
Mar 11 2015 16:37 UTC
Screen Shot 2015-03-11 at 12.36.00 PM.png
@crisberrios Still no luck
second else if statement should be true
I think I'm complicating things more than I should
Cristián Berríos
@crisberrios
Mar 11 2015 16:41 UTC
remember that you have 2 "arrays"
or 3
[[arr2],[arr3]]
strings aren't arrays but share some of it's methods
and in some languages they are virtually the same
so, for searching a letter within the 1st string, you have to use arr[0][i]
Nareg Khoshafian
@nkhoshaf
Mar 11 2015 16:42 UTC
oh wow that's really good to know thanks
let me play around with it for minute
Suzanne Atkinson
@AdventureBear
Mar 11 2015 16:43 UTC
is this a case for using arguments @crisberrios ?
Nareg Khoshafian
@nkhoshaf
Mar 11 2015 16:43 UTC
the code that is
Cristián Berríos
@crisberrios
Mar 11 2015 16:43 UTC
but to search a single character from the 2nd string on the 1st one you should use arr[0].indexOf(arr[1][i])
nope @AdventureBear just for dealing with strings and arrays
Suzanne Atkinson
@AdventureBear
Mar 11 2015 16:44 UTC
hmph. thought I learned something.
Nareg Khoshafian
@nkhoshaf
Mar 11 2015 16:48 UTC
@crisberrios IT WORKED! Thanks man wow I knew I was close but it was so frustrating what I needed to change...I was on that one for a while
I usually just like to struggle through the problem but I was just stumped on that one
Paul C
@realPaulC
Mar 11 2015 16:53 UTC
hey guys im stuck on the 'title case a sentence' bonfire here's what i've got so far
blob
blob
and it throws this
Cristián Berríos
@crisberrios
Mar 11 2015 16:54 UTC
paste the code not the screenshot
Paul C
@realPaulC
Mar 11 2015 16:54 UTC
k
Cristián Berríos
@crisberrios
Mar 11 2015 16:54 UTC
read the .md help button
Paul C
@realPaulC
Mar 11 2015 16:54 UTC
function titleCase(str) {
  var spl = str.split(" ");
  var caps = [];
  for (var i=0; i <= spl.length; i++) {
    caps[i] = spl[i].charAt(0).toUpperCase() + spl[i].substr(1);
  }
  return caps;
}

titleCase("I'm a little tea pot");
Cristián Berríos
@crisberrios
Mar 11 2015 16:54 UTC
to learn how to format it
``` in lines before and after the code
Christian
@crisxian
Mar 11 2015 16:55 UTC
you can still edit the text after you send it *
Paul C
@realPaulC
Mar 11 2015 16:56 UTC
whats .md?
Suzanne Atkinson
@AdventureBear
Mar 11 2015 16:56 UTC
I think the sytax for your substr is incorrect: string.substr(start,length)
Cristián Berríos
@crisberrios
Mar 11 2015 16:56 UTC
google it
Paul C
@realPaulC
Mar 11 2015 16:56 UTC
boom
Cristián Berríos
@crisberrios
Mar 11 2015 16:56 UTC
it's for text formatting
in a simple way
Paul C
@realPaulC
Mar 11 2015 16:57 UTC
will do!
Nareg Khoshafian
@nkhoshaf
Mar 11 2015 16:58 UTC
@pcigolini GET RID OF = in your for loop
that should do it
I just tried it
Cristián Berríos
@crisberrios
Mar 11 2015 16:59 UTC
^
good catch
it's just failing on the last unexistant array item
Paul C
@realPaulC
Mar 11 2015 16:59 UTC
yes, i understand now
amazing, fellows
Suzanne Atkinson
@AdventureBear
Mar 11 2015 17:00 UTC
i keep trying to help but I keep missign the mark!
Nareg Khoshafian
@nkhoshaf
Mar 11 2015 17:00 UTC
This is the first time I actually helped someone lol
Paul C
@realPaulC
Mar 11 2015 17:02 UTC
@nkhoshaf how does it feel?
also needed to add .toLowerCase to the second part of caps[i]
Nareg Khoshafian
@nkhoshaf
Mar 11 2015 17:09 UTC
I have this warm feeling inside my body...then again I did just have soup
Suzanne Atkinson
@AdventureBear
Mar 11 2015 17:11 UTC
hahah
I can't wait to have soup. Er, ah..be able to help someone
James Barnett
@barnettjw
Mar 11 2015 17:15 UTC
@pcigolini @crisberrios - The button below the send message button on gitter.im is a markdown cheatsheet
Tyler Haas
@tylerthehaas
Mar 11 2015 17:49 UTC
Finished all the Bonfires Today! Big shout out to @Dadsaster and all the others of you who helped me through it!
Suzanne Atkinson
@AdventureBear
Mar 11 2015 17:49 UTC
@haasDev nice job
Cristián Berríos
@crisberrios
Mar 11 2015 17:51 UTC
grats haasDev!
I'm startin with these anytime during this/next week
made me feel like starting all over from scratch
Suzanne Atkinson
@AdventureBear
Mar 11 2015 17:54 UTC
haha @crisberrios ... Desert of Despair?
just show them your little jumping game. :)
Cristián Berríos
@crisberrios
Mar 11 2015 17:56 UTC
:P
Suzanne Atkinson
@AdventureBear
Mar 11 2015 17:59 UTC
I plan to show off my single trajectory missile box to get clients. :)
Cristián Berríos
@crisberrios
Mar 11 2015 18:08 UTC
Suzanne Atkinson
@AdventureBear
Mar 11 2015 18:12 UTC
That's sweet. Jus thope they don't have a seizure disorder
Meta Hirschl
@MetaCoderHirschl
Mar 11 2015 18:33 UTC
congrats to @haasDev for finishing bonfires! wow! I'm stuck here and have been hitting my head against the wall for way too long...I"m on the Sum All Primes (#26) and I've got the code to work except fails for 977...I must be missing something obvious....any help out there? will insert code
function isPrime(num) {

    for ( var i = 2; i < num; i++ ) {
        if ( num % i === 0 ) {
            return false;
        }
    }
    return true;
}

function sumPrimes(n) {
    var arr = [2];
    for ( var i = 3; i < n; i+=2 ) {
        if ( isPrime(i) ) {
            arr.push(i);
        }
    }
    var totalAmount = 0;

    for (var z = 0; z < arr.length; z++) {

    totalAmount += arr[z]; 
    } 
    console.log(arr);
    console.log(totalAmount); 

    return totalAmount;
}

sumPrimes(977);
when I look at the final array, 977 is missing -- should be there, it's prime. So not sure why that is not being added to array.
oh and the answer is 977 off, so that is what is missing.
jsonify @phlacin Folks, we've got Camper News now!!! Please start submitting stuff. I know you've got cool stuff that I'd be interested in! It's all about Sharing the Wealth...of knowledge:
http://www.freecodecamp.com/stories/hot
Meta Hirschl
@MetaCoderHirschl
Mar 11 2015 18:42 UTC
@phlacin very cool!!!
Jason Rueckert
@jsonify
Mar 11 2015 18:43 UTC
yeah, a lot of hard work was put into building that app and I want to make sure people get a chance to play with it
Suzanne Atkinson
@AdventureBear
Mar 11 2015 18:45 UTC
@phlacin did it break due to server overlaod? Been working fine, just got some weird errors
Jason Rueckert
@jsonify
Mar 11 2015 18:46 UTC
@AdventureBear looks fine on my end
screen shot?
Suzanne Atkinson
@AdventureBear
Mar 11 2015 18:58 UTC
Screen Shot 2015-03-11 at 2.58.02 PM.png
Jason Rueckert
@jsonify
Mar 11 2015 19:05 UTC
I've let Quincy know, so hopefully he can look into it. And refreshing doesn't help still?
Suzanne Atkinson
@AdventureBear
Mar 11 2015 19:13 UTC
now it's all of FCC for me
Meta Hirschl
@MetaCoderHirschl
Mar 11 2015 19:13 UTC
anyone have time to look at the bonfire I'm stuck on? code above....I'm hitting a wall. hard... :worried:
Suzanne Atkinson
@AdventureBear
Mar 11 2015 19:13 UTC
i'm ata coffee shop maybe something to do with that
Danny Fritz
@dannyfritz
Mar 11 2015 19:25 UTC
@MetaCoderHirschl you aren't including n in your loop that adds primes to the array.
Meta Hirschl
@MetaCoderHirschl
Mar 11 2015 19:27 UTC
@dannyfritz DANG IT!!! Thanks so much, an missing = sign. That was it. I wish I'd asked yesterday, I just couldn't see it. You are the best.
Paul C
@realPaulC
Mar 11 2015 20:07 UTC
got pretty close on the return largest number in array bonfire
function largestOfFour(arr) {
  var number = [0, 0, 0, 0];
  for (var i=0; i<arr.length; i++) {
    for (var j=0; j<arr[i].length; j++) {
      if (arr[i][j] > number[i]) {
        number[i] += arr[i][j];
      }
    }
  }
  return number;
}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
[9,40,67,2001]
was my result
don't get why its adding the whole sub-array together
SOLVED thanx
Christopher Nguyen
@crosscris
Mar 11 2015 21:12 UTC
Can anyone recommend any other "contact us" tool besides formspree.io?
Yosi
@jparkton
Mar 11 2015 21:35 UTC
just a simple php script
or is this in a CMS of some type?
Christopher Nguyen
@crosscris
Mar 11 2015 22:01 UTC
Looking to make a contact form for my own site and a friend's.
Friend's will need a CMS
Any recs?