Posted in Interesting, Open Source, Programming, Softwares, Web Tech

Web browsers and JavaScript engine

What is a JS engine?

A Javascript engine is a computer program that executes JS code in a web browser. The engine is developed by web browser vendors.

The first JavaScript engine was created by Brendan Eich in 1995 for the Netscape Navigator web browser. This has evolved to be known as SpiderMonkey engine used by Firefox.

In general, JS engines are also known as ECMAScript engines. As many web browsers there are, so are the JS engines.

  • Google chrome has V8 engine.
  • Mozilla Firefox has SpiderMonkey
  • Microsoft Edge and Internet Explorer has Chakra
  • Apple Safari has JavaScriptCore
  • Opera has Carakan(pronounced Tsharakan)

Each JS engine works in a more or less similar fashion. But, the most popular being V8 engine which used in Chrome and Node.js .

 

Posted in Interesting, Softwares

SOS Save Our Soul

In general, SOS is a Morse code signal used internationally to indicate distress. This was originally used for maritime industry. Now a days, we see the SOS as one of the feature in mobile devices such as smartphones and smartwatches.

To use the SOS feature user can set up a list of emergency contacts. Most of the mobile device vendors have this feature enabled on press of power button. In case of emergency situation, when power button is pressed continuously certain number of times, quick alert is sent to user’s contacts about the distress or panic.

Posted in Interesting, Open Source, Programming, Softwares, Web Tech

Code Linting

What does linting mean?

Linting in software world means analyzing the developed source code for potential errors and warnings such as syntactical, logical (which might have got introduced without the knowledge of a developer) with the help of a program. The program is called as a lint or linter.

Why is linting important?

This mechanism of running lint ensures that the code is bug free and adheres coding guidelines of a particular language. This also helps in maintaining code quality reducing technical debt incurred.

Each language has its own linting tools. For eg. Javascript has JSLint, JSHint, ESLint etc.

  • JSLint is a static code analyser which checks if code complies JS coding rules. Its available on jslint.com. The CLI is also available. It was created by Douglas Crockford in the year 2002.
  • JSHint was created by Anton Kovalyov in the year 2011 and is a fork of Duoglas Crockford JSLint project. Anton thought that JSLint was “too opinionated and less configurable”. Both, online jshint.com and CLI versions  are available for this.
  • ESLint was created by Nicholas Zakas in the year 2013 as a static analysis tool which identifies problematic patterns in javascript. This tool is an advanced version of JSLint and JSHint. ESLint covers both code quality and coding style issues which were not covered by JSLint and JSHint. It supports current ECMAScript standards.Online available on eslint.org and as of March 2019 ESLint is a part of OpenJS foundation. Companies such as JetBrains has integrated support for ESLint in their WebStorm code editor and Facebook has published official ESLint plugin for React projects.
Posted in Interesting, Open Source, Web Tech

Web Accessibility

Ever wondered how a person with a impaired sight would be accessing the new era’s human peripherals. Hmmn…Human peripherals…?

Yeah! I am talking about the electronic gadgets most importantly our smartphones and apps on it. Do they have a difficulty in using technology? Does the web or gadget industry consider such special cases and provide features? Web is built and designed to work universally for everyone. Isn’t it? So is web accessibility.

What is web accessibility?
In simple words, web accessibility is a way to ensure that technology which is available in various forms of tools, websites, apps etc can be accessed universally even by people with disabilities.

To address this, W3C – World Wide Web Consortium considering different technologies and tools involved in building an application has come up with WAI – Web Accessibility Initiative.

WAI develops specifications, guidelines and supporting resources that describe accessibility solutions. These are considered international standards for web accessibility. WAI is an initiative to help people with disabilities that affect access to the Web, including:

  • auditory
  • cognitive
  • neurological
  • physical
  • speech
  • visual

In some nations, web accessibility is compulsory by law. Though this initiative of web accessibility was begun years back and websites/apps are built at a faster rate but somewhere only a minor percentage have the full web accessibility features.  Hopefully, future has more to inclusion! Because, everybody is good at something.

Posted in Interesting, Open Source, Programming, Web Tech

Spaghetti code

Imagine a bowl of cooked spaghetti and you manage to take a few of its strands on a fork. Unfortunately, few fall back to bowl. Now, trying to search for which is the longest string or the start point of it. Quite a task. Isn’t it? Analogically, this is what happens when we have a spaghetti code.

What is spaghetti code?

Spaghetti code, as the name says it is an unstructured, complex and tangled nature of  source code which is troublesome to maintain and comprehend for fellow programmers.

How does it get introduced?

Not implying the design patterns expected for a programming language per se.

The code starts simple but as and when new features get appended for the sake of scalability not understanding the existing code can introduce redundant code and looping/jumping of program from one to other, back and forth. Also if multiple developers work simultaneously problem can be worse.

Overuse of workarounds to serve the purpose of functionality for time being and never refactoring it.

Is spaghetti code avoidable?

Yes. It is definitely avoidable as a developers if we use more readable variables and provide comments to make it comprehensible.

Before beginning writing new feature understand what the existing code does and is it possible to tweak it a little bit to improvise new feature.

If there is a reusable code block its a good practice to isolate it in a function construct and make a call from other code block on need basis.

 

 

 

 

 

Posted in Interesting, Programming, Softwares

Log Off, Shut Down and Restart – Dig the difference

We use these terms log off, shut down, restart on a daily basis, especially when you call the customer care to troubleshoot a puzzling issue with your computer or mobile devices. But, for a layman these words may sound perplexing. So, lets get started to lessen the oblivion and understand the differences.

To log off a computer means to end the currently logged in session to make it available for other user who may have his/her own account or continue to use admin account, whichever user has access to while the system is still in running mode.

Shut down terminates all the running processes and services completely. Even the power of the computer is turned down.  Shut down performs POST (Power On Self Test) operation which is primarily to verify whether the hardware is working as per expectation, before handing control to the system to load OS.

Restart stops processes relevant to OS, while hardware- CPU, RAM are still running and powers on the computer on its own. Unlike shut down, it does not perform POST. Restart is required specifically during software installation/uninstallation and troubleshooting.

Posted in Interesting, Poetics

मन मंदिरा… तेजाने Oh the temple of mind… enlight

मन मंदिरा… तेजाने उजळून घेई साधका

Oh the temple of mind… enlight the seeker with the divinity of radiance

संवेदना… संवादे सहवेदना… जपताना

Being empathetic and compassionate in this discourse

तळहाताच्या रेषांनी सहज सुखा का भोगी कुणी?

Does anyone procure spontaneous happiness according to lines of one’s palms?

स्वयंप्रकाशी तू तारा… चैतन्याचा गाभारा

A self-illuminating star, you are… resembling exuberance filled in the inner temple

भर पंखातून स्वप्न उद्याचे झेप घे रे पाखरा

Oh little bird, fill the wings with the dreams of tomorrow and take a high flight