Debugging TypeScript with Google Chrome and Node

To debug TypeScript using Visual Studio Code, install the Debugger for Chrome, located at: https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome: You will see the message: The debugger will now be installed: Let’s say in our environment we have: A folder called TS with TypeScript files A TS file called HelloWorld.ts Like below: And we have an index.html page which calls the HelloWorld.ts file: Now, update your tsconfig.json file like below: And the launch.json file: Now, if … Continue reading Debugging TypeScript with Google Chrome and Node

Installing TypeScript for Visual Studio Code

Visual Studio Code has support for the TypeScript language. To use it, create a new file with TypeScript code in Visual Studio Code: And save the file, we will see TypeScript as an option: We can see Visual Studio Code has TypeScript Intellisense: Visual Studio Code does not include the TypeScript Compiler (tsc). To install it using the Visual Studio Code terminal, type: npm install -g typescript You will see … Continue reading Installing TypeScript for Visual Studio Code

Scrum Daily Standup

The Scrum daily standup is a meeting that takes place each day of a sprint. The meeting is attended by the Scrum Master, Product Owner, and all team members. Other non-team members can attend the meeting in order to listen. The idea of standing up during the meeting is to ensure people don’t get too comfortable, which would lead to meeting inefficiencies such as one person dominating the meeting and … Continue reading Scrum Daily Standup

Installing TypeScript on Node

To install TypeScript on Node, run the command: npm install -g typescript Now let’s create a new TypeScript file. First create a directory for our TypeScript project called TS, and create a new file HelloWorld.ts: Run the TypeScript compiler command: tsc HelloWorld.ts This will create a new js file: With JavaScript code:  

Introduction to TypeScript

TypeScript is a superset of JavaScript developed by Microsoft that supports classes, modules and interfaces, along with several other features. It is a static type language, meaning it will validate code at development time. JavaScipt is a dynamic language, which does not validate code at development time. Having a static type language is very useful for building robust code. To try out TypeScript online, go to www.typescriptlang.org and select Playground: You will … Continue reading Introduction to TypeScript

JavaScript setTimeout and setInterval

In JavaScript, we can use setTimeout() to call a function after waiting for a specified number of milliseconds. We can provide a callback function to as well as the timeout as parameters. For example, let’s say we want to print to the console “Hello World” after waiting 2 seconds. To do this: setTimeout(function(){ console.log(“Hello World”); }, 2000); This will wait for 2 seconds before printing to the console: If we … Continue reading JavaScript setTimeout and setInterval

Dependency Inversion Principle

Dependency Inversion Principle (DIP) is a software development principle that reduces coupling between code. Robert C Martin explains DIP: High-level modules should not depend on low-level modules. Both should depend on abstractions. Abstractions should not depend on details. Details should depend on abstractions. Consider if you have an object that calls another object. The higher level object is dependent on the lower level object; making changes to the lower level object … Continue reading Dependency Inversion Principle

Don’t Repeat Yourself

Don’t Repeat Yourself (DRY) is a software development principle that prevents waste through the repetition of code. When code is designed and developed, it should be abstract. As a result of abstraction, the code is easier to maintain and extend. Smarter code leads to less code waste, which leads to better software. Imagine if you find a bug in one part of your code, and the bug is repeated in … Continue reading Don’t Repeat Yourself

Separation of Concerns

Separations of Concerns (Soc) is a design principle in software development. The idea is to separate code based on the function and logic. A typical example is the separation of code that performs business logic, and the code that displays this to the user. This code should exist independently; if a developer were to write code that performed both these functions together, it would be a violation of the principle. … Continue reading Separation of Concerns

C# Using the BackgroundWorker

The background worker in the .NET Framework is used to run background operations in a background thread. This is useful if you don’t want to tie up your user interface while an operation completes, such as downloading a large file. The background worker exposes events ProgressChanged and RunWorkerCompleted, which are useful to display progress to the user in a UI scenario. In this example, we will create a WPF form … Continue reading C# Using the BackgroundWorker