NodeJS and Express, NPM, TDD, CI/CD
An introduction to NodeJS and Express
Explain middleware, answer as though I were a non-technical recruiter. Middleware is software that works in between the operating system and an application, working as a connector to do some additional work behind the scenes by communicating or otherwise perfroming data management.
Express is the most popular __ __ ____. node web framework
Express is “unopinionated.” What does that mean? Unopinionated frameworks, as opposed to opinionated framewrorks, are less strict about the ways in which different components can be used to achieve a goal. The file structure can be put together in any way, and as long as middleware is compatible, it can be used throughout the application.
What is a module and why is modularity useful to us as developers? A module is a Javascript library/file that can be imported and then used. Modularity allows one to take advantage of the qualities and tools found within a library, allowing a programmer to stand of the shoulders of giants and create a better app. It also allows one to break an apps components down into smaller components, which simplifies the structure and allows each component to used elsewhere.
What is NPM?
What version of npm are you running on your machine? 8.19.1
What command would you type to install a library/package called ‘jshint’ into your node project? npm install jshint
What is TDD?
Explain why tests are important. Please explain as though I were your non technical elder. Test driven developemet is a way to approach developing a product. It combines coding, testing, and design. By doing TDD, one can develop a test to see if a program will meet certain requirements, and then seek to create the simplest means for passing that test. As more and more tests are created and then pass, an application will evolve into a functionsl, elegant version of itself, and it will work along the way.
What are three expected benefits of testing?
- Reduced defects (less mistakes)
- The longer ramp up reduces effort in the project’s final phases
- Potentially a higher level of technial quality
Name at lest 2 individual pitfalls and at least 2 team pitfalls commonly encountered while writing tests.
Individual:
- Forgetting to run tests frequently
- Writing too many tests at once
- Writing tests that are too large or coarse-grained
- Writing overly trivial tests, for instance omitting assertions
- Writing tests for trivial code, for instance accessors
Team:
- Partial adoption – only a few developers on the team use TDD
- Poor maintenance of the test suite – most commonly leading to a test suite with a prohibitively long running time
- Abandoned test suite (i.e. seldom or never run) – sometimes as a result of poor maintenance, sometimes as a result of team turnover
CI/CD
What are three benefits of Continuous Integration?
- Ensures the team’s changes will integrate
- Catches bugs
- Reduces merge conflicts
What is the difference between Continuos Delivery and Continuous Deployment?
Continuous Delivery is the practice of developing software in such a way that it could be released at any time. Continuous Deployemtn is an extension of CI that allows one to deploy changes in real time.
Explain how GitHub fits into this process assuming the listener comes from a non-technical background:
Github allows teams to set themselves up in a way that when a team member is done working on their part of a project, they can connect to the tests and integrate their code into the working project.