@manhng

Welcome to my blog!

Asynchronous Programming Best Practies

April 23, 2021 13:44

Asynchronous Programming (edit)

Async/Await - Best Practices in Asynchronous Programming | Microsoft Docs (HAY HAY HAY)

Best practices in .Net asynchronous programming | InfoWorld (HAY HAY HAY)

Devops best practices: How to drive agility and operational excellence | InfoWorld

AppVeyor & Azure DevOps

AppVeyor: Tích hợp liên tục cho các nhà phát triển bận rộn

AppVeyor tự động hóa việc xây dựng, thử nghiệm và triển khai các ứng dụng .NET giúp nhóm của bạn tập trung vào việc cung cấp các ứng dụng tuyệt vời.

Login - AppVeyor

Các tính năng chính:

  • Không cần thiết lập hoặc bảo trì
  • Cấu hình xây dựng thân thiện với nhà phát triển bằng UI hoặc YAML
  • Xây dựng nhanh trên phần cứng chuyên dụng với ổ SSD
  • Xây dựng nhiều chi nhánh
  • Nhân viên và hỗ trợ cộng đồng
  • Trả giá khi bạn đi

Các phần mềm tương tự AppVeyor:

GitHub - ariya/karma-appveyor: Karma AppVeyor integration demo

BenchmarkDotNet

Powerful .NET library for benchmarking

GitHub - dotnet/BenchmarkDotNet: Powerful .NET library for benchmarking

Generate PDF Files

How to Generate PDF Files in Python with Xhtml2pdf, WeasyPrint or Unoconv - Gearheart

Creating PDF Reports with Pandas, Jinja and WeasyPrint - Practical Business Python (pbpython.com)

6 Things to Do Before You Outsource Web Development - Gearheart

Azure DevOps

Dịch vụ cho các nhóm chia sẻ mã, theo dõi công việc và gửi phần mềm cho bất kỳ ngôn ngữ nào. Đó là sự bổ sung hoàn hảo cho IDE của bạn.

Công cụ triển khai phần mềm hàng đầu: 25 công cụ hữu ích để hợp lý hóa việc phân phối cài đặt phần mềm - Danh Võ (danhvo.net)

CSS

  • Typography

  • Blueprint CSS

Avoid mixing asynchronous and synchronous code

You should never have a mix of synchronous and asynchronous code. It is a bad programming practice to block on async code by making calls to Task.Wait or Task.Result. I would recommend using async code end to end – it is the safest way to avoid errors from creeping in.

You can avoid deadlocks by using .ConfigureAwait(continueOnCapturedContext: false) whenever you make a call to await. If you don't use this, the async method would block at the point where await has been called. In this case you are just informing the awaiter not to capture the current context. I would say that it is a good practice to use .ConfigureAwait(false) unless you have a specific reason to not use it.

I would discuss more on asynchronous programming in my future blog posts here. For more information on best practices in asynchronous programming, you can refer to Stephen Cleary's great article at MSDN.

Code Coverage:

Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)

GitHub - FortuneN/FineCodeCoverage: Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)

FineCodeCoverage 1.1.144 - AppVeyor

Best Practices:

How to use SortedDictionary, SortedList, and SortedSet in C# | InfoWorld

How to benchmark C# code using BenchmarkDotNet | InfoWorld

How to work with Quartz.Net in C# | InfoWorld

How to use Moq to ease unit testing in C# | InfoWorld

How to perform lazy initialization in C# | InfoWorld

How to work with reflection in C# | InfoWorld

How to avoid temporal coupling in C# | InfoWorld

7 best practices for remote development teams | InfoWorld

You can explore a demo ASP.NET Core application that illustrates several ways to benchmark the code. You can get the application from the ASP.NET repo on GitHub. 

How to do more in C#: 

Azure DevOps

May 13, 2020 09:24

Azure DevOps (edit)

https://www.microsoft.com/en-sg/apac/appswebinar

Azure DevOps helps teams to plan work, collaborate on code development, and build and deploy applications. You can implement DevOps practices like continuous integration and continuous delivery (CI/CD), infrastructure as code, and continuous monitoring – for any application irrespective of whether the app uses virtual machines, web apps, or Kubernetes. In this session, we will walk you through the Azure DevOps Services including Azure Boards, Azure Repos and Azure Pipelines. We will cover how you can easily setup a CI/CD pipeline to build a Node.JS app to a docker container image and run it on Azure Kubernetes Service

In this session, you will discover:

  • Azure DevOps helps team plan smarter, collaborate better, and ship faster with a set of modern dev services
  • With Azure Pipelines you can easily set up automated pipelines to build, test, and deploy your code to any platform
  • Azure DevOps is fully cloud-hosted. You can build web, desktop or mobile applications across Windows, Linux or macOS

https://www.microsoft.com/en-sg/apac/appswebinar

Developing Microservices Directly in Kubernetes/AKS

Azure DevOps 2019

November 6, 2019 16:29

Azure DevOps Service 2019 & Azure DevOps Server 2019 (edit)​

https://docs.microsoft.com/en-us/azure/devops/organizations/security/access-levels?view=azure-devops

https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/manage-users-table-view?view=azure-devops&tabs=browser

  • Stakeholder: Provides partial access, can be assigned to unlimited users for free. Assign to users with no license or subscriptions who need access to a limited set of features.
  • Basic: Provides access to most features. Assign to users with a Visual Studio Professional subscription, an Azure DevOps Server CAL, and to users for whom you're paying for Basic access in an organization.

Default permissions and access for Azure DevOps

To use Azure DevOps features, users must be added to a security group with the appropriate permissions and granted access to the web portal. Limitations to select features are based on the access level and security group to which a user is assigned. The Basic access level and higher supports full access to all Azure Boards features. Stakeholder access level provides partial support to select features, allowing users to view and modify work items, but not use all features. Stakeholder access is available to support free access to a limited set of features by an unlimited set of stakeholders.

The most common built-in security groups—Readers, Contributors, and Project Administrators— and team administrator role grant permissions to specific features.

In general, use the following guidance when assign users to an access level and security group:

  • Grant Basic access or higher and add to the Contributors security group full-time workers who contribute to the code base or manage projects.
  • Grant Stakeholder access and add to the Contributors security group managers or users who don't actively contribute to the code base but want to check project status and provide direction, feedback, feature ideas, and business alignment to a team.
  • Grant Stakeholder access and add to the Project Administrators security group users tasked with managing project resources. If they also need to contribute to the code base, then you must assign them Basic or higher-level access.
  • Grant Stakeholder access and add to the Project Collection Administrators security group users tasked with managing organization or collection resources. If they also need to contribute to the code base, then you must assign them Basic or higher-level access.

Security in Azure DevOps (formerly called VSTS)

https://www.dotnetcurry.com/devops/1496/azure-devops-security

Azure DevOps organization once created is free forever up to 5 (Basic) users. The users can be with various Access Levels - Basic, Stakeholders and Visual Studio Subscription.

azure-devops-access-levels

Figure 7: Access Levels in Azure DevOps

Stakeholder: it is similar to read-only view for Azure DevOps. We can add as many users with this access as required (no restriction to number of users). The users can view the project status, but cannot contribute to code. They can provide feedback for the project

Basic: these users can contribute to code and manage projects

Visual Studio Subscription: the users who already have Visual Studio subscription for Professional, Test Professional or Enterprise. These will get access as per their subscription.

Repos - Azure DevOps

November 3, 2019 10:48

Repos - Azure DevOps (edit)

https://azure.microsoft.com/en-us/services/devops/repos/

Clone:

https://docs.microsoft.com/vi-vn/azure/devops/organizations/public/clone-git-repo-public?view=azure-devops&viewFallbackFrom=vsts

https://docs.microsoft.com/en-us/azure/devops/user-guide/code-with-git?view=azure-devops

Setup Git:

https://docs.microsoft.com/en-us/azure/devops/learn/git/install-and-set-up-git

SqlLocalDB

December 7, 2018 09:07

Cách sử dụng SqlLocalDB (edit)

https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-ver15

https://docs.microsoft.com/en-us/sql/tools/sqllocaldb-utility?view=sql-server-2017

https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/working-with-sql?view=aspnetcore-2.2

https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/working-with-sql?view=aspnetcore-2.2&tabs=visual-studio

https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2012/ms233817(v=vs.110)

Express

SELECT @@VERSION
Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64)   Sep 24 2019 13:48:23   Copyright (C) 2019 Microsoft Corporation  Express Edition (64-bit) on Windows 10 Pro 10.0 <X64> (Build 19042: )

LocalDB

C:\Program Files\Microsoft SQL Server\150\Tools\Binn\SqlLocalDB.exe

SELECT @@VERSION
Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64)   Sep 24 2019 13:48:23   Copyright (C) 2019 Microsoft Corporation  Express Edition (64-bit) on Windows 10 Pro 10.0 <X64> (Build 19042: )

Guide: Start > Run > CMD

> SqlLocalDB.exe info
> SqlLocalDB.exe info v11.0
> SqlLocalDB.exe info MSSQLLocalDB
> sqllocaldb start

SQL Express 2012: (localdb)\v11.0

SQL Express 2014: (LocalDB)\MSSQLLocalDB

(localdb)\v11.0
(localdb)\MSSQLLocalDB

MVC Nerddinner, MVC Music Store

Visual Studio 2017, ASP.NET, Azure DevOps, and other Azure services

https://techbash.com/

Categories

Recent posts