Posts

What are CJS, AMD, UMD, and ESM in Javascript?

  CJS CJS is short for CommonJS. Here is what it looks like: //importing const doSomething = require('./doSomething.js'); //exporting module.exports = function doSomething(n) { // do something } Some of you may immediately recognize CJS syntax from node. That's because node uses CJS module format. CJS imports module synchronously. You can import from a library   node_modules   or local dir. Either by   const myLocalModule = require('./some/local/file.js')   or   var React = require('react');   works. When CJS imports, it will give you a   copy   of the imported object. CJS will not work in the browser. It will have to be transpiled and bundled. AMD AMD stands for Asynchronous Module Definition. Here is a sample code: define(['dep1', 'dep2'], function (dep1, dep2) {     //Define the module value by returning a value.     return function () {}; }); or // "simplified CommonJS wrapping" https://requirejs.org/docs/whyamd.h...

Microsoft Azure Certification Path 2020

Image
Role Based Azure certifications: The introduction of role-based certifications has created a simple learning road map from the fundamental stage to the associate stage and lastly to the expert stage. Microsoft Azure is offering below mentioned role-based certifications for different levels, which include: Azure Fundamentals Azure Administrator Associate Azure Developer Associate Azure Solutions Architect Expert Azure DevOps Engineer Expert Azure Security Engineer Associate Azure Data Engineer Associate Azure AI Engineer Associate Azure Data Scientist Associate Azure IoT Developer Azure Architect for SAP Workloads Why do you Need Azure Certification? Certification demonstrates your skill and level of expertise in handling the complexities of Azure. Companies all over the world are looking for Azure certified professionals & with good paychecks. There are different certifications available in Azure, choose the one which suits you based on your level of expertise and b...

What is Jenkins Pipeline & Its Best Practices

What is a Jenkins pipeline? A pipeline is a collection of jobs that brings the software from version control into the hands of the end users by using automation tools. It is a feature used to  incorporate continuous delivery  in software development workflow. Pipeline Concepts The below fundamentals are common to both, scripted and declarative pipeline: 1.     Pipeline:  A user-defined block which contains all the stages. It is a key part of declarative pipeline syntax. 2.     Node:  A node is a machine that executes an entire workflow. It is a key part of the scripted pipeline syntax. 3.     Agent:  instructs Jenkins to allocate an executor for the builds. It is defined for an entire pipeline or a specific stage. It has the following parameters: ·        Any : Runs pipeline/ stage on any available agent ·       None : applied at the root of the pipeline, ...

Dotnet Core CLI useful commands

Image
  .NET Core command-line interface (CLI) is a cross-platform toolchain for developing, building, running, and publishing .NET Core applications. It comes handy when using Visual Studio Code (lightweight IDE for developers)  Basic Commands : new - create new item based on template. dotnet new [console|classlib|web|mvc|angular|react|webapi] build - build the solution or project dotnet build clean - clean the output directory of the  project. publish - publish the application and it dependencies to folder for deployment run - start the application or project sln - lists or modify solution file, for e.g. adding or deleting a project  dotnet sln add <project_files> dotnet sln remove <project_files>  test - dotnet test driver to execute unit tests help - to get more detailed information on any command

Assemblies: locating, binding and deploying

Image
Introduction This article describes how the CLR locates and binds assemblies and how to change the default behavior when needed (e.g. in the deployment stage). Any developer and system administrator who deals with .NET assemblies, especially commercial applications, must be familiar with these topics. This knowledge is the best way to plan for service packs, upgrades and hot fixes as they come along. The .NET Framework is loaded (almost inflated) with a bunch of terms and features related to assembly deployment, locating and binding. Here is a short list: Static and dynamic loading Public and private GAC and private folder Probing Codebase BindingRedirect App.Config and Machine.config Strongly named and weakly named DevelopmentMode Audience The article is not at the beginner level, readers with basic knowledge in configuration files and assembly structure can also benefit from it right in the first reading. The quest for type resolving The CLR – Common Language...

Cracking C# Interview Questions Part One

Most asked questions:  Explain the difference between abstract class and interface. Constructors: What is Static Constructor? Static constructor is used to initialize static data members as soon as the class is referenced for first time. Static constructor does not take access modifiers and or have any parameter and cannot access any non-static data member of class. Whereas the instance constructor is used to initialize instance member of object of class. It is called whenever a new object is created ( either explicitly or implicitly). Inheritance: Are private data members inherited? Yes, but they cannot be accessed by child class methods. What are Delegates? A delegate in C# allows us to pass a method of a class to object of another class that can call these methods. It is alias of function pointer in C++.

What most programmers need to learn - Basics of Programming

The main thing programmers need to learn is self discipline. The discipline to always write the clearest code you can, the discipline to re factor code if it becomes muddy through changes later in development, the discipline to remove unused code and add comments. What you think is important in being a good programmer and the usual answer is code should be clear, understandable and maintainable. But it is very rare to actually consistently follow through with that. Keeping this in mind requires self discipline, because it means not stopping "when it works". If all the variables would have the wrong name the code could still function perfectly, but the code would be super confusing. The step from functional code to clear code brings very little reward in the short term: it worked already and after cleaning it up it still works. That is why discipline is required to take this step.  Let me give a few examples of the kinds of things I often see in code written by starting progra...