8 Tips i Would Recommend to any Beginner Frontend Web Developer
Tags: discuss, newbie, frontend, webdev
Published: 2020-01-31 18:55:24

---
title: 8 Tips i Would Recommend to any Beginner Frontend Web Developer
published: true
description: In my journey as a frontend web developer, I have come across some tools or techniques I would appreciate to have I known earlier.
tags: #discuss #newbie #frontend #web-development
---

In my journey as a frontend web developer, I have come across some tools and techniques I hope I knew earlier. I wish to share them with you and hopefully, contribute to your web development knowledge and save you some resources.

# 1. Bootstrap has its importance
For some developers, bootstrap hinders developers knowing the basics of HTML, CSS and some Javascript because codes are literally handed out; little thinking, add this, maybe that and we are good to go. Simple? But that not always the case. Some designs require using bootstrap to save time or serve as the foundation for other designs.
Here is an example of using the bootstrap carousel as the foundation for testimonial slider in angular.

![Bootstrap Carousel](https://dev-to-uploads.s3.amazonaws.com/i/8ou7bcnrquekbxwoohoe.PNG)
<em style="text-align:center">Bootstrap Carousel [Code](https://getbootstrap.com/docs/4.4/components/carousel/#slides-only)</em>

![Slider in Angular](https://dev-to-uploads.s3.amazonaws.com/i/c6l13gq5uqpovnr26kan.PNG "Angular Code")
<em style="text-align:center">Angular Code</em>

![Slider in Angular Video](https://dev-to-uploads.s3.amazonaws.com/i/ccn7nu0e9vwc270zen42.gif)
<em style="text-align:center">Result</em>

For me, it is highly required for every developer to know their onions when it comes to HTML, CSS, and Javascript and also know that bootstrap can effectively speed up development. I prefer to stick to the [Block-Element-Modifier (BEM)](http://getbem.com/introduction/) as much as I can but sometimes, the codebase becomes difficult to maintain which is one of the main reasons why bootstrap was designed. Hence, I recommend understanding at least the basics of HTML, CSS, and Javascript (who knows, it might be an apt measure just in case of any bootstrap apocalypse) and then use bootstrap when necessary.

# 2. SASS is beautiful and not difficult
Getting started with SASS (Syntactically Awesome Style Sheets) is very easy and [this tutorial shows why if you start SASS, you might hardly ever want to write plain CSS ever again](https://www.youtube.com/watch?v=Zz6eOVaaelI). [SASS Mixins](https://sass-lang.com/documentation/at-rules/mixin) are like return functions which you can design to accept variable and use default values if null. [SASS documentation](https://sass-lang.com/) is simple to use and understand.

> *P.S*: I use SCSS (Sassy CSS) which used the same syntax as SASS but wraps codes in curly brackets like CSS. Both SCSS and SASS use the same [documentation website]((https://sass-lang.com/)).

# 3. IDE Shortcuts and Extensions

![Emmet Example](https://dev-to-uploads.s3.amazonaws.com/i/ahcg8juc4mhj8u4x0dew.gif)

IDE Shortcuts makes development a lot faster. To achieve this, you need [Emmet](https://emmet.io/download/) for IDE. Here is the [Emmet cheat-sheet](https://docs.emmet.io/cheat-sheet/) for faster development across IDE.
Extensions like [Live SASS Compiler](https://marketplace.visualstudio.com/items?itemName=ritwickdey.live-sass) help convert SASS, LESS or SCSS to CSS on each file save.
There are extensions like [Web Server for Chrome](https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb?hl=en) which can help you serve local folders over the network, using HTTP. It also runs offline.

# 4. Version Control is a Norm
Yes, version control is a norm in software development and there will be many times it will be the savior. Version control is easy to not abide. It is eminent to stick to it for easier understand and control of software. There are standards for using version controls on bugs and features such as [Andela's git naming conventions and best practices](https://github.com/andela/bestpractices/wiki/Git-naming-conventions-and-best-practices). Udacity has an awesome course on [Version Control](https://www.udacity.com/course/version-control-with-git--ud123).

# 5. Scaffolding really saves time.
Scaffolding frequently refers to a quick set up skeleton for an application. In most cases, Scaffolding is referred to as a backend process. An example of scaffolding is typing `html` on the sublime text IDE  or `!` in Visual studio code IDE and hitting `tab`. Both will result in the basic boilerplate for most HTML pages. One basic challenge for most beginner frontend developers is auto-refresh of browser contents on saving file change without having to click the refresh button on the browser. I discovered [Yeoman](https://yeoman.io/) solves this challenge and at the same time providing you with basic scaffolds for HTML, CSS and JS, test files and task runner. On installing yeoman, you ask to choose `SCSS`, `Bootstrap` or `CSS`, `Behavior-Driven Development (BDD)` or `Test-Driven Development (TDD)` and pull out package manager dependencies. This saves you time need to setup browser-sync, write basic boilerplates, and create important task runners that help make development faster, better and stick close to standards.
[Using Yeoman GitHub repo instructions](https://github.com/yeoman/yo)

![Running `yo webapp`](https://dev-to-uploads.s3.amazonaws.com/i/udzqp43uvt5hhyc0x3qy.PNG)

![After Running yeoman](https://dev-to-uploads.s3.amazonaws.com/i/grxntorsxhd2iptpknw4.PNG)

# 6. Task Runners
Task runners are scripts that help automate numerous development process for web development. These processes can be converting SASS to CSS, spin up servers or serving the latest code files in the IDE on the browser during development, serving CSS on save without refreshing the browser, minify and uglify code, and compress ([gzipping](https://en.wikipedia.org/wiki/Gzip)) codes. Task Runners help optimize codes and improve performance on the web. Major task runners are [Grunt](https://gruntjs.com/) and [Gulp](https://gulpjs.com/).
I mainly use Gulp which is an open-source task runner that uses javascript syntax to perform web automation and tooling. Gulp is very easy to start with and has a detailed [documentation](https://gulpjs.com/). It requires Node and npm to work. Gulp uses command in gulpfile.js for tooling which is written in javascript. In the file, you can specify which process to run when developing and that for production. Fortunately, Yeoman can help scaffold web apps that have gulp scripts for important task runners like minifying, uglifying, compressing images, and gzip on production as well as other tasks like browser-sync for development. This article does justice to [how to harness the power of task runner](https://www.smashingmagazine.com/2016/06/harness-machines-productive-task-runners/).

# 7. There are easier ways to host your work for the world to see
I use services like [Netlify](https://netlify.com/) to showcase my works. Projects files or folder can be drag and dropped to deploy or lined to an online repository like Github and which updates automatically for nay change on the project. Netlify allows one to run the production script from deploy terminal if task runners like gulp where used in the project.

# 8. Web auditing and Checking Performance
Modern browsers provide tools for analysis codes and show ways to improve on them for the web. There are also online tools like [Google Pagespeed Insights](https://developers.google.com/speed/pagespeed/insights/). 
On modern browsers, `Ctrl` + `Shift` + `i` exposes the developer tool. Here you can check the performance of any website by going to the `performance tab` and then, click the `start recording performance`, `record` or `profile` button (the text is dependent on the browser). The result shows chart(s) on how long it takes the website to render, paint, etc. 

![Checking Performance of a website on Mozilla Filefox.](https://dev-to-uploads.s3.amazonaws.com/i/lfvc0em935vj89clzuhu.PNG)

For Google Chrome, you can use the audit tab to run analysis and get feedback on what to improve on the website.

![Setting up Audit on Google Chrome](https://dev-to-uploads.s3.amazonaws.com/i/8f0f8knymz0ghhirakuf.PNG)

![Result from Audit on Google Chrome](https://dev-to-uploads.s3.amazonaws.com/i/t653ot3dj90zvl48jl0z.PNG)

Udacity has two amazing courses - [Browswe Rendering Optimization](https://www.udacity.com/course/browser-rendering-optimization--ud860) and [Website Performance Optimization](https://www.udacity.com/course/website-performance-optimization--ud884) to help improve web application performance.

# Conclusion
As developers grow, we tend to use front-end frameworks for web development. These frameworks may use CLIs and scripts for web automation and tooling. This can be seen with the Angular CLI which has commands to help scaffold components, etc. This article is a solution for developers who are yet to start using frameworks or seeking fast and effective ways to scaffold web applications to be built on plain HTML, CSS, and JavaScript. Furthermore, there are quality documents, videos, and tutorials on how to set up processes to make our applications better such as [Progressive Web Application](https://developers.google.com/web/progressive-web-apps), [efficient web forms](https://developers.google.com/web/fundamentals/design-and-ux/input/forms), etc. This makes these processes easy to learn and apply.
Finally, we all at some points in our career, look back at previous challenges and laugh at how hard it took us to figure it out. Every aspect of life learning is like that, including front-end web development. Consistent learning, discipline, keeping to standards, and refusing to stay on the ground when we fail makes us better.

I will appreciate it if you can share the techniques you learned in your career that you would love to have known earlier.


# References
+ https://stackoverflow.com/a/235027/5765188
+ https://www.smashingmagazine.com/2016/06/harness-machines-productive-task-runners/
+ https://yeoman.io/
+ https://www.udacity.com/course/web-tooling-automation--ud892
+ https://www.udacity.com/course/version-control-with-git--ud123
+ https://github.com/andela/bestpractices/wiki/Git-naming-conventions-and-best-practices
+ https://www.udacity.com/course/website-performance-optimization--ud884
+ https://www.udacity.com/course/browser-rendering-optimization--ud860
+ https://www.vojtechruzicka.com/chrome-audit-lighthouse/