Debounce and throttle function calls in JavaScript
Overview Looking at debouncing and throttling function calls in JavaScript. My source code on StackBlitz.com. Because I am using global variables to keep track of the state, the function debounce()...
View ArticleQuick Moq Reminder
LinksC# Writing unit tests with NUnit and MoqMock.Of() and Mock.Get() in Moq Code Sample using System; using Microsoft.VisualStudio.TestTools.UnitTesting; /// ///...
View ArticleRepository pattern versus Service layer
What is the difference between the repository pattern and the service layer concept ? Repository A Repository is a facade for persistence that implement CRUD access to data/object.Martin Fowler's...
View ArticleUsing Azure Container Instance (ACI) to run a console container job using...
Overview The PowerShell script below uses the Azure CLI, and start the container jrottenberg/ffmpeg and execute the console app ffmpeg that will extract a thumb nail for an mp4 file. Both file names...
View ArticleHow to test a Javascript async function returning a promise with Jest
Overview Testing JavaScript asynchronous function with Jest. Reminders:A JavaScript asynchronous function always return a promiseWhen an JavaScript asynchronous function throw an exception, the...
View ArticleCloud back end architecture patterns
Overview Concepts related to cloud back end architecture TermsCQRS (Command Query Responsibility Segregation)CQRS Martin FowlerCQS - Command–query separationMicros ServicesPattern: Microservice...
View ArticleHow to revert a PR with Git ? (reminder)
Find the PR you want to revert - Copy the hash git checkout develop git pull git checkout -b new-branch-name git revert -m 1 hash # The default editor will open git push -u origin new-branch-name...
View ArticleHow to upgrade all package to the last version on package.json
See How do I update each dependency in package.json to the latest version?
View ArticleReact, Redux and Jest useful links
ReactNone ReduxRedux Workflow - SummaryReasons to learn Redux as a JavaScript DeveloperHow to create and register a React redux middleware? JestJest Cheat SheetHow to test a Javascript async function...
View ArticleBoston Code Camp 31 - My Summary
Boston Code Camp 31 Web Site ~ Twitter FeedCreating Docker images with .NET Core debugging. Visual Studio 2017 debug configuration for docker is not good. James Pansarasa present how to setup the...
View Articlejavascript destructuring in function parameters
Reminder that Javascript destructuring is more powerful that it looks likeMozilla Documentation about Destructuring assignment. Sampleconst theKey = 'key'; function f( { a: { b, // 'theDefaultValue' is...
View ArticleGit -- How to compare if a file was changed in the last commit
git diff --unified=0 HEAD~1 HEAD src\myFile.js
View ArticleHow to reset the password of the ftp user for an Azure App Service
In the left section click on the followingDeployment Deployment CenterFTP TilsDashBoard ButtonUser Credentials Tab
View ArticleHow to transpile a js file from the command line with babel
const f = () => { // < Should be transpiled const a = { a:1 }; const b = { ...a }; // < Should be transpiled console.log('f running '+ JSON.stringify(b)); }; f(); Command Line npx babel a.js...
View ArticleIssue with Curl posting some json data on windows
Overview If you are testing your api with Curl, you should be aware of this issue, escaping double quote in JSON data. Problem Most of the documentation and blog on the InterWeb, mention the...
View ArticleC# async method returning multiple parameters
Overview C# 7 now supports function and method that return multiple values. The reasons why I like it areOutput parameter require more code to write and do not make the code easier to readThe other...
View ArticleHow to send a message to a Microsoft Teams Channel with Curl
Create a channelAdd the connector "Incoming Webhook"Get the connector URLset...
View ArticleDifference between JavaScript Engines
Spread operator JavaScriptCore the JavaScript engine in SAFARI Mac Os and iOS as well as in Chrome iOS implements the spread operator differently than V8 (Chrome) or Spider Monkey (Firefox). o1 = {...
View ArticleAbout React 16
Links related to learn what is new with React 16Introducing HooksHow Are Function Components Different from ClassesHow I ruined my application performances by using React context instead of ReduxPure...
View Article
More Pages to Explore .....