These are chat archives for codefellows/sea-c16-javascript

9th
Jul 2014
Martin Genev
@mgenev
Jul 09 2014 00:02 UTC
@lwscroggins your personal copy of the class repo is a mirror of the original on codefellows, your pull request is a request to merge the difference between yours and the original, hence everything which is included in your repo and doesn't exist in the original codefellows repo will be merged
does that help?
Tyler Morgan
@toastynerd
Jul 09 2014 00:03 UTC
A good way to know for sure is to check the files changed tab or the commits tab. https://github.com/codefellows/sea-c16-javascript/pull/20/files Looks like you’re good to go.
Larry Scroggins
@lwscroggins
Jul 09 2014 00:05 UTC
@mgenev not really, but @toastynerd seems confident that my assignment is there. hopefully that's a voice of some authority.
Martin Genev
@mgenev
Jul 09 2014 00:07 UTC
yes, he is correct that that's the easy way to check and it is included, i'm trying to help you understand what's going on :)
basically as long as you've made changes to your local copy of your repo and pushed them to your copy on github, the merge request will include them
Larry Scroggins
@lwscroggins
Jul 09 2014 00:09 UTC
thanks @mgenev Git is still a bit confusing and half the time I use it I feel like anything I do right was by sheer luck.
Hank Yates
@hankyates
Jul 09 2014 00:09 UTC
@lwscroggins it definitely feels that way at first
Martin Genev
@mgenev
Jul 09 2014 00:09 UTC
don't worry it takes weeks or months for almost everyone to get used to it
Hank Yates
@hankyates
Jul 09 2014 00:09 UTC
its very powerful but has a steep learning curve
Martin Genev
@mgenev
Jul 09 2014 00:10 UTC
once people learn it they can't even imagine coding without it
Aron Garavaglia
@agaravag
Jul 09 2014 01:25 UTC
mgenev: hi, I had a question for you
i think i deleted the wrong readme files on my fork, should i delete my fork and start over?
Martin Genev
@mgenev
Jul 09 2014 01:29 UTC
@agaravag answered
Larry Scroggins
@lwscroggins
Jul 09 2014 01:55 UTC
If there's a comment on my submission does that mean I need to change something and resubmit, our will I be told specifically that I need to resubmit?
Tyler Morgan
@toastynerd
Jul 09 2014 01:57 UTC
@lwscroggins depends on the comment, for one that I left for you, you should probably resubmit. I should have specifically stated that, my bad.
Larry Scroggins
@lwscroggins
Jul 09 2014 01:57 UTC
Ok. Thanks for the clarification.
Tyler Morgan
@toastynerd
Jul 09 2014 01:58 UTC
np, btw, by resubmit I don’t mean starting completely over
just make the changes and push the commit. It will update the pull request automatically.
Larry Scroggins
@lwscroggins
Jul 09 2014 02:00 UTC
Np. I've already got it set up. I just need to get back to my computer and git it up.
sunny yuen
@yuens1002
Jul 09 2014 02:27 UTC
why is this happening
why is this happening
```
why is this not evaluated to 2
> parseInt(02432, 10)
1306
Ivan Storck
@ivanoats
Jul 09 2014 02:32 UTC
yuens1002 which browser / runtime ?
I think it’s the leading zero, try 2432
Aron Garavaglia
@agaravag
Jul 09 2014 02:38 UTC
@mgenev : am I supposed to configure remotes after I clone the fork?
BrockBeaudry
@BrockBeaudry
Jul 09 2014 02:45 UTC
@yuens1002 Looks like parseInt is interpreting the number as an octal due the the leading 0. Either way though I'm not sure why you're expecting 2 as a result. 02432 in base-10 is just 2432.
Aron Garavaglia
@agaravag
Jul 09 2014 02:52 UTC
Hello all. I'm about to fork the sea-c16-javascript class repo, should I configure remotes after I clone the fork?
Larry Scroggins
@lwscroggins
Jul 09 2014 03:56 UTC
@toastynerd I updated the pull request. Hopefully what I did is what you are looking for. Thanks.
Tyler Morgan
@toastynerd
Jul 09 2014 04:14 UTC
@lwscroggins your code looks good but the pull request can’t be auto merged, I posted a comment on it.
Joaquin Guardado
@macikokoro
Jul 09 2014 04:17 UTC
@toastynerd Hi Tyler! I got a comment on my pull request: good job adding your student folder, the only problem is that you are also altering the common readme in the /students/ root folder, if I merge your pull request i'd wipe out the one in codefellows
@toastynerd do I have to delete the common readme file in my fork
Tyler Morgan
@toastynerd
Jul 09 2014 04:19 UTC
No, you shouldn’t edit the common readme. If you go to the pull request’s page there should be a “Use the command line” link uder the text “We can’t automatically merge this pull request” if you click that link it will give you instructions on how to fix it.
Essentially in a pull requequest you should only be adding your assignment and not touching any of the other files or folders unless you’re fixing a typo or something similar.
Joaquin Guardado
@macikokoro
Jul 09 2014 04:21 UTC
I did mess around with the other files by accident
@toastynerd Are we supposed to fork the repo or remote it?
Tyler Morgan
@toastynerd
Jul 09 2014 04:24 UTC
you should have your own fork of the codefellows repo and possibly the codefellows repo as a remote on your fork
Tyler Morgan
@toastynerd
Jul 09 2014 04:31 UTC
so in your repo you could add something like git remote add codefellows https://github.com/codefellows/sea-c16-javascript/ then git pull codefellows master it will give some errors about merge errors, you’ll have to open the files and fix the merge conflicts then push it to master
Joaquin Guardado
@macikokoro
Jul 09 2014 04:32 UTC
Thanks toastynerd
Tyler Morgan
@toastynerd
Jul 09 2014 04:32 UTC
here are git docs on merging files with git http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
np, let me know if you have any more questions
Aron Garavaglia
@agaravag
Jul 09 2014 04:33 UTC
@toastynerd was I supposed to to configure remotes after I clone the fork?
Tyler Morgan
@toastynerd
Jul 09 2014 04:34 UTC
You only really have to add the codefellows remote if you need to fix merge conflicts
or if you want to have every other student’s folders on your fork
Aron Garavaglia
@agaravag
Jul 09 2014 04:36 UTC
@toastynerd ok, awesome, thanks for the help!
Aron Garavaglia
@agaravag
Jul 09 2014 04:38 UTC
@toastynerd do you know if there is a F2 study lab on thursdays like there was for F1?
Joaquin Guardado
@macikokoro
Jul 09 2014 04:40 UTC
@mgenev I read that article today Silicon Valley is number 1
Tyler Morgan
@toastynerd
Jul 09 2014 04:41 UTC
@agaravag I’m not sure, I know that @hankyates wanted one but we haven’t talked to the TAs about it yet. I’ll be at codefellows thursday nights but not this thursday.
Joaquin Guardado
@macikokoro
Jul 09 2014 04:42 UTC
@toastynerd Tyler I resubmitted my pull request. Is there a way you could check if it's correct this time.
Scott Romney Burbidge
@sburbidg
Jul 09 2014 04:56 UTC
So I added a .gitignore and I was wondering if files added to it should still be showing up in my remote repo.?
Tyler Morgan
@toastynerd
Jul 09 2014 04:58 UTC
Yeah, because they’re still checked in, .gitignore won’t get rid of the files that have already been commited
I think git rm —cache <file you want to get rid of> will get rid of them on your local repo but I don’t think it will remove them from github.
^^don’t actually wrap the file with <>
Scott Romney Burbidge
@sburbidg
Jul 09 2014 05:02 UTC
@toastynerd Thank you. I got rid of them in my local repo by untracking them first. I'll just have to live with it being in my remote. So if I .gitignore a file in my local before I commit it to the remote they won't show up
Tyler Morgan
@toastynerd
Jul 09 2014 05:03 UTC
correct
if you really want to remove them here are the github docs https://help.github.com/articles/remove-sensitive-data
Scott Romney Burbidge
@sburbidg
Jul 09 2014 05:04 UTC
I'll give it a look. Might as well learn it anyways. Thanks
Tyler Morgan
@toastynerd
Jul 09 2014 05:05 UTC
yeah, it’s a good thing to know how to do
Joaquin Guardado
@macikokoro
Jul 09 2014 05:15 UTC
I found this link for anybody looking to spice up their readme files: https://guides.github.com/features/mastering-markdown/
Scott Romney Burbidge
@sburbidg
Jul 09 2014 05:26 UTC
this is also a good one
Joe Elsey
@joeelsey
Jul 09 2014 15:06 UTC
I googled, but not much came up. What is the !! operator? Not not?
BrockBeaudry
@BrockBeaudry
Jul 09 2014 15:46 UTC
!! isn't an operator, it's ! twice. so ! (not, or bang) gives you an inverse boolean value, and applying it twice (not not, or bang bang) gives you a true boolean value
example:
!Boolean(false) // returns true, the inverse boolean value of what we started with
!!Boolean(false) // returns false, the true boolean of what we started with
sunny yuen
@yuens1002
Jul 09 2014 16:24 UTC
@ivanoats i used chrome....
i'm looking for a way to test the js code i'm writing... can someone shed some light on that?
sunny yuen
@yuens1002
Jul 09 2014 17:03 UTC

i'm going thru the mdn examples on array and the for loop. here's one that says

for (var i = 0, item; item = a[i++];) {
  // do something with item
}

why is the array"a" okay without having to define it first

Joe Elsey
@joeelsey
Jul 09 2014 17:07 UTC
Do you have the mdn link? I think the 'a' variable my be just an example.
might
Tyler Morgan
@toastynerd
Jul 09 2014 17:19 UTC
@joeelsey !! is actually used to convert non boolean values to boolean, watch out though because 0, null, undefined and empty string all evaluate to false:
!!(2 + 4) // returns true
!!(2 - 2) // returns false
Hank Yates
@hankyates
Jul 09 2014 17:25 UTC
@joeelsey ! actually is an operator but it s a logical operator
@yuens1002 that doesnt look right. or it looks strange
for (var i = 0; i < a.length; i++) {
  var item = a[i];
  // do something with item
}
thats a better pattern to follow
sunny yuen
@yuens1002
Jul 09 2014 17:30 UTC
but it's efficient, it's looking up the length of at each iteration of the loop. can be done with setting the length to a var first....
sunny yuen
@yuens1002
Jul 09 2014 17:33 UTC
@joeelsey @hankyates mdn reintroduction
Hank Yates
@hankyates
Jul 09 2014 17:46 UTC
huh interesting
that's new
it works
shrug use it
to answer you question though... its just an example you do have do define an array
var a = [1, 2, 3];

for (var i = 0, item; item = a[i++];) {
  console.log(item);
  // do something with item
}
Joe Elsey
@joeelsey
Jul 09 2014 18:12 UTC
Is it ok that I'm pushing to just origin instead of origin master? Doesn't seem to make a difference.
Hank Yates
@hankyates
Jul 09 2014 18:12 UTC
the default branch is master
so ... no
git push will default to git push origin which will default to git push origin master
or git push origin <current checked out branch>
jbassage
@jbassage
Jul 09 2014 18:51 UTC
@hankyates Are you automatically notified of pull requests or should be we submitting PRs as assignments through Canvas or via email or something?
jbassage
@jbassage
Jul 09 2014 19:05 UTC
Oh and @toastynerd I think I talked to you Monday about having some Linux questions, right? Well I figured out the specific things I'd been planning to ask, so I'm okay for now. But I'm sure I'll be coming to you for something soon enough.
djlabowski
@djlabowski
Jul 09 2014 20:51 UTC
Hello All - There's a JS meet up @ my office next Wednesday from 5-8 centered around Famo.us which for those that don't know is the new jQuery killer. For those interested check here: http://www.meetup.com/Famous-Seattle/events/193612532/
Hank Yates
@hankyates
Jul 09 2014 21:08 UTC
@jbassage yeah it sends me and everyone watching an email. we are getting flooded pretty bad though
Hank Yates
@hankyates
Jul 09 2014 22:14 UTC
hmm
Hank Yates
@hankyates
Jul 09 2014 23:23 UTC
@djlabowski if people were actually going to use the lib they wouldnt call it a jquery killer