Node.js & Pair Programming:
Node.js
Node.js?
is an open-source, cross-platform, back-end JavaScript runtime environment that runs on the V8 engine and executes JavaScript code outside a web browser.
Node.js lets developers use JavaScript to write command line tools and for server-side scripting—running scripts server-side to produce dynamic web page content before the page is sent to the user’s web browser.
Consequently, Node.js represents a “JavaScript everywhere” paradigm, unifying web-application development around a single programming language, rather than different languages for server-side and client-side scripts.
Chrome’s V8 JavaScript Engine?
Open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.
It takes JavaScript and makes it into something that individual’s computers can read and execute. The Chrome V8 engine is not exactly what node is built on, though. Cause node doesn’t run in the browser.
### Node is a JavaScript runtime?
It executes code on the computer, not necessarily on the browser.
npm?
A package manager for JavaScript. For example, if you wanted to install a package called ‘abc,’ you would type npm install abc
.
Using npm and Node in tandem to install and run build tools lets one test code, do code linting, and other helpful tasks. When working with React, it is especially important to have a working knowledge of node and npm.
Node can also be used as a scripting language, or to write one’s own terminal tool.
Pair Programming:
How it works?
one person is the driver, and the other is the navigator. The driver is the one typing the code and handling the immediate tech issues, and the navigator is watching, strategizing, and researching.
Reasons to Pair Program?
- Safer code: Since we have two brains focusing on the code we will reduce errors and failures.
- Save time: The actual development time might be a bit faster or slower but with a higher quality we will save time in error fixing and refactoring code.
- More money: Since we know that time is money we will save money too. But also if we have less errors and other issues we will have happier users. Happy users is often equal to more money.
- Better code: With a partner you’re able to discuss different structures and solutions you wouldn’t come up with by yourself.
- Better team knowledge: Pairing means more communication. The side effect is better spreading of knowledge across the team regarding coding, project, company, workflow and anything else.
- Faster learning for Juniors: Juniors often learn much faster when pair programming with a senior. Getting more insights of the code and the company.
- Better understanding of the task: To have good collaboration, it’s important to be clear about the task. By explaining the tasks we often get an better understanding of it. Maybe questions arise and solutions are made before any code is written.
- Shared experience across the team: While pair programming you will constantly learn from your partner. Yes, even if you’re senior, you have things to learn. It’s also a good time to share your tips when you’re coding.
- Confidence: Pair programmers often have a higher degree of confidence since two brains have been part of the development and testing.
- Happier employees: Some think it’s more fun and are more satisfied with their work environment. It’s also a great time to make friends with the ones you normally don’t hang out with.
- Higher focus: Since you have to collaborate you’re more likely to focus. Having a constant dialog also helps you to stay focused.