Modern Javascript Learning Path

0

Category :

When you’re learning any new language, you write code and then you throw it away, and then you write some more. My modern JavaScript education has been a stepladder of tutorials, then a small tractable project during which I compiled a list of questions and problems, then a check-in with my coworkers to get answers and explanations, then more tutorials, then a slightly bigger project, more questions, a check-in — wash, rinse, repeat.

Here’s an incomplete list of some of the workshops and tutorials I’ve run through in this process so far.

  • 1) HOW-TO-NPM — npm is the package manager for JavaScript. Even though I’d typed npm install thousands of times before I started this process, I didn’t know all the things npm does till I completed this interactive workshop. (On several projects I’ve since moved onto using yarn instead of npm, but all the concepts translate.)
  • 2) learnyounode — I decided to focus on server-side JavaScript first because that’s where I’m comfortable, so Node.js it is. Learnyounode is an interactive introduction to Node.js similar in structure to how-to-npm.
  • 3) expressworks — Similar to the previous two workshoppers, Expressworks is an introduction to Express.js, a web framework for Node.js. Express doesn’t get a whole lot of use here at Postlight these days, but it was worth learning as a beginner to get a taste of building a simple webapp.
  • 4) Now it was time to build something real. I found Tomomi Imura’s tutorial on Creating a Slack Command Bot from Scratch with Node.js was just enough Node and Express to put my newfound skills to work. Since I was focusing on backend, building a slash command for Slack was a good place to start because there’s no frontend presentation (Slack does that for you).

    5) In the process of building this command, instead of using ngrok or Heroku as recommended in the walkthrough, I experimented with Zeit Now, which is an invaluable tool for anyone building quick, one-off JS apps.

    6) Once I started writing Actual Code, I also started to fall down the tooling rabbit hole. Installing Sublime plugins, getting Node versioning right, setting up ESLint using Airbnb’s style guide (Postlight’s preference) — these things slowed me down, but also were worth the initial investment. I’m still in the thick of this; for example, Webpack is still pretty mysterious to me, but this video is a pretty great introduction.

    7) At some point JS’s asynchronous execution (specifically, “callback hell”) started to bite me. Promise It Won’t Hurt is another workshopper that teaches you how to write “clean” asynchronous code using Promises, a relatively new JS abstraction for dealing with async execution. Truth be told, Promises almost broke me — they’re a mind-bendy paradigm shift. Thanks to Mariko Kosaka, now I think about them whenever I order a burger.

    8) From here I knew enough to get myself into all sorts of trouble, like experiment with Jest for testing, Botkit for more Slack bot fun, and Serverless to really hammer home the value of functional programming. If you don’t know what any of that means, that’s okay. It’s a big world, and we all take our own paths through it.

    my thanks to this great post:
    https://trackchanges.postlight.com/modern-javascript-for-ancient-web-developers-58e7cae050f9

    Automate Postman Tests with Newman

    0

    Category : , , ,

    Newman is a command-line collection runner for postman.

    1) So the first step is to export your collection and environment variables.

    2) Save the JSON file in a location you can access with your terminal.

    3) Install Newman CLI globally, then navigate to the where you saved the collection.

    4) Once you are in the directory, run the below command, replacing the collection_name with the name you used to save the collection.
    newman run "collection_name.json" -e GITHUB_ENV.postman_environment.json
    
    5) Ensure you add the -e flag which is for the environment param.

    6) You may also want to specify the -d flag for a data file and the --insecure switch to allow calls to self signed certs.


    You should see something like the below:





    my thanks to the great article below.
    https://scotch.io/tutorials/write-api-tests-with-postman-and-newman#newman-cli

    Postman BDD allows you to use BDD syntax to structure your tests and fluent Chai-JS syntax to write assertions. So the above test suite could look like this instead:
    https://github.com/BigstickCarpet/postman-bdd

    API Test Automation CI using GitHub, Jenkins, and Slack

    First few steps are the same as above i.e. export the postman tests and environment.

    Probably start at Step 2: Setup Your Jenkins Build

    npm commands

    Get npm installed version
    npm -version
    
    Get npm installion directory
    npm root -g
    
    Get list of installed packages
    npm list -g --depth=0
    


    my thanks to the great post below:
    https://www.linkedin.com/pulse/api-test-automation-ci-using-github-jenkins-slack-talal-ibdah?trk=mp-reader-card

    Install SSH BitBucket + SourceTree

    0

    Category :

    Follow the tutorial provided by Atlassian/BitBucket

    Set up SSH for Git
    https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html


    I encountered 2 issues:

    1)
    The authenticity of host 
    'bitbucket.org (131.103.20.167)' can't be established.
    RSA key fingerprint is 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40.
    Are you sure you want to continue connecting (yes/no)?

    Fix

    I used the answer i found in the following question
    https://answers.atlassian.com/questions/331668/how-to-rectify-ssh-error-authenticity-of-host-cant-be-established

    Which basically was:
    "This is actually normal. It’s not actually an SSH error. What’s happening is that SSH is being cautious. That’s part of being secure. Whenever SSH tries to log in to a host it hasn’t seen before, it will put up a message like this.
    SSH is saying “I haven’t seen this host before. It has this IP. It identifies itself with this fingerprint. Do you really want to connect?”

    In this particular case, you don’t have any other fingerprint to compare it to. But you really are trying to connect to bitbucket.org. So you can go ahead and say “yes” and you should continue logging in."

    2)
    "Authentication via SSH keys failed, do you want to launch 
    the SSH key agent and retry?"

    When i got to the final step to commit my test commit, I got the above error from SourceTree

    I was able to complete a push to BitBucket using GitBash with no error, which to me suggested it as solely a SourceTree issue..

    When i tried to use the suggested "Putty Authentication Agent" it was looking for a .ppk file which i had not generated as part of the suggested process so i presume it was looking for this type of file due to the SSH Client setting.

    Fix

    To fix the issue i went to
    SourceTree-->Tools-->Options
    and within the
    SSH Configuration. section i changed the
    SSH Client to OpenSSH, which solved the issue.
    SourceTree actually located the appropriate file itself which i just confirmed.