Posts

Showing posts from February, 2021

How JavaScript uses hashing

Image
  INTRODUCTION The aim of this blog is to explain what hashing is and what it is used for and also discuss what a hash table is and what the benefits of this data structure are. Moreover, identify and explain  the differences  between hashing and encryption. Since in JavaScript, Map objects are often implemented using hash tables will investigate what a Map object is and how it can be used. Lastly, compare objects and maps. In the comparison, referring to how hashing is used for each. What is hashing ? Hashing is the transformation of a string of characters into a generally more limited fixed-length value or key that represents the first string. Hashing is used to index and retrieve items in a database because it is faster to find the item using the shorter hashed key than to find it using the original value. It is also utilized in numerous encryption algorithms. Why do we use  hashing ? Hashing gives a safer and flexible method for recovering information compared wi...

Interfaces In Object Oriented Programming Languages and Prototype-Based Languages

Image
 INTRODUCTION The aim of this blog is to explain what an interface is and the benefits of using interfaces in OOP, moreover expand on  why JavaScript does not really use interfaces and how objects are created with JavaScript, and discuss how one could emulate interfaces using JavaScript, shed light on what what strict mode is in JavaScript and why one would use this. Furthermore, expand on the idea of TypeScript is and how it can be used to create interfaces  and enforce strict typing in JavaScript. Interfaces in Object Oriented Programming Languages An interface is a description of the actions that an object can do... for example when you flip a light switch, the light goes on, you don't care how, just that it does. In Object Oriented Programming, an Interface is a description of all functions that an object must have in order to be an "X". Again, as an example, anything that "ACTS LIKE" a light, should have a turn-on() method and a turn-off() method. The purpo...

Big O notation basics for web developers

Image
WHAT IS THE BIG O NOTATION? Big O notation is a mathematical notation that describes the limiting behaviour of a function when the argument tends towards a particular value or infinity. It is a member of a family of notations invented by Paul Bachmann, Edmund Landau, and others, collectively called Bachmann–Landau notation or asymptotic notation. WHY SHOULD YOU CARE? For a small app that processes little data, such analysis might be unnecessary. This is because the difference in the runtime of algorithms might have little impact on your app. For large applications that manipulate a large amount of data, this analysis is crucial. Because inefficient algorithms will create a significant impact on the processing time. With a good knowledge of Big-O notation, you can design algorithms for efficiency. Thus, you'll build apps that scale and save yourself a lot of potential headaches. For your coding interviews. Yeah, you heard me right. You are likely to get asked by an interviewer the r...

Concurrency in Web Development

Image
INTRODUCTION In this article, we will take a look at different models of concurrency, how to achieve them in various programming languages. Describes what concurrency is and briefly describes various methods of implementing concurrency, and how concurrency is implemented with Node.js, and the role asynchronous programming play in concurrency Moreover interrogating how are web APIs related to implementing concurrency? Also, what is the event-loop in JavaScript and how does it relate to concurrency? Lastly, compare the way Oracle and MongoDB support database concurrency. DESCRIPTION OF CONCURRENCY AND A BRIEF DESCRIPTION OF VARIOUS METHODS OF IMPLEMENTING CONCURRENCY   Concurrency means multiple computations are happening at the same time. Concurrency is everywhere in modern programming, whether we like it or not: Multiple computers in a network Multiple applications running on one computer Multiple processors in a computer (today, often multiple processor cores on a single chip) ...