Ninja Space Content Blog

MISC: Useful Commands and Keys

October 16, 2021
Find all git files in your machine: find . -name .git -type d -prune

Click F2 and then change the variable name and click 'enter' to change all variables that is the same as what you selected before hitting F2.

Things I didn't remember to do when trying to create my server from memory:
  1. Install nodemon by: npm install nodemon --save-dev
 

My GraphQL Study

October 16, 2021
I haven't finished my Angular tutorial yet but I'm going to have to shift gears here and start learning GraphQL. It's been said that it's a great alternative to Rest API as you only need one end point to get data for a group of tables in your database. You implement GraphQL in the back-end of your project. I haven't started coding in it but what I always do is watch a lot of YouTube videos and documents to narrow down the resource(s) that I need to look back to. Here are my notes.

PROS for GraphQL from watching Pedro Youtube:
  • You only need one end point to get data form a group of tables which is /graphql
  • You can query to receive only the data you need.
  • GraphQL is strongly-typed.
  • You can utilize the GraphiQL to test a query in the browser and try the end point
  • If using PostgreQL, you will need to use pg-promise library so there is familiarity if you're used to PostgreQL.
  • You won't need a body parser? (not sure about this one)
CONS for GraphQL:
  • You'll be required to install a few additional libraries and add more folders and files like schema or import schema from the graphql library
Differences for GraphQL versus Rest API that stood out to me:
  • Instead of using req.body or req.send, you use resolve.

This a great resource to read on starting up the files: https://medium.com/codingthesmartway-com-blog/creating-a-graphql-server-with-node-js-and-express-f6dddc5320e1

If your stack is PostgreSQL, this is a great GraphQL article: https://blog.cloudboost.io/postgresql-and-graphql-2da30c6cde26

Journal:
October 16, 2021 at 2:21PM: I spent a good couple hours looking at 3 Youtube videos about GraphQL and a few readings from online so I'm ready to create a new project and utilize GraphQL for the first time. I'll build my server with Express first.

 

AB Testing on Buying a Domain From Godaddy vs Netlify

September 14, 2021
I found something interesting this past week.

Last month, I bought a domain name via Netlify because I've been deploying my front end React apps there during bootcamp and decided to do something different with domain buying. Earlier this year in January 2021, I also bought another domain name but this was through Godaddy. I didn't think much of it. I buy almost all of my domains through Godaddy because that's what I've been doing for over a decade as I'm comfortable with their interface.

Even though my January 2021 domain that I bought through Godaddy has been live for 8 months and the Netifly domain has only been live for 1 month, my Netifly domain has been properly indexed already and showing up in Google search queries way faster than my other domain from Godaddy. The cost for me was actually cheaper through Netlify too!

I have a few theories on why this is happening.

First off, I built my own database for the Netifly domain, whereas I was pulling data from a public API for the Godaddy domain. Right there, was very key. I have unique content displaying for my Netlify website.

Secondly, any domain that I buy through Netlify, if I'm hosting it there, comes automatically with a secure socket layer. I didn't have to buy extra for SSL. Therefore, my Netlify site is secure from the get-go via https whereas the January domain purchase is not. Godaddy charges me extra for SSL certs so I usually avoid buying one unless my revenue justifies it.

Lastly, I was hosting through Godaddy's shared hosting which could be a very bad thing if I'm sharing the same IP address with another site that belongs to someone else that was marked as spam. That could affect my rankings and the way Google indexes my website.

I'm very happy with how my newer site is indexing in Google's search engine and can't wait to share any new findings. I highly recommend trying Netlify out if you're torn between using Godaddy or Netlify to buy your domain and plan on deploying a React app.


 Tech Supplies:

 

My Career Coach broke up with me today

August 26, 2021
My career coach, who had been mentoring me since I was in my coding bootcamp broke up with me this morning. I call it a break up because it really feels like it to me.

I graduated from my coding bootcamp about 8 months ago but 2 months before I graduated, my university career coach had been helping me with updating my resume, job researching and strategies. After I graduated, she played a pivotal role in getting me out of my imposter syndrome. We used to meet once a month and would email often to each other to keep her up-to-date on my career plans. I never had a career coach before this so I felt like this was a such a unique relationship to me. She had great rapport with everyone in my cohort and was amazing!

A new cohort class has just graduated and so I'm old news now and I know she has to dedicate her resources to the new group who needs her services more than I do.

The email that she sent me this morning was only a few sentences long but the part where she said, "do you feel that you're finish with support from Career Success?" was a big hint of the end. The question was loaded with a good-bye, sayonara, nice to know you and adios all in one.

This pandemic has really made me crave and appreciate every regular communication with anyone and I met up with her more than I did with anyone else from my bootcamp after I graduated. And now, this chapter has closed. After I responded back to thank her for everything, I expressed to her that I'm hoping she'd be able to keep me on her email blast list that she sends periodically to a group of us. I hope she's able to.

Good-bye career coach. I will never forget you.

Suggested Work Accessory:
A good laptop stand can give you a better angle for Zoom calls and avoid that double chin look.
 

Integrating Google Adsense in a React App

August 17, 2021
For several years, I've been embedding Google Adsense on my websites to earn revenue. Part of the process is when I'm adding ads to a new site that I've just launched, I would need to add that site under settings for my Google Adsense account and wait for a review.

My Steps
  1. Go to your Google Adsense account and on the left side, select "Sites." 
  2. Go ahead and add a site here. Embed your code with your publisher ID in the head section of your website.
  3. Then, request Google Adsense to review it. 
  4. You will see this message: "Getting your site ready to show ads Please bear with us! This usually takes a few days, but in some cases can take up to 2 weeks. We'll notify you as soon as we've run some checks on your site. Make sure you don't remove your site and resubmit it because this can delay the process. In the meantime, place the code on every page you want ads to appear. After our checks are complete, your site will be ready to show ads. Remember to go to Ads and choose the ad formats you want to show"
  5. Now, this is the part that you'll need to be patient for awhile. When you check the console of your React App, you'll see this red error in the console "Failed to load resource: the server responded with a status of 403 ()" but don't fret, just be patient. It's because Google Adsense hasn't approved your request yet. When it has approved it, it will go away. 
I'll update this post to let you know how long this particular request took to approve.

Sept 14, 2021 Update: 
I was denied for Adsense for this website for not having enough content! Don't fret. I was successful with other websites I've built for so I can make this work in a few months. Here was my denied message below from Google.

"We’ve found some policy violations on your site which means your site isn’t ready to show ads yet. Valuable Inventory: Not enough content It's important for a site displaying AdSense to offer significant value to the user by providing unique and relevant content, and not to place ads on auto-generated pages or pages with little to no original content. This may include, but is not limited to:
  • copying portions of text content from other sources
  • websites dedicated to embedded videos from other hosts
  • websites with gibberish content that makes no sense or seems auto-generated
  • templated or pre-generated websites that provide duplicate content to users."
So let's write more content, guys!

Suggested Rainbow Work Space Accessory:
 

About Ninja Space Content


Ninja Space Content I have been building simple websites on my own since 2008 and currently run several websites at the moment, including this one. I used to be an account manager for an affiliate/e-commerce company, helping affiliates grow their sales so I have some knowledge on the business side and client side of affiliate marketing. Most recently, I decided to complete a JavaScript coding bootcamp and graduated in Dec 2020.
Note: links to resources and promoting special deals may allow me to earn a small commission from each sale.
Work Station Accessories