Image for post
Image for post
Photo by Jan Tinneberg on Unsplash

Hi Everyone,

I wanted to let you know that I am moving on from Medium to and FreeCodeCamp. I will continue to cross post articles on both platforms for now.

I am sure that the decision to move away from Medium doesn’t come as a surprise to most of you, considering the not-so-recent decision taken by Medium to push everyone to its payment platform.

In this blog post I hope to explain git like I wish someone had explained to me. I am going to show how you can get started with just a few commands and the concepts behind them.

Image for post
Image for post
Photo by Yancy Min on Unsplash

Basic concepts

Your local code

This is the work that you do on your computer. Any edits, formats, features or development work that you have in your computer is your local code.

Staged site

Once you are happy with the changes or amount of work done, you can mark it as ready for stage. It means that you are declaring that these lines of code are ready to be committed.

The server

Once you are feel ready with the files you have staged, you can send them out to the server which stores all your code so that other people can use it too. …

Gotchas where automatic semicolon insertion can lead to bugs

Image for post
Image for post
Photo by Markus Spiske on Unsplash

I took Effective JavaScript training by Douglas Crockford a few months ago. One thing that stuck with me since then is the importance of using explicit semicolons in JavaScript. For a while, I have been lazily avoiding writing the ; and assuming the parser will do my job correctly for me. In this post, I want to present some examples that changed my mindset.

Image for post
Image for post
“turned on black Android smartphone” by Caspar Rubin on Unsplash

We learnt about what is a Progressive Web App (PWA) in part 1. In this part, we are going to build a progressive web app using no frameworks but just DOM manipulation.

Let’s do a quick recap of what we have learnt so far. For an app to be progressive, it needs to have the following requirements:

  1. a manifest file — manifest.json
  2. service worker with at least a fetch event — serviceworker.js
  3. icon — icon.jpeg
  4. served over HTTPS —

In this tutorial, I will be talking about requirements 1 and 2 — creating a manifest file and registering a service worker. …

What is a Progressive Web App? Why do we need one? How can we build one?

Image for post
Image for post
Instagram’s Progressive Web Application

Have you ever seen an “Add to Home Screen” banner, like above, while browsing a website? When you click the button, the “application” installs itself in the background. When you open this application that now sits in your app drawer, you can browse the same experience you were doing on your browser, but now right in your mobile phone.

What you have now is a mobile app that was downloaded from a web application. All this, without even have to see the face of an app store.

Getting the app was so easy! But that’s not even the best part. When you open this app, you will be able to browse the content even when you do not have internet. You have offline access to the app! …

Image for post
Image for post
Let’s convert Angular components to React components

Angular and React are both great frameworks/libraries. Angular provides a defined structure of MVC (Model, View, Controller). React provides a lightweight rendering mechanism based on state change. Often times, developers will have an application with legacy code in AngularJS but they’ll want to build new features in ReactJS.

Although it is possible to retire an AngularJS application and build a ReactJS application from scratch, it isn’t a workable solution for large scale applications. In such situations, it is easier to build a React component in isolation and import it into Angular.

In this post, I will help you create a React component in an Angular app using react2angular. …

If singleton is available globally, how is it different from a global variable that has a single instance?

Image for post
Image for post
Global variables are available to everyone, globally.

If singletons are accessible to the application globally but can only have one instance, how are they different from a global variable that can be only be initialized once, lets say by making it static?

What is a singleton?

Singleton is an object which can only be instantiated once.

A singleton pattern creates a new instance of the class if one doesn’t exist. If an instance already exists, it returns the reference to that object.

Here is a simple singleton you may use everyday:

var user = {
name: 'Shruti Kapoor',
location: 'SF',
intro: function() {
return + ', ' + this.location

Talking about promises in layman terms

Image for post
Image for post
A promise being initiated. Photo by Ben White on Unsplash

Promise: In Layman terms

Think of it as a conversation between two people:

Alex: Hey Mr. Promise! Can you run to the store down the street and get me itemA for this dish we are cooking tonight?

Mr. Promise: Sure thing!

Alex: While you are doing that, I will prepare itemB(asynchronous operation). But make sure you let me know whether you could find itemA (promise return value).

Mr. Promise: What if you are not at home when I am back?

Alex: In that case, send me a text message saying you are back and have the item for me (success callback). …

5 steps to help you get started with your development career

Image for post
Image for post

No matter what profession you are in, how old you are, where you live, what degree you have (or don’t have), you CAN be a programmer.

You don’t need to go to expensive grad schools and get a Computer Science degree or shell out $10k to become a developer. With a set direction, clear focus and passion, you can become a programmer at almost no cost.

Step 1: Passion

As cliche as it may sound, you won’t be able to sustain a new profession if you don’t feel passionate about it. Find your passion and go for it! No, really! Do some self-analysis to find out what you feel passionate about. Do you like the web? Do you want to build mobile apps? Do you want to work on the security of platforms? Do you want to work on networks? When I was a kid (not too long ago), I really liked scrolling text on the screen in a website. For those of you who don’t know what I am talking about , that ‘scrolling thing’ is actually a marquee element, which btw is an obsolete HTML element now (there… I gave my age away). Probably thats why I automatically got drawn towards web development. …

Image for post
Image for post

I recently moved to the Bay Area and as a Canadian citizen, there was a lot of preparation and paperwork that had to be done. After almost 45 days of job search, I found the kind of role and technical challenge I was looking for. I am very excited to be working as a Software Engineer at PIX System in San Francisco. I learnt a lot during my job search phase and found out that it takes a great deal of preparation — both before and after getting a job.

I hope this guide will help you in your transition to the Bay area and help you in finding your dream job. …


Shruti Kapoor

Software Engineer@PayPal. Writer at freecodecamp and codeburst. I write about JavaScript. Tweet me @shrutikapoor08

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store