iolalog (10) [Avatar] Offline
#1
Hi Yan

I'm at the fourth section now. Great course so far, but thought I'd list a few things that could be useful to adjust.

  • Code-speed: You jump very quickly from editing one file to the next. I sometimes struggle to pause just as you complete coding in one file and jumping to the next. I've taken several "code along" courses on Udemy and never had that problem, so I think you would make it easier to follow along if you took a little pause after completing each code section to make it easier to pause at the right spot or catch up. Would also be useful if you always tell the student what file you're currently editing, as you switch so fast. Same for the commands you run to install npm modules, I sometimes have to replay to figure out if it was a development or production dependency etc.

  • Environment variables: I struggled quite a bit to get the "env" stuff correct in package.json for Windows 10. I ended up using cross-env (see below), but it would be ideal if you could create setups that work cross platform to begin with. Experienced coders will probably have no problem with this, but the course will be more approachable for newer coders if you adjust that.

  • Resource links: Would be good if all links shown in the videos were also available on the section to the right of the video. I sometimes had to hunt down a bit.ly link again in the video, and it's rather cumbersome to click through the video hunting a link.

  • "Current-code": I had several episodes through the first modules where I got an error that I struggled to solve. It would be great if each section that alters the code had links to all files in current state, not just some. You change the code enough that it's moderately helpful to look at the repository with "final code". In one example I had written "Content-type" instead of "Content-Type", and that didn't affect the previous section (where I actually made the mistake), but the next. There's value in learning to debug from the very first modules, but with configuration issues due to OS mixed with coding errors etc. it's easy to get really stuck. Would be very useful to have access to the full codebase for a given section then, not just some of the files. This may be too much work compared to what it's worth for the student however smilie


  • Here's the cross-env stuff I added to package.json to make it work at Windows 10 (first line works without cross-env, but can't manage to set two variables that way, and not sure if I should have included the "export" command as well). Haven't tested it on other OS's yet, probably needs a little further adjustment to be proper cross OS:
    "alt-integration-test": "SET \"TEST_MODE=handler\" && mocha tests/test_cases --reporter spec",
    "integration-test": "cross-env TEST_MODE=handler mocha tests/test_cases --reporter spec",
    "acceptance-test": "cross-env TEST_MODE=http TEST_ROOT=<API URL> mocha tests/test_cases --reporter spec"


    Regards,
    Olav
    480416 (10) [Avatar] Offline
    #2
    Hi Olav,

    Thank you for your feedback. I actually help provide the resource links in the course and am sorry to hear that some may be missing. We do provide several links in this course, but would you happen to know in which video modules you didn't see the links on the right-hand side?

    I hope that you continue to enjoy the course. We really appreciate your notes!

    Julia
    Manning Rep
    iolalog (10) [Avatar] Offline
    #3
    Hi Julia

    There were a few places I believe, but I can't remember as I didn't make notes of it at the time. If the files at the side is just displaying the actual github content I may be mistaken.

    One example where the code is wrong is the acceptance test section: https://livevideo.manning.com/module/38_3_3/production-ready-serverless/testing/writing-acceptance-tests?

    The "when.js" code posted at the side is different from the one Yan writes in the video (9:02 or so). Both the side and the file linked to is wrong in this case however: http://bit.ly/2C2glfZ

    The link and besides the video is:
    let we_invoke_search_restaurants = co.wrap(function* (theme) {
      let body = JSON.stringify({ theme });
    
      let res = 
        mode === 'handler'
          ? viaHandler({ body }, 'search-restaurants')
          : viaHttp('restaurants/search', 'POST', { body })
    
      return res;
    });


    Should be (based on the video):
    let we_invoke_search_restaurants = co.wrap(function* (user, theme) {
      let body = JSON.stringify({ theme });
      let auth = user.idToken;
    
      let res =
        mode === 'handler'
          ? viaHandler({ body }, 'search-restaurants')
          : viaHttp('restaurants/search', 'POST', { body, auth })
    
      return res;
    });
    iolalog (10) [Avatar] Offline
    #4
    And since I'm spamming. Section 4.1 lists a command for running debug that doesn't work in Windows 10 at least: https://livevideo.manning.com/module/38_4_1/production-ready-serverless/debugging/running-and-debugging-functions-locally-with-the-serverless-framework?

    Suggested:
    ${workspaceRoot}/node_modules/.bin/sls


    Working:
    ${workspaceFolder}/node_modules/serverless/bin/serverless


    Found here: https://stackoverflow.com/questions/45437205/cannot-debug-serverless-application-in-visual-studio-code

    Regards,
    Olav
    iolalog (10) [Avatar] Offline
    #5
    4.1: When you remove awscred from init.js that acceptance-test for search-restaurants starts failing. Had to add it back in addition to adding it to the get-index.js function.

    Regards,
    Olav
    iolalog (10) [Avatar] Offline
    #6
    I get this error now and then when I run tests (caused by conditions sometimes had when random generating users I guess):

    InvalidParameterException: 1 validation error detected: Value at 'username' failed to satisfy constraint: Member must satisfy regular expression pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}]+
    iolalog (10) [Avatar] Offline
    #7
    The process_all.js file gives me the following error:
    FAILED TO SUBSCRIBE [/aws/lambda/big-mouth-dev-accept-order]
    {"message":"Resource limit exceeded.","code":"LimitExceededException"...}


    Any ideas?