Coder Social home page Coder Social logo

learningwebappdev's People

Contributors

bothxp avatar garrytaulu avatar macloo avatar semmypurewal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

learningwebappdev's Issues

Exposition problem in Chapter 6

Page number of error:
193

Location on the page:
Last paragraph

Detailed description of error:
The last sentence states: "Let's start by creating a new directory in our app directory called Express. Create a server.js file that looks like this:"

However, on the top of the previous page (192), it says the same thing: "Let's start by creating a new directory inside the app directory and call it Express." So, if we followed the directions, we would have already created that directory. The only difference would be that we will be changing the server.js file as it is on pages 192-193 to the how it is on page 194.

errata: eBook, pdf, chapter 3, p.91 figure 3-24

eBook, pdf, chapter 3, p.91 figure 3-24 is slightly incorrect.

"And on the right side of the footer, you’ll need to create a subleft/-right layout to style the sitemap."
...
"When we finish with this section, we’ll have something that looks like Figure 3-24."

But the image in figure 3-24 doesn't have the sitemap styled correctly. It's still shown as a single column, not the 2 column layout that it should be.

main nav is not using a list

I think the nav should be:


      <nav>
        <ul>
          <li><a href='#'>home</a></li>
          <li><a href='#'>FAQ</a></li>
          <li><a href='#'>support</a></li>
        </ul>
      </nav>

Since it is a list

Some potential issues c/o Douglas Eichelberger

p. 223:
cards.push( { "rank":rank, "suit":"clubs" } )
-Shouldn't this be clubs.push...?

p. 228:
Cards.forEach(function (card) {
-Doesn't "Cards" need to be lowercase?

p. 228:
"change all of the cards that have the suit spades to hearts"
-The code seems to do the converse (hearts -> spades)

p. 264, figure 9-1:
I think the HTTP response arrow (from the computer to the controller) is pointing the wrong way.

Chapter 2, 'open issues with Amazeriffic'

eBook, pdf, Chapter 2, p.49
"More Practice and Further Reading
I’ve left a few open issues with Amazeriffic. I encourage you to fix them and get them working as well as you can. Remember, if you’re having trouble you can see the finished HTML on our GitHub page."

I followed along with the html as the chapter progressed, creating the index.html file. Then saw the above statement about there being a few issues left open and I have to admit that I can't find them, so i checked chapter2/Amazeriffic/index.html here on the github page but it looks exactly the same as the code in the chapter. Actually the file here on github is missing that alt attribute for the image.

So I think the code example in the eBook is missing the 'issues' or the finished index.html file is currently missing from github.

It is confusing me a bit as I thought I'd understood the chapter until I couldn't spot the issues.

Redis Code Example: Incorrect variable name used

In Chapter 7, the "Interacting with Redis in Our Code" and "Initializing the Counts from the Redis Store" code snippets declare a "redisClient" variable, but use a variable named "client" for the call to redid.createClient().

Chapter 6 Amazeriffic

I've been having a few problems getting the Amazeriffic project to work on the server. On page 205, do we add the code to the inside of the main function in app.js, the $(document).ready, or just the very end of app.js? I'm also confused about the app.get("todos.json"), because I thought we changed it to todos.OLD.json on the previous page. But then I'm not quite sure why we have both toDos = {}; and also the link to "todos.json" in app.get(). Is toDos = {} supposed to be an array that contains our objects?

Also, do we cd down into /Amazeriffic/client/javascripts when we run "vagrant $ node app.js" in Terminal?

Sorry for so many questions! I think there are just a 1 or 2 explanatory sentences that I'm missing in order to get it all working. Thanks!

req.writeHead instead of res.writeHead

Page number of error:
191

Location on the page:
2nd Paragraph, last sentence

Detailed description of error:
"The req.writeHead function creates the HTTP header that sets the attributes of the response, and the res.end function completes the response by adding "Hello World.""

In the example (and the code in server.js), it says res.writeHead, not req.writeHead.

Chapter 7 MongoDB typo

Page 225, code block in the middle of the page.
var aces = db.cards.find( { "rank" : "aces" } ); <-- should be "rank" : "ace", otherwise it doesn't find it, since the aces are listed as "rank" : "ace" in the objects we created.

errata; print Book, Chapter 4 page 108

In the first example of adding an if statement to test for keyCode 13, the example is
if (keyCode === 13) which generates an uncaught reference error.
Should be as follows
if (event.keyCode === 13)

Kindle edition has TOC at end of book

Any look up of a chapter section then sets the "Furthest Read" pointer to the end of the book. Usually "Furthest Read" is the location you were last at before going to look something up in the TOC. For example, a previous section you wish to review.

Please have future editions move the TOC to the front. Kinda like has been standard in publishing for centuries.

variable declared twice on page 108

Via Ken Hommel:

"var $new_comment" appears twice, first as a variable declaration, second line of the snippet, and again inside the nested block where it's used -- but also as a declaration ("var" occurs in both places).

Wish List item: Feed back on Add ToDo item at end of Chapter 4

As it is now one types their text, clicks the button and the text disappears.
A check of Newest shows the item added to the list.

Be nice to diplay " added to your ToDo list." Maybe even fading out.

My attempts to implement this functionality have been stymied by (it seems) scope issues. A var newItem gets unset before the content display.

CloudFoundry issues

The CloudFoundry free trial has moved from cloudfoundry.com to run.pivotal.io.

This was reported by Michael Hennessy and Steve Fickas.

.append() can take additional arguments

I was looking at the .append() documentation and I see that it accepts multiple arguments e.g. $("body").append($div1, $div2);

I was just wondering why on line 48 you use the append method twice (https://github.com/semmypurewal/LearningWebAppDev/blob/master/Chapter4/Amazeriffic/javascripts/app.js) to add to elements.

It seems like adding additional arguments to the single .append() function is the neater option. What is the reasoning behind how you've done it?

Thanks.

Chapter 9, p. 267: wrong filepath given when using sendfile

I can't get the function show of the UserController to work in a correct manner. It loads a bare HTML-file, but none of the formatting and the scripts. The issue seems to be that the CSS and JavaScript files are requested from localhost:3000/users instead of localhost:3000 directly.

loadingfromusersfolder

My function looks like this (as detailed in the book):

UsersController.show = function (req, res) {
var name = req.params.name;
User.find({"username": name}, function (err, user) {
if (err) {
console.log(err);
res.send(500,err);
} else if (user.length !== 0) {
res.sendfile("./client/todo.html");
} else {
res.send(404);
}
});
};

Typo in comment

Page number of error:
113

Location on the page:
2nd block of example code

Detailed description of error:
"var $newUL = $("

    "); //create a new li element" should be:
    "var $newUL = $("
      "); //create a new ul element"

Typo on page 165

The argument passed to main has an extra "s" at the end.

Currently reads var main = function (toDoObjectss).

Narrative issue on pg 202

Page number of error:
202-203

Location on the page:
code blocks

Detailed description of error:
The code throughout pages 202-203 refers to counts.json, but I don't think we ever created this file up to this point in the book. I tried to get the code at the top of 202 to work, but using node app, tweetCounts = require("./tweet_counter.js"), and app.get("/counts.json"...) all seemed like bits of the code that I couldn't reconcile. Were we supposed to come up with this on our own, or is there an explanation missing? Either way, I think a sentence or two to clear this up would benefit the reader.

Creating function inside closure

via Gilbert Desport:

I have a question regarding the JavaScript For loop example in Chapter 4 "Interactivity" (page 136). I couldn't get this to work as expected - it highlights the last(3rd) tab regardless of the tab clicked. Would I be correct in thinking this may be because the variable used when building the function (tabnumber) will always be set to 3 at runtime (and accessed via JavaScript closure) i.e. it will reference the last iterated value?

Typo on page 135

Also from Gilbert Desport.

There is a typo in the code example on page 135 as follows:

$(".tabs a:nth-child(3)").on("click", function () {
     $(".tabs span").removeClass("active");
     $(".tabs a:nth-child(2) span").addClass("active"); // <----typo: should be 3
     $("main .content").empty();
     return false;
});

Typo on page 177

Near the top of page 177, the closing curly brace after the displayMessage(0); call ( just before $(document).ready(main); ) should have a semicolon after it.

<span> tag for button used on page 175

This is leftover from a previous iteration of the code. It's corrected in the Github example. It should be

 $button = $("<button>").text("+");

This was caught by David Boles.

Code error on page 194

Page number of error:
194

Location on the page:
Second block of code, 3rd line

Detailed description of error:
Missing an ending parenthesis:

from
app.use(express.static(__dirname + "/client");
to
app.use(express.static(__dirname + "/client"));

Exposition problem on page 45

Page number of error:
45

Location on the page:
2nd paragraph

Detailed description of error:
The second paragraph ("Add index.html and follow up ...") seems to be a recap of the immediately preceding steps. Is it meant as a summary? If so the language should be adjusted to make this clear.

It looks more like a portion of outline which was expanded upon and should have been deleted.

Duplicate of organizeByTags function on p 171-172

reported by Ken Hommel:

Why are there two definitions for the function "organizeByTags", one inside of main() and one before it? They have different function signatures; does JavaScript support polymorphism?

If the first version of this function is #1 and the second version is #2, then #1 has a formal parameter and #2 does not. I don't know JavaScript; I would expect that the call to "organizeByTags(toDoObjects)" (in main()) would cause the interpreter to call #1, because the function signatures match. It doesn't, it calls #2. I'm guessing that this is a result of scoping, and polymorphism either doesn't exist in JavaScript or doesn't work the way I expect.

In short, I think the first definition of organizeByTags is just an error, and should be omitted.

Missing code in makeTabActive in Chapter 4 (pg 136)

Via Ken Hommel:

The block that demonstrates refactoring the code for activating each tab omits the line from the previous version for clearing the main content ("$("main .content").empty();").

This line reappears on p. 137.

Code errors on pg 219 and 221

Page number of error:
219, 221

Location on the page:
function(stream) in code blocks

Detailed description of error:
I believe the if statement shouldn't have the = in >=.
"if (tweet.text.indexOf("awesome") >= -1)"

This executes the if statement when we found awesome and when we didn't as well. The code back in chapter 6 does not have the =, too.

Code Error on page 200

Page number of error:
200

Location on the page:
if statement in large code block

Detailed description of error:
The code "as is" on page 200 produces an error. Since tweet is an object, we can't use tweet.indexOf. I got it to work by replacing it with tweet.text.indexOf, which is hinted at on page 199 under "Using the indexOf function to find words."

possible error on pg 50?

Error: pg 50:
Says: Commit the style.css changes to your Git repository
Should be Commit the index.html changes to your Git repository, yes?

Chapter 5, page 162 - console error due to 'same origin' policy

In trying to obtain the JSON from the Flickr URL provided, the Chrome console shows this error:

XMLHttpRequest cannot load http://api.flickr.com/services/feeds/photos_public.gne?tags=dogs&format=json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8888' is therefore not allowed access.

The Chrome fix detailed on page 156 ("Overcoming Browser Security Restrictions") only applies to JSON files on the same server. I'm using Mac OS X 10.9 (Mavericks), running the page through MAMP.

Apologies if this is my error and doesn't belong on the Issues tracker.

CSS Problem

Page number of error:
68

Location on the page:
CSS example

Detailed description of error:
To avoid an horizontal scroll bar under "

" container the CSS rule "nav" require "overflow: hidden" or the CSS rule "nav p" require "width: 100px" . (Verified in Linux Firefox and Google Chrome.)

Issue with caption in chapter 4

Page number of error:
116

Location on the page:
Figure 4-7 at the top of the page

Detailed description of error:
Figure 4-6 and Figure 4-7 have the same caption, but the caption no longer applies to Figure 4-7.

"The DOM, with an unconnected subtree that represents a ul element."

The subtree is now connected though, not unconnected, so if it followed the same pattern as the figure in which the p element was added, it might say:

"The DOM, after the ul subtree is added to main."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.