I've recently discovered Github but haven't yet had the time to dig into it. It appears to be a shared/open source repository of code and projects. You can even contribute to projects if you're so inclined.
Anyone else on here with more knowledge than I please correct or elaborate.
I don't know about editors but I was looking for a javascript shell and I found Rhino and SpiderMonkey. Any pros and cons? Rhino is java-based and seems easy enough to install ...
I agree with Oz. We do not need a shell for this course.
The console in Eloquent Javascript is very nice and should suffice for most things. JSFiddle also has a good environment for running Javascript programs.
Git is a distributed version control system. GitHub is a web based service which allows users to host their source code on GitHub's Git repository. When you use the free account your code is automatically available in the public domain.
GitHub is used by many people who create open source software as well as companies who don't. GitHub also promotes the concept of social coding, because users can follow code commits made by other users and even fork other's projects.
Sorry if I introduced too many new concepts :-)
To use GitHub you will need a working knowledge of Git. Since most people here will be working on the code individually, a very deep knowledge of Git is not required. You should be able to read a basic Git tutorial (I am sure GitHUb will also have some tutorials) and get started.
I'm not sure about their other offerings. I don't know much about PHP, but I do recall they have a manual available online. You can always counter check on that..
I was playing with an example int he Eloquent Javascript book using a while statement and wanted to make it display number 1-10 but get 1-11 and am wondering how to make it stop at 10. Here is my code:
var total = 0, count = 1;
document.write (count);
document.write ( "," ) ;
while (count <= 10)
The reason why this is happening:
When the value of 'count' is 10, the program is able to enter the while condition, because, 10 <= 10. The value of count is incremented inside the loop, so it becomes 11, which is printed.
On the following run, the program does not enter the while condition, because 11 <= 10 is not true.
You must either stop the while condition at 9, or increment after printing.
Well no. There is absolutely no difference. Javascript doesn't read white spaces. Please feel free to use any of those - whatever is more readable to you.
Usually it is a matter of coding conventions, which the individual, or team, or company follows. It is a good idea to be consistent in where the brackets are placed, and follow conventions of the team if you are working with others.
I'm not getting the \n (backslash n) to work to create a new line. I was trying here: http://userpages.umbc.edu/~flinchba/2tothe10th.html and then made a file just with that breaking some text here: http://userpages.umbc.edu/~flinchba/newline.html and that didn't work either. This looked and should have been very simple and I just don't know why it doesn't make a new line the way it's supposed to?
Hi Michelle,
wanted to try and help so - regarding to the second text link - first line second line,
with the
>>alert ("text \n text")
will break the lines in a pop up
or like an html
>>document.write("Line 1 Line2 Line3");
hope i am helping. new here myslef
oops where did the html break gone ?
there suppose to be --- line 1 line 2 ....
lol - i guess it is working since it appears to be in new lines
the html break is < b r > with no spacing in the <>
so write --- line1 < b r > line2 < b r > and so on
Here, for example:
http://www.planet-source-code.com/vb/default.asp?lngWId=14#categories
Thanks Jakub
Plenty there, although I am not sure which is good or not.
There is a column named level/Author. You can check there if it's novice, intermidiate etc.
I've recently discovered Github but haven't yet had the time to dig into it. It appears to be a shared/open source repository of code and projects. You can even contribute to projects if you're so inclined.
Anyone else on here with more knowledge than I please correct or elaborate.
Thx,
n
Hi Nick
Signed up there, not sure why, LOL...
I was looking around for an editor (I know Netbeans for Java but seems a bit heavy for Javascript).
Anyway, came across http://www.ixedit.com/ - amazing, prebuilt inpage(!) designer.
Must be good because even I could figure it out....
I don't know about editors but I was looking for a javascript shell and I found Rhino and SpiderMonkey. Any pros and cons? Rhino is java-based and seems easy enough to install ...
java can be memory hog ..
You should not need a JS shell for this class..
For sure not in the lite class
I agree with Oz. We do not need a shell for this course.
The console in Eloquent Javascript is very nice and should suffice for most things. JSFiddle also has a good environment for running Javascript programs.
Also the shell has some limitations as its not a browser , so in the end you still need to put your script in a web page .
I use the console given by Google Chrome developer tools (similar to FireBug for Firefox). There are even command line console on Mozilla site, I suggest this https://developer.mozilla.org/en/Rhino/Downloads_archive
Nick,
Git is a distributed version control system. GitHub is a web based service which allows users to host their source code on GitHub's Git repository. When you use the free account your code is automatically available in the public domain.
GitHub is used by many people who create open source software as well as companies who don't. GitHub also promotes the concept of social coding, because users can follow code commits made by other users and even fork other's projects.
Sorry if I introduced too many new concepts :-)
To use GitHub you will need a working knowledge of Git. Since most people here will be working on the code individually, a very deep knowledge of Git is not required. You should be able to read a basic Git tutorial (I am sure GitHUb will also have some tutorials) and get started.
--
Regards
Parag
JQuery (http://jquery.com/) is a good JavaScript library code to review. Here is an article on 10 Things I Learned from the jQuery Source. http://paulirish.com/2010/10-things-i-learned-from-the-jquery-source/
What exactly is jquery? Do we need it for the course?
Melipone, JQuery is a Javascript library for creating web apps. It does a whole lot of things, including manipulating the DOM.
No we do not need it for this course. I believe someone is thinking of offering a separate JQuery course next semester.
Thanks all,
I found some by myself now:-
http://www.javascripter.net/faq/
http://www.w3schools.com/js/default.asp
http://javascript.internet.com/
http://www.webmonkey.com/tutorials/
Seem OK.
Hi Maya,
I would not recommend w3schools at the moment. You can look in here instead to see why this is so: http://w3fools.com/
This is a note for everyone too.
Cheers,
Darth
Hi Darth
Thanks for the headsup, will stay away from that one, the link you gave had some other good sources so I will use them instead.
Darth,
I am doing the php course as well and I just noticed that the course organizer is providing w3schools as a principal reference....
I pretty sure it is dependent on the discipline. For JS, not so much...
Maya,
I'm not sure about their other offerings. I don't know much about PHP, but I do recall they have a manual available online. You can always counter check on that..
Good luck!
Oh wow, I've been using w3schools to study Javascript. I'm gonna check out that w3fools website. Thanks.
I was playing with an example int he Eloquent Javascript book using a while statement and wanted to make it display number 1-10 but get 1-11 and am wondering how to make it stop at 10. Here is my code:
var total = 0, count = 1;
document.write (count);
document.write ( "," ) ;
while (count <= 10)
{
total += count;
count += 1;
document.write (count);
document.write ( "," ) ;
}
try this : while (count<=9) or while (count<10). remember the loop runs once more before stopping.
you are printing the value of count before it is incremented in the loop. and your while condition loops 10 times, that is why you are getting 1-11.
another way would also be doing all the "document.write(count)" inside the loop.
try this:
var total = 0, count = 1;
while (count <= 10)
{
// print the count variable first
document.write(count);
document.write(",");
total += count;
// increment the count variable
count += 1; // can also be written as "count++" or "++count"
}
The reason why this is happening:
When the value of 'count' is 10, the program is able to enter the while condition, because, 10 <= 10. The value of count is incremented inside the loop, so it becomes 11, which is printed.
On the following run, the program does not enter the while condition, because 11 <= 10 is not true.
You must either stop the while condition at 9, or increment after printing.
try this : while (count<=9) or while (count<10). remember the loop runs once more before stopping.
Thank you all for your help.
Hi Michelle,
We also have QA forums for every week of the course on this page: http://webcraftp2p.appspot.com/courses/course/javascript101p2pujanuary2011/
You can also use these forums if you wish.
I don't know if this is the right place to ask this, but is there a difference where you put the left bracket that is the start of a function, like:
function message() {
somethingsomething
}
Is this different from:
function message()
{
somethingsomething
}
I'm just dying to know if there is any major difference, and if it affects your website in any way.
Well no. There is absolutely no difference. Javascript doesn't read white spaces. Please feel free to use any of those - whatever is more readable to you.
There is no difference in where you place the {}.
Usually it is a matter of coding conventions, which the individual, or team, or company follows. It is a good idea to be consistent in where the brackets are placed, and follow conventions of the team if you are working with others.
You can also ask the questions on the weekly forums. The forum for the first week of the course is here: http://webcraftp2p.appspot.com/courses/course/javascript101p2pujanuary20...
I'm not getting the \n (backslash n) to work to create a new line. I was trying here: http://userpages.umbc.edu/~flinchba/2tothe10th.html and then made a file just with that breaking some text here: http://userpages.umbc.edu/~flinchba/newline.html and that didn't work either. This looked and should have been very simple and I just don't know why it doesn't make a new line the way it's supposed to?
Hi Michelle,
wanted to try and help so - regarding to the second text link - first line second line,
with the
>>alert ("text \n text")
will break the lines in a pop up
or like an html
>>document.write("Line 1
Line2
Line3");
hope i am helping. new here myslef
oops where did the html
break gone ?
there suppose to be --- line 1
line 2
....
lol - i guess it is working since it appears to be in new lines
the html break is < b r > with no spacing in the <>
so write --- line1 < b r > line2 < b r > and so on
oops where did the html
break gone ?
there suppose to be --- line 1
line 2
....