Book

Start With Why (Reading Notes)

Posted on

Book by Simon Sinek. Audio Book: https://youtu.be/iTcktDL8vjY Book: https://amzn.to/2JvEtf9 Part I – The World That Doesn’t Start With Why 1. Assume You Know When things go right, do we really know why or we assume we know why? When things go wrong, is it because incorrect assumptions led us to wrong decisions? More information and data are key for good decision making. 2. Carrot and Stick Manipulation vs Inspiration Many product/service options for same price, same quality, same level of services, same feature. First movers advantages are lost in matter of months. Most companies don’t know why their customers are their customers, or their employers are their employers. So, assumptions drive their business. Two ways to influence human behavior: manipulation or inspiration. […]

Azure

Deploying DACPAC as new database in Azure

Posted on

The following powershell script can be used to deploy a DACPAC file to a new (or replace an existing) database in Azure.

Notice that Azure and SQL credentials are not taken as parameter, but instead the  Get-Credential command is called. It works well in desktop, but not necessarily as an automated script without human intervention. The code can be easily modified for that purpose, though. The script above can be executed with the following command:

   

Technology

Working with Azure Data Factory Pipelines

Posted on

I am often tasked with automating tasks related to managing Azure Data Factory (ADF) pipelines. I am documenting below the PowerShell commands I frequently use to achieve the results I expect. Retrieve pipelines from a given factory

If you have multiple factories, you can append the results of another call in the same result variable

Similarly, there are commands to retrieve datasets and linked services

The hierarchy of ADF pipelines goes as follow (there may be variations to this pattern that I am not aware): Factory → Pipelines → Activities → DataSets → LinkedServices Looping on the hierarchy:

Much of the information retrieved by these commands are in complex types. Most of them contains a Type property […]

Technology

Service Health Check

Posted on

I spent some time back in Feb 2017 to implement a service health check for our WCF services. The idea was to attach a new endpoint for every real service endpoint, where the new endpoint would give a standard health check information. So, if you knew the service endpoint, the health check endpoint would be easily discovered from that. Microsoft has just released the Azure Monitor that provides monitoring telemetry for all cloud resources. Another tool for the toolbox! https://azure.microsoft.com/en-us/blog/announcing-the-general-availability-of-azure-monitor/

Technology

Service Fabric Introduction

Posted on

Service Fabric is a distributed system platform that abstracts out much of the complexity of packaging, deploying and managing scale and reliable applications. There are plenty of cool online material that provide introduction on Service Bus, including videos. I will not repeat them myself, but instead provide links and a brief description about them. https://docs.microsoft.com/en-us/azure/service-fabric/ Landing page for SF documentation https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-overview 7-min long introduction with links to a couple of videos https://azure.microsoft.com/en-us/resources/videos/index/?services=service-fabric Lots of videos about SF https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-create-your-first-application-in-visual-studio Hello World!?! No, finally somebody created a simple example that is not called Hello World.

Technology

Hashing Source Code Files

Posted on

You can match source files and binaries by hashing the source code: “might be useful for tracking, processing and controlling source code files that have a strong linkage to the specific executable files, resulting in a higher level of end-user confidence in the executable files.” https://msdn.microsoft.com/en-us/magazine/mt795185

Technology

Temporal Tables – Soft Updates

Posted on

Just read an interesting article about soft updates. It seems that SQL Server 2016 has a new feature to enable temporal tables: SYSTEM_VERSIONING. For those who don’t know, temporal databases maintain multiple copies of each piece of data instead of only storing the data that’s true at the current time. Why do I want this: this approach maintain the entire history of the data, including updates and delete information. Data mining anyone? Auditing anyone? How have we done this in the past? I have seen DBAs creating tools to maintain the database schema. Those tools generate SQL scripts that are executed in SQL Server to create and to update the tables. In addition, the tools would create an aggregate table (appended with _History […]

Technology

General Mobile Development Reading List

Posted on

http://www.discoversdk.com/blog/ionic-2-vs-reactnative-vs-nativescript A comparison among Ionic 2, NativeScript and ReactScript from Feb 2017. Pros and cons of each tool is available on the page. https://www.codementor.io/fmcorz/react-native-vs-ionic-du1087rsw This is a slightly older article (Aug 2016) that compares React Native and Ionic, focusing on development process, testing, community, etc. The author doesn’t choose the better tool, but instead indicates his favorite: React Native. https://medium.com/react-id/ionic-framework-hybrid-app-vs-react-native-4facdd93f690#.zek9fvi1g This article also compares Ionic and Reatic Native, but focus more on app performance and size. The author indicates React Native as a better choice.

Technology

Async/Await best practices

Posted on

Here are some best practices on async/await programing model based on reading from: Async/Await – Best Practices in Asynchronous Programming TPL and async/await Best Practices for the Busy Developer Use ‘async Task’ or ‘async Task<T>’ instead of ‘async void’. Why? Primarily because of error-handling semantics. When using ‘async void’, any exception thrown will be raised directly on the SynchronizationContext that was active when the async void method started. When using ‘async Task’, exception is captured and plated on the Task object. The exception is asynchronous event handlers, which must regturn void (ex: ICommand.Execute implementations)

Async code works best if it goes all the way from bottom up (or top down). That means that you shouldn’t mix synchronous and asynchronous […]

Technology

WPF UI Responsiveness

Posted on

All window objects are associated with the dispatcher where it has been created. Golden rules: Any UI element must be touched from the same UI thread that created it Don’t block the UI thread How to execute slow work then? In summary, perform slow work asynchronously update the UI using the Dispatcher.BeginInvoke Example:

  DispatcherPriority list …. Windows forms way: