These are chat archives for FreeCodeCamp/Help

2nd
Jan 2015
Quincy Larson
@QuincyLarson
Jan 02 2015 01:03
I delete myself several times a day
Have you ever seen The Prestige? I do that all day long.
Justin Rogers
@yaskyj
Jan 02 2015 01:12
The Transported Man?
Quincy Larson
@QuincyLarson
Jan 02 2015 01:13
@yaskyj Exactly :)
@yaskyj And I mean doing the Transported Man the hard way
Justin Rogers
@yaskyj
Jan 02 2015 01:15
@QuincyLarson Hopefully you'll be the man standing on the stage.
Quincy Larson
@QuincyLarson
Jan 02 2015 06:00
;)
Jeannette Castañeda
@mjcCodes
Jan 02 2015 06:48
Just added quick-fix bug to Trello. Wrong link on Challenge #30. FYI.
Quincy Larson
@QuincyLarson
Jan 02 2015 07:39
Great! Thanks for catching this. I’ll fix it now.
Quincy Larson
@QuincyLarson
Jan 02 2015 07:48
Fixed
Jeannette Castañeda
@mjcCodes
Jan 02 2015 08:01
Yay! I love being able to cross something off the list in a jif!
Dominic Jones
@towwiow
Jan 02 2015 12:51
@Maximization - I'm doing the try.jQuery challenges still.
I'm on chapter 3 - last section (3.17)
Maxim Orlov
@Maximization
Jan 02 2015 12:52
alright
Dominic Jones
@towwiow
Jan 02 2015 12:52
they just added a bunch of stuff all in one section so now I'm all screwed up. I think I'm close though; this is what I have...
$(document).ready(function(){
  $('button').on('click', function(){
    var message = $("<span>Call 1-555-jquery-air to book this tour</span>");
    var discount = $.data(discount);
    $(this).closest(".tour").append(message);
    $(this).remove();
  });
});
Maxim Orlov
@Maximization
Jan 02 2015 12:54
the solution is easier than you'd expect
Dominic Jones
@towwiow
Jan 02 2015 12:54
I think my discount variable isn't right but I'm kinda confused on how it should be... should it be calling the data-discount in the css?
tinkerhead
@tinkerhead
Jan 02 2015 12:54
oops can i jump in with my doubt...........
Maxim Orlov
@Maximization
Jan 02 2015 12:54
exactly, so it needs to be all in one line
var discount = $....;
you'll need to traverse and get the data in one line
Dominic Jones
@towwiow
Jan 02 2015 12:56
var discount = $('vacation').first().data('discount')
like that?
that's not right... hmm..
let me go back to the last sections slides and see if I can figure this out.
Maxim Orlov
@Maximization
Jan 02 2015 13:01
ahh, struggled with a small bug myself
alright so you've declared the discount variable, so far so good
how would you traverse to the closest .tour list item?
@TheGermanGuy did you manage to set up the background?
tinkerhead
@tinkerhead
Jan 02 2015 13:06
nope
Dominic Jones
@towwiow
Jan 02 2015 13:08
@Maximization - well the thing is, all 3 of the li classes are different
but maybe I could do.
Maxim Orlov
@Maximization
Jan 02 2015 13:08
@TheGermanGuy show us the code you're using
Dominic Jones
@towwiow
Jan 02 2015 13:09
$('.tour').find("li");
Maxim Orlov
@Maximization
Jan 02 2015 13:09
@towwiow you already did it with the .append("message") code, it's exactly the same
Dominic Jones
@towwiow
Jan 02 2015 13:09
or `$('.tour').find("data-discount");
tinkerhead
@tinkerhead
Jan 02 2015 13:09

<!DOCTYPE html>

<head>

<title>My Profile</title>

<style>
input {
padding: 10px;
}
h1 {
font-family: "Helvetica Neue";
}
body {
text-align: center;
background:url("C:\Users\chandarshek\Desktop\hello.png");
}
</style>

<body>
<img src="C:\Software\'kid'\img\app.png">
<p><h1>Hi! I am Kiranraj</h1></p>
<input type="email" placeholder="Your email">
<input type="submit">
</body>

html file is also on desktop.................
Maxim Orlov
@Maximization
Jan 02 2015 13:10
@TheGermanGuy use background: url("img/hello.png"); , your hello.png file is in the img folder of your project so you can use relative paths now
@TheGermanGuy then background: url("hello.png"); will do the trick
tinkerhead
@tinkerhead
Jan 02 2015 13:11
ok.......................i will try and let u know thx
Maxim Orlov
@Maximization
Jan 02 2015 13:12
@towwiow remember, you're traversing from the clicked button so first thing you need to do is start at the button that was triggered by the listening event
@towwiow how do you reference an object to itself?
Dominic Jones
@towwiow
Jan 02 2015 13:12
ok..let me try again
jQuery object to itself?
Maxim Orlov
@Maximization
Jan 02 2015 13:13
yes
Dominic Jones
@towwiow
Jan 02 2015 13:15
i keep getting data-discount doesn't exist on this element,, you want the closest .tour item instead - so I'm traversing to the wrong css selector right?
Maxim Orlov
@Maximization
Jan 02 2015 13:15
that seems the case
Dominic Jones
@towwiow
Jan 02 2015 13:15
@Maximization - sorry man, still really new to all this. learning it for the very first time so you'll have to bear with me.
Maxim Orlov
@Maximization
Jan 02 2015 13:15
so traversing is the issue here
Dominic Jones
@towwiow
Jan 02 2015 13:15
right
Maxim Orlov
@Maximization
Jan 02 2015 13:16
@towwiow haha no problem, I'm patient
Dominic Jones
@towwiow
Jan 02 2015 13:16
i'm not finding what needs to be found - therefore my changes won't happen.
  1. find it 2. change it
Maxim Orlov
@Maximization
Jan 02 2015 13:16
I can tell you that finding the correct tag consists of 2 actions
calling the jQuery object on itself, in this case the button
and then traversing to the closest .tour class item
Nathan
@terakilobyte
Jan 02 2015 13:17
what’s the dom look like atm?
Dominic Jones
@towwiow
Jan 02 2015 13:18
hold on a moment - at work, taking a phone call lol.
brb
Nathan
@terakilobyte
Jan 02 2015 13:19
no worries, when you have the time
Dominic Jones
@towwiow
Jan 02 2015 13:30
ok..
dom looks like this.
<div id="tours">
  <h1>Guided Tours</h1>
  <ul>
    <li class="usa tour" data-discount="299">
      <h2>New York, New York</h2>
      <span class="details">$1,899 for 7 nights</span>
      <button class="book">Book Now</button>
    </li>
    <li class="europe tour" data-discount="176">
      <h2>Paris, France</h2>
      <span class="details">$2,299 for 7 nights</span>
      <button class="book">Book Now</button>
    </li>
    <li class="asia tour" data-discount="349">
      <h2>Tokyo, Japan</h2>
      <span class="details">$3,799 for 7 nights</span>
      <button class="book">Book Now</button>
    </li>
  </ul>
</div>
$(document).ready(function(){
  $('button').on('click', function(){
    var message = $("<span>Call 1-555-jquery-air to book this tour</span>");
    var discount = $(this).closest(".tour").closest('data-discount').data();
    $(this).closest(".tour").append(message);
    $(this).remove();
  });
});
second part is my application.js part
i'm hung up on traversing to the li classes to pull the discount
Nathan
@terakilobyte
Jan 02 2015 13:32
what happens when you append to li?
Maxim Orlov
@Maximization
Jan 02 2015 13:33
you're almost, you have one redundant method call in your traversing code
Nathan
@terakilobyte
Jan 02 2015 13:34
yeah I was going to get to that too
Dominic Jones
@towwiow
Jan 02 2015 13:34
the redundency is .closest("tour").closest('data-discount') - but I don't know what to put in place of the second .closest
Maxim Orlov
@Maximization
Jan 02 2015 13:34
you start by selecting the clicked button with $(this) then you find the closest .tour class element with .closest(".tour") , that's it you're already there
now you need to extract the data information
@terakilobyte my bad
Dominic Jones
@towwiow
Jan 02 2015 13:35
so it would be closest("tour").data(discount);
?
Nathan
@terakilobyte
Jan 02 2015 13:35
it’s all good
in this case I’m not even sure closest is necessary
but is an li to a button?
Maxim Orlov
@Maximization
Jan 02 2015 13:38
@towwiow when you pass in tag properties to method calls you always use quotes, therefore .data(discount) won't work and misses the quotes, just like you do with .tour
Nathan
@terakilobyte
Jan 02 2015 13:39
is there a way to put the element where you want without the opportunity for misquoting or mispelling a selector at all?
Maxim Orlov
@Maximization
Jan 02 2015 13:39
@terakilobyte we need closest I think, we're going from the button to the li
Nathan
@terakilobyte
Jan 02 2015 13:40
looking at it, the button is a child of an li
making an li a parent, no?
Maxim Orlov
@Maximization
Jan 02 2015 13:40
yes
Nathan
@terakilobyte
Jan 02 2015 13:40
so $(this).parent().append(x)
Maxim Orlov
@Maximization
Jan 02 2015 13:41
yeah sure that would work, but we're doing http://try.jquery.com/levels/3/challenges/17
I don't think the system will accept an alternative solution
oh it did, so yeah that works too
Dominic Jones
@towwiow
Jan 02 2015 13:43
hmm.
Maxim Orlov
@Maximization
Jan 02 2015 13:43
but perhaps it's better to stick to the problem description and try to work it out that way
Dominic Jones
@towwiow
Jan 02 2015 13:43
I wouldn't know what to append with this line because the data variable still isn't defined. $(this).parent().append(x)
Don't I have to define the data variable still? I thought that's why I'm pulling the .data("discount")
Maxim Orlov
@Maximization
Jan 02 2015 13:44
you don't need to append anything in this challenge
exactly
so how does your code look now?
Dominic Jones
@towwiow
Jan 02 2015 13:44
$(document).ready(function(){
  $('button').on('click', function(){
    var message = $("<span>Call 1-555-jquery-air to book this tour</span>");
    var discount = $(this).closest(".tour").data("discount");
    $(this).closest(".tour").append(message);
    $(this).remove();
  });
});
That's the answer.
Maxim Orlov
@Maximization
Jan 02 2015 13:44
hooray
Dominic Jones
@towwiow
Jan 02 2015 13:45
so let's talk this over
lol
Nathan
@terakilobyte
Jan 02 2015 13:45
$(document).ready(function(){
  $('button').on('click', function(){
    var message = $("<span>Call 1-555-jquery-air to book this tour</span>");
    var discount = $(this).closest('.tour').data('discount');
    $(this).parent().append(message);
    $(this).remove();
  });
});
was also just accepted as a valid answer
Dominic Jones
@towwiow
Jan 02 2015 13:45
we're looking at all the button's for a click
Maxim Orlov
@Maximization
Jan 02 2015 13:45
yup
Dominic Jones
@towwiow
Jan 02 2015 13:45
when we click on he button we get the message still because we aren't doing anything with the discount variable yet, correct?
on the* button
Maxim Orlov
@Maximization
Jan 02 2015 13:46
correct
Nathan
@terakilobyte
Jan 02 2015 13:46
all it’s doing is reading in the information from data into discount, and removing the button after appending the telephone number
Dominic Jones
@towwiow
Jan 02 2015 13:46
but if I were to put discount in the .append(discount) space - it would append the individual discounted prices?
Maxim Orlov
@Maximization
Jan 02 2015 13:46
try it
Nathan
@terakilobyte
Jan 02 2015 13:48
looking back over the jquery stuff makes me like angular even more
Dominic Jones
@towwiow
Jan 02 2015 13:52
yeah - I did it and the correct discounts pulled in @Maximization
Maxim Orlov
@Maximization
Jan 02 2015 13:53
indeed, as you would expect
Nathan
@terakilobyte
Jan 02 2015 13:53
it’s very helpful it didn’t pull in the wrong discount
otherwise the jquery library wouldn’t be as used
Christopher Hutchinson
@cshutchinson
Jan 02 2015 13:57
@towwiow I am happy you are making progress
I worked hard yesterday to finish these. It really helped me to take notes during his video presentations ( I guess I am a person who learns by writing)...then the challenges were much easier for me and I rarely provided an incorrect answer unless his objective was a little unclear.
Dominic Jones
@towwiow
Jan 02 2015 14:00
@cshutchinson - i learn by writing as well and I wrote notes from the videos as you stated that you did and it helped you.
I haven't touched tr.jQuery for 48 hours so I think the missed day yesterday allowed time for the logic behind jQuery to leave me lol
Christopher Hutchinson
@cshutchinson
Jan 02 2015 14:00
i hope it goes smoothly for you today :)
Dominic Jones
@towwiow
Jan 02 2015 14:00
likewise.
Christopher Hutchinson
@cshutchinson
Jan 02 2015 14:01
project 13 was a breeze after these....
I am going for another cup of coffee :)
Dominic Jones
@towwiow
Jan 02 2015 14:05
hehe cool.
come back and help me when you're done.
Christopher Hutchinson
@cshutchinson
Jan 02 2015 14:08
hmm there was only a half a cup left but it was good
Dominic Jones
@towwiow
Jan 02 2015 14:09
ahh.
Robby Faller
@robbyfaller
Jan 02 2015 14:40
Anyone know why the Github login on FCC is missing?
login
Nathan
@terakilobyte
Jan 02 2015 14:41
@robbyfaller we’ve been tracking down a bug in authentication that a very small % of users have experienced where they are logged in but shown someone else’s profile information. @QuincyLarson has tracked it down to accounts created with github, and temporarily disabled the option to login/create new accounts while we figure out what’s going on.
Dominic Jones
@towwiow
Jan 02 2015 14:42
nice to know @terakilobyte
towwiow @towwiow goes back to struggling with jQuery.
Nathan
@terakilobyte
Jan 02 2015 14:43
@towwiow if you’d like to pair on the jquery stuff let me know
Robby Faller
@robbyfaller
Jan 02 2015 14:43
@terakilobyte Okie dokie, thanks.
Dominic Jones
@towwiow
Jan 02 2015 14:43
I would but I'm at work ;(
Nathan
@terakilobyte
Jan 02 2015 14:43
also, I found the docs super useful
Dominic Jones
@towwiow
Jan 02 2015 14:44
@terakilobyte - and pairing would just mean connecting on a google hangout or skype right?
Nathan
@terakilobyte
Jan 02 2015 14:44
@towwiow lol, I forgot. Ok, gl, and keep asking away as you run into any snags
Dominic Jones
@towwiow
Jan 02 2015 14:44
well like.. the software I mean.
I got past 3.18
Nathan
@terakilobyte
Jan 02 2015 14:44
screenhero
Dominic Jones
@towwiow
Jan 02 2015 14:44
oh okay, I don't have that yet. I'll DL it when I get home.
Nathan
@terakilobyte
Jan 02 2015 14:45
@robbyfaller apologies for any inconvenience but protecting privacy is of the utmost concern at the moment
Dominic Jones
@towwiow
Jan 02 2015 14:45
I'm working on 3.19 trying to set $(this).closest('.tour') to a variable.
Robby Faller
@robbyfaller
Jan 02 2015 14:46
@terakilobyte it's cool.
Christopher Hutchinson
@cshutchinson
Jan 02 2015 14:54
@towwiow some help I can provide on 3.19?
i have it pulled up here if you need me
Dominic Jones
@towwiow
Jan 02 2015 15:01
@terakilobyte - try.jQuery is just so strange. when I use the code in the slides and change out what needs to be changed, it still doesn't work. It's like they aren't providing the complete info in the slides and it's making me fell dumb >.< @cshutchinson - please do.
what I have right now is.
$(document).ready(function(){
  $("button").on("click", function(){
    var discount = tour.data('discount');
    var message = $("<span>Call 1-555-jquery-air for a $" + discount + " discount.</span>");
    var tour = $(this).closest('.tour');
    tour.append(message);
    $(this).remove();
  });
});
Christopher Hutchinson
@cshutchinson
Jan 02 2015 15:02
comparing now...
Dominic Jones
@towwiow
Jan 02 2015 15:02
ok, ty
when I submit it I get TypeError: undefined is not an object (evaluating 'tour.data')
Christopher Hutchinson
@cshutchinson
Jan 02 2015 15:05
tell me how you format your code here in chat so I can show you mine
Dominic Jones
@towwiow
Jan 02 2015 15:06
i am following the slides. this is my first time learning jQuery so I'm just sticking to how they teach it.
Christopher Hutchinson
@cshutchinson
Jan 02 2015 15:06
$(document).ready(function(){
$("button").on("click", function(){
var tour = $(this).closest(".tour");
var discount = tour.data("discount");
var message = $("<span>Call 1-555-jquery-air for a $" + discount + " discount.</span>");
tour.append(message);
$(this).remove();
});
});
Dominic Jones
@towwiow
Jan 02 2015 15:06
I don't know any other way // haven't reached any familiarity with it yet to try and "format" or do the same thing they are asking me to do, differently.
Christopher Hutchinson
@cshutchinson
Jan 02 2015 15:06
this is mine, I can't find any difference except the order we define the variables
Dominic Jones
@towwiow
Jan 02 2015 15:07
maybe that's it.
let me see.
@cshutchinson - that was it.
Christopher Hutchinson
@cshutchinson
Jan 02 2015 15:07
damn that sucks... sorry
Dominic Jones
@towwiow
Jan 02 2015 15:07
var tour needed to be defined before it could run var discount and pull the tour.data
it makes sense now.
Christopher Hutchinson
@cshutchinson
Jan 02 2015 15:08
yes that makes sense!
Dominic Jones
@towwiow
Jan 02 2015 15:08
reason for everything.
Christopher Hutchinson
@cshutchinson
Jan 02 2015 15:08
glad to help
Dominic Jones
@towwiow
Jan 02 2015 15:08
@cshutchinson - thanks !
Christopher Hutchinson
@cshutchinson
Jan 02 2015 15:08
how do you make your code show up so nicely formatted in chat?
$(document).ready(function(){
$("button").on("click", function(){
var tour = $(this).closest(".tour");
var discount = tour.data("discount");
var message = $("<span>Call 1-555-jquery-air for a $" + discount + " discount.</span>");
tour.append(message);
$(this).remove();
});
});
like that
type code
well.. ```
when you hit enter it should make a space and then auto. add three more ``` at the bottom
paste your code in there and then do ctrl+enter and it should show up on the black box
Christopher Hutchinson
@cshutchinson
Jan 02 2015 15:12
$(document).ready(function(){
  $("button").on("click", function(){
    var tour = $(this).closest(".tour");
    var discount = tour.data("discount");
    var message = $("<span>Call 1-555-jquery-air for a $" + discount + " discount.</span>");
    tour.append(message);
    $(this).remove();
  });
});
sweet! thank you
$(document).ready(function(){
  $("button").on("click", function(){
    var tour = $(this).closest(".tour");
    var discount = tour.data("discount");
    var message = $("<span>Call 1-555-jquery-air for a $" + discount + " discount.</span>");
    tour.append(message);
    $(this).remove();
  });
});
yeah I learned something new, thanks @towwiow
Dominic Jones
@towwiow
Jan 02 2015 15:21
@cshutchinson - you're welcome.
took me a little while to get that too haha
you can find other things to do in this chat to the right hand side of the textbox.
underneath the bubbles is a markup list - commands you can do to do different things in the chat.
Ian Yeager
@iyeager2004
Jan 02 2015 15:37
'''
That's not right...
//Ohhhhhh, there we go...
Dominic Jones
@towwiow
Jan 02 2015 15:41
yup
@cshutchinson or @terakilobyte or @Maximization you guys still around?
Christopher Hutchinson
@cshutchinson
Jan 02 2015 15:42
yes :)
Dominic Jones
@towwiow
Jan 02 2015 15:43
lol, now i'm stuck on filtering
Christopher Hutchinson
@cshutchinson
Jan 02 2015 15:43
3.20?
let me know how I can help
Dominic Jones
@towwiow
Jan 02 2015 15:48
now i'm on 3.22
Christopher Hutchinson
@cshutchinson
Jan 02 2015 15:49
ok great, what problem are you having I will help
Dominic Jones
@towwiow
Jan 02 2015 15:57
apparently...
i'm not adding a .highlight class?
$(document).ready(function(){
  $('.tour').filter('on-sale').addClass('highlighted');
  $("#filters").on("click", ".on-sale", function(){
  });
});
with that code it doesn't take.
with this code below it doesn't take either
$(document).ready(function(){
  $('.tour').filter('on-sale').addClass('.highlight');
  $("#filters").on("click", ".on-sale", function(){
  });
});
Ian Yeager
@iyeager2004
Jan 02 2015 16:00
Take out the '.' in the second one.
When you use addClass, you don't have to specify it's a class, like '.highlight'. You just say 'highlight'.
Because jQuery knows you're going to pass it a class. That one caught me up a few times too.
Christopher Hutchinson
@cshutchinson
Jan 02 2015 16:01
well the class you are adding is '.highlight' so you can rule first code out
and you don't have to add the . before '.highlight' b/c addClass is expecting a class anyway so .addClass('highlight') works
why did you choose to add the class highlight before you received the click? I would put the on('click')... prior to adding the class
Dominic Jones
@towwiow
Jan 02 2015 16:05
still doesn't do the trick for me. I had the on-click line at the top first then changed it the bottom and it still doesn't like it.
may have to refresh and try again.
Christopher Hutchinson
@cshutchinson
Jan 02 2015 16:06
I am fixing my code, will have the correct sequence for you shortly....
ok, i have it
do you want me to post the code or help you understand first?
everything you do in this exercise needs to be inside the on.click functions
Alex Hazel
@metalhaze
Jan 02 2015 16:10
@towwiow addClass method in jQuery does not require the use of a period when lisitng the class name
Christopher Hutchinson
@cshutchinson
Jan 02 2015 16:11
both the adding the highlight class and remove it as requested by 3.23.
Alex Hazel
@metalhaze
Jan 02 2015 16:11
it should be .addClass('myClass')
@towwiow Also in your first code snippet and your second code snippet you have two different names for the highlight class....which one is it? hehe
highlight or highlighted?
Dominic Jones
@towwiow
Jan 02 2015 16:12
it shows in the instructions it should be .highlight
and highlight
i've switched back and forth between the two, and still no go.
Alex Hazel
@metalhaze
Jan 02 2015 16:13
I am also almost certain that .filter() needs the period before the name of the class when listing the name of the class you are filtering by.... should be .filter('.myClass')
yes I just doubled checked
that is what you are missing
should be .filter('.on-sale')
$(document).ready(function(){
  $('.tour').filter('.on-sale').addClass('highlighted');
  $("#filters").on("click", ".on-sale", function(){
      //Do your function stuff here
  });
});
Alex Hazel
@metalhaze
Jan 02 2015 16:19
@towwiow General rule of thumb for jQuery. The only time you don't supply the period for the class name is when the method you are using has the word "class" in it. addClass method only works with classes so you don't need to supply a period. Where as filter works with many types of elements so you need to specify which type you are filtering
Dominic Jones
@towwiow
Jan 02 2015 16:20
Okay.
@metalhaze - the period before the on-sale is what I was missing.
Alex Hazel
@metalhaze
Jan 02 2015 16:20
yay!
:smile:
Dominic Jones
@towwiow
Jan 02 2015 16:20
v.v'
Alex Hazel
@metalhaze
Jan 02 2015 16:20
glad you got it working!
Dominic Jones
@towwiow
Jan 02 2015 16:20
the most trivial of trivial lol can break the whole site
Alex Hazel
@metalhaze
Jan 02 2015 16:21
yup....that is why the console is your friend
Dominic Jones
@towwiow
Jan 02 2015 16:21
I haven't gotten that far yet
think sir charles watson was telling me about it but I was reading it like I was reading a Korean characters -
Alex Hazel
@metalhaze
Jan 02 2015 16:22
well for the most part the errors in the console can be pretty clear....sometimes it might tell you where the error is originating from so at the very least you know where to focus your energy...even if you aren't totally familar with it yet
Charles Watson
@sircharleswatson
Jan 02 2015 16:23
I heard my name :)
Alex Hazel
@metalhaze
Jan 02 2015 16:23
FCC genie himself!
Ok for my first wish....
:P
Charles Watson
@sircharleswatson
Jan 02 2015 16:25
you-rang
Christopher Hutchinson
@cshutchinson
Jan 02 2015 16:27
@towwiow i am stepping a way for a moment....sent you a private chat
Dominic Jones
@towwiow
Jan 02 2015 16:56
Ok
yeah, well. Does FCC eventually introduce you to this magical "Console" you @sircharleswatson & @metalhaze speak of?
Ian Yeager
@iyeager2004
Jan 02 2015 16:59
@towwiow Challenge 14, yes it does.
It will change your life forever. :)
Dominic Jones
@towwiow
Jan 02 2015 16:59
thanks @iyeager2004 - awesome.
Charles Watson
@sircharleswatson
Jan 02 2015 16:59
@towwiow are you on a mac?
Dominic Jones
@towwiow
Jan 02 2015 16:59
I'm ready for my virginty to be taken
lol
Justin Rogers
@yaskyj
Jan 02 2015 16:59
@towwiow If you're in Chrome, just press Ctrl+Shift+J and you can play with the console.
Dominic Jones
@towwiow
Jan 02 2015 17:00
@sircharleswatson - no I'm not on a Mac. told my mom yesterday that I by the end of the year I need it. willing to pay half haha. told her web development, it's not a "want" it's a necessity
Charles Watson
@sircharleswatson
Jan 02 2015 17:00
@yaskyj that is OS specific
Dominic Jones
@towwiow
Jan 02 2015 17:00
been eyeing it up for a few years now but still haven't had the opportunity to get one. this year I will, no matter what.
Charles Watson
@sircharleswatson
Jan 02 2015 17:00
@towwiow I actually would recommend NOT getting a mac
Dominic Jones
@towwiow
Jan 02 2015 17:01
how come?
I am using chrome though, and I do see this spiffy thing that opens up, but don't understand it.
Charles Watson
@sircharleswatson
Jan 02 2015 17:01
well, for 25% of the cost, you can get a good PC and then install linux on it (take off Windows)
Kathy O'Driscoll
@odrisck
Jan 02 2015 17:01
^
Ian Yeager
@iyeager2004
Jan 02 2015 17:01
I've been dabbling in web design, and write code full-time on an Asus running Ubuntu.
Charles Watson
@sircharleswatson
Jan 02 2015 17:02
and then you'll be well set
Justin Rogers
@yaskyj
Jan 02 2015 17:02
You can enter commands in there. Like console.log('Hello world')
Ian Yeager
@iyeager2004
Jan 02 2015 17:02
14.04, no crashes in like, a week.
Dominic Jones
@towwiow
Jan 02 2015 17:02
Hi @odrisck - what's the ^ for?
Kathy O'Driscoll
@odrisck
Jan 02 2015 17:02
thats me agreeing with Charles :)
^ means “all that what he said right up there"
Charles Watson
@sircharleswatson
Jan 02 2015 17:02
@towwiow that's a way to say "I agree" lol
Dominic Jones
@towwiow
Jan 02 2015 17:02
I have a secondary laptop I'm willing to wipe and put linux on but I still no diddly about linux
so either way my noob level -100 has me incapacitated right now
Ian Yeager
@iyeager2004
Jan 02 2015 17:03
@towwiow In fact, if you're in the Bay area I've got a spare Acer sitting around that I'll throw Ubuntu on and you can have for free.
Charles Watson
@sircharleswatson
Jan 02 2015 17:03
well, it does have a steep learning curve if you've never used it before, but it's not that bad. you can pick it up pretty easily
Kathy O'Driscoll
@odrisck
Jan 02 2015 17:03
no better way to learn than just doing :)
Nathan
@terakilobyte
Jan 02 2015 17:03
it’s easy to learn and there are a plethora of resources online to get help
Charles Watson
@sircharleswatson
Jan 02 2015 17:03
^
Kathy O'Driscoll
@odrisck
Jan 02 2015 17:04
linux is like pregnancy, you can’t really know what its like unless you just do it, and there is no doing it part way :)
Dominic Jones
@towwiow
Jan 02 2015 17:04
so you suggest taking that lappy I had the .csrss.exe scare with and wiping it to install linux on it?
lmfao @odrisck - I have a penis so I wouldn't know about that either xD
thank God
Kathy O'Driscoll
@odrisck
Jan 02 2015 17:04
eggzactly
Dominic Jones
@towwiow
Jan 02 2015 17:04
whew... that was funny lol
you guys help my work day go faster.
Kathy O'Driscoll
@odrisck
Jan 02 2015 17:05
its a talent :)
Charles Watson
@sircharleswatson
Jan 02 2015 17:06
haha
@towwiow Ya, I would wipe it and install linux
Kathy O'Driscoll
@odrisck
Jan 02 2015 17:07
I would as well
Charles Watson
@sircharleswatson
Jan 02 2015 17:07
Ubuntu is the best way to ease-in to linux
Dominic Jones
@towwiow
Jan 02 2015 17:07
would it be possible to screen hero and like walk me through? I guess not with the wipe but before the wipe?
trying to think about a way to be helped with it.
Kathy O'Driscoll
@odrisck
Jan 02 2015 17:08
Ubuntu just installs, you can then get online and come talk :)
I swear no magic
Ian Yeager
@iyeager2004
Jan 02 2015 17:09
@towwiow Are you in the Bay Area? I'd be happy to walk you through it over a cup of coffee sometime.
Deam
@deamme
Jan 02 2015 17:10
Help with challenge 16.. I have no Idea x_x
Kathy O'Driscoll
@odrisck
Jan 02 2015 17:11
this bit? This page is currently using a two-column layout, with the main content on the left and additional navigation on the right. See if you can make it a one-column layout.
Deam
@deamme
Jan 02 2015 17:12
yes thank you
Kathy O'Driscoll
@odrisck
Jan 02 2015 17:12
look in the css, where its using the md col
there are like 12 I think
you have to delete or comment out something there
Deam
@deamme
Jan 02 2015 17:13
thanks
Justin Rogers
@yaskyj
Jan 02 2015 17:13
@towwiow If you're running a Windows system and want to try out some Linux, you can also download/install Cygwin. It will give you a shell and various other Unix programs to play with before you do a full system wipe.
Dominic Jones
@towwiow
Jan 02 2015 17:14
@iyeager2004 - that would be awesome, but I'm on the other side of the states - PA
@yaskyj - I have virtual box. is that similar to Cygwin?
Justin Rogers
@yaskyj
Jan 02 2015 17:16
@towwiow That was the other thing I was going to suggest. You can also install various Linux distros with Virtual Box and try them out.
Dominic Jones
@towwiow
Jan 02 2015 17:16
@yaskyj - what's a Linux distro? like Ubuntu?
Justin Rogers
@yaskyj
Jan 02 2015 17:17
@towwiow Sorry, yes. It's short for distribution.
Dominic Jones
@towwiow
Jan 02 2015 17:17
Cool, I caught that part at least lol
Justin Rogers
@yaskyj
Jan 02 2015 17:18
Besides Ubuntu, other popular ones are Debian, Fedora, Red Hat, etc. There are a ton of them. Ubuntu is usually the easiest to move from after using Windows.
Cygwin provides a Linux-like environment you can use inside of Windows.
When I'm on my Windows machine, I use it for the curl and ssh programs. Otherwise I just use Windows Powershell. I do prefer Unix commands though in the command shell, which I'm more familiar with.
Dominic Jones
@towwiow
Jan 02 2015 17:24
Got yah.
Still brand new to it and all the terminology I don't get - I'll just spend some time and look it up.
a linux course is starting on Edx this upcoming monday so maybe that'll help
but I would prefer to have someone's personal help too
Christopher Hutchinson
@cshutchinson
Jan 02 2015 17:25
help me understand... I am sitting here chugging along on my 27" imac with windows 8.1 blazing away....why do I neeed an Ubuntu machine? I am not being smart just trying to understand
Charles Watson
@sircharleswatson
Jan 02 2015 17:26
@cshutchinson you dont need ubuntu
Justin Rogers
@yaskyj
Jan 02 2015 17:26
@cshutchinson You definitely do not need Ubuntu.
Linux is just a preference.
Ryan Malm
@Rybar
Jan 02 2015 17:27
if you have a mac, you're in awesome shape. Its the windows users that we'd like to steer towards at least running a linux VM, for tools sake
Justin Rogers
@yaskyj
Jan 02 2015 17:27
@towwiow Since you already have Virtual Box installed, I would just grab the lastest Ubuntu and try to install it virtually.
Charles Watson
@sircharleswatson
Jan 02 2015 17:27
@cshutchinson I'm recommending it because he doesn't already own a mac. So, rather than spending a ton of money on a mac, he can save it and get just as good of specs by getting a pc for less. Then installing linux makes it easier to do dev work on
Nathan
@terakilobyte
Jan 02 2015 17:28
if it’s an older laptop, xubuntu might be a better option
less demanding desktop
Christopher Hutchinson
@cshutchinson
Jan 02 2015 17:28
thanks for expalanation
Charles Watson
@sircharleswatson
Jan 02 2015 17:28
@cshutchinson No problem :)
Dominic Jones
@towwiow
Jan 02 2015 17:29
would it be better to have a mac or a cheaper pc w/ linux?
@sircharleswatson ^
@yaskyj - I'll have to try and do that when I get home.
Nathan
@terakilobyte
Jan 02 2015 17:30
@towwiow define better
Charles Watson
@sircharleswatson
Jan 02 2015 17:30
@towwiow well, seeing as you can get a pc with the same specs as a mac, for much cheaper, i'd go with the pc :)
Deam
@deamme
Jan 02 2015 17:31
hackintosh ^_^
Ryan Malm
@Rybar
Jan 02 2015 17:32
I've been down that road. For the time and effort, and all the gotchas, and truly compatible hardware doesn't really offset the cost of just buying a refurbished mac
Justin Rogers
@yaskyj
Jan 02 2015 17:32
@towwiow Another easy way to play with an entire Linux development environment is getting a free account at Cloud9. https://c9.io/
Dominic Jones
@towwiow
Jan 02 2015 17:32
@yaskyj - well, all things come down to preferences. I mean, I love mac's - I used to rent them out at school every week even when I didn't technically "need it"
but i'm still new to the web development space so I mean, I want to have the best setup I can get from scratch
right now I just have two identical laptops and an even older desktop.
Ryan Malm
@Rybar
Jan 02 2015 17:33
^^ to play around with command-line tools can't beat that option. I love cloud9.
Christopher Hutchinson
@cshutchinson
Jan 02 2015 17:33
my eyes hate me when I leave home and go to work and stare at a crappy low res dell monitor all day
Nathan
@terakilobyte
Jan 02 2015 17:33
also check craigslist. Someone down on their luck is probably willing to part ways with their newer mac for an acceptable price, if having a mac tickles your fancy
Dominic Jones
@towwiow
Jan 02 2015 17:34
good idea @terakilobyte
Justin Rogers
@yaskyj
Jan 02 2015 17:34
@Rybar Yeah, I love it too. I just have to remember to set /.c9/ in gitignore otherwise it's a complete pain to rebase between my master gh-pages all the time.
towwiow @towwiow just setup Cloud9 account with github.
Dominic Jones
@towwiow
Jan 02 2015 17:35
@yaskyj - you just lost me xD
Justin Rogers
@yaskyj
Jan 02 2015 17:35
It also made me think of trying out a cheap Chromebook since it has pretty much the entire environment on there.
@towwiow Have you gotten to the Git challenge yet?
Dominic Jones
@towwiow
Jan 02 2015 17:36
@yaskyj for Cloud9?
Justin Rogers
@yaskyj
Jan 02 2015 17:36
No, I just mean in the normal FCC challenges.
Dominic Jones
@towwiow
Jan 02 2015 17:36
I'm only on challenge 11 @yaskyj
I haven't really looked ahead on the FCC challenges.. i've just been plugging along trying to learn as I go and stay sharp with it all.
to my unsuccess..
Justin Rogers
@yaskyj
Jan 02 2015 17:38
Git is version control software. It's challenge 35. It is what Github is based on.
When you create a repository with Git there are certain files you might not want to keep track of so you name them in a file called .gitignore.
towwiow @towwiow reminds Justin he is talking way over his head again.
Dominic Jones
@towwiow
Jan 02 2015 17:45
I keep saying I'm not there yet, it's aka. for I don't understand anything you just said. I comprehend the words but since I don't have any kind of reference to connect them to, I don't understand >.<
Justin Rogers
@yaskyj
Jan 02 2015 17:50
Sorry, man.
Gunnar
@TobogganMD
Jan 02 2015 17:52
Git is basically about keeping track of different versions of your project
David
@DavidII
Jan 02 2015 17:52
@towwiow I see you signed up to Cloud9. As this is the first time I've heard it. I've of people using codepen and codeanywhere, not sure how this would measure against others. I didn't see a buy section which is good.
Gunnar
@TobogganMD
Jan 02 2015 17:53
so if you find a bug, you can go back and see how that part of the code has changed
and you can have a live version of a webpage and a version for testing, and then you can merge them when you want to
Charles Watson
@sircharleswatson
Jan 02 2015 17:55
@TobogganMD That is over most people's heads at this point lol
especially if they are hanging out in this room :P
Gunnar
@TobogganMD
Jan 02 2015 17:56
yeah, maybe, though I haven't even used Git, just read about it.
Charles Watson
@sircharleswatson
Jan 02 2015 17:57
lol
seahik
@seahik
Jan 02 2015 17:58
is there a minimum hardware requirements to run virtualbox? and is there any
'risk' to running it?
Charles Watson
@sircharleswatson
Jan 02 2015 17:59
no risk
David
@DavidII
Jan 02 2015 17:59
there is no risk runningit.
seahik
@seahik
Jan 02 2015 17:59
i was thinking about installing on my laptop...but its my only one i have
Justin Rogers
@yaskyj
Jan 02 2015 17:59
There's definitely going to be a minimum. Here's the link: https://www.virtualbox.org/
seahik
@seahik
Jan 02 2015 18:00
i was on there earlier today, but couldnt find the mins
Justin Rogers
@yaskyj
Jan 02 2015 18:00
It can get pretty resource intensive.
Charles Watson
@sircharleswatson
Jan 02 2015 18:00
well, you can assign how much resources you want to give it
seahik
@seahik
Jan 02 2015 18:00
ive got 6 gigs ram...ive heard you have to split your ram?
so even when youre not using it...the ram is locked up?
Justin Rogers
@yaskyj
Jan 02 2015 18:01
Charles Watson
@sircharleswatson
Jan 02 2015 18:01
@seahik if you have 6, you can assign 2 to the virtual box
Justin Rogers
@yaskyj
Jan 02 2015 18:01
I'm sure you'll be fine.
Charles Watson
@sircharleswatson
Jan 02 2015 18:01
and you'll have 4 left over for your normal operations
seahik
@seahik
Jan 02 2015 18:01
ah ok cool i might give it ago
i dont really do anything else intensively
Charles Watson
@sircharleswatson
Jan 02 2015 18:02
it's only used while your virtual box is running
seahik
@seahik
Jan 02 2015 18:02
how much hardrive space does it use?
oh actually found it...thanks @yaskyj
Charles Watson
@sircharleswatson
Jan 02 2015 18:03
in fact, if you are only using the virtual box and you wont be going back and forth too much, you could assign 5gb ram to the virtual box and it will work better
Justin Rogers
@yaskyj
Jan 02 2015 18:03
np
seahik
@seahik
Jan 02 2015 18:03
only uses 30mb ...but then whatever Ubuntu takes up, I guess
Charles Watson
@sircharleswatson
Jan 02 2015 18:04
You can assign how much HDD space it gets
just like the ram
seahik
@seahik
Jan 02 2015 18:04
ah ok cool...thanks guys ...great timing coming into you talking about it...i was reading about doing this today and had questions
oh one other question....I'm assuming virtualbox and ubuntu are pretty painless to uninstall if needed?
Justin Rogers
@yaskyj
Jan 02 2015 18:07
Virtualbox should uninstall just like any other Windows program.
The only thing you should have from Ubuntu is the downloaded iso.
seahik
@seahik
Jan 02 2015 18:09
ok great...i think i will take the plunge tomorrow....will be great fun to play around with linux
Justin Rogers
@yaskyj
Jan 02 2015 18:09
Here's a resource for Ubuntu and Virtualbox installations: https://help.ubuntu.com/community/VirtualBox
seahik
@seahik
Jan 02 2015 18:09
ah many thanks
Cinnamon
@CinnamonB
Jan 02 2015 18:09
Ok so I'm on the Codecademy Object Constructor and it seems all of my solutions were wrong...here's what I have currently:
var me = new me.About ();

me.name = "Cinnamon";
me.age = 26;
Ryan Malm
@Rybar
Jan 02 2015 18:10
var me = {};
Kathy O'Driscoll
@odrisck
Jan 02 2015 18:10
your variable can’t be two words plus a dot I think, which challenge
Ryan Malm
@Rybar
Jan 02 2015 18:11
yup currently your syntax looks like a function call, when you're really trying to make a new object.
Cinnamon
@CinnamonB
Jan 02 2015 18:11
@Rybar that was the first thing I did.
Justin Rogers
@yaskyj
Jan 02 2015 18:11
var me = new Object();
Charles Watson
@sircharleswatson
Jan 02 2015 18:11
var me = new Object();

// or

var me = {}
Cinnamon
@CinnamonB
Jan 02 2015 18:11
And it kept saying "Did you create your object using the object constructor?"
So I don't know what else to do.
Charles Watson
@sircharleswatson
Jan 02 2015 18:12
object constructor is the first one I posted
object literal is the second
Kathy O'Driscoll
@odrisck
Jan 02 2015 18:12
var me = new Object(); //object constructor
Ryan Malm
@Rybar
Jan 02 2015 18:12
it's the .About in your code that is incorrect.
Cinnamon
@CinnamonB
Jan 02 2015 18:14
Yes, figured that as I've tried numerous solutions and continuously kept getting an error. Thanks guys. I thought I was suppose to use a different name for the Object instead of 'new Obect'
var me = new Object ();

me.name = "Cinnamon";
me.age = 26;
How come only the age appears in the output and not the string for name?
Ryan Malm
@Rybar
Jan 02 2015 18:17
are you logging the name?
Justin Rogers
@yaskyj
Jan 02 2015 18:17
The output in Codecademy prints out the last input.
Ryan Malm
@Rybar
Jan 02 2015 18:17
^ ah yes.
Justin Rogers
@yaskyj
Jan 02 2015 18:18

It you put:

console.log(me.name);
console.log(me.age);

It will print out everything.

Cinnamon
@CinnamonB
Jan 02 2015 18:18
Ohh, I thought both were to appear. But only if I'm logging, then they both would appear. Got it!
They didn't ask to log both, so I didn't
MychaelZ
@MychaelZ
Jan 02 2015 19:00
does anyone know where i can find the actual code for native js methods?
Justin Rogers
@yaskyj
Jan 02 2015 19:01
I was just looking for that yesterday.
MychaelZ
@MychaelZ
Jan 02 2015 19:07
did u find it?
im trying to rewrite all the js methods\
Which led me to this: https://github.com/v8/v8-git-mirror
That's Chrome's V8 engine
MychaelZ
@MychaelZ
Jan 02 2015 19:10
does it have the source code for the native methods though
Charles Watson
@sircharleswatson
Jan 02 2015 19:10
an engine is different than the actual language

JavaScript is programming language initially developed by a company called Netscape. It is standardised under the name of ECMAScript http://www.ecmascript.org. This deviation in name is owing to disagreements between different companies over what to call it at the time that it became standardised.

There are various "engines" that interpret JavaScript when it is run in a browser. Some of these are open source (for example "Rhino" used in Firefox or "V8" used in Chrome).

However, the question of whether JavaScript itself is open source is a little off the mark. "Open source" refers to programs, whereas JavaScript is a programming language. It is an open standard, which is a close approximation in some ways - at least in the sense that it is not a "propriety" language that is owned and controlled by one company.

MychaelZ
@MychaelZ
Jan 02 2015 19:14
okay so does the source code for the actual methods exists
Charles Watson
@sircharleswatson
Jan 02 2015 19:16
probably not because it's not open source
Evan Davis
@davisec52
Jan 02 2015 19:25

Hi. I have a question on the Regex challenge. I'm on regexone.com, lesson 14. I find that the site only accepts this version of the answer as correct:

I love (cats|dogs)

My question is whether regex is really this strict with regard to spacing. For example, all of the following were rejected:

I love(cats|dogs)
I love(cats | dogs)
I love (cats|dogs)
I love (cats | dogs)

The solution given by regexone.com appears to be,

I love(cats | dogs)

which is actually rejected by the answer box.

Sorry, the third item on the rejection list is actually the one accepted.
Justin Rogers
@yaskyj
Jan 02 2015 19:29
Yes, regex is strict with regards to spacing.
You can add different regex codes to match spacing though.
This also works:
I\s+love\s+(cats|dogs)
Evan Davis
@davisec52
Jan 02 2015 19:31
Right, but this is my first experience with regex, so I'm really just plodding around in the dark at this point.
I was having trouble with lesson 14 because even though I had the basic conditional format correct, I didn't know what spacing conventions to apply.
MychaelZ
@MychaelZ
Jan 02 2015 19:35
alright everyone i am gooing to rewrite all of js native methods
wish me luck!
Justin Rogers
@yaskyj
Jan 02 2015 19:35
What are you going to write them in?
And good luck!
MychaelZ
@MychaelZ
Jan 02 2015 19:39
javascript lol just want a deeper understanding of the methods
help me memorize waht it does
Jason Rueckert
@jsonify
Jan 02 2015 19:42
@MychaelZ where do you save them to?
Justin Rogers
@yaskyj
Jan 02 2015 19:42
Javascript Inception
MychaelZ
@MychaelZ
Jan 02 2015 19:43
im just going to use my text editor
Jason Rueckert
@jsonify
Jan 02 2015 19:44
right. but how do you overwrite the native methods?
Justin Rogers
@yaskyj
Jan 02 2015 19:45
He could just leave the objects and overwrite the prototype method.
Jason Rueckert
@jsonify
Jan 02 2015 19:45
i mean, I probably don't really want to know. "Fizzbuzz" confuses me sometimes...so, yeah
MychaelZ
@MychaelZ
Jan 02 2015 19:46
Array.prototype.forEach = function (callback) {
  for (var i = 0; i < this.length; i++) {
     callback(this[i])
  }
}
something like this
i jsut did it off the top of my head im sure tehre is more to it
just wanted to post an idea of how to do it
MychaelZ
@MychaelZ
Jan 02 2015 19:54
thanks Ryan
Ryan Malm
@Rybar
Jan 02 2015 19:54
so, yes, the source for all of JS's base objects are in there. I did some poking around at this a while back, because apparently some methods differ in their implementation from browser to browser, like the default sort algorithm.
I think @metalhaze was doing a similar exercise; reimplementing some prototype methods just to better understand how what they do/how they work
Evan Davis
@davisec52
Jan 02 2015 23:39
Say, how important is regex to the overall FCC curriculum? The reason I ask is that regexone.com is as clear as mud, at least for me. If it is truly important, then I will find some other resource that actually understands how to train beginners. And I confess, I am a beginner--regexone is clearly not for fresh meat, as it were.
Nathan
@terakilobyte
Jan 02 2015 23:40
@davisec52 it’s useful to at least know the basics
it’s very possible to reduce a function that might take 10 lines and a loop or two into a well structured regex statement on a string method
Evan Davis
@davisec52
Jan 02 2015 23:41
@terakilobyte That makes sense. By any chance, do you have any recommendations for resources that would undercut regexone?
Nathan
@terakilobyte
Jan 02 2015 23:42
coderbyte and code kata to practice using regex
but I think regexone does a decent job of introducing the concept. Also, searching google when you want to do something to see if someone else has provided a solution
Evan Davis
@davisec52
Jan 02 2015 23:44
Thank you. I don't mind spending the money to buy a book or two.
Right now, though, I've hit a wall with regexone.
Nathan
@terakilobyte
Jan 02 2015 23:44
if somone was to go through the regexone lessons and suddenly call themselves an expert, I’d call them a liar. Practice is the way to internalize it. And no sense in buying a book about it imo
a google search will return numerous SO answers to regex questions
Ben Stoltz
@benstoltz
Jan 02 2015 23:45
Plenty of blog posts out there also on regex.
Nathan
@terakilobyte
Jan 02 2015 23:45
you’re already paying for internet access, and I don’t think regex is that important to your success
if it is, there’s probably some libraries that would make it easier anyway
Ryan Malm
@Rybar
Jan 02 2015 23:46
Www.regexr.com was better for me, learn by playing, read reference/cheat sheet
Evan Davis
@davisec52
Jan 02 2015 23:46
I think I would rather cut to the chase and get to the fundamentals
@Rybar Thank you. I'll check it out.
It's a shame that Zed Shaw doesn't have a regex book
Right, regexr, mentioned in the challenge.