<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by rouzbeh on Medium]]></title>
        <description><![CDATA[Stories by rouzbeh on Medium]]></description>
        <link>https://medium.com/@rouzbeh84?source=rss-4d03c3b47843------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*WS2RmcDuz7gKv-Dggyym8g.png</url>
            <title>Stories by rouzbeh on Medium</title>
            <link>https://medium.com/@rouzbeh84?source=rss-4d03c3b47843------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 00:14:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rouzbeh84/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What is NPM? (and how to install it)]]></title>
            <link>https://medium.com/@rouzbeh84/what-is-npm-and-how-to-install-it-9492034d90f7?source=rss-4d03c3b47843------2</link>
            <guid isPermaLink="false">https://medium.com/p/9492034d90f7</guid>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[rouzbeh]]></dc:creator>
            <pubDate>Wed, 05 Aug 2015 23:44:12 GMT</pubDate>
            <atom:updated>2015-09-24T23:01:06.452Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*-K2xJ8OwCmcgxmzVvMbASQ.png" /><figcaption>NodeJS and NPM Logo</figcaption></figure><p>At its core, <strong>NPM</strong> is just a package manager for <strong>NodeJS</strong> tools. It is run within the <strong>Command Line Interface </strong>or <strong>CLI </strong>on Mac/Win/Linux machines and allows you to use node ‘<strong><em>modules</em></strong>’ within your node applications.</p><p>For a quick intro to Node, visit their homepage <a href="https://nodejs.org/"><strong>here</strong></a><strong>,</strong> but for our purposes you just need to know that it allows you to write applications in JavaScript on the server. It’s built on the V8 JavaScript runtime and written in C++. You can install it for Mac and Windows machines <a href="https://nodejs.org/download/"><strong>here</strong></a><strong> </strong>and Linux machines<strong> </strong><a href="https://github.com/joyent/node/wiki/installing-node.js-via-package-manager"><strong>here</strong></a>.</p><p>To check if you installed it correctly type ‘<strong><em>node</em></strong>’ in your terminal shell and you should be greeted with the following which is a console in your shell.</p><pre>$ node<br>&gt; console.log(&#39;Node is running&#39;);<br>Node is running<br>&gt; .help is a very useful command and so is <br>&gt; .break or .exit if you get stuck</pre><p>Pretty cool huh! [I think so :)];</p><p>You can install packages locally to a project or globally to be used in any project directory. In local mode, it installs the package in a<strong> ‘<em>node_modules’</em></strong> folder in your parent working directory of the project you are currently in via the command line and is owned by the current user.</p><p>Global packages are installed in which is owned by root:</p><pre>{usr{/local}}/lib/node_modules/<br>// the paths in the braces are possible paths but could vary so <br>// check both if in</pre><p>To install packages globally you would use the global flag, which is as follows:</p><pre>&#39;--global&#39; or &#39;-g&#39; for short.</pre><p>Choosing which path to install to is up to you, usually install locally if you want to use the package in your current project and globally if you would like to use it in your terminal shell.</p><p>To see what you have installed use:</p><pre>npm ls</pre><p>This should list all installed packages like so:</p><pre>$ npm ls<br>auth_sb@1.0.0 /Users/{username/path-to-project<br>├── angular@1.4.3<br>├── angular-ui-router@0.2.15 extraneous<br>├─┬ bcrypt@0.8.4<br>│ ├── bindings@1.2.1<br>│ └── nan@1.8.4<br>.......<br>  ├─┬ mongodb@2.0.34<br>  │ ├─┬ mongodb-core@1.2.0<br>  │ │ ├── bson@0.4.8<br>  │ │ └─┬ kerberos@0.0.12<br>  │ │   └── nan@1.8.4<br>  │ └─┬ readable-stream@1.0.31<br>  │   ├── core-util-is@1.0.1<br>  │   ├── inherits@2.0.1<br>  │   ├── isarray@0.0.1<br>  │   └── string_decoder@0.10.31<br>  └── sliced@0.0.5</pre><pre>npm ERR! extraneous: angular-ui-router@0.2.15 /Users/username/path-to-project/node_modules/angular-ui-router</pre><pre>npm ERR! extraneous: jquery@2.1.4 /Users/username/path-to-project/node_modules/jquery</pre><p>As you can see it also display what is extraneous and not being used by the project. The pipes on the left create a nice tree of installed modules for you to easily navigate as well. This install was particularly long so I just clipped the chunk in the middle to show that it also lists extraneous dependencies at the end as well.</p><p>At this point you might be asking what are these modules and how does NPM know to install them. Well, my friend, this is done with a file on the root of your working directory called ‘<strong><em>package.json’ </em></strong>that is like a manifest file for your project. Let’s check out an example one below:</p><pre>{<br> “name”: “auth_sb”,<br> “version”: “1.0.0”,<br> “description”: “enter description here”,<br> “main”: “index.js”,<br> “scripts”: { <br>   “start”: “node index.js”<br>  },<br> //^specifies which file to reference when you type &#39;npm start&#39; to<br> //start your server^<br> “author”: “self”,<br> “license”: “ISC”,<br> “dependencies”: {<br>   “angular”: “^1.4.3”,<br>   “bcrypt”: “^0.8.4”,<br>   “body-parser”: “^1.13.2”,<br>   “cookie-parser”: “^1.3.5”,<br>   “express”: “^4.13.1”,<br>   “gulp”: “^3.9.0”,<br>   “hat”: “0.0.3”,<br>   “mongoose”: “^4.0.7”<br>  }<br>}</pre><p>Now most of this file is self-explanatory and you can fill it out accordingly but to begin this file you can use the following code:</p><pre>npm init</pre><p>This initializes the file and you can now add your dependencies and path to your server file on the root of your directory.</p><blockquote><strong>One key thing to notice is what is to the right of each dependency</strong>.</blockquote><p>This is the version of the package that will be installed when you install all your dependencies as the next step is the following:</p><pre>npm install</pre><p>An important thing to know is that you can also specify the ‘<strong><em>latest</em></strong>’ version at the time of install but be careful with this as newer versions of modules may not have the same functionality as they did at the time you built your project.</p><p>With your “<strong><em>package.json”</em></strong> configured correctly, the command above will install all specified modules and their respective versions to your working directory and with that we have learned what NPM is, what it does, the start of how to use it and finally how to maintain it at a very basic level.</p><p>Enjoy your new knowledge and do share if you find it useful :).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9492034d90f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GitHub & Pair Programming]]></title>
            <link>https://medium.com/@rouzbeh84/github-pair-programming-a92053d71385?source=rss-4d03c3b47843------2</link>
            <guid isPermaLink="false">https://medium.com/p/a92053d71385</guid>
            <category><![CDATA[pair-programming]]></category>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[rouzbeh]]></dc:creator>
            <pubDate>Mon, 20 Jul 2015 23:50:48 GMT</pubDate>
            <atom:updated>2016-01-22T18:48:10.980Z</atom:updated>
            <content:encoded><![CDATA[<p>I have recently been attending a development boot camp to become a full-stack JavaScript Engineer and have run into major problems when trying to work on the same project with my paired partner. The partners change on a daily basis and they both usually have to start by forking a repository from GitHub. Unfortunately, a forked repository from a private repository <strong>does not</strong> allow collaborators so we have some steps to take to prepare a new repository we can both contribute to since pair programming only involves one computer to be used.</p><p>The first step is to fork the main repository to your own account. After forking this repository, you then clone it on your local machine.</p><pre>git clone /url of forked branch/</pre><p>Once you have a local copy you go back into your online account and create a fresh repository on it and add your paired partner as a collaborator under the settings of the new repository.</p><p>So now you have the forked repo, the fresh new repo with your partner as a collaborator and the original repo you forked from. Once this is done you have to set a couple of remotes to link them all together. First, by default, you will have a link to the forked repo as <strong>origin </strong>so now you have to add a remote to your new repo you want to collaborate on with the following command:</p><pre>git remote add &lt;any name you call it&gt; /url off freshly made repository/</pre><p>Now you have to link back to the original repo you forked from with the same method:</p><pre>git remote add &lt;upstream&gt; /original repo url/</pre><p>I called it upstream as this is the convential name for it and makes sense as it is a stream up to the original code base.</p><p>So now you have a link to the original repository, your forked repository (by default) and your new collaborative repository. Once all this is done you can now <strong><em>git push</em></strong> to your collaborative repository so your pair programming partner can <strong>clone</strong> it to their desktop.</p><pre>git push origin /collaborative repo link name/</pre><p><strong>Origin</strong> is your default name for your forked repo that we cloned to our local machine as described earlier and you want it to be the exact same as the collaborative one at the beginning. Once your all set with all repos at the same point you can now have your partner add the same remote links to your forked repo and the original repo that started this all.</p><p>Now you should be good to go to be able to collaborate on the same repository and once finished pushing back to the forked and original repo!</p><p>Good luck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a92053d71385" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>