<?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 Mohammed Chisti on Medium]]></title>
        <description><![CDATA[Stories by Mohammed Chisti on Medium]]></description>
        <link>https://medium.com/@mchisti?source=rss-9816fb967236------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*VtP2L2bLuGAm0RwebhVCoQ.jpeg</url>
            <title>Stories by Mohammed Chisti on Medium</title>
            <link>https://medium.com/@mchisti?source=rss-9816fb967236------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 12 Nov 2026 08:37:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mchisti/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[SQL Primer — Basic Operations]]></title>
            <link>https://medium.com/hackernoon/sql-primer-pt-1-basic-operations-54954031aac0?source=rss-9816fb967236------2</link>
            <guid isPermaLink="false">https://medium.com/p/54954031aac0</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Mohammed Chisti]]></dc:creator>
            <pubDate>Mon, 23 Oct 2017 01:12:59 GMT</pubDate>
            <atom:updated>2018-04-14T01:26:48.478Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve been doing a lot of coding on the front-end lately; actually I’ve been doing so much that I might need to create a quick primer about it. If you’re just like me and need a refresher or are just getting the hang of SQL and need a quick reference, you might appreciate this one. For this primer, I’ll use MySQL syntax.</p><h3>Where Does SQL Fit Into My Project?</h3><p>SQL in laymen terms is a language we use to save data permanently with. To better understand this so it makes a bit more sense, let me further explain a little more. You usually have a project that usually consists of a front-end maybe written with HTML/CSS/JavaScript and then you usually have a back-end like NodeJS or Rails. Where SQL comes in, is that your back-end usually through an ORM (Object Relational Mapping), like <a href="https://code.tutsplus.com/articles/an-introduction-to-mongoose-for-mongodb-and-nodejs--cms-29527">Mongoose</a> or <a href="https://www.tutorialspoint.com/ruby-on-rails/rails-active-records.htm">Active Record</a>, connects to your database of stored data, where this data is created using SQL. This is how any software remembers your username and password so that you can log back in again at a later time.</p><h3>CRUD</h3><p>The basic operations of SQL is <strong>CRUD</strong>, which is an acronym for <strong>C</strong>reate,<strong> R</strong>ead,<strong> U</strong>pdate,<strong> D</strong>elete. You’re mostly always either creating, reading, updating or deleting a table inside you database. Usually you have one database that you connect to and in that database you create tables that you store data in through records. If you’ve worked on Excel sheets, then imagine a database being the Excel file itself, the tables you create in your database being the table pages in your Excel sheet file and a record is the row in your Excel sheet page.</p><p>To create a new database for your project run:</p><pre>CREATE DATABASE name_of_database;</pre><p>For this example we’ll create a database named project</p><pre>CREATE DATABASE project;</pre><p>Now we’ll have to state that we’ll use the database name project:</p><pre>USE project</pre><h4>Create</h4><p>Now that we have created and are using a database we namedproject, we need to start adding some tables to it so we can save some records to it.</p><p>This will create a new table inside of your database.</p><pre>CREATE TABLE table_name (<br>  table_name_id INT AUTO_INCREMENT PRIMARY KEY,<br>  column_name VARCHAR(20)<br>);</pre><p>For our example, let’s create a table named users in our database. The following line of code should help us accomplish this:</p><pre>CREATE TABLE users (<br>  user_id INT AUTO_INCREMENT PRIMARY KEY, <br>  username VARCHAR(20),<br>  age INT<br>);</pre><p>Now that we have a table, we can now save some type of data, which in SQL we call a record. The way you would insert a record is through the following:</p><pre>INSERT INTO table_name (column1, column2, ...) VALUES (value1, value2, ...);</pre><p>So let insert two records to our table, the way we would do this is by:</p><pre>INSERT INTO users (username, age) VALUES (&#39;john&#39;, 34);<br>INSERT INTO users (username, age) VALUES (&#39;mary&#39;, 18);</pre><h4>Read</h4><p>Usually once you have a table, you’d like to retrieve information from it. The way you’d retrieve all records from a table is by the following:</p><pre>SELECT * FROM table_name;</pre><p>Let’s retrieve everything from our users table:</p><pre>SELECT * FROM users;</pre><p>We can then specify so that we don’t get everything by using the WHERE clause in SQL.</p><pre>SELECT * FROM table_name WHERE column = value;</pre><p>So if we’re to get john in from our table users, we’d do something like this.</p><pre>SELECT * FROM users WHERE username = &#39;john&#39;;</pre><h4>Update</h4><p>Update is for when things have changed or we’ve made a mistake and like for that record to reflect that.</p><pre>UPDATE table_name <br>SET column = value, column1 = value1, ...<br>WHERE another_column = another_value;</pre><p>So lets say mary in our database has gotten one year older and we’d like to update that</p><pre>UPDATE users<br>SET age = 19<br>WHERE username = &#39;mary&#39;;</pre><h4>Delete</h4><p>Delete is pretty self explanatory, but it allows us to delete records that we no longer need or remove tables we no longer use.</p><pre>DELETE FROM table_name<br>WHERE column = value;</pre><p>Let’s say john decided that he no longer wants to be apart of our software and would like to delete himself from our product.</p><pre>DELETE FROM users<br>WHERE username = &#39;john&#39;;</pre><p>Since we’re almost done with our SQL Primer Pt. 1, lets remove our table from our database and then also DROP our database.</p><p>To remove our table</p><pre>DROP TABLE table_name;</pre><p>For us it’ll be</p><pre>DROP TABLE users;</pre><p>And now to end it, lets drop our no longer needed database itself.</p><pre>DROP DATABASE database_name;</pre><p>For us.</p><pre>DROP DATABASE project;</pre><p>Hope you guys liked that primer and had a good time going through it. Follow me for Pt. 2 ! I’ll go through JOIN and database relationships!</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*UYKB6najaRWYUzuyV4EkkA.gif" /></figure><p><em>Thanks for reading! Please share and recommend to other interested readers!</em></p><p><em>Check out my portfolio </em><a href="http://mohammedchisti.com/"><em>http://mohammedchisti.com</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54954031aac0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/sql-primer-pt-1-basic-operations-54954031aac0">SQL Primer — Basic Operations</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generic CSS I Keep When I Create My CSS From Scratch]]></title>
            <link>https://medium.com/@mchisti/generic-css-i-keep-when-i-create-my-css-from-scratch-54f2a6361dd4?source=rss-9816fb967236------2</link>
            <guid isPermaLink="false">https://medium.com/p/54f2a6361dd4</guid>
            <category><![CDATA[css3]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Mohammed Chisti]]></dc:creator>
            <pubDate>Mon, 16 Oct 2017 03:44:10 GMT</pubDate>
            <atom:updated>2017-10-16T03:44:10.398Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ytoNB--azBCbE8xk8rqC-A.jpeg" /></figure><p>I love designing websites and I’ve designed plenty of sites to start to realize there are certain CSS tricks I always keep on my master sheet to make my life easier. A lot of the time, if I’m building my CSS from scratch, they’re always a copy and paste. I’m not a pro by any means, so take my advice with a grain of salt.</p><h3>Defaults</h3><p>In my index.css or master.css I usually have the following below.</p><pre>* {<br>  padding: 0;<br>  margin: 0;<br>  box-sizing: border-box;<br>  font-family: &lt;Font of Your Choice&gt;;<br>}</pre><pre>html,<br>body {<br>  width: 100%;<br>  height: 100%;<br>}</pre><p>Reason:</p><p>Everything has their own padding and margin size and by simply setting your own padding and margin with box-sizing set to border-box, everything manually will allow you to perfectly align items better. Setting width &amp; height of html &amp; body to 100% will allow you to set a background wallpaper, without it seeming like a website from when the internet first came out.</p><h3>Classes</h3><p>Also in my index.css or master.css are these classes. They really help when I need some obscure random spacing or size.</p><h4>Space</h4><pre>.space-small {<br>  heigth: 3em;<br>}</pre><pre>.space-medium {<br>  height: 5em;<br>}</pre><pre>.space-large {<br>  height: 8em;<br>}</pre><p>Reason:</p><p>There are times when I need some space between divs, but it’s a unique situation and padding isn’t going to cut it.</p><h4>Icon</h4><pre>.icon-small {<br>  width: 3em;<br>  height: 3em;<br>}</pre><pre>.icon-medium {<br>  width: 5em;<br>  height: 5em;<br>}</pre><pre>.icon-large {<br>  width: 8em;<br>  height: 8em;<br>}</pre><p>Reason:</p><p>Sometimes you make a call from an API and get returned images that are random sizes. So you you just want them all to be a specific size, you can just add these into it and you’ll have them all a certain length.</p><h4>Align</h4><pre>.left {<br>  float: left;<br>}</pre><pre>.right {<br>  float: right;<br>}</pre><pre>.center {<br>  align-text: center;<br>  margin-left: auto;<br>  margin-right: auto;<br>}</pre><p>Reason:</p><p>Sometimes you just need a quick way to set something to the left, right or center of the page and these come in handy time to time.</p><p>So these are some of my tips and tricks, of course it’s also created to encourage you guys to not be afraid to build your own CSS classes that you really helpful for when you code. I hope you guys liked it!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54f2a6361dd4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implement Google Maps in ReactJs]]></title>
            <link>https://medium.com/hackernoon/implement-google-maps-in-reactjs-5bc218074689?source=rss-9816fb967236------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bc218074689</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[google-maps]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Mohammed Chisti]]></dc:creator>
            <pubDate>Sun, 08 Oct 2017 18:50:54 GMT</pubDate>
            <atom:updated>2017-10-09T14:14:32.578Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F8DfT7CmyGjvjAvhceq6Tw.jpeg" /></figure><p>I’ve had my fair share of trouble implementing Google Maps in ReactJs using a npm package. Hopefully this article helps you avoid the troubles I’ve gone through.</p><h4>Finding the Best Package</h4><p>The trouble was mostly finding the best package with good documentation to follow through so that I can get my Google Maps on my page and going. The package I found best was google-map-react by <a href="https://github.com/istarkov/google-map-react"><strong>istarkov</strong></a>.</p><h4>Google Map Example Project</h4><p>What was really nice of him to also do, was to also create a React.Js example project implementing google-map-react. This way you can have real world application to see an <a href="http://istarkov.github.io/google-map-react/map/main/">example</a> of.</p><h4>Quick Start</h4><p>He does a pretty good job getting you quickly started through his documentation, but I threw in this example just in case you wanted to copy and paste it immediately.</p><p>While in your current React.JS directory, run the following lines of code in your terminal.</p><pre>npm i -S google-map-react</pre><p>Then create a component, I’m going to call mine map.js. Copy and paste the following lines of code to that file.</p><pre>import React, { Component } from &#39;react&#39;<br>import GoogleMapReact from &#39;google-map-react&#39;</pre><pre>const AnyReactComponent = ({ text }) =&gt; &lt;div&gt;{ text }&lt;/div&gt;;</pre><pre>export default class Map extends Component {<br>  static defaultProps = {<br>    center: { lat: 40.7446790, lng: -73.9485420 },<br>    zoom: 11<br>  }</pre><pre>render() {<br>    return (<br>      &lt;div className=&#39;google-map&#39;&gt;<br>        &lt;GoogleMapReact<br>          defaultCenter={ this.props.center }<br>          defaultZoom={ this.props.zoom }&gt;<br>          &lt;AnyReactComponent<br>            lat={ 40.7473310 }<br>            lng={ -73.8517440 }<br>            text={ &#39;Where&#39;s Waldo?&#39; }<br>          /&gt;<br>        &lt;/GoogleMapReact&gt;<br>      &lt;/div&gt;<br>    )<br>  }<br>}</pre><p>Now you can just import this file onto any other component/container file you have and it should display Google’s Map in your project! For more understanding of Google Maps, I’d recommend reading the google-map-react GitHub <a href="https://github.com/istarkov/google-map-react">repo</a> with the <a href="https://developers.google.com/maps/documentation/javascript/adding-a-google-map">Google Maps API documentation</a> while using the <a href="http://istarkov.github.io/google-map-react/map/main/">project</a> as a reference.</p><p>Hope this helped!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bc218074689" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/implement-google-maps-in-reactjs-5bc218074689">Implement Google Maps in ReactJs</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Is Execution Context in JavaScript?]]></title>
            <link>https://medium.com/@mchisti/what-is-execution-context-in-javascript-94e89529ad53?source=rss-9816fb967236------2</link>
            <guid isPermaLink="false">https://medium.com/p/94e89529ad53</guid>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Mohammed Chisti]]></dc:creator>
            <pubDate>Mon, 18 Sep 2017 02:26:08 GMT</pubDate>
            <atom:updated>2017-09-18T02:26:08.344Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eXSelOUjbOpRpauG-FTWCA.jpeg" /></figure><p>This kind of came up, when I was getting an interview. What is Execution Context in JavaScript and I pretty much blanked out. I was told to make an educated guess and I said “Scope? Bind?”. That was terrible. Now I’m going to figure it out for myself.</p><p>I don’t completely know it in depth, but in laymen terms, Execution Context in JavaScript is pretty much what it sounds like, which it’s the environment in which the code is executed in. To be more specific, there are two types of execution context, first one is global and the second one is functional. Global context can be accessed from anywhere in the program while functional context can be accessed by the function itself and inner functions of it.</p><pre>// Global Context everything in the file.</pre><pre>// Function Context <br>function bar() {<br>    console.log(&quot;Foo Bar&quot;)<br>}</pre><pre>// Functional Context<br>function foo() {<br>  bar()<br>}</pre><h3>Execution Context Stack</h3><p>Something that you’ll have to understand along to the Execution Context is the Execution Context Stack. Execution Context Stack is created by from the order of which things are called. So lets take our code and call Foo().</p><pre>// Global Context everything in the file.</pre><pre>// Function Context <br>function bar() {<br>    console.log(&quot;Foo Bar&quot;)<br>}</pre><pre>// Functional Context<br>function foo() {<br>  bar()<br>}</pre><pre>// Run<br>Foo()</pre><p>So if I were to call Foo() now, the way the code would be executed is in the following order:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/1*q61dnT111UgpyF-HHGS6lg.png" /></figure><p>Hope fully these visuals help on understanding what Execution Context is and how the stack is created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*UYKB6najaRWYUzuyV4EkkA.gif" /></figure><p><em>Thanks for reading! Please share and recommend to other interested readers!</em></p><p><em>Check out my portfolio </em><a href="http://mohammedchisti.com/"><em>http://mohammedchisti.com</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94e89529ad53" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Two CSS Tricks That’ll Make Your Site Fully Responsive]]></title>
            <link>https://medium.com/@mchisti/two-css-tricks-thatll-make-your-site-fully-responsive-5f9efba4015e?source=rss-9816fb967236------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f9efba4015e</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[responsive-design]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Mohammed Chisti]]></dc:creator>
            <pubDate>Mon, 11 Sep 2017 03:35:57 GMT</pubDate>
            <atom:updated>2017-09-11T03:37:18.503Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*gFqItc58z45f2VOq9u97DQ.jpeg" /></figure><p>Everyone who’s a web developer should understand how to make their website responsive to even the smallest extent. It’s expected that everything that is currently digitally available will be mobile friendly in some possible way or it seems like your site and skills are somewhat out dated. So I made a quick start guide on how to make your site minimally responsive by adding only two things to your CSS file.</p><h4>Fluid Design</h4><p>The first thing to realize about Responsive design is to make sure your website is fluid. What that means is that your website components should scale with your screen size. The way you start to make your site fluid, is by using percentages for your height and width instead of static pixel sizes. This way when someone resizes their browser window, your html tags will shrink or expand accordingly instead of breaking the page.</p><p>The following will scale based on the percentage of your screen.</p><pre>div {<br>  width: 25%;<br>  height: 50%;<br>}</pre><h4>@media Breakpoints</h4><p>The second thing you want to add to your arsenal is to create @media breakpoints in your CSS file. This will cause your CSS file to use different CSS styles based on the screen size of the device its on.</p><p>However for you to first be able to use them, make sure you add the following meta tag in between your &lt;head&gt;&lt;/head&gt; tags in all you .html files.</p><pre>&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;</pre><p>The following line of code is a @media breakpoint:</p><pre>@media screen and (max-width: 480px) { <br>  /* CSS Code for when the screen size is 480px Screen size */<br>}</pre><p>That line will cause every screen at 480px width and below to apply the CSS code between the curly brackets to your website. This way if your website is on a mobile device, which is usually less then 480px wide, will apply those css styles to itself.</p><p>Just to make sure you understand how to use them I’ll give an example. The following lines of code will cause all div to be blue and will then they will turn green as soon as it’s window size is below 780px.</p><pre>div {<br>  width: 300px;<br>  height: 300px;<br>  background-color: blue;<br>}</pre><pre>/* MEDIA QUERIES */</pre><pre><a href="http://twitter.com/media">@media</a> screen and (max-width: 780px) {<br>  /* tablet */<br>  div {<br>    background-color: green;<br>  }<br>}</pre><p>You can have multiple breakpoints by simply adding multiple ones like so:</p><pre>@media screen and (max-width: 1020px) { /* Large Desktop */ }</pre><pre>@media screen and (max-width: 780px) { /* tablet */ }</pre><pre>@media screen and (max-width: 480px) { /* mobile */ }</pre><p>Hope these tricks help greatly on your journey to a much more responsive website!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*UYKB6najaRWYUzuyV4EkkA.gif" /></figure><p><em>Thanks for reading! Please share and recommend to other interested readers!</em></p><p><em>Check out my portfolio </em><a href="http://mohammedchisti.com/"><em>http://mohammedchisti.com</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f9efba4015e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is ESLint? How do I set it up on Atom?]]></title>
            <link>https://medium.com/hackernoon/what-is-eslint-how-do-i-set-it-up-on-atom-70f270f57296?source=rss-9816fb967236------2</link>
            <guid isPermaLink="false">https://medium.com/p/70f270f57296</guid>
            <category><![CDATA[eslint]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Mohammed Chisti]]></dc:creator>
            <pubDate>Sun, 27 Aug 2017 21:08:07 GMT</pubDate>
            <atom:updated>2017-08-28T00:52:41.366Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yt4jmipE6odAIOu-BzTfEA.jpeg" /></figure><p>Occasionally, I’d hear about linters, but never gave it much attention. I’d rationalize, I’m coding pretty well without a linter already, why bloat my coding experience?</p><p>Linters save time for you, by debugging your code before you even run your application. Additionally it makes sure you and your team are all following clean code practices. ESLint is quick and easy to setup and the benefits are too great to ignore.</p><p>Imagine.</p><blockquote>You had a misspelled variable named <em>people </em>and you run your code, then your projects breaks, you go on console, console says some arbitrary line number like <em>error on line 43</em>, then you go to <em>line 43</em>, see that you passed a variable named <em>purple</em> instead of <em>people</em>. You probably wasted 3 minutes, where your linter would’ve immediately caught it, Error: No variable named purple, you fix it, you move on.</blockquote><h3>Installing Atom Packages</h3><p>For you to be able to use ESLint you have to make sure you have two packages installed in Atom.</p><p>Let’s go to Atom’s <strong>settings</strong>, which you can get to by simply pressing ⌘+, or <strong>Atom &gt; Preferences</strong> on a Mac and by pressing ctrl+, or <strong>File &gt; Settings</strong> on Windows. Once your at the <strong>settings</strong> tab, click on Install and you should see a search bar to search for package names.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/233/1*UbkSp2-biuBhotgFMWtkcQ.png" /></figure><p>Type the title of these two packages and install both.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*YfX0teMQJJDu0aSxvvWKmg.png" /></figure><h3>Setup ESLint</h3><p>All you have to do now is create a new file and name it .eslintrc at the root of your project directory with ESlint rules. These rules can be created yourself or you can also npm install rules that others have created to quickly get started.</p><p>For this example, we’ll use a set of rules that Google has created and you can install it through the following command.</p><pre>$ npm install --save-dev eslint eslint-config-google</pre><p>Afterwards, you’ll need to add the following to your .erlintrc file.</p><pre>{<br>    “extends”: “eslint-config-google”<br>}</pre><h3>Try It</h3><p>If everything was done correctly, you can try the following code below and eslint should automatically give you an error. Once you correct it by having a space after the closing parentheses and opening brace, it should disappear on its own.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g5NczUDewXf7TY6xfEc31w.png" /></figure><p>If you don’t see any errors show up, try quitting Atom and starting it again.</p><h3>Some Help from ESLint to Create Your Own Rules</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*TZQcFiJHf8TmeJ8hgEXRpw.png" /></figure><p>The guys from ESLint let me know, they can also help you get started quickly with your own rules.</p><p>The following line will install ESLint globally.</p><pre>$ npm i -g eslint</pre><p>Then this line will prompt you with some questions about your coding preferences so that you can use your own set of rules.</p><pre>$ eslint --init</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*UYKB6najaRWYUzuyV4EkkA.gif" /></figure><p><em>Thanks for reading! Please share and recommend to other interested readers!</em></p><p><em>Check out my portfolio </em><a href="http://mohammedchisti.com/"><em>http://mohammedchisti.com</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70f270f57296" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/what-is-eslint-how-do-i-set-it-up-on-atom-70f270f57296">What is ESLint? How do I set it up on Atom?</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Custom Domain on Github Pages Tutorial Using Namecheap]]></title>
            <link>https://medium.com/hackernoon/custom-domain-on-github-pages-tutorial-using-namecheap-7112bf2b8882?source=rss-9816fb967236------2</link>
            <guid isPermaLink="false">https://medium.com/p/7112bf2b8882</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[website]]></category>
            <category><![CDATA[blogging]]></category>
            <category><![CDATA[developer]]></category>
            <dc:creator><![CDATA[Mohammed Chisti]]></dc:creator>
            <pubDate>Sun, 20 Aug 2017 20:02:51 GMT</pubDate>
            <atom:updated>2017-08-21T00:37:04.460Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a quick tutorial for if you already have a Github page and want to change your domain url from username.github.io/repo to customDomain.com. If you haven&#39;t already, buy a domain from <a href="https://namecheap.com/"><em>Namecheap</em></a>, I recommend it since you usually pay around $1-10 for a year and the UI is beautiful.</p><h4>Configure Github Pages to use a Custom Domain</h4><p>First, go to your Github Page repo and click on <strong>Settings</strong>, then scroll down until you see <strong>Custom Domain</strong>. In the input box, type the domain name you just bought to set your Github Page too, e.g. <a href="http://www.yourdomainname.com./">www.yourDomainName.com.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*JXe84Nrx8FL5HfEuvBw0zA.png" /></figure><p>Lets return to the <strong>Code</strong> tab of your repo, you should now see a new file created, named CNAME.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*h_wcX4xg3d-yYDpGc1SasQ.png" /></figure><p>If you don’t, then create a new file, name it CNAME, type www.yourDomainName.com in it, save and push it to your repo.</p><h4>Configure Namecheap DNS Settings</h4><p>Lets get your domain to point to your Github Pages server.</p><p>Go to <em>Namecheap</em>, click <strong>Domain List</strong> in the navigation bar, then click <strong>manage</strong> next to your domain url and then click <strong>Advanced DNS</strong>.</p><p>Now create the following records I have listed from the picture below, except replace seeyouspacecowboy.github.io with yourGithubUsername.github.io.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SGQoKcLkaqSap7GFddWmtQ.png" /></figure><h4>The Wait game</h4><p>You’re all set and all you have to do is wait anywhere from 5–30 mins for it work.</p><p><em>Thanks for reading! Please share and recommend to other interested readers!</em></p><p><em>Check out my portfolio </em><a href="http://mohammedchisti.com/"><em>http://mohammedchisti.com</em></a><em>. (Hosted on Github Pages and domain bought from Namecheap) :p</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7112bf2b8882" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/custom-domain-on-github-pages-tutorial-using-namecheap-7112bf2b8882">Custom Domain on Github Pages Tutorial Using Namecheap</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Express & Node.JS Intro Faster Than You Can Drink Your Coffee]]></title>
            <link>https://medium.com/@mchisti/quick-introduction-to-express-node-js-in-under-30-seconds-if-you-know-rails-3ed6eeb258c0?source=rss-9816fb967236------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ed6eeb258c0</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Mohammed Chisti]]></dc:creator>
            <pubDate>Thu, 25 May 2017 23:33:50 GMT</pubDate>
            <atom:updated>2024-04-19T01:03:35.172Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*MOqUqFlNZkxjNud0Y2aWlQ.png" /></figure><p>Express + Node.Js is as simple as it seems.</p><p>We’ll create a directory for our project and then execute the following lines in terminal. ( The command code . is to open the directory in Visual Studios, but if you use another text editor, you can omit or replace it)</p><pre>mkdir node-express-intro</pre><p>then run the following in your terminal</p><pre>cd node-express-intro<br>npm init -y &amp;&amp; npm i -S express<br>touch index.js<br>code .</pre><p>Copy the following code and paste it into your index.js file. Then save.</p><pre>const express = require(&#39;express&#39;)<br><br>const app = express()<br><br>app.get(&#39;/&#39;, (req, res) =&gt; {<br>    res.send(&#39;Express works!&#39;)<br>})<br><br>app.listen(3000)</pre><p>Now run the following to your terminal :</p><pre>node index.js</pre><p>If you go to your browser and type <a href="http://localhost:3000/">localhost:3000</a> you should get the message Express works! on your browser screen.</p><p>Here’s an amazing link that got me started on my path of Node + Express <a href="https://www.youtube.com/watch?v=L5Nle1VXYnw&amp;t=649s">https://www.youtube.com/watch?v=L5Nle1VXYnw&amp;t=649s</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ed6eeb258c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lets Add a Test File with Jest in 30 Seconds to Your Create-React-App Project]]></title>
            <link>https://medium.com/@mchisti/lets-add-a-test-file-with-jest-in-30-seconds-to-your-create-react-app-project-1b806a1f4517?source=rss-9816fb967236------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b806a1f4517</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[create-react-app]]></category>
            <category><![CDATA[jest]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Mohammed Chisti]]></dc:creator>
            <pubDate>Mon, 15 May 2017 01:04:26 GMT</pubDate>
            <atom:updated>2017-05-15T01:04:26.023Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*2ua0XnPLlZBLs8gWA74T6Q.png" /></figure><p>If you’re like me, you dread TDD because you it kind of feels like more work then it needs to be, but we all know that TDD can make sure you don’t forget what your project guidelines are if their put in place. If I wanted my project to have a single button on the screen and then ended up 3 buttons instead, test code I’ve written will remind me that I’ve got 2 more buttons then I had originally hoped for. Aside from when you’re solo, this is extremely beneficial to your team who will also be working on the project with you. If you’ve been working on a React project then I’ll show you how you can make it a TDD ready project.</p><h3>Step 1</h3><p>If you’ve been using npm’s create-react-app then you’ve already got Jest installed on your project, Step 1&#39; s already finished!</p><h3>Step 2</h3><p>Go to your scripts on your package.js file and type/edit the following :</p><pre>&quot;scripts&quot;: {<br>    ...</pre><pre>    &quot;test&quot;: &quot;jest&quot;</pre><pre>    ...<br>}</pre><h3>Step 3</h3><p>Create a folder in your src folder called __test__. It’s usually convention to have your test folder named test followed after double underscore dashes and then also followed after with double underscore dashes. With in the __test__ folder add a file named test.js in it.</p><h3>Step 4</h3><p>Copy and paste the following code to your test.js file. Replace Foo with any component you have in your folder:</p><pre>import React from &#39;react&#39;;<br><br>import Foo from &#39;../components/Foo&#39;;<br><br>describe(&#39;&lt;Foo /&gt;&#39;, () =&gt; {<br>  it(&#39;Some possible tests&#39;, () =&gt; {});<br>});</pre><h3>Step 5</h3><p>Run the following line in your terminal :</p><pre>$ npm run test</pre><h3>Finished!</h3><p>You should see a test that was complete in your terminal. If want to see some better examples of TDD, they checkout Airbnb’s examples <a href="https://github.com/airbnb/enzyme">here</a>. Be sure to npm i any libraries like enzyme to your project.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b806a1f4517" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adding SASS/SCSS to your Current Create React App Project without Ejecting]]></title>
            <link>https://medium.com/@mchisti/adding-sass-to-your-current-create-react-app-project-without-ejecting-841d115f250a?source=rss-9816fb967236------2</link>
            <guid isPermaLink="false">https://medium.com/p/841d115f250a</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[scss]]></category>
            <category><![CDATA[sass]]></category>
            <category><![CDATA[create-react-app]]></category>
            <dc:creator><![CDATA[Mohammed Chisti]]></dc:creator>
            <pubDate>Sun, 07 May 2017 20:01:13 GMT</pubDate>
            <atom:updated>2017-05-07T20:02:02.083Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x6G6PLmjXzmvj6X7ObnrdA.jpeg" /></figure><p>I’ve usually used frameworks for CSS and didn’t really worry too much about having SCSS or SASS support for my React projects, but on a recent project of mine, I’ve decided that I’m going to build my own CSS framework and grid for myself, since I wanted some of my own tweaking flexibility. While building my own CSS framework, I’ve had so many redundancies in my CSS that I knew it was time that I just had to port to SCSS.</p><h3>Getting Started</h3><p>The way we’re going to support SCSS is sort of how Webpack picks up our ES6 Javascript using Babel to recreate regular Javascript. We’ll be taking our SCSS files and then recreate regular CSS files that our index.html can read.</p><p>The way my project tree is structured is the following :</p><pre>project-dir<br>├── .git<br>├── .gitignore<br>├── node_modules<br>├── package.json<br>├── public<br>│   ├── stylesheets <br>│   │   └── index.css   <br>│   └── index.html<br>└── src<br>    ├── components<br>    ├── App.js<br>    └── index.js</pre><p>And I hope you use it as a reference for this blog. We’ll create a new folder for our SCSS files so that their separate from the CSS folder when their built. Let’s create a new index.scss file in our new folder with the following :</p><pre>$ mkdir public/scss-stylesheets<br>$ touch public/scss-stylesheets/index.scss </pre><p>After your tree should now look like this :</p><pre>project-dir<br>├── .git<br>├── .gitignore<br>├── node_modules<br>├── package.json<br>├── public<br>│   ├── scss-stylesheets<br>│   │   └── index.scss   <br>│   ├── stylesheets <br>│   │   └── index.css   <br>│   └── index.html<br>└── src<br>    ├── components<br>    ├── App.js<br>    └── index.js</pre><p>You’ll also want to install the following npm package:</p><pre>$ npm i --save-dev node-sass</pre><p>Then in your package.json file located in your project root directory add the following two lines to scripts:</p><pre>&quot;script&quot;: {<br>    &quot;build-css&quot;: &quot;node-sass public/scss-stylesheets -o public/stylesheets&quot;,<br>    &quot;watch-css&quot;: &quot;npm run build-css &amp;&amp; node-sass public/scss-stylesheets -o public/stylesheets --watch --recursive&quot;,<br>    ...<br>}</pre><p>You can change entry path public/scss-stylesheets on both build-css and watch-css to any folder you prefer instead. Same holds true for the output path public/stylesheets for the code above. The build-css let you build the SCSS files to CSS files once, but if you want your project do this while you code, you run watch-css and it’ll reload as you change you SCSS file. You could try this with the following :</p><pre>$ npm run watch-css</pre><p>Now you might be thinking we’re already watching our react project when we run npm start and we’d have to then also watch SCSS with npm run watch-css. A bit of an annoyance, so why don’t we fix that bit too, so that SCSS is also watched when npm start is ran. We’re going to need the following package to be installed :</p><pre>$ npm install --save-dev npm-run-all</pre><p>Then change the following lines from your package.json ( — are lines we’re getting rid of while + are lines we’re adding) :</p><pre>&quot;scripts&quot;: {<br>     &quot;build-css&quot;: &quot;node-sass src/ -o src/&quot;,<br>     &quot;watch-css&quot;: &quot;npm run build-css &amp;&amp; node-sass src/ -o src/ --watch --recursive&quot;,<br>-    &quot;start&quot;: &quot;react-scripts start&quot;,<br>-    &quot;build&quot;: &quot;react-scripts build&quot;,<br>+    &quot;start-js&quot;: &quot;react-scripts start&quot;,<br>+    &quot;start&quot;: &quot;npm-run-all -p watch-css start-js&quot;,<br>+    &quot;build&quot;: &quot;npm run build-css &amp;&amp; react-scripts build&quot;,<br>     &quot;test&quot;: &quot;react-scripts test --env=jsdom&quot;,<br>     &quot;eject&quot;: &quot;react-scripts eject&quot;<br>   }</pre><p>Once you’re done with it all you can now just write the following and you should have SCSS support on your project :</p><pre>$ npm start</pre><h3>Bonus : .gitignore</h3><p>So that we’re not adding redundant code to our git repo, we can add the following folder path to our .gitignore :</p><pre>public/stylesheets</pre><p>Hope you liked my posts! I’d love any feedback and follow me more posts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=841d115f250a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>