Some Things You Need To Know To Be A Best Web Developer

Sourav Sarkar Emon
4 min readNov 5, 2020
Things you need to know to be the best

There are so many people around the world are web developers, but all of them are best? Who doesn’t want to be best.

In this article I am going to talk about some things that gonna make your skill more advance. And you will be one step advance to be the best. There are some tricky things in web development that every developer must should know. Like cross browser testing, event loop in javascript, try…catch syntax, etc. If you know how this things are and how this things work then you are one step ahead from the other developers.

Event Loop In JavaScript

event loop in js

We know javascript is a combination of synchronous and asynchronous events. Synchronous is being one after another other hand asynchronous is a thing like callbacks or promises.

Javascript is a single-threaded programming language. It means there’s only one thread that does all of the work. Events are stack in event queue. When single events are done executing. It goes through the skew of events and executes them until they are empty. In these skew of events some events has callback of another function or some of events has set time out of 3–5minutes. Then what should we do now. We don't gonna wait for the events to complete in 5minutes. There the event loop comes. While the event loop is not empty pull out the first item from event queue and execute it. This loop continuously work until there isn’t anything left in the event stack.

So basically event queue is like a to-do list for the thread and event loop is a thread is continuously checking this to-do list and doing those thing until there’s anything left.

The “try…catch” syntax

try…catch syntax

By the “try…catch” syntax we can run a code in try block and if any error occurs then try execution will stop and we can simply catch the error the catch block. If there are no error occurs the catch(err) will be ignored. Here’s a simple example:

try{    //your code} catch(error) {    //handle error}

Conditions where “try…catch” syntax work:

  1. “try…catch” only works for runtime errors
  2. “try…catch” works synchronously

Cross Browser Testing

There are thousand of web browser and its version are available in internet. Cross browser testing is the practice of making sure that the web sites and web apps you create work across an acceptable number of web browsers.

To be the best as a web developer you need to be perfect from all corners. Cross browser testing is one of the corner.

Why cross browser issue occurs?

  1. Outdated Browser Detection: It is the most common problem for cross browser issue.
  2. HTML/CSS Validation: Validation of HTML and CSS codes can pose major problems for developers during cross browser testing.
  3. Vendor Specific Functions: Developers must take note that while creating features/functionalities, they have to use specific code in CSS, depending on which browser they are designing for.
  4. Layout Compability: By applying CSS Resets, developers often remove the default design in browsers and apply their own.
  5. DOCTYPE error: This usually involves some kind of faulty rendering due to missing a basic line in the code.

How to solve these issues

  1. Use Modernizer, a set of superfast test that compaitable all browsers feature.
  2. Use code Validating tools for HTML and CSS.
  3. Use the right prefix for the selected browser. here’s the right prefixes :
  • Safari and Chrome (-webkit)
  • Internet Explorer (-ms)
  • Mozilla Firefox (-moz)
  • Opera (-o)

4. Use CSS Flexbox or CSS Grids for the modern browsers.

5. Start with ‘ !DOCTYPE HTML ’ in the HTML code.

Don’t ever think you can’t do something and be the best.

If any developer knows this tips and tricks then he is one step ahead from the other beginner developers. I hope this short article has influenced you in a positive way.

--

--